summaryrefslogtreecommitdiffstats
path: root/deploy/config
diff options
context:
space:
mode:
authorZhijiang Hu <hu.zhijiang@zte.com.cn>2017-03-15 14:28:04 +0000
committerGerrit Code Review <gerrit@opnfv.org>2017-03-15 14:28:04 +0000
commit3be546d10b71cec1d8a4d2a2e3d513284bbc6569 (patch)
treeb2133ed060e32ea4163b006a229c93ddb6c83586 /deploy/config
parentaf66c7f4fd99ca8491fa3024832cdad0568b3047 (diff)
parente62117170f9dd562cdb85bf6bd95644655e046c2 (diff)
Merge "add default_floating_pool configuration for nova-api"
Diffstat (limited to 'deploy/config')
-rw-r--r--deploy/config/__init__.py0
-rw-r--r--deploy/config/network.py20
-rw-r--r--deploy/config/vm_environment/zte-virtual1/network.yml21
3 files changed, 31 insertions, 10 deletions
diff --git a/deploy/config/__init__.py b/deploy/config/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/deploy/config/__init__.py
diff --git a/deploy/config/network.py b/deploy/config/network.py
new file mode 100644
index 00000000..ed14f95b
--- /dev/null
+++ b/deploy/config/network.py
@@ -0,0 +1,20 @@
+import yaml
+
+from deploy.common import query
+
+
+class NetworkConfig(object):
+ def __init__(self, network_file):
+ self._file = network_file
+ self._get_config()
+
+ def _get_config(self):
+ self.config = yaml.safe_load(file(self._file))
+
+ def _get_network(self, name):
+ return query.find(lambda item: item['name'] == name,
+ self.config['networks'])
+
+ @property
+ def external_network(self):
+ return self._get_network('EXTERNAL')
diff --git a/deploy/config/vm_environment/zte-virtual1/network.yml b/deploy/config/vm_environment/zte-virtual1/network.yml
index 7d746be6..6c8a2824 100644
--- a/deploy/config/vm_environment/zte-virtual1/network.yml
+++ b/deploy/config/vm_environment/zte-virtual1/network.yml
@@ -17,8 +17,8 @@ networks:
- cidr: '10.20.11.0/24'
gateway: '10.20.11.1'
ip_ranges:
- - 'start': '10.20.11.3'
- 'end': '10.20.11.10'
+ - start: '10.20.11.3'
+ end: '10.20.11.10'
name: 'MANAGEMENT'
- cidr: '10.20.11.0/24'
gateway: '10.20.11.1'
@@ -27,22 +27,23 @@ networks:
end: '10.20.11.10'
name: 'STORAGE'
- cidr: '172.10.101.0/24'
- gateway: '172.10.101.0'
+ gateway: '172.10.101.1'
ip_ranges:
- - 'start': '172.10.101.1'
- 'end': '172.10.101.10'
- 'name': 'EXTERNAL'
+ - start: 172.10.101.2
+ end: 172.10.101.20
+ name: EXTERNAL
+ network_name: admin_external
- cidr: '10.20.11.0/24'
gateway: '10.20.11.1'
ip_ranges:
- - 'start': '10.20.11.3'
- 'end': '10.20.11.10'
+ - start: '10.20.11.3'
+ end: '10.20.11.10'
name: 'PUBLICAPI'
- cidr: '10.20.11.0/24'
gateway: '10.20.11.1'
ip_ranges:
- - 'start': '10.20.11.3'
- 'end': '10.20.11.10'
+ - start: '10.20.11.3'
+ end: '10.20.11.10'
name: 'TENANT'
interfaces:
- name: 'EXTERNAL'