mirror of
https://opendev.org/openstack/ansible-collections-openstack.git
synced 2026-04-12 20:01:17 +00:00
Renamed image property protected to is_protected
OpenStack SDK removed support for the deprecated image property
protected in commit afb49692 [1][2]. This replaces the usage of
protected with is_protected in openstack.cloud.image but adds
protected as an alias to not break backward compatibility for
user code. This breaks backward compatibility to older OpenStack
SDK releases though.
Ref.:
[1] afb49692f5
[2] https://review.opendev.org/c/openstack/openstacksdk/+/820926
Change-Id: I5044c927e90c650234fbc22375f44e6841a485a1
This commit is contained in:
@@ -57,9 +57,10 @@ options:
|
|||||||
- Whether the image can be accessed publicly. Note that publicizing an image requires admin role by default.
|
- Whether the image can be accessed publicly. Note that publicizing an image requires admin role by default.
|
||||||
type: bool
|
type: bool
|
||||||
default: false
|
default: false
|
||||||
protected:
|
is_protected:
|
||||||
description:
|
description:
|
||||||
- Prevent image from being deleted
|
- Prevent image from being deleted
|
||||||
|
aliases: ['protected']
|
||||||
type: bool
|
type: bool
|
||||||
default: false
|
default: false
|
||||||
filename:
|
filename:
|
||||||
@@ -173,7 +174,7 @@ class ImageModule(OpenStackModule):
|
|||||||
min_disk=dict(type='int', default=0),
|
min_disk=dict(type='int', default=0),
|
||||||
min_ram=dict(type='int', default=0),
|
min_ram=dict(type='int', default=0),
|
||||||
is_public=dict(type='bool', default=False),
|
is_public=dict(type='bool', default=False),
|
||||||
protected=dict(type='bool', default=False),
|
is_protected=dict(type='bool', default=False, aliases=['protected']),
|
||||||
filename=dict(type='str'),
|
filename=dict(type='str'),
|
||||||
ramdisk=dict(type='str'),
|
ramdisk=dict(type='str'),
|
||||||
kernel=dict(type='str'),
|
kernel=dict(type='str'),
|
||||||
@@ -210,7 +211,7 @@ class ImageModule(OpenStackModule):
|
|||||||
wait=self.params['wait'],
|
wait=self.params['wait'],
|
||||||
timeout=self.params['timeout'],
|
timeout=self.params['timeout'],
|
||||||
is_public=self.params['is_public'],
|
is_public=self.params['is_public'],
|
||||||
protected=self.params['protected'],
|
is_protected=self.params['is_protected'],
|
||||||
min_disk=self.params['min_disk'],
|
min_disk=self.params['min_disk'],
|
||||||
min_ram=self.params['min_ram'],
|
min_ram=self.params['min_ram'],
|
||||||
volume=self.params['volume'],
|
volume=self.params['volume'],
|
||||||
@@ -225,7 +226,7 @@ class ImageModule(OpenStackModule):
|
|||||||
image=image,
|
image=image,
|
||||||
kernel=self.params['kernel'],
|
kernel=self.params['kernel'],
|
||||||
ramdisk=self.params['ramdisk'],
|
ramdisk=self.params['ramdisk'],
|
||||||
protected=self.params['protected'],
|
is_protected=self.params['is_protected'],
|
||||||
**self.params['properties'])
|
**self.params['properties'])
|
||||||
if self.params['tags']:
|
if self.params['tags']:
|
||||||
self.conn.image.update_image(image.id, tags=self.params['tags'])
|
self.conn.image.update_image(image.id, tags=self.params['tags'])
|
||||||
|
|||||||
Reference in New Issue
Block a user