1 # Licensed under the Apache License, Version 2.0 (the "License");
2 # you may not use this file except in compliance with the License.
3 # You may obtain a copy of the License at
5 # http://www.apache.org/licenses/LICENSE-2.0
7 # Unless required by applicable law or agreed to in writing, software
8 # distributed under the License is distributed on an "AS IS" BASIS,
9 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10 # See the License for the specific language governing permissions and
11 # limitations under the License.
14 Documentation [BASIC-01] CRUD operations on VIM targets.
15 ... All tests will be performed over an Openstack VIM, and the credentials will be loaded from clouds.yaml file.
17 Resource %{ROBOT_DEVOPS_FOLDER}/lib/vim_lib.robot
19 Variables %{ROBOT_DEVOPS_FOLDER}/resources/basic_01-crud_operations_on_vim_targets_data.py
21 Force Tags basic_01 cluster_main daily regression
25 Create VIM Target Basic
26 [Documentation] Create a VIM Target only with the mandatory parameters.
27 ... Checks the status of the VIM in Prometheus after it creation.
29 Pass Execution If '${vim_account_type}' != 'openstack' Not applicable for ${vim_account_type} VIM
30 ${rand}= Generate Random String 6 [NUMBERS]
31 ${vim_name}= Catenate SEPARATOR=_ ${vim_name_prefix} ${rand}
32 Set Suite Variable ${vim_name}
33 ${created_vim_account_id}= Create VIM Target ${vim_name} ${vim_user} ${vim_password} ${vim_auth_url} ${vim_tenant} ${vim_account_type}
34 Set Suite Variable ${created_vim_account_id}
35 Check VIM Target Operational State ${vim_name}
36 Check for VIM Target Metric ${vim_name} ${prometheus_host} ${prometheus_port}
39 Delete VIM Target By Name
40 [Documentation] Delete the VIM Target created in previous test-case by its name.
41 ... Checks whether the VIM Target was created or not before perform the deletion.
44 Pass Execution If '${vim_account_type}' != 'openstack' Not applicable for ${vim_account_type} VIM
45 ${vim_account_id}= Get VIM Target ID ${vim_name}
46 Should Be Equal As Strings ${vim_account_id} ${created_vim_account_id}
47 Delete VIM Target ${vim_name}
50 Create VIM Target With Extra Config
51 [Documentation] Create a VIM Target using the extra parameter 'config'.
52 ... Checks the status of the VIM in Prometheus after it creation.
54 ${rand}= Generate Random String 6 [NUMBERS]
55 ${vim_name}= Catenate SEPARATOR=_ ${vim_name_prefix} ${rand}
56 Set Suite Variable ${vim_name}
57 ${created_vim_account_id}= Create VIM Target ${vim_name} ${vim_user} ${vim_password} ${vim_auth_url} ${vim_tenant} ${vim_account_type} config=${vim_config}
58 Set Suite Variable ${created_vim_account_id}
59 Check VIM Target Operational State ${vim_name}
60 Check for VIM Target Status ${vim_name} ${prometheus_host} ${prometheus_port}
63 Delete VIM Target By ID
64 [Documentation] Delete the VIM Target created in previous test-case by its ID.
65 ... Checks whether the VIM Target was created or not before perform the deletion.
68 ${vim_account_id}= Get VIM Target ID ${vim_name}
69 Should Be Equal As Strings ${vim_account_id} ${created_vim_account_id}
70 Delete VIM Target ${vim_account_id}