Commit Graph

41 Commits

Author SHA1 Message Date
27c621950c cloudstack: fix has_changed dict values comparsion (#17632)
In some rare situations, the CloudStack API returns string for numbers
when we expected int.

With this fix, we ensure we compare the types expected.
2016-09-19 14:08:21 +02:00
5b9f795140 cloudstack: handle unicode API results in has_changed (#16601)
* cloudstack: handle unicode API results in has_changed

* cloudstack: add more case sensitve keys
2016-07-07 11:01:30 +02:00
65e61e340a cloudstack: fix bug, api_secret always None
In case if api args are used, api_secret is None in every cloudstack module.
2016-03-31 00:04:42 +02:00
6c641fb6a8 cloudstack: add CS_HYPERVISORS constant 2016-03-01 08:05:32 +01:00
766738ef7c cloudstack: fix case insensitivity
cloudstack: fix has_change reports changed for case insensitivity values
2016-01-10 22:38:18 +01:00
1d59caed07 cloudstack: change order of tags handling, fixes update of tag value does not work 2015-11-08 20:27:01 +01:00
3410a855b0 cloudstack: use jop polling in tag handling, fixes outdated tags returned.
In some cases the async job did not finish fast enough, causing returning an unexpeded result.
2015-11-08 20:23:06 +01:00
1bc75374dc Add imports for stdlib modules that are used.
This is cleanup that will aid us when we get ziploader implemented for 2.1
2015-11-02 12:02:26 -08:00
c09a34bb10 cloudstack: clean up unneeded ";" 2015-11-01 17:13:46 +01:00
744679601f Remove mutable default arguments. 2015-10-20 22:13:23 -07:00
b43939dfd6 cloudstack: make tags handling idempotence
Credits to @jeffersongirao, who provided the patch.
2015-09-22 16:12:35 +02:00
efd122c2f0 cloudstack: add returns_to_int return handling into utils
It is not uncommon that the API returns string for int values e.g. ports in listFirewallRules or listPortForwardings,
2015-09-22 14:44:08 +02:00
c9a3801a25 cloudstack: common argument_spec and requried_together to utils 2015-09-22 14:36:43 +02:00
3db4039ad1 cloudstack: implement general api_region support, update docs 2015-08-25 13:54:21 +02:00
d16429b59c cloudstack: rename returns for consistency 2015-08-19 21:25:19 +02:00
2913d2b44d cloudstack: add more common returns 2015-08-17 08:21:37 +02:00
4f3c863b42 cloudstack: refactor get_result()
* A commen dict of keys has been defined, which we look in results returned from the API.
* self.returns dict can be use in subclass to extend this dict.
* Optionally the key name can be replaced with a new key name, often used to make the return keys identical to the arguments passed.
* Use new style class
2015-08-12 23:14:17 +02:00
e62fbf5fba cloudstack: add get_result() in utils to return common results 2015-08-11 18:03:50 +02:00
7952723530 cloudstack: fix domain name is not unique, use full path 2015-06-26 09:25:26 +02:00
b9b1e294d7 cloudstack: add get_or_failback() 2015-06-26 09:25:26 +02:00
0b074c449b cloudstack: methods renaming 2015-06-10 17:31:46 +02:00
7b3dd55c3d cloudstack: remove unused methods used for backward compatibility 2015-06-10 17:28:45 +02:00
fc3020c57a cloudstack: prevent getting the wrong project.
Since we use domain and account data to filter the project, listall is not needed and can return the wrong identical named project of another account if root admin permissions are used.

Fixed projects names are not case insensitive.
2015-06-09 16:16:58 +02:00
caf3cf6930 cloudstack: add timeout to utils 2015-06-02 14:51:25 +02:00
62ccc1b9b6 cloudstack: fix typo in variable, fixes get_domain() 2015-05-08 16:42:07 +02:00
333c623b35 cloudstack: implement account und domain support in utils 2015-05-03 14:59:44 +02:00
af74d7f1a9 cloudstack: add get_domain() and get_account() to utils 2015-05-03 14:34:25 +02:00
034ac8ae78 cloudstack: _has_changed() should not compare None values 2015-05-01 17:25:06 +02:00
b11cd73df1 cloudstack: add tag support in utils 2015-04-29 21:06:58 +02:00
2f255f5b96 cloudstack: get_vm(): fix missing zone
Fixes returning wrong VM having identical name in different zone.
2015-04-26 23:09:33 +02:00
ca88189bf7 cloudstack: add method to to get infos of API
get_capabilities() allows you to get infos e.g. `cloudstackversion`
to compare functionality of the API in your modules.
2015-04-25 18:32:02 +02:00
3c0e406f5d cloudstack: fix missing self. in cloudstack utils 2015-04-24 20:25:19 +02:00
6354ca0718 cloudstack: add _has_changed() to utils
Generic method to compare values in dict.
2015-04-24 19:16:42 +02:00
765c8fe368 cloudstack: use _get_by_key in get_...() methods in utils
But also add backward compatibility for existing modules in extras.
2015-04-24 19:09:49 +02:00
88540d3cdc cloudstack: add _get_by_key() to utils
Generic method to get the whole dict or just a singe value by key if found.
2015-04-24 19:06:33 +02:00
31520cdd17 cloudstack: fix other projects not found 2015-04-24 18:58:57 +02:00
822c2c0cd3 cloudstack: fix vm not found by displayname 2015-04-20 09:40:49 -05:00
0a26b149fc cloudstack: add error result handling in async job 2015-04-20 09:40:49 -05:00
3e7d959c9d cloudstack: module utils are BSD licensed 2015-03-26 15:39:02 +01:00
c066a60b7c cloudstack: fail_json() if library cs is not found 2015-03-26 15:32:58 +01:00
bb6d983290 cloudstack: add utils for common functionality 2015-03-26 14:18:13 +01:00