CSIT-158: Tap interface tests
[csit.git] / tests / func / honeycomb / 050_interface_vhost_user.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 *** Variables ***
15 | ${interface}= | ${node['interfaces']['port1']['name']}
16 | ${vhost_interface}= | test_vhost
17 | &{vhost_user_server}= | socket=soc1 | role=server
18 | &{vhost_user_server_edit_1}= | socket=soc12 | role=server
19 | &{vhost_user_server_edit_2}= | socket=soc12 | role=client
20 | &{vhost_user_client}= | socket=soc2 | role=client
21 | &{vhost_user_client_edit_1}= | socket=soc22 | role=client
22 | &{vhost_user_client_edit_2}= | socket=soc22 | role=server
23 | &{vhost_user_wrong}= | socket=soc2 | role=wrong
24
25 *** Settings ***
26 | Resource | resources/libraries/robot/default.robot
27 | Resource | resources/libraries/robot/honeycomb/vhost_user.robot
28 | Force Tags | honeycomb_sanity
29 | Documentation | *Honeycomb vhost-user interface management test suite.*
30 | ...
31 | ...           | This test suite tests if it is posible to create, modify and\
32 | ...           | delete a vhost-user interface.
33
34 *** Test Cases ***
35 | Honycomb creates vhost-user interface - server
36 | | [Documentation] | Check if Honeycomb creates a vhost-user interface, role:\
37 | | ... | server.
38 | | ...
39 | | Given vhost-user configuration from Honeycomb should be empty
40 | | ... | ${node} | ${vhost_interface}
41 | | When Honeycomb creates vhost-user interface
42 | | ... | ${node} | ${vhost_interface} | ${vhost_user_server}
43 | | Then vhost-user configuration from Honeycomb should be
44 | | ... | ${node} | ${vhost_interface} | ${vhost_user_server}
45 | | And vhost-user configuration from VAT should be
46 | | ... | ${node} | ${vhost_user_server}
47
48 | Honycomb modifies vhost-user interface - server
49 | | [Documentation] | Check if Honeycomb can modify properties of existing\
50 | | ... | vhost-user interface, role: server.
51 | | ...
52 | | Given vhost-user configuration from Honeycomb should be
53 | | ... | ${node} | ${vhost_interface} | ${vhost_user_server}
54 | | When Honeycomb configures vhost-user interface
55 | | ... | ${node} | ${vhost_interface} | ${vhost_user_server_edit_1}
56 | | Then vhost-user configuration from Honeycomb should be
57 | | ... | ${node} | ${vhost_interface} | ${vhost_user_server_edit_1}
58 | | And vhost-user configuration from VAT should be
59 | | ... | ${node} | ${vhost_user_server_edit_1}
60 | | When Honeycomb configures vhost-user interface
61 | | ... | ${node} | ${vhost_interface} | ${vhost_user_server_edit_2}
62 | | Then vhost-user configuration from Honeycomb should be
63 | | ... | ${node} | ${vhost_interface} | ${vhost_user_server_edit_2}
64 | | And vhost-user configuration from VAT should be
65 | | ... | ${node} | ${vhost_user_server_edit_2}
66 | | When Honeycomb configures vhost-user interface
67 | | ... | ${node} | ${vhost_interface} | ${vhost_user_server}
68 | | Then vhost-user configuration from Honeycomb should be
69 | | ... | ${node} | ${vhost_interface} | ${vhost_user_server}
70 | | And vhost-user configuration from VAT should be
71 | | ... | ${node} | ${vhost_user_server}
72
73 | Honycomb deletes vhost-user interface - server
74 | | [Documentation] | Check if Honeycomb can delete an existing vhost-user\
75 | | ... | interface, role: server.
76 | | ...
77 | | Given vhost-user configuration from Honeycomb should be
78 | | ... | ${node} | ${vhost_interface} | ${vhost_user_server}
79 | | When Honeycomb removes vhost-user interface
80 | | ... | ${node} | ${vhost_interface}
81 | | Then vhost-user configuration from Honeycomb should be empty
82 | | ... | ${node} | ${vhost_interface}
83 | | And vhost-user configuration from VAT should be empty
84 | | ... | ${node}
85
86 | Honycomb creates vhost-user interface - client
87 | | [Documentation] | Check if Honeycomb creates a vhost-user interface, role:\
88 | | ... | client.
89 | | ...
90 | | Given vhost-user configuration from Honeycomb should be empty
91 | | ... | ${node} | ${vhost_interface}
92 | | When Honeycomb creates vhost-user interface
93 | | ... | ${node} | ${vhost_interface} | ${vhost_user_client}
94 | | Then vhost-user configuration from Honeycomb should be
95 | | ... | ${node} | ${vhost_interface} | ${vhost_user_client}
96 | | And vhost-user configuration from VAT should be
97 | | ... | ${node} | ${vhost_user_client}
98
99 | Honycomb modifies vhost-user interface - client
100 | | [Documentation] | Check if Honeycomb can modify properties of existing\
101 | | ... | vhost-user interface, role: client.
102 | | ...
103 | | Given vhost-user configuration from Honeycomb should be
104 | | ... | ${node} | ${vhost_interface} | ${vhost_user_client}
105 | | When Honeycomb configures vhost-user interface
106 | | ... | ${node} | ${vhost_interface} | ${vhost_user_client_edit_1}
107 | | Then vhost-user configuration from Honeycomb should be
108 | | ... | ${node} | ${vhost_interface} | ${vhost_user_client_edit_1}
109 | | And vhost-user configuration from VAT should be
110 | | ... | ${node} | ${vhost_user_client_edit_1}
111 | | When Honeycomb configures vhost-user interface
112 | | ... | ${node} | ${vhost_interface} | ${vhost_user_client_edit_2}
113 | | Then vhost-user configuration from Honeycomb should be
114 | | ... | ${node} | ${vhost_interface} | ${vhost_user_client_edit_2}
115 | | And vhost-user configuration from VAT should be
116 | | ... | ${node} | ${vhost_user_client_edit_2}
117 | | When Honeycomb configures vhost-user interface
118 | | ... | ${node} | ${vhost_interface} | ${vhost_user_client}
119 | | Then vhost-user configuration from Honeycomb should be
120 | | ... | ${node} | ${vhost_interface} | ${vhost_user_client}
121 | | And vhost-user configuration from VAT should be
122 | | ... | ${node} | ${vhost_user_client}
123
124 | Honycomb deletes vhost-user interface - client
125 | | [Documentation] | Check if Honeycomb can delete an existing vhost-user\
126 | | ... | interface, role: client.
127 | | ...
128 | | Given vhost-user configuration from Honeycomb should be
129 | | ... | ${node} | ${vhost_interface} | ${vhost_user_client}
130 | | When Honeycomb removes vhost-user interface
131 | | ... | ${node} | ${vhost_interface}
132 | | Then vhost-user configuration from Honeycomb should be empty
133 | | ... | ${node} | ${vhost_interface}
134 | | And vhost-user configuration from VAT should be empty
135 | | ... | ${node}
136
137 | Honeycomb does not set vhost-user configuration on another interface type
138 | | [Documentation] | Check if Honeycomb refuses to set vhost-user\
139 | | ... | configuration for interface which is not v3po:vhost-user type.
140 | | ...
141 | | When Honeycomb fails setting vhost-user on different interface type
142 | | ... | ${node} | ${interface} | ${vhost_user_server}
143 | | Then vhost-user configuration from Honeycomb should be empty
144 | | ... | ${node} | ${interface}
145 | | And vhost-user configuration from VAT should be empty
146 | | ... | ${node}
147
148 | Honeycomb does not set invalid vhost-user configuration
149 | | [Documentation] | Check if Honeycomb refuses to set invalid parameters to\
150 | | ... | vhost-user interface.
151 | | ...
152 | | Given vhost-user configuration from Honeycomb should be empty
153 | | ... | ${node} | ${vhost_interface}
154 | | When Honeycomb fails setting invalid vhost-user configuration
155 | | ... | ${node} | ${vhost_interface} | ${vhost_user_wrong}
156 | | Then vhost-user configuration from Honeycomb should be empty
157 | | ... | ${node} | ${vhost_interface}
158 | | And vhost-user configuration from VAT should be empty
159 | | ... | ${node}