a5ab102652330def0348ecd1232ebef342ee9511
[csit.git] / resources / libraries / robot / lisp / lispgpe.robot
1 # Copyright (c) 2016 Cisco and/or its affiliates.
2 # Licensed under the Apache License, Version 2.0 (the "License");
3 # you may not use this file except in compliance with the License.
4 # You may obtain a copy of the License at:
5 #
6 #     http://www.apache.org/licenses/LICENSE-2.0
7 #
8 # Unless required by applicable law or agreed to in writing, software
9 # distributed under the License is distributed on an "AS IS" BASIS,
10 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11 # See the License for the specific language governing permissions and
12 # limitations under the License.
13
14 *** Settings ***
15 | Documentation | LISP-gpe encapsulation suite keywords
16 | Library | resources.libraries.python.topology.Topology
17 | Resource | resources/libraries/robot/lisp/lisp_api.robot
18 | Library  | resources.libraries.python.LispSetup.LispLocatorSet
19 | Library  | resources.libraries.python.LispSetup.LispLocator
20 | Library  | resources.libraries.python.LispSetup.LispLocalEid
21 | Library  | resources.libraries.python.LispSetup.LispAdjacency
22 | Library  | resources.libraries.python.LispSetup.LispRemoteMapping
23
24 *** Keywords ***
25 | Set up LISP GPE topology
26 | | [Documentation] | Set up LISP GPE topology.
27 | | ...
28 | | ... | *Arguments:*
29 | | ... | - dut1_node - DUT1 node. Type: dictionary
30 | | ... | - dut1_if - DUT1 node interface. Type: string
31 | | ... | - dut1_int_index - DUT1 node interface index. Type: integer
32 | | ... | - dut2_node - DUT2 node. Type: dictionary
33 | | ... | - dut2_if - DUT2 node interface. Type: string
34 | | ... | - dut2_int_index - DUT2 node interface index. Type: integer
35 | | ... | - locator_set - Locator set values. Type: dictionary
36 | | ... | - dut1_eid - DUT1 node eid address. Type: dictionary
37 | | ... | - dut2_eid - DUT2 node eid address. Type: dictionary
38 | | ... | - dut1_static_adjacency - DUT1 static adjacency. Type: dictionary
39 | | ... | - dut2_static_adjacency - DUT2 static adjacency. Type: dictionary
40 | | ...
41 | | ... | *Return:*
42 | | ... | - No value returned
43 | | ...
44 | | ... | *Example:*
45 | | ... | \| Set up LISP GPE topology \| ${dut1_node} \| ${interface_name} \
46 | | ... | \| None \| ${dut2_node} \| ${interface_name} \| None \
47 | | ... | \| ${locator_set} \| ${dut1_eid} \| ${dut2_eid} \
48 | | ... | \| ${dut1_static_adjacency} \| ${dut2_static_adjacency} \|
49 | | ...
50 | | [Arguments]
51 | | ... | ${dut1_node} | ${dut1_if} | ${dut1_int_index}
52 | | ... | ${dut2_node} | ${dut2_if} | ${dut2_int_index}
53 | | ... | ${locator_set} | ${dut1_eid} | ${dut2_eid}
54 | | ... | ${dut1_static_adjacency} | ${dut2_static_adjacency}
55 | | ...
56 # DUT1 settings:
57 | | ${dut1_int_index}= | Run Keyword If | ${dut1_int_index} is None
58 | | | ... | Get Interface Sw Index | ${dut1_node} | ${dut1_if}
59 | | | ... | ELSE | Set Variable | ${dut1_int_index}
60 | | Enable Lisp | ${dut1_node}
61 | | Enable Lisp GPE | ${dut1_node}
62 | | Vpp Add Lisp Locator Set | ${dut1_node}
63 | | ... | ${locator_set['locator_name']}
64 | | Vpp Add Lisp Locator | ${dut1_node}
65 | | ... | ${locator_set['locator_name']}
66 | | ... | ${dut1_int_index}
67 | | ... | ${locator_set['priority']}
68 | | ... | ${locator_set['weight']}
69 | | Vpp Add Lisp Local Eid | ${dut1_node}
70 | | ... | ${dut1_eid['locator_name']}
71 | | ... | ${dut1_eid['vni']}
72 | | ... | ${dut1_eid['eid']}
73 | | ... | ${dut1_eid['prefix']}
74 | | Vpp Add Lisp Remote Mapping | ${dut1_node}
75 | | ... | ${dut1_static_adjacency['vni']}
76 | | ... | ${dut1_static_adjacency['deid']}
77 | | ... | ${dut1_static_adjacency['prefix']}
78 | | ... | ${dut1_static_adjacency['seid']}
79 | | ... | ${dut1_static_adjacency['prefix']}
80 | | ... | ${dut1_static_adjacency['rloc']}
81 | | Vpp Add Lisp Adjacency | ${dut1_node}
82 | | ... | ${dut1_static_adjacency['vni']}
83 | | ... | ${dut1_static_adjacency['deid']}
84 | | ... | ${dut1_static_adjacency['prefix']}
85 | | ... | ${dut1_static_adjacency['seid']}
86 | | ... | ${dut1_static_adjacency['prefix']}
87 | | ...
88 # DUT2 settings:
89 | | ${dut2_int_index}= | Run Keyword If | ${dut2_int_index} is None
90 | | | ... | Get Interface Sw Index | ${dut2_node} | ${dut2_if}
91 | | | ... | ELSE | Set Variable | ${dut2_int_index}
92 | | Enable Lisp | ${dut2_node}
93 | | Enable Lisp GPE | ${dut2_node}
94 | | Vpp Add Lisp Locator Set | ${dut2_node}
95 | | ... | ${locator_set['locator_name']}
96 | | Vpp Add Lisp Locator | ${dut2_node}
97 | | ... | ${locator_set['locator_name']}
98 | | ... | ${dut2_int_index}
99 | | ... | ${locator_set['priority']}
100 | | ... | ${locator_set['weight']}
101 | | Vpp Add Lisp Local Eid | ${dut2_node}
102 | | ... | ${dut2_eid['locator_name']}
103 | | ... | ${dut2_eid['vni']}
104 | | ... | ${dut2_eid['eid']}
105 | | ... | ${dut2_eid['prefix']}
106 | | Vpp Add Lisp Remote Mapping | ${dut2_node}
107 | | ... | ${dut2_static_adjacency['vni']}
108 | | ... | ${dut2_static_adjacency['deid']}
109 | | ... | ${dut2_static_adjacency['prefix']}
110 | | ... | ${dut2_static_adjacency['seid']}
111 | | ... | ${dut2_static_adjacency['prefix']}
112 | | ... | ${dut2_static_adjacency['rloc']}
113 | | Vpp Add Lisp Adjacency | ${dut2_node}
114 | | ... | ${dut2_static_adjacency['vni']}
115 | | ... | ${dut2_static_adjacency['deid']}
116 | | ... | ${dut2_static_adjacency['prefix']}
117 | | ... | ${dut2_static_adjacency['seid']}
118 | | ... | ${dut2_static_adjacency['prefix']}