CSIT-662: KWI - KW renaming
[csit.git] / resources / libraries / robot / honeycomb / provider_backbone_bridge.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 | Library | resources.libraries.python.honeycomb.HcAPIKwInterfaces.InterfaceKeywords
16 | ...     | WITH NAME | IfAPI
17
18 *** Keywords ***
19 | Honeycomb creates PBB sub-interface
20 | | [Documentation] | Uses Honeycomb API to set PBB sub-interface on an\
21 | | ... | interface.
22 | | ...
23 | | ... | *Arguments:*
24 | | ... | - node - Information about a DUT node. Type: dictionary
25 | | ... | - super_if - Super-interface. Type: string
26 | | ... | - sub_if_id - Sub-interface ID. Type: string
27 | | ... | - params - Parameters of the sub-interface to be created.
28 | | ... | Type - dictionary
29 | | ...
30 | | ... | *Example:*
31 | | ... | \| Honeycomb creates PBB sub interface \| ${node} \| ${super_if}\
32 | | ... | \| ${cfg_pbb_sub_if_1} \|
33 | | ...
34 | | [Arguments] | ${node} | ${super_if} | ${params}
35 | | ...
36 | | IfAPI.Set Interface Up | ${node} | ${super_if}
37 | | IfAPI.Create PBB Sub Interface
38 | | ... | ${node} | ${super_if} | ${params}
39
40 | Honeycomb removes PBB sub-interface
41 | | [Documentation] | Uses Honeycomb API to remove PBB sub-interface from its\
42 | | ... | super interface.
43 | | ...
44 | | ... | *Arguments:*
45 | | ... | - node - Information about a DUT node. Type: dictionary
46 | | ... | - super_if - Super-interface. Type: string
47 | | ... | - sub_if_id - Sub-interface ID. Type: string
48 | | ...
49 | | ... | *Example:*
50 | | ... | \| Honeycomb Removes PBB sub interface\
51 | | ... | \| ${node} \| ${super_if} \|
52 | | ...
53 | | [Arguments] | ${node} | ${super_if}
54 | | ...
55 | | Delete PBB Sub Interface | ${node} | ${super_if}
56
57 | PBB Sub Interface Operational Data From Honeycomb Should Be
58 | | [Documentation] | Retrieves PBB sub-interface operational data from
59 | | ... | Honeycomb and compares with expected configuration.
60 | | ...
61 | | ... | *Arguments:*
62 | | ... | - node - Information about a DUT node. Type: dictionary
63 | | ... | - super_if - Super-interface. Type: string
64 | | ... | - sub_if_id - Sub-interface ID. Type: string
65 | | ... | - expected_params - Expected operational data. Type: dictionary
66 | | ...
67 | | ... | *Example:*
68 | | ... | \| PBB sub interface operational data from Honeycomb should be\
69 | | ... | \| ${node} \| ${super_if} \| ${cfg_pbb_sub_if_1_ID}\
70 | | ... | \| ${oper_pbb_sub_if_1} \|
71 | | ...
72 | | [Arguments] | ${node} | ${super_if} | ${sub_if_id} | ${expected_params}
73 | | ...
74 | | ${data}= | IfAPI.Get PBB Sub Interface Oper Data
75 | | ... | ${node} | ${super_if} | ${sub_if_id}
76 | | Compare data structures | ${data} | ${expected_params}
77
78 | PBB Sub Interface Operational Data From Honeycomb Should Be Empty
79 | | [Documentation] | Retrieves interface BPP configuration from Honeycomb,\
80 | | ... | and expects an empty dictionary.
81 | | ...
82 | | ... | *Arguments:*
83 | | ... | - node - Information about a DUT node. Type: dictionary
84 | | ... | - super_if - Super-interface. Type: string
85 | | ... | - sub_if_id - Sub-interface ID. Type: string
86 | | ...
87 | | ... | *Example:*
88 | | ... | \| PBB sub interface operational data from Honeycomb should be empty\
89 | | ... | \| ${node} \| ${super_if} \| ${cfg_pbb_sub_if_1_ID} \|
90 | | ...
91 | | [Arguments] | ${node} | ${super_if} | ${sub_if_id}
92 | | ...
93 | | ${data}= | IfAPI.Get PBB Sub Interface Oper Data
94 | | ... | ${node} | ${super_if} | ${sub_if_id}
95 | | Should be empty | ${data}
96
97 | Honeycomb fails to create PBB sub-interface
98 | | [Documentation] | Uses Honeycomb API to set PBB sub-interface with wrong\
99 | | ... | parameter(s) and expects to fail.
100 | | ...
101 | | ... | *Arguments:*
102 | | ... | - node - Information about a DUT node. Type: dictionary
103 | | ... | - super_if - Super-interface. Type: string
104 | | ... | - sub_if_id - Sub-interface ID. Type: string
105 | | ... | - params - Parameters of the sub-interface to be created.
106 | | ... | Type - dictionary
107 | | ...
108 | | ... | *Example:*
109 | | ... | \| Honeycomb fails to create PBB sub interface\
110 | | ... | \| ${node} \| ${super_if} \| ${cfg_pbb_sub_if_no_vlan_tag} \|
111 | | ...
112 | | [Arguments] | ${node} | ${super_if} | ${params}
113 | | ...
114 | | IfAPI.Set Interface Up | ${node} | ${super_if}
115 | | Run keyword and expect error | *HoneycombError*not successful*.
116 | | ... | IfAPI.Create PBB Sub Interface
117 | | ... | ${node} | ${super_if} | ${params}