Add Honeycomb persistence 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 | 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 | | [Tags] | honeycomb_sanity
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 | | [Tags] | honeycomb_sanity
53 | | ...
54 | | Given vhost-user configuration from Honeycomb should be
55 | | ... | ${node} | ${vhost_interface} | ${vhost_user_server}
56 | | When Honeycomb configures vhost-user interface
57 | | ... | ${node} | ${vhost_interface} | ${vhost_user_server_edit_1}
58 | | Then vhost-user configuration from Honeycomb should be
59 | | ... | ${node} | ${vhost_interface} | ${vhost_user_server_edit_1}
60 | | And vhost-user configuration from VAT should be
61 | | ... | ${node} | ${vhost_user_server_edit_1}
62 | | When Honeycomb configures vhost-user interface
63 | | ... | ${node} | ${vhost_interface} | ${vhost_user_server_edit_2}
64 | | Then vhost-user configuration from Honeycomb should be
65 | | ... | ${node} | ${vhost_interface} | ${vhost_user_server_edit_2}
66 | | And vhost-user configuration from VAT should be
67 | | ... | ${node} | ${vhost_user_server_edit_2}
68 | | When Honeycomb configures vhost-user interface
69 | | ... | ${node} | ${vhost_interface} | ${vhost_user_server}
70 | | Then vhost-user configuration from Honeycomb should be
71 | | ... | ${node} | ${vhost_interface} | ${vhost_user_server}
72 | | And vhost-user configuration from VAT should be
73 | | ... | ${node} | ${vhost_user_server}
74
75 | Honycomb deletes vhost-user interface - server
76 | | [Documentation] | Check if Honeycomb can delete an existing vhost-user\
77 | | ... | interface, role: server.
78 | | [Tags] | honeycomb_sanity
79 | | ...
80 | | Given vhost-user configuration from Honeycomb should be
81 | | ... | ${node} | ${vhost_interface} | ${vhost_user_server}
82 | | When Honeycomb removes vhost-user interface
83 | | ... | ${node} | ${vhost_interface}
84 | | Then vhost-user configuration from Honeycomb should be empty
85 | | ... | ${node} | ${vhost_interface}
86 | | And vhost-user configuration from VAT should be empty
87 | | ... | ${node}
88
89 | Honycomb creates vhost-user interface - client
90 | | [Documentation] | Check if Honeycomb creates a vhost-user interface, role:\
91 | | ... | client.
92 | | [Tags] | honeycomb_sanity
93 | | ...
94 | | Given vhost-user configuration from Honeycomb should be empty
95 | | ... | ${node} | ${vhost_interface}
96 | | When Honeycomb creates vhost-user interface
97 | | ... | ${node} | ${vhost_interface} | ${vhost_user_client}
98 | | Then vhost-user configuration from Honeycomb should be
99 | | ... | ${node} | ${vhost_interface} | ${vhost_user_client}
100 | | And vhost-user configuration from VAT should be
101 | | ... | ${node} | ${vhost_user_client}
102
103 | Honycomb modifies vhost-user interface - client
104 | | [Documentation] | Check if Honeycomb can modify properties of existing\
105 | | ... | vhost-user interface, role: client.
106 | | [Tags] | honeycomb_sanity
107 | | ...
108 | | Given vhost-user configuration from Honeycomb should be
109 | | ... | ${node} | ${vhost_interface} | ${vhost_user_client}
110 | | When Honeycomb configures vhost-user interface
111 | | ... | ${node} | ${vhost_interface} | ${vhost_user_client_edit_1}
112 | | Then vhost-user configuration from Honeycomb should be
113 | | ... | ${node} | ${vhost_interface} | ${vhost_user_client_edit_1}
114 | | And vhost-user configuration from VAT should be
115 | | ... | ${node} | ${vhost_user_client_edit_1}
116 | | When Honeycomb configures vhost-user interface
117 | | ... | ${node} | ${vhost_interface} | ${vhost_user_client_edit_2}
118 | | Then vhost-user configuration from Honeycomb should be
119 | | ... | ${node} | ${vhost_interface} | ${vhost_user_client_edit_2}
120 | | And vhost-user configuration from VAT should be
121 | | ... | ${node} | ${vhost_user_client_edit_2}
122 | | When Honeycomb configures vhost-user interface
123 | | ... | ${node} | ${vhost_interface} | ${vhost_user_client}
124 | | Then vhost-user configuration from Honeycomb should be
125 | | ... | ${node} | ${vhost_interface} | ${vhost_user_client}
126 | | And vhost-user configuration from VAT should be
127 | | ... | ${node} | ${vhost_user_client}
128
129 | Honycomb deletes vhost-user interface - client
130 | | [Documentation] | Check if Honeycomb can delete an existing vhost-user\
131 | | ... | interface, role: client.
132 | | [Tags] | honeycomb_sanity
133 | | ...
134 | | Given vhost-user configuration from Honeycomb should be
135 | | ... | ${node} | ${vhost_interface} | ${vhost_user_client}
136 | | When Honeycomb removes vhost-user interface
137 | | ... | ${node} | ${vhost_interface}
138 | | Then vhost-user configuration from Honeycomb should be empty
139 | | ... | ${node} | ${vhost_interface}
140 | | And vhost-user configuration from VAT should be empty
141 | | ... | ${node}
142
143 | Honeycomb does not set vhost-user configuration on another interface type
144 | | [Documentation] | Check if Honeycomb refuses to set vhost-user\
145 | | ... | configuration for interface which is not v3po:vhost-user type.
146 | | [Tags] | honeycomb_sanity
147 | | ...
148 | | When Honeycomb fails setting vhost-user on different interface type
149 | | ... | ${node} | ${interface} | ${vhost_user_server}
150 | | Then vhost-user configuration from Honeycomb should be empty
151 | | ... | ${node} | ${interface}
152 | | And vhost-user configuration from VAT should be empty
153 | | ... | ${node}
154
155 | Honeycomb does not set invalid vhost-user configuration
156 | | [Documentation] | Check if Honeycomb refuses to set invalid parameters to\
157 | | ... | vhost-user interface.
158 | | [Tags] | honeycomb_sanity
159 | | ...
160 | | Given vhost-user configuration from Honeycomb should be empty
161 | | ... | ${node} | ${vhost_interface}
162 | | When Honeycomb fails setting invalid vhost-user configuration
163 | | ... | ${node} | ${vhost_interface} | ${vhost_user_wrong}
164 | | Then vhost-user configuration from Honeycomb should be empty
165 | | ... | ${node} | ${vhost_interface}
166 | | And vhost-user configuration from VAT should be empty
167 | | ... | ${node}