From 2a710a61e3b560c2d39cb759f5d9ac1da21d34c4 Mon Sep 17 00:00:00 2001 From: SerenaFeng Date: Fri, 24 Mar 2017 14:51:32 +0800 Subject: unify the way of obtaining network configuration Change-Id: Idd960d7faf0f24ae8caac13562858ccaa1c67f7b Signed-off-by: SerenaFeng --- deploy/config/network.py | 8 -------- deploy/prepare/execute.py | 4 ++-- 2 files changed, 2 insertions(+), 10 deletions(-) (limited to 'deploy') diff --git a/deploy/config/network.py b/deploy/config/network.py index 9f03bc15..cd38e94d 100644 --- a/deploy/config/network.py +++ b/deploy/config/network.py @@ -64,11 +64,3 @@ class NetworkConfig(object): prefix = self.type2name[network_type] name = '{}_{}'.format(prefix, field) if field else prefix setattr(self, name, value) - - @property - def external_network(self): - return self._get_network('EXTERNAL') - - @property - def external_name(self): - return self.external_network['network_name'] diff --git a/deploy/prepare/execute.py b/deploy/prepare/execute.py index 30319b2e..1e88755c 100644 --- a/deploy/prepare/execute.py +++ b/deploy/prepare/execute.py @@ -40,9 +40,9 @@ def _config_service(service, subs): @_config_service('nova', ['api']) def _set_default_floating_pool(network_file): - xnet = NetworkConfig(network_file=network_file).external_network + xnet = NetworkConfig(network_file=network_file).ext_network_name return '[DEFAULT]\n' \ - 'default_floating_pool = {}\n'.format(xnet['network_name']) + 'default_floating_pool = {}\n'.format(xnet) @_config_service('heat', ['api', 'engine']) -- cgit 1.2.3-korg