Revert "Feature 11001: Robot framework linting for E2E tests"
[osm/tests.git] / robot-systest / resources / basic_08-disable_port_security_network_level_data.py
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
4 #
5 # http://www.apache.org/licenses/LICENSE-2.0
6 #
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.
12
13 import os
14 from pathlib import Path
15 import yaml
16 from get_clouds_yaml_info import get_values_from_cloud, get_vim_values
17
18
19 # VIM Configuration
20 vim_account_type = "openstack"
21 vim_name = "basic_08_vim_test"
22
23 # Get credentials from Openstack clouds file
24 cloud, os_cloud = get_values_from_cloud()
25 (
26 vim_user,
27 vim_password,
28 vim_auth_url,
29 vim_tenant,
30 vim_user_domain_name,
31 vim_project_domain_name,
32 vim_insecure,
33 ) = get_vim_values(cloud, os_cloud)
34
35 # Extra VIM config
36 vim_config_dict = {}
37 vim_config_dict["vim_network_name"] = os.environ.get("VIM_MGMT_NET")
38 if vim_project_domain_name:
39 vim_config_dict["project_domain_name"] = vim_project_domain_name
40 if vim_user_domain_name:
41 vim_config_dict["user_domain_name"] = vim_user_domain_name
42 if vim_insecure:
43 vim_config_dict["insecure"] = True
44 vim_config_dict["disable_network_port_security"] = True
45 vim_config_dict["management_network_name"] = os.environ.get("VIM_MGMT_NET")
46 vim_config = "'{}'".format(
47 yaml.safe_dump(vim_config_dict, default_flow_style=True, width=10000).rstrip("\r\n")
48 )
49
50 # Get ${HOME} from local machine
51 home = str(Path.home())
52 # NS and VNF descriptor package folder
53 vnfd_pkg = "hackfest_multivdu_vnf"
54 nsd_pkg = "hackfest_multivdu_ns"
55 # NS and VNF descriptor id
56 vnfd_name = "hackfest_multivdu-vnf"
57 nsd_name = "hackfest_multivdu-ns"
58 # NS instance name
59 ns_name = "basic_08_disable_port_security_network_level_test"
60 # SSH keys to be used
61 publickey = home + "/.ssh/id_rsa.pub"
62 privatekey = home + "/.ssh/id_rsa"