diff options
author | Zhijiang Hu <hu.zhijiang@zte.com.cn> | 2017-05-05 06:42:19 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@opnfv.org> | 2017-05-05 06:42:19 +0000 |
commit | 568edb9d5ed462672d5a5c53ac735e04d8f687c4 (patch) | |
tree | 85c0742a5331e0a9e19622f3c4a49780b66fb79e /deploy | |
parent | 0f203447deda439811dd4062c588ef4145a34873 (diff) | |
parent | a7e8ac7aa6cf5bdefb80fdd051a2162b4f7d6108 (diff) |
Merge "Hardcoded physnet1 changed to obtain from .yml"
Diffstat (limited to 'deploy')
-rw-r--r-- | deploy/config/vm_environment/zte-virtual1/network.yml | 1 | ||||
-rw-r--r-- | deploy/config/vm_environment/zte-virtual2/network.yml | 1 | ||||
-rw-r--r-- | deploy/post/execute.py | 7 |
3 files changed, 6 insertions, 3 deletions
diff --git a/deploy/config/vm_environment/zte-virtual1/network.yml b/deploy/config/vm_environment/zte-virtual1/network.yml index 6c8a2824..34b466a2 100644 --- a/deploy/config/vm_environment/zte-virtual1/network.yml +++ b/deploy/config/vm_environment/zte-virtual1/network.yml @@ -33,6 +33,7 @@ networks: end: 172.10.101.20
name: EXTERNAL
network_name: admin_external
+ mapping: physnet1
- cidr: '10.20.11.0/24'
gateway: '10.20.11.1'
ip_ranges:
diff --git a/deploy/config/vm_environment/zte-virtual2/network.yml b/deploy/config/vm_environment/zte-virtual2/network.yml index 28d531ce..9477ab9c 100644 --- a/deploy/config/vm_environment/zte-virtual2/network.yml +++ b/deploy/config/vm_environment/zte-virtual2/network.yml @@ -33,6 +33,7 @@ networks: end: 172.10.101.20
name: EXTERNAL
network_name: admin_external
+ mapping: physnet1
- cidr: '10.20.11.0/24'
gateway: '10.20.11.1'
ip_ranges:
diff --git a/deploy/post/execute.py b/deploy/post/execute.py index d310acbc..37a67b4c 100644 --- a/deploy/post/execute.py +++ b/deploy/post/execute.py @@ -16,14 +16,14 @@ import nova from deploy.config.network import NetworkConfig -def _config_external_network(ext_name): +def _config_external_network(ext_name, physnet): body = { 'network': { 'name': ext_name, 'admin_state_up': True, 'shared': False, 'provider:network_type': 'flat', - 'provider:physical_network': 'physnet1', + 'provider:physical_network': physnet, 'router:external': True } } @@ -50,9 +50,10 @@ def _config_external_subnet(ext_id, network_conf): def _create_external_network(network_file): network_conf = NetworkConfig(network_file=network_file) ext_name = network_conf.ext_network_name + physnet = network_conf.ext_mapping neutronclient = neutron.Neutron() ext_id = neutronclient.create_network(ext_name, - _config_external_network(ext_name)) + _config_external_network(ext_name, physnet)) neutronclient.create_subnet(_config_external_subnet(ext_id, network_conf)) |