diff options
Diffstat (limited to 'os_client_config/cloud_config.py')
-rw-r--r-- | os_client_config/cloud_config.py | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/os_client_config/cloud_config.py b/os_client_config/cloud_config.py index e63bd12..5dfbba9 100644 --- a/os_client_config/cloud_config.py +++ b/os_client_config/cloud_config.py @@ -442,23 +442,25 @@ class CloudConfig(object): def get_external_networks(self): """Get list of network names for external networks.""" return [ - net['name'] for net in self._openstack_config['networks'] + net['name'] for net in self.config['networks'] if net['routes_externally']] def get_internal_networks(self): """Get list of network names for internal networks.""" return [ - net['name'] for net in self._openstack_config['networks'] + net['name'] for net in self.config['networks'] if not net['routes_externally']] def get_default_network(self): """Get network used for default interactions.""" - for net in self._openstack_config['networks']: + for net in self.config['networks']: if net['default_interface']: - return net + return net['name'] + return None def get_nat_destination(self): """Get network used for NAT destination.""" - for net in self._openstack_config['networks']: + for net in self.config['networks']: if net['nat_destination']: - return net + return net['name'] + return None |