-class ImageSettings:
- def __init__(self, config=None, name=None, image_user=None, img_format=None, url=None, image_file=None,
- extra_properties=None, nic_config_pb_loc=None, kernel_image_settings=None,
- ramdisk_image_settings=None):
- """
-
- :param config: dict() object containing the configuration settings using the attribute names below as each
- member's the key and overrides any of the other parameters.
- :param name: the image's name (required)
- :param image_user: the image's default sudo user (required)
- :param img_format: the image type (required)
- :param url: the image download location (requires url or img_file)
- :param image_file: the image file location (requires url or img_file)
- :param extra_properties: dict() object containing extra parameters to pass when loading the image;
- can be ids of kernel and initramfs images for a 3-part image
- :param nic_config_pb_loc: the file location to the Ansible Playbook that can configure multiple NICs
- :param kernel_image_settings: the settings for a kernel image
- :param ramdisk_image_settings: the settings for a kernel image
- """
-
- if config:
- self.name = config.get('name')
- self.image_user = config.get('image_user')
- self.format = config.get('format')
- self.url = config.get('download_url')
- self.image_file = config.get('image_file')
- self.extra_properties = config.get('extra_properties')
- self.nic_config_pb_loc = config.get('nic_config_pb_loc')
- if config.get('kernel_image_settings'):
- self.kernel_image_settings = ImageSettings(config=config['kernel_image_settings'])
- else:
- self.kernel_image_settings = None
+class ImageSettings(image.ImageConfig):
+ """
+ Deprecated, use snaps.config.image.ImageSettings instead
+ """
+ def __init__(self, **kwargs):
+ from warnings import warn
+ warn('Use snaps.config.image.ImageConfig instead', DeprecationWarning)
+ super(ImageSettings, self).__init__(**kwargs)