summaryrefslogtreecommitdiffstats
path: root/deploy/config
diff options
context:
space:
mode:
authorSerenaFeng <feng.xiaowei@zte.com.cn>2017-03-15 14:31:36 +0800
committerSerenaFeng <feng.xiaowei@zte.com.cn>2017-03-15 15:55:09 +0800
commite62117170f9dd562cdb85bf6bd95644655e046c2 (patch)
tree05a4e983534f1687f6d7b96b805eae7130bd08ed /deploy/config
parentc557362eb2a14055587feac228a4463bd96f6f4a (diff)
add default_floating_pool configuration for nova-api
Change-Id: I9db5509667e9c10a9c07b55531c6d78fb95cc223 Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
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'