Improve pf layer
[csit.git] / resources / libraries / robot / features / gbp.robot
index 78f9251..fc1c9fa 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (c) 2019 Cisco and/or its affiliates.
+# Copyright (c) 2020 Cisco and/or its affiliates.
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
 # You may obtain a copy of the License at:
 
 *** Settings ***
 | Library | resources.libraries.python.GBP
-| ...
-| Documentation | GBP keywords
+|
+| Documentation | GBP keywords.
 
 *** Keywords ***
 | Initialize GBP routing domains on node
 | | [Documentation]
 | | ... | Initialize GBP routing domains on node.
-| | ...
+| |
 | | ... | *Arguments:*
 | | ... | - dut - DUT node. Type: string
 | | ... | - count - Number of baseline interface variables. Type: integer
-| | ...
+| |
 | | ... | *Example:*
-| | ...
+| |
 | | ... | \| Initialize GBP routing domains on node \| DUT1 \| 1 \|
-| | ...
+| |
 | | [Arguments] | ${dut} | ${count}=${1}
-| | ...
-| | ${dut_str}= | Convert To Lowercase | ${dut}
-| | :FOR | ${id} | IN RANGE | 1 | ${count} + 1
+| |
+| | FOR | ${id} | IN RANGE | 1 | ${count} + 1
 | | | ${hexa_id}= | Convert To Hex | ${id} | length=2 | lowercase=yes
 | | | ${dut_lo}= | VPP Create Loopback | ${nodes['${dut}']}
 | | | ... | mac=ba:dc:00:ff:ee:${hexa_id}
 | | | ... | ${nodes['${dut}']} | ${dut_lo} | bd_id=${id}
 | | | GBP Endpoint Group Add
 | | | ... | ${nodes['${dut}']} | ${100} | bd_id=${id} | rd_id=${id}
-| | | Configure IP addresses on interfaces
+| | | VPP Interface Set IP Address
 | | | ... | ${nodes['${dut}']} | ${dut_lo} | 1.1.1.1 | 24
 | | | GBP Subnet Add Del
 | | | ... | ${nodes['${dut}']} | 1.1.1.0 | 24 | ${100} | rd_id=${id}
 | | | GBP Ext Itf Add Del
 | | | ... | ${nodes['${dut}']} | ${dut_lo} | bd_id=${id} | rd_id=${id}
 | | | GBP Endpoint Add
-| | | ... | ${nodes['${dut}']} | ${${dut_str}_${prev_layer}_${id}_1} | 1.1.1.100
-| | | ... | ${tg_if1_mac} | ${100}
+| | | ... | ${nodes['${dut}']} | ${${dut}_${int}1_${id}}[0]
+| | | ... | 1.1.1.100 | ${TG_pf1_mac}[0] | ${100}
 | | | GBP Endpoint Add
-| | | ... | ${nodes['${dut}']} | ${${dut_str}_${prev_layer}_${id}_2} | 1.1.1.200
-| | | ... | ${tg_if2_mac} | ${100}
+| | | ... | ${nodes['${dut}']} | ${${dut}_${int}2_${id}}[0]
+| | | ... | 1.1.1.200 | ${TG_pf2_mac}[0] | ${100}
 | | | VPP Route Add
 | | | ... | ${nodes['${dut}']} | 10.10.10.0 | 24 | gateway=1.1.1.100
 | | | ... | interface=${dut_lo} | vrf=${1}
 | | | ... | ${nodes['${dut}']} | ${200} | ${300} | acl_index=${0}
 | | | GBP Contract Add Del
 | | | ... | ${nodes['${dut}']} | ${300} | ${200} | acl_index=${0}
+| | END
 
 | Initialize GBP routing domains
 | | [Documentation]
 | | ... | Initialize GBP routing domains on all DUTs.
-| | ...
+| |
 | | ... | *Arguments:*
 | | ... | - count - Number of GBP routing domains. Type: integer
-| | ...
+| |
 | | ... | *Example:*
-| | ...
+| |
 | | ... | \| Initialize GBP routing domains \| 1 \|
-| | ...
+| |
 | | [Arguments] | ${count}=${1}
-| | ...
-| | :FOR | ${dut} | IN | @{duts}
+| |
+| | FOR | ${dut} | IN | @{duts}
 | | | Initialize GBP routing domains on node | ${dut} | count=${count}
+| | END
 | | Set interfaces in path up