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