97d3112876983410172c6a59fd2c720d6d81ae44
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 from pathlib
import Path
16 from .get_clouds_yaml_info
import get_values_from_cloud
, get_vim_values
19 # Variables to be used by the testsuite
20 vim_account_type
= "openstack"
21 vim_name
= "basic_08_vim_test"
28 # Get credentials from Openstack clouds file
29 cloud
, os_cloud
= get_values_from_cloud()
36 vim_project_domain_name
,
38 ) = get_vim_values(cloud
, os_cloud
)
42 vim_config_dict
["vim_network_name"] = os
.environ
.get("VIM_MGMT_NET")
43 if vim_project_domain_name
:
44 vim_config_dict
["project_domain_name"] = vim_project_domain_name
45 if vim_user_domain_name
:
46 vim_config_dict
["user_domain_name"] = vim_user_domain_name
48 vim_config_dict
["insecure"] = True
49 vim_config_dict
["disable_network_port_security"] = True
50 vim_config_dict
["management_network_name"] = os
.environ
.get("VIM_MGMT_NET")
51 vim_config
= "'{}'".format(
52 yaml
.safe_dump(vim_config_dict
, default_flow_style
=True, width
=10000).rstrip("\r\n")
55 # Get ${HOME} from local machine
56 home
= str(Path
.home())
57 # NS and VNF descriptor package folder
58 vnfd_pkg
= "hackfest_multivdu_vnf"
59 nsd_pkg
= "hackfest_multivdu_ns"
60 # NS and VNF descriptor id
61 vnfd_name
= "hackfest_multivdu-vnf"
62 nsd_name
= "hackfest_multivdu-ns"
64 ns_name
= "basic_08_disable_port_security_network_level_test"
66 publickey
= home
+ "/.ssh/id_rsa.pub"
67 privatekey
= home
+ "/.ssh/id_rsa"