Commit graph

66 commits

Author SHA1 Message Date
Rene Moser
aef2da2401 cloudstack: use has_changed() from utils 2016-06-09 22:41:32 +02:00
Rene Moser
8a235e4e53 cloudstack: use poll_job() from utils 2016-06-09 22:39:03 +02:00
Rene Moser
efcfe21732 cloudstack: remove duplicate import cs handling, already in utils. 2016-06-09 21:32:45 +02:00
René Moser
30a46ee542 cloudstack: cs_instance: fix template not found (#2005)
Let users decide which filter should be used to find the template.
2016-04-12 18:46:02 +02:00
Rene Moser
c32569d7f8 cloudstack: cs_instance: implement updating security groups
ACS API implemented in 4.8, has no effect < 4.8.
2016-02-03 14:17:33 +01:00
Rene Moser
db31914f58 cloudstack: use CS_HYPERVISORS from cloudstack utils 2016-02-02 19:10:22 +01:00
Rene Moser
11fdb822a4 cloudstack: fixes and improvements
cs_instance: fix case insensitivity
cs_instance: remove duplicate code block
cs_securitygroup_rule: fix KeyError on older ACS
2016-01-11 19:06:36 +01:00
Rene Moser
15b14f8109 cloudstack: cs_instance: fix do not require name to be set to avoid clashes
Require one of display_name or name. If both is given, name is used as identifier.
2015-12-20 22:18:30 +01:00
Rene Moser
99385de340 cloudstack: fixes and improvements
cloudstack: fix python3 support and use type='bool'

cloudstack: cs_instance: update vm on state=restored
2015-12-16 11:09:18 +01:00
Rene Moser
a0a19e16ff cloudstack: cs_instance: fixes and improvements
- cs_instance: fix VM not updated with states given stopped, started, restarted
  A missing VM will be created though but an existing not updated. This fixes the lack of consistency.

- cs_instance: fix user data can not be cleared

- cs_instance: fix deleted VM not recovered on state=present
2015-12-15 08:49:43 +01:00
Brian Coca
cbe0211f3d Merge pull request #1294 from resmo/feature/cs_instance_restore
cloudstack: cs_instance: implement state=restored
2015-12-14 23:17:51 -05:00
Rene Moser
8ec66713d9 cloudstack: fixes and improvements
- cs_affinitygroup: add project support
  Project support in CloudStack for affinity groups is going to be fixed/implemented in the near future, this module should already support.

- cs_affinitygroup:  fix missing returns in doc

- cs_volume: fix disk offering not found

- cs_volume: fix volume not found if created with display_volume=no

- cs_firewall: argument zone is missing, default zone is always used.
  credits for reporting and fixing to @atsaki
  closes #1320

- cs_instance: fix user_data base64 encoding fails if not a string
2015-12-04 09:39:53 +01:00
Rene Moser
f2eb00cc71 cloudstack: cs_instance: implement state=restored 2015-11-30 17:08:07 +01:00
Greg DeKoenigsberg
b69362647a Merge pull request #1011 from resmo/feature/args_specs
cloudstack: implement common argument spec handling
2015-09-30 16:47:19 -04:00
Rene Moser
bcfe75a52d cloudstack: fix redundant security_group return 2015-09-22 18:28:18 +02:00
Rene Moser
faa575afb5 cloudstack: implement common argument spec handling 2015-09-22 18:24:04 +02:00
Brian Coca
4a6285b774 Merge pull request #886 from DazWorrall/feature/cs_instance_custom
Add support for custom service offerings
2015-09-04 12:46:08 -04:00
Toshio Kuratomi
903d209071 Merge pull request #896 from resmo/for-ansible
cloudstack: add api_region arg
2015-09-03 13:00:05 -07:00
Rene Moser
0c1257b0c1 cloudstack: cs_instance: deploy instance in desired state on state=started/stopped
Before this change, an instance must be present for make use of state=stopped/started. Now we are deploying an instance in the desire state if it does not exist.

In this case all args needed to deploy the instance must be passed. However the short form for stopping/starting an _existing_ instance still works as before.
2015-09-01 00:36:15 +02:00
Rene Moser
52a3d99873 cloudstack: add api_region arg
* docs in module_docs_fragments/cloudstack.py
* implemented in module_utils/cloudstack.py -> https://github.com/ansible/ansible/pull/12083
2015-08-31 15:55:22 +02:00
Darren Worrall
a284c4e974 More doc fixes 2015-08-28 13:29:30 +01:00
Darren Worrall
37b601b5f9 Doc fix 2015-08-28 09:00:30 +01:00
Darren Worrall
50d9589bc8 Use module level validation for params 2015-08-28 08:21:20 +01:00
Darren Worrall
e8137d4065 Add support for custom service offerings
This adds 3 new params: cpu, cpu_speed, and memory, which are required
together.
2015-08-27 09:19:51 +01:00
Rene Moser
249b7bf969 cloudstack: cs_instance: fix ip address may not be set on default nic 2015-08-23 00:01:52 +02:00
Rene Moser
28ad84b87a cloudstack: add Simulator as hypervisor 2015-08-19 21:53:07 +02:00
Rene Moser
2e52f11dc3 cloudstack: use new get_result() handling 2015-08-17 22:33:59 +02:00
Brian Coca
e31a4be192 fixes to prevent doc brekage 2015-08-13 00:00:09 -04:00
Brian Coca
1e067a96ea Merge pull request #828 from resmo/for-ansible
cloudstack: fixes, docs, imrovements
2015-08-11 12:50:09 -04:00
Brian Coca
c310d3a8cd Merge pull request #826 from DazWorrall/feature/cs_instance_iptonetwork
Add iptonetwork parameter to cs_instance
2015-08-11 12:18:33 -04:00
Darren Worrall
2be506dbdf Add alias 2015-08-11 15:42:55 +01:00
Darren Worrall
53e447e38e Api tidy up 2015-08-11 15:41:07 +01:00
Darren Worrall
ecfd18a941 Rename param to ip_to_networks 2015-08-11 15:33:20 +01:00
Rene Moser
713cec4423 cloudstack: cs_instance: use mutually_exlusive of AnsibleModule 2015-08-11 16:11:19 +02:00
Darren Worrall
d11182b80b Add iptonetwork parameter 2015-08-11 14:23:28 +01:00
Milamber
51f3b9f6dd Add an option to allow the resize of root disk when the instance is created. (need CloudStack 4.4 or +, cloud-initramfs-growroot installed on the template)
Signed-off-by: Milamber <milamber@apache.org>
2015-08-11 07:48:15 +01:00
Rene Moser
cbb2e96993 cloudstack: doc fixes 2015-08-08 15:43:32 +02:00
Rene Moser
e71daafd8e cloudstack: fix KeyError: 'public_ip' in cs_instance 2015-08-08 15:40:05 +02:00
Rene Moser
7d6738ab9d cloudstack: cs_instance: fix display_name not used in deployment 2015-07-19 15:10:36 +02:00
Rene Moser
8e6e9c782b cloudstack: use get_or_fallback() from cloudstack utils 2015-07-19 15:09:49 +02:00
Rene Moser
1ccb21bd18 cloudstack: cs_instance: fix missing resource error in check mode if instance is not yet present 2015-07-10 17:36:20 +02:00
Rene Moser
db33fcf89a cloudstack: update code to match best practice
* Remove catchall exception
* use `if __name__ == '__main__':`
2015-06-28 12:52:05 +02:00
Rene Moser
94060b5ade cloudstack: fix state=expunged in cs_instance 2015-06-27 11:48:54 +02:00
Rene Moser
5b86a15cdb cloudstack: cs_instance do not pass zoneid to listVirtualMachines
This change is related to 2 issues;

- The API does not return destroyed VMs if zone ID is passed for CS version < 4.5.2. Also see CLOUDSTACK-8578. This only affects domain and root admins.
- The instance name must be unique across all zones. If we pass the zone ID to find  a VM, it will not be found if it is in a different zone but a deployment with the name would fail.
2015-06-27 11:48:54 +02:00
Rene Moser
c8d6d68428 cloudstack: cleanup cs_instance use param key exlicitly for utils methods 2015-06-27 11:48:54 +02:00
Rene Moser
b031e818b1 cloudstack: fix cs_instance can not find iso and disk offering if domain is set.
This does only affect root admins.
2015-06-27 11:47:49 +02:00
Rene Moser
b1e6d6ba52 cloudstack: fix cs_instance hypervisor must be omitted if set on template/iso
Fix related to issue reported in PR GH-646
2015-06-26 14:52:31 +02:00
Rene Moser
60b5ae35b3 cloudstack: make get_template_or_iso returning a dict for fix GH-646 2015-06-26 14:23:35 +02:00
Greg DeKoenigsberg
004dedba8a Changes to author formatting, remove emails 2015-06-16 14:32:39 -04:00
Rene Moser
421b3ff24e cloudstack: fix doc for cs_instance, force is defaulted to false 2015-06-16 11:33:12 -04:00