summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rw-r--r--examples/demo.py7
-rw-r--r--examples/launch.py5
2 files changed, 7 insertions, 5 deletions
diff --git a/examples/demo.py b/examples/demo.py
index 108bdc0..faf6459 100644
--- a/examples/demo.py
+++ b/examples/demo.py
@@ -13,10 +13,11 @@ os_creds = OSCreds(username='admin', password='cable123', auth_url='http://192.1
# Images
-from snaps.openstack.create_image import ImageSettings, OpenStackImage
+from snaps.openstack.create_image import OpenStackImage
+from snaps.config.image import ImageConfig
-image_settings = ImageSettings(name='cirros-test', image_user='cirros', img_format='qcow2',
- url='http://download.cirros-cloud.net/0.3.4/cirros-0.3.4-x86_64-disk.img')
+image_settings = ImageConfig(name='cirros-test', image_user='cirros', img_format='qcow2',
+ url='http://download.cirros-cloud.net/0.3.4/cirros-0.3.4-x86_64-disk.img')
image = OpenStackImage(os_creds, image_settings)
image.create()
diff --git a/examples/launch.py b/examples/launch.py
index 88ff420..debb52f 100644
--- a/examples/launch.py
+++ b/examples/launch.py
@@ -27,7 +27,8 @@ import yaml
from snaps import file_utils
from snaps.openstack.create_flavor import FlavorSettings, OpenStackFlavor
-from snaps.openstack.create_image import ImageSettings, OpenStackImage
+from snaps.openstack.create_image import OpenStackImage
+from snaps.config.image import ImageConfig
from snaps.openstack.create_instance import VmInstanceSettings
from snaps.openstack.create_keypairs import KeypairSettings, OpenStackKeypair
from snaps.openstack.create_network import (
@@ -659,7 +660,7 @@ def main(arguments):
# Create images
images_dict = __create_instances(
- os_creds_dict, OpenStackImage, ImageSettings,
+ os_creds_dict, OpenStackImage, ImageConfig,
os_config.get('images'), 'image', clean, users_dict)
creators.append(images_dict)