adding ability to set openstack image ids

pull/26813/head
Peter Shrom 8 years ago committed by Brian Coca
parent 6608629d25
commit de5fb8d98c

@ -38,6 +38,11 @@ options:
- Name that has to be given to the image
required: true
default: None
id:
description:
- The Id of the image
required: false
default: None
disk_format:
description:
- The format of the disk that is getting uploaded
@ -131,6 +136,7 @@ def main():
argument_spec = openstack_full_argument_spec(
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']),
container_format = dict(default='bare', choices=['ami', 'aki', 'ari', 'bare', 'ovf', 'ova', 'docker']),
owner = dict(default=None),
@ -159,6 +165,7 @@ def main():
if not image:
image = cloud.create_image(
name=module.params['name'],
id=module.params['id'],
filename=module.params['filename'],
disk_format=module.params['disk_format'],
container_format=module.params['container_format'],

Loading…
Cancel
Save