adding ability to set openstack image ids
This commit is contained in:
parent
6608629d25
commit
de5fb8d98c
1 changed files with 7 additions and 0 deletions
|
@ -38,6 +38,11 @@ options:
|
||||||
- Name that has to be given to the image
|
- Name that has to be given to the image
|
||||||
required: true
|
required: true
|
||||||
default: None
|
default: None
|
||||||
|
id:
|
||||||
|
description:
|
||||||
|
- The Id of the image
|
||||||
|
required: false
|
||||||
|
default: None
|
||||||
disk_format:
|
disk_format:
|
||||||
description:
|
description:
|
||||||
- The format of the disk that is getting uploaded
|
- The format of the disk that is getting uploaded
|
||||||
|
@ -131,6 +136,7 @@ def main():
|
||||||
|
|
||||||
argument_spec = openstack_full_argument_spec(
|
argument_spec = openstack_full_argument_spec(
|
||||||
name = dict(required=True),
|
name = dict(required=True),
|
||||||
|
id = dict(default=None),
|
||||||
disk_format = dict(default='qcow2', choices=['ami', 'ari', 'aki', 'vhd', 'vmdk', 'raw', 'qcow2', 'vdi', 'iso', 'vhdx', 'ploop']),
|
disk_format = dict(default='qcow2', choices=['ami', 'ari', 'aki', 'vhd', 'vmdk', 'raw', 'qcow2', 'vdi', 'iso', 'vhdx', 'ploop']),
|
||||||
container_format = dict(default='bare', choices=['ami', 'aki', 'ari', 'bare', 'ovf', 'ova', 'docker']),
|
container_format = dict(default='bare', choices=['ami', 'aki', 'ari', 'bare', 'ovf', 'ova', 'docker']),
|
||||||
owner = dict(default=None),
|
owner = dict(default=None),
|
||||||
|
@ -159,6 +165,7 @@ def main():
|
||||||
if not image:
|
if not image:
|
||||||
image = cloud.create_image(
|
image = cloud.create_image(
|
||||||
name=module.params['name'],
|
name=module.params['name'],
|
||||||
|
id=module.params['id'],
|
||||||
filename=module.params['filename'],
|
filename=module.params['filename'],
|
||||||
disk_format=module.params['disk_format'],
|
disk_format=module.params['disk_format'],
|
||||||
container_format=module.params['container_format'],
|
container_format=module.params['container_format'],
|
||||||
|
|
Loading…
Reference in a new issue