Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[2.7] backport cs_instance fixes #46274

Merged
merged 3 commits into from
Oct 10, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions changelogs/fragments/46115-46035-cs_instance-fixes.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
bugfixes:
- cs_instance - Fix host migration without volume (https://github.com/ansible/ansible/pull/46115).
- cs_instance - Fix docs and typo in examples (https://github.com/ansible/ansible/pull/46035).
10 changes: 5 additions & 5 deletions lib/ansible/modules/cloud/cloudstack/cs_instance.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,11 @@
- Name the hypervisor to be used for creating the new instance.
- Relevant when using I(state=present), but only considered if not set on ISO/template.
- If not set or found on ISO/template, first found hypervisor will be used.
choices: [ KVM, VMware, BareMetal, XenServer, LXC, HyperV, UCS, OVM, Simulator ]
choices: [ KVM, kvm, VMware, vmware, BareMetal, baremetal, XenServer, xenserver, LXC, lxc, HyperV, hyperv, UCS, ucs, OVM, ovm, Simulator, simulator ]
keyboard:
description:
- Keyboard device type for the instance.
choices: [ de, de-ch, es, fi, fr, fr-be, fr-ch, is, it, jp, nl-be, no, pt, uk, us ]
choices: [ 'de', 'de-ch', 'es', 'fi', 'fr', 'fr-be', 'fr-ch', 'is', 'it', 'jp', 'nl-be', 'no', 'pt', 'uk', 'us' ]
networks:
description:
- List of networks to use for the new instance.
Expand Down Expand Up @@ -189,7 +189,7 @@
delegate_to: localhost

- name: for changing a running instance, use the 'force' parameter
- cs_instance:
cs_instance:
name: web-vm-1
display_name: web-vm-01.example.com
iso: Linux Debian 7 64-bit
Expand Down Expand Up @@ -840,7 +840,7 @@ def update_instance(self, instance, start_vm=True):
'hostid': self.get_host_id(),
}
if not self.module.check_mode:
res = self.query_api('migrateVirtualMachineWithVolume', **args_host)
res = self.query_api('migrateVirtualMachine', **args_host)
instance = self.poll_job(res, 'virtualmachine')

return instance
Expand Down Expand Up @@ -1004,7 +1004,7 @@ def main():
disk_offering=dict(),
disk_size=dict(type='int'),
root_disk_size=dict(type='int'),
keyboard=dict(choices=['de', 'de-ch', 'es', 'fi', 'fr', 'fr-be', 'fr-ch', 'is', 'it', 'jp', 'nl-be', 'no', 'pt', 'uk', 'us']),
keyboard=dict(type='str', choices=['de', 'de-ch', 'es', 'fi', 'fr', 'fr-be', 'fr-ch', 'is', 'it', 'jp', 'nl-be', 'no', 'pt', 'uk', 'us']),
hypervisor=dict(choices=CS_HYPERVISORS),
host=dict(),
security_groups=dict(type='list', aliases=['security_group']),
Expand Down
1 change: 0 additions & 1 deletion test/sanity/validate-modules/ignore.txt
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,6 @@ lib/ansible/modules/cloud/cloudscale/cloudscale_server.py E325
lib/ansible/modules/cloud/cloudstack/cs_cluster.py E326
lib/ansible/modules/cloud/cloudstack/cs_domain.py E325
lib/ansible/modules/cloud/cloudstack/cs_host.py E326
lib/ansible/modules/cloud/cloudstack/cs_instance.py E326
lib/ansible/modules/cloud/cloudstack/cs_instance_nic_secondaryip.py E325
lib/ansible/modules/cloud/cloudstack/cs_iso.py E323
lib/ansible/modules/cloud/cloudstack/cs_iso.py E325
Expand Down