mirror of
https://opendev.org/openstack/ansible-collections-openstack.git
synced 2026-07-29 11:14:30 +00:00
Added is_multiattach parameter to volume module
Change-Id: Ieb98d78d730ee51480c78053152da265481c11f1
This commit is contained in:
committed by
Jakob Meng
parent
7d9de2858a
commit
52e7bfe7a4
@@ -13,6 +13,7 @@ expected_fields:
|
|||||||
- image_id
|
- image_id
|
||||||
- is_bootable
|
- is_bootable
|
||||||
- is_encrypted
|
- is_encrypted
|
||||||
|
- is_multiattach
|
||||||
- migration_id
|
- migration_id
|
||||||
- migration_status
|
- migration_status
|
||||||
- project_id
|
- project_id
|
||||||
|
|||||||
@@ -32,6 +32,15 @@ options:
|
|||||||
type: bool
|
type: bool
|
||||||
default: False
|
default: False
|
||||||
aliases: [bootable]
|
aliases: [bootable]
|
||||||
|
is_multiattach:
|
||||||
|
description:
|
||||||
|
- Whether volume will be sharable or not.
|
||||||
|
- To enable this volume to attach to more than one server, set
|
||||||
|
I(is_multiattach) to C(true).
|
||||||
|
- Note that support for multiattach volumes depends on the volume
|
||||||
|
type being used.
|
||||||
|
- "Cinder's default for I(is_multiattach) is C(false)."
|
||||||
|
type: bool
|
||||||
metadata:
|
metadata:
|
||||||
description:
|
description:
|
||||||
- Metadata for the volume
|
- Metadata for the volume
|
||||||
@@ -140,6 +149,10 @@ volume:
|
|||||||
is_encrypted:
|
is_encrypted:
|
||||||
description: If true, this volume is encrypted.
|
description: If true, this volume is encrypted.
|
||||||
type: bool
|
type: bool
|
||||||
|
is_multiattach:
|
||||||
|
description: Whether this volume can be attached to more than one
|
||||||
|
server.
|
||||||
|
type: bool
|
||||||
metadata:
|
metadata:
|
||||||
description: A metadata object. Contains one or more metadata key and
|
description: A metadata object. Contains one or more metadata key and
|
||||||
value pairs that are associated with the volume.
|
value pairs that are associated with the volume.
|
||||||
@@ -207,6 +220,7 @@ class VolumeModule(OpenStackModule):
|
|||||||
description=dict(aliases=['display_description']),
|
description=dict(aliases=['display_description']),
|
||||||
image=dict(),
|
image=dict(),
|
||||||
is_bootable=dict(type='bool', default=False, aliases=['bootable']),
|
is_bootable=dict(type='bool', default=False, aliases=['bootable']),
|
||||||
|
is_multiattach=dict(type='bool'),
|
||||||
metadata=dict(type='dict'),
|
metadata=dict(type='dict'),
|
||||||
name=dict(required=True, aliases=['display_name']),
|
name=dict(required=True, aliases=['display_name']),
|
||||||
scheduler_hints=dict(type='dict'),
|
scheduler_hints=dict(type='dict'),
|
||||||
@@ -263,8 +277,8 @@ class VolumeModule(OpenStackModule):
|
|||||||
self.exit_json(changed=True, volume=volume, diff=diff)
|
self.exit_json(changed=True, volume=volume, diff=diff)
|
||||||
|
|
||||||
def _build_create_kwargs(self):
|
def _build_create_kwargs(self):
|
||||||
keys = ('availability_zone', 'size', 'name', 'description',
|
keys = ('availability_zone', 'is_multiattach', 'size', 'name',
|
||||||
'volume_type', 'scheduler_hints', 'metadata')
|
'description', 'volume_type', 'scheduler_hints', 'metadata')
|
||||||
kwargs = {k: self.params[k] for k in keys
|
kwargs = {k: self.params[k] for k in keys
|
||||||
if self.params[k] is not None}
|
if self.params[k] is not None}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user