summaryrefslogtreecommitdiffstats
path: root/deploy/config
diff options
context:
space:
mode:
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'