summaryrefslogtreecommitdiffstats
path: root/snaps/openstack/utils
diff options
context:
space:
mode:
authorspisarski <s.pisarski@cablelabs.com>2017-11-17 09:49:52 -0700
committerspisarski <s.pisarski@cablelabs.com>2017-11-20 08:34:23 -0700
commit3482f6e28e26025043f61efb90892d886f5909cc (patch)
treea9a5209a5a21d893ed0f673d6b8a9cda73ff9652 /snaps/openstack/utils
parent133b321125eeb4c22b2963dbd112a074cfeb6ab1 (diff)
Refactoring of RouterSettings to extend RouterConfig
RouterSettings and neutron_utils have a runtime cyclical dependency. This patch reduces this dependency and deprecates the RouterSettings class. JIRA: SNAPS-223 Change-Id: I6a2a5e6e6e86204e62148a57e3525da5862841cf Signed-off-by: spisarski <s.pisarski@cablelabs.com>
Diffstat (limited to 'snaps/openstack/utils')
-rw-r--r--snaps/openstack/utils/deploy_utils.py2
-rw-r--r--snaps/openstack/utils/neutron_utils.py2
-rw-r--r--snaps/openstack/utils/settings_utils.py6
3 files changed, 5 insertions, 5 deletions
diff --git a/snaps/openstack/utils/deploy_utils.py b/snaps/openstack/utils/deploy_utils.py
index 028da84..8c8431d 100644
--- a/snaps/openstack/utils/deploy_utils.py
+++ b/snaps/openstack/utils/deploy_utils.py
@@ -78,7 +78,7 @@ def create_router(os_creds, router_settings, cleanup=False):
"""
Creates a network on which the CMTSs can attach
:param os_creds: The OpenStack credentials object
- :param router_settings: The RouterSettings instance
+ :param router_settings: The RouterConfig instance
:param cleanup: Denotes whether or not this is being called for cleanup
:return: A reference to the network creator objects for each network from
which network elements such as the subnet, router, interface
diff --git a/snaps/openstack/utils/neutron_utils.py b/snaps/openstack/utils/neutron_utils.py
index 9ca9aba..ec8daff 100644
--- a/snaps/openstack/utils/neutron_utils.py
+++ b/snaps/openstack/utils/neutron_utils.py
@@ -327,7 +327,7 @@ def get_router(neutron, router_settings=None, router_name=None):
values if not None, else finds the first with the value of the router_name
parameter, else None
:param neutron: the client
- :param router_settings: the RouterSettings object
+ :param router_settings: the RouterConfig object
:param router_name: the name of the network to retrieve
:return: a SNAPS-OO Router domain object
"""
diff --git a/snaps/openstack/utils/settings_utils.py b/snaps/openstack/utils/settings_utils.py
index cdcdeab..e85bd08 100644
--- a/snaps/openstack/utils/settings_utils.py
+++ b/snaps/openstack/utils/settings_utils.py
@@ -17,13 +17,13 @@ import uuid
from snaps import file_utils
from snaps.config.flavor import FlavorConfig
from snaps.config.keypair import KeypairConfig
+from snaps.config.router import RouterConfig
from snaps.openstack.create_instance import (
VmInstanceSettings, FloatingIpSettings)
from snaps.openstack.create_network import (
PortSettings, SubnetSettings, NetworkSettings)
from snaps.openstack.create_security_group import (
SecurityGroupSettings, SecurityGroupRuleSettings)
-from snaps.openstack.create_router import RouterSettings
from snaps.openstack.create_volume import VolumeSettings
from snaps.openstack.create_volume_type import (
VolumeTypeSettings, VolumeTypeEncryptionSettings, ControlLocation)
@@ -96,7 +96,7 @@ def create_subnet_settings(neutron, network):
def create_router_settings(neutron, router):
"""
- Returns a RouterSettings object
+ Returns a RouterConfig object
:param neutron: the neutron client
:param router: a SNAPS-OO Router domain object
:return:
@@ -142,7 +142,7 @@ def create_router_settings(neutron, router):
if port_setting.network_name != ext_net_name:
filtered_settings.append(port_setting)
- return RouterSettings(
+ return RouterConfig(
name=router.name, external_gateway=ext_net_name,
admin_state_up=router.admin_state_up,
port_settings=filtered_settings)