From 3482f6e28e26025043f61efb90892d886f5909cc Mon Sep 17 00:00:00 2001 From: spisarski Date: Fri, 17 Nov 2017 09:49:52 -0700 Subject: 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 --- snaps/openstack/utils/settings_utils.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'snaps/openstack/utils/settings_utils.py') 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) -- cgit 1.2.3-korg