diff options
author | 2017-11-20 13:51:18 -0700 | |
---|---|---|
committer | 2017-11-20 13:51:18 -0700 | |
commit | 594e4d2b15dcf59fc7dc1b8380b096382a0b1cb1 (patch) | |
tree | e6fc560f93257f5e2d142a6099993830cd5a479f /examples/demo.py | |
parent | 6d6a6d72ca1050525010bbb9c2569b85e050ad62 (diff) |
Refactoring of VmInstanceSettings to extend VmInstanceConfig
VmInstanceSettings, FloatingIPSettings and nova_utils have a
runtime cyclical dependency. This patch reduces this dependency and
deprecates the VmInstanceSettings and FloatingIPSettings class with
snaps.config.vm_inst VmInstanceConfig and FloatingIpConfg classes
JIRA: SNAPS-218
Change-Id: I95688130256bca1df4a5c347bdb741019ae0937e
Signed-off-by: spisarski <s.pisarski@cablelabs.com>
Diffstat (limited to 'examples/demo.py')
-rw-r--r-- | examples/demo.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/examples/demo.py b/examples/demo.py index c888d7b..87c095b 100644 --- a/examples/demo.py +++ b/examples/demo.py @@ -1,4 +1,7 @@ import logging + +from snaps.config.vm_inst import VmInstanceConfig + logging.basicConfig(level=logging.INFO) # Credentials @@ -48,12 +51,11 @@ flavor.create() # Instances from snaps.config.network import PortConfig -from snaps.openstack.create_instance import ( - VmInstanceSettings, OpenStackVmInstance) +from snaps.openstack.create_instance import OpenStackVmInstance port_settings = PortConfig( name='test-port', network_name=network_settings.name) -instance_settings = VmInstanceSettings( +instance_settings = VmInstanceConfig( name='test-inst', flavor=flavor_settings.name, port_settings=[port_settings]) |