diff options
author | spisarski <s.pisarski@cablelabs.com> | 2017-11-17 16:07:40 -0700 |
---|---|---|
committer | spisarski <s.pisarski@cablelabs.com> | 2017-11-20 12:52:10 -0700 |
commit | a82209830309354c5bdc7e8b885c51df42c731d1 (patch) | |
tree | 8526779a6add5ff3dae7562b9b525231032f0a51 /examples/launch.py | |
parent | 1d7f4a18cf4a070570beccbb46303f5822840c41 (diff) |
Refactoring of NetworkSettings to extend NetworkConfig
This also includes SubnetSettings extending to SubnetConfig and
PortSettings extenting to Portconfig and neutron_utils have a runtime cyclical
dependency. This patch reduces this dependency and deprecates the NetworkSettings,
SubnetSettings, and PortSettings classes.
JIRA: SNAPS-220
Change-Id: I996d73d9b910c075a6511a423f01d966f5b6fb74
Signed-off-by: spisarski <s.pisarski@cablelabs.com>
Diffstat (limited to 'examples/launch.py')
-rw-r--r-- | examples/launch.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/examples/launch.py b/examples/launch.py index b0311e6..9320512 100644 --- a/examples/launch.py +++ b/examples/launch.py @@ -29,6 +29,7 @@ from snaps import file_utils from snaps.config.flavor import FlavorConfig from snaps.config.image import ImageConfig from snaps.config.keypair import KeypairConfig +from snaps.config.network import PortConfig, NetworkConfig from snaps.config.project import ProjectConfig from snaps.config.qos import QoSConfig from snaps.config.router import RouterConfig @@ -39,8 +40,7 @@ from snaps.openstack.create_flavor import OpenStackFlavor from snaps.openstack.create_image import OpenStackImage from snaps.openstack.create_instance import VmInstanceSettings from snaps.openstack.create_keypairs import OpenStackKeypair -from snaps.openstack.create_network import ( - PortSettings, NetworkSettings, OpenStackNetwork) +from snaps.openstack.create_network import OpenStackNetwork from snaps.openstack.create_project import OpenStackProject from snaps.openstack.create_qos import OpenStackQoS from snaps.openstack.create_router import OpenStackRouter @@ -152,7 +152,7 @@ def __parse_ports_config(config): """ out = list() for port_config in config: - out.append(PortSettings(**port_config.get('port'))) + out.append(PortConfig(**port_config.get('port'))) return out @@ -673,7 +673,7 @@ def main(arguments): # Create networks creators.append(__create_instances( - os_creds_dict, OpenStackNetwork, NetworkSettings, + os_creds_dict, OpenStackNetwork, NetworkConfig, os_config.get('networks'), 'network', clean, users_dict)) # Create routers |