CSIT-425: HC Test: NSH-SFC test suite
[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/honeycomb.robot
28 | Resource | resources/libraries/robot/honeycomb/vhost_user.robot
29 | Force Tags | honeycomb_sanity
30 | Suite Teardown | Run Keyword If Any Tests Failed
31 | ... | Restart Honeycomb And VPP And Clear Persisted Configuration | ${node}
32 | Documentation | *Honeycomb vhost-user interface management test suite.*
33 | ...
34 | ...           | This test suite tests if it is posible to create, modify and\
35 | ...           | delete a vhost-user interface.
36
37 *** Test Cases ***
38 | Honycomb creates vhost-user interface - server
39 | | [Documentation] | Check if Honeycomb creates a vhost-user interface, role:\
40 | | ... | server.
41 | | ...
42 | | Given vhost-user configuration from Honeycomb should be empty
43 | | ... | ${node} | ${vhost_interface}
44 | | When Honeycomb creates vhost-user interface
45 | | ... | ${node} | ${vhost_interface} | ${vhost_user_server}
46 | | Then vhost-user configuration from Honeycomb should be
47 | | ... | ${node} | ${vhost_interface} | ${vhost_user_server}
48 | | And vhost-user configuration from VAT should be
49 | | ... | ${node} | ${vhost_user_server}
50
51 | Honycomb modifies vhost-user interface - server
52 | | [Documentation] | Check if Honeycomb can modify properties of existing\
53 | | ... | vhost-user interface, role: server.
54 | | ...
55 | | Given vhost-user configuration from Honeycomb should be
56 | | ... | ${node} | ${vhost_interface} | ${vhost_user_server}
57 | | When Honeycomb configures vhost-user interface
58 | | ... | ${node} | ${vhost_interface} | ${vhost_user_server_edit_1}
59 | | Then vhost-user configuration from Honeycomb should be
60 | | ... | ${node} | ${vhost_interface} | ${vhost_user_server_edit_1}
61 | | And vhost-user configuration from VAT should be
62 | | ... | ${node} | ${vhost_user_server_edit_1}
63 | | When Honeycomb configures vhost-user interface
64 | | ... | ${node} | ${vhost_interface} | ${vhost_user_server_edit_2}
65 | | Then vhost-user configuration from Honeycomb should be
66 | | ... | ${node} | ${vhost_interface} | ${vhost_user_server_edit_2}
67 | | And vhost-user configuration from VAT should be
68 | | ... | ${node} | ${vhost_user_server_edit_2}
69 | | When Honeycomb configures vhost-user interface
70 | | ... | ${node} | ${vhost_interface} | ${vhost_user_server}
71 | | Then vhost-user configuration from Honeycomb should be
72 | | ... | ${node} | ${vhost_interface} | ${vhost_user_server}
73 | | And vhost-user configuration from VAT should be
74 | | ... | ${node} | ${vhost_user_server}
75
76 | Honycomb deletes vhost-user interface - server
77 | | [Documentation] | Check if Honeycomb can delete an existing vhost-user\
78 | | ... | interface, role: server.
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 | | ...
93 | | Given vhost-user configuration from Honeycomb should be empty
94 | | ... | ${node} | ${vhost_interface}
95 | | When Honeycomb creates vhost-user interface
96 | | ... | ${node} | ${vhost_interface} | ${vhost_user_client}
97 | | Then vhost-user configuration from Honeycomb should be
98 | | ... | ${node} | ${vhost_interface} | ${vhost_user_client}
99 | | And vhost-user configuration from VAT should be
100 | | ... | ${node} | ${vhost_user_client}
101
102 | Honycomb modifies vhost-user interface - client
103 | | [Documentation] | Check if Honeycomb can modify properties of existing\
104 | | ... | vhost-user interface, role: client.
105 | | ...
106 | | Given vhost-user configuration from Honeycomb should be
107 | | ... | ${node} | ${vhost_interface} | ${vhost_user_client}
108 | | When Honeycomb configures vhost-user interface
109 | | ... | ${node} | ${vhost_interface} | ${vhost_user_client_edit_1}
110 | | Then vhost-user configuration from Honeycomb should be
111 | | ... | ${node} | ${vhost_interface} | ${vhost_user_client_edit_1}
112 | | And vhost-user configuration from VAT should be
113 | | ... | ${node} | ${vhost_user_client_edit_1}
114 | | When Honeycomb configures vhost-user interface
115 | | ... | ${node} | ${vhost_interface} | ${vhost_user_client_edit_2}
116 | | Then vhost-user configuration from Honeycomb should be
117 | | ... | ${node} | ${vhost_interface} | ${vhost_user_client_edit_2}
118 | | And vhost-user configuration from VAT should be
119 | | ... | ${node} | ${vhost_user_client_edit_2}
120 | | When Honeycomb configures vhost-user interface
121 | | ... | ${node} | ${vhost_interface} | ${vhost_user_client}
122 | | Then vhost-user configuration from Honeycomb should be
123 | | ... | ${node} | ${vhost_interface} | ${vhost_user_client}
124 | | And vhost-user configuration from VAT should be
125 | | ... | ${node} | ${vhost_user_client}
126
127 | Honycomb deletes vhost-user interface - client
128 | | [Documentation] | Check if Honeycomb can delete an existing vhost-user\
129 | | ... | interface, role: client.
130 | | ...
131 | | Given vhost-user configuration from Honeycomb should be
132 | | ... | ${node} | ${vhost_interface} | ${vhost_user_client}
133 | | When Honeycomb removes vhost-user interface
134 | | ... | ${node} | ${vhost_interface}
135 | | Then vhost-user configuration from Honeycomb should be empty
136 | | ... | ${node} | ${vhost_interface}
137 | | And vhost-user configuration from VAT should be empty
138 | | ... | ${node}
139
140 | Honeycomb does not set vhost-user configuration on another interface type
141 | | [Documentation] | Check if Honeycomb refuses to set vhost-user\
142 | | ... | configuration for interface which is not v3po:vhost-user type.
143 | | ...
144 | | When Honeycomb fails setting vhost-user on different interface type
145 | | ... | ${node} | ${interface} | ${vhost_user_server}
146 | | Then vhost-user configuration from Honeycomb should be empty
147 | | ... | ${node} | ${interface}
148 | | And vhost-user configuration from VAT should be empty
149 | | ... | ${node}
150
151 | Honeycomb does not set invalid vhost-user configuration
152 | | [Documentation] | Check if Honeycomb refuses to set invalid parameters to\
153 | | ... | vhost-user interface.
154 | | ...
155 | | Given vhost-user configuration from Honeycomb should be empty
156 | | ... | ${node} | ${vhost_interface}
157 | | When Honeycomb fails setting invalid vhost-user configuration
158 | | ... | ${node} | ${vhost_interface} | ${vhost_user_wrong}
159 | | Then vhost-user configuration from Honeycomb should be empty
160 | | ... | ${node} | ${vhost_interface}
161 | | And vhost-user configuration from VAT should be empty
162 | | ... | ${node}