CSIT-664: Refactor setups and teardowns
[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 | Honeycomb fails to create PBB sub-interface
58 | | [Documentation] | Uses Honeycomb API to set PBB sub-interface with wrong\
59 | | ... | parameter(s) and expects to fail.
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 | | ... | - params - Parameters of the sub-interface to be created.
66 | | ... | Type - dictionary
67 | | ...
68 | | ... | *Example:*
69 | | ... | \| Honeycomb fails to create PBB sub-interface\
70 | | ... | \| ${node} \| ${super_if} \| ${cfg_pbb_sub_if_no_vlan_tag} \|
71 | | ...
72 | | [Arguments] | ${node} | ${super_if} | ${params}
73 | | ...
74 | | IfAPI.Set Interface Up | ${node} | ${super_if}
75 | | Run keyword and expect error | *HoneycombError*not successful*.
76 | | ... | IfAPI.Create PBB Sub Interface
77 | | ... | ${node} | ${super_if} | ${params}