summaryrefslogtreecommitdiffstats
path: root/lib/python/apex/network_environment.py
diff options
context:
space:
mode:
authorDan Radez <dradez@redhat.com>2016-08-09 11:44:12 -0400
committerDan Radez <dradez@redhat.com>2016-08-09 14:31:38 -0400
commitce2b7dc6d86cfeae8a8addc9ef427e1c58bf8908 (patch)
tree5b6ae10db9ba69d202b8b720e7d8a7a49f18296d /lib/python/apex/network_environment.py
parent5c9e135ccc5867ebf26bbe594cbd9964582a237d (diff)
Making NetworkSettings a dict
Change-Id: Ib7fc4e9ca543a4c678576ea2119fa606ece0095c Signed-off-by: Dan Radez <dradez@redhat.com>
Diffstat (limited to 'lib/python/apex/network_environment.py')
-rw-r--r--lib/python/apex/network_environment.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/python/apex/network_environment.py b/lib/python/apex/network_environment.py
index bf81b98..22dcc35 100644
--- a/lib/python/apex/network_environment.py
+++ b/lib/python/apex/network_environment.py
@@ -59,17 +59,16 @@ class NetworkEnvironment:
self.netenv_obj = yaml.load(net_env_fh)
self._update_net_environment(net_settings)
- def _update_net_environment(self, settings_obj):
+ def _update_net_environment(self, net_settings):
"""
Updates Network Environment according to Network Settings
:param: network settings object
:return: None
"""
- if not settings_obj:
+ if not net_settings:
raise NetworkEnvException("Network Settings does not exist")
- net_settings = settings_obj.get_network_settings()
- enabled_networks = settings_obj.get_enabled_networks()
+ enabled_networks = net_settings.get_enabled_networks()
param_def = 'parameter_defaults'
reg = 'resource_registry'
for key, prefix in TENANT_RESOURCES.items():
@@ -201,7 +200,7 @@ class NetworkEnvironment:
# Set IPv6 related flags to True. Not that we do not set those to False
# when IPv4 is configured, we'll use the default or whatever the user
# may have set.
- if settings_obj.get_ip_addr_family() == 6:
+ if net_settings.get_ip_addr_family() == 6:
for flag in IPV6_FLAGS:
self.netenv_obj[param_def][flag] = True