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
20 vim_account_type
= "openstack"
21 vim_name
= "basic_08_vim_test"
23 # Get credentials from Openstack clouds file
24 cloud
, os_cloud
= get_values_from_cloud()
31 vim_project_domain_name
,
33 ) = get_vim_values(cloud
, os_cloud
)
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
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")
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"
59 ns_name
= "basic_08_disable_port_security_network_level_test"
61 publickey
= home
+ "/.ssh/id_rsa.pub"
62 privatekey
= home
+ "/.ssh/id_rsa"