Commit Graph

67 Commits (2df3f310faaf37fae3ade246ca82334c430dd7aa)

Author SHA1 Message Date
Rene Moser 2df3f310fa cloudstack: fix timeout in ini config file is ignored
(partly cherry picked from commit 1c3bba0bdb)
8 years ago
René Moser 8320071e81 cloudstack: utils: reduce cs lib dependency in modules (#26848)
Also improves error handling and reduces code duplication
9 years ago
Marc-Aurèle Brothier ee8ce99bed cloudstack: add nic operation (#26168)
* CloudStack: Remove networkid parameter in global list

* New module for CloudStack VM's Nic

Closes #25911

* Review changes
9 years ago
René Moser 4ffc4b6748 cloudstack: add missing zone name to result (#25806) 9 years ago
Abhijeet Kasurde b7558f5018 Add missing msg keyword in fail_json (#25635)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
9 years ago
René Moser 53c46df323 cloudstack: new module cs_network_acl_rule (#25325)
* cloudstack: new module cs_network_acl_rule
* fix doc errors
9 years ago
René Moser d5b04aa1f1 cloudstack: add check mode tests (#24908)
* cloudstack: test: cs_network_acl: add check_mode tests

* cloudstack: test: cs_pod: add check_mode tests

* cloudstack: test: cs_user: add check_mode tests

* cloudstack: test: cs_sshkeypair: add check_mode tests

* cloudstack: test: cs_project: add check_mode tests

* cloudstack: test: cs_vpc: add check_mode tests

* cloudstack: test: cs_vpn_gateway: add check_mode tests

* cloudstack: test: cs_volume: add check_mode tests

* cloudstack: test: cs_vmsnapshot: add check_mode tests

* cloudstack: test: cs_account: add check_mode tests

* cloudstack: test: cs_affinitygroup: add check_mode tests

* cloudstack: test: cs_cluster: add check_mode tests

* cloudstack: test: cs_domain: add check_mode tests

* cloudstack: test: cs_instancegroup: add check_mode tests

* cloudstack: test: cs_iso: add check_mode tests

* cloudstack: test: cs_loadbalancer_rule: add check_mode tests

* cloudstack: test: cs_portforward: add check_mode tests

* cloudstack: test: cs_resourcelimit: add check_mode tests

* cloudstack: test: cs_securitygroup: add check_mode tests

* cloudstack: test: cs_securitygroup_rule: add check_mode tests

* cloudstack: test: cs_configuration: add check_mode tests

* cloudstack: test: cs_firewall: add check_mode tests

* cloudstack: test: cs_instance: add check_mode tests

* cloudstack: query current tags from API

Fixes unexpected tags returned in check mode.
9 years ago
René Moser 19e7abb971 cloudstack: return known used resources in fail_json (#24575) 9 years ago
Matt Clay d999d613cb Python 3 fixes for CloudStack modules and tests. (#24400) 9 years ago
René Moser b90517caf9 cloudstack: implement config overloading and ENV vars for API auth (#22724)
* cloudstack: fix connection by ENV vars and configs overloading

* cloudstack: pep8 cloudstack module_utils

* cloudstack: allow api_url to be set in ini config

* docsite: explain ENV vars support as written in python-cs for ansible
9 years ago
René Moser 0ee108bda0 cloudstack: cs_instance: revert VPC support (#22629)
Partly reverts 5374c7cd09
9 years ago
René Moser 2be3418a81 cloudstack: fix wrong vpc found by name (#22603)
Fail fast if more than one VPC found with given identifier.
9 years ago
René Moser a6f887ce6e cloudstack: cs_portforward: implement vpc support (#19044)
* cloudstack: cs_portforward: implement vpc support

* cloudstack: cs_portforward: add vpc and network to returns

* cloudstack: cs_portforward: networkid must not be used for rule listing

* cloudstack: fail for get_network when vpc but no network name

This seem to be a global pattern for get_network, we want to enforce a
network name to be set if a vpn param is given.

This is used for cs_portforward.

* cloudstack: cs_portforward: doc: fix defaults for vpc, network
9 years ago
Andrea Tartaglia 59227d8c31 Removed dict.iteritems() in several other files.
This is for py3 compatibility #18506
9 years ago
René Moser 18b7852940 cloudstack: utils: fail friendlier if no zones available (#19332) 9 years ago
René Moser 72f75fd9e0 cloudstack: add helpers to distinguish VMs not in VPC (#18560)
VMs in VPC and not in VPC can have an identical name. As a result VMs in a VPC must be sorted out if no VPC is given.
Due the API limitation, the only way is to check if the network of the VM is in a VPC.
9 years ago
René Moser ff7051bab4 cloudstack: fix distinguish VPC and other networks (#18515) 9 years ago
René Moser b08ef44da0 cloudstack: extend support for VPC (#18434) 9 years ago
René Moser 80af461178 cloudstack: add additional CLOUDSTACK_VPC env var (#18467) 9 years ago
Daniel Menet 19fdb58948 fix iteritems for python 3 9 years ago
René Moser 44bdc6fb79 cloudstack: implement diff support (#18254) 9 years ago
René Moser 01af859090 cloudstack: add support for defining some args as ENV vars (#17946)
These ENV vars are:
  - CLOUDSTACK_ZONE
  - CLOUDSTACK_DOMAIN
  - CLOUDSTACK_ACCOUNT
  - CLOUDSTACK_PROJECT

help to DRY on every task, args still have precedence.
9 years ago
René Moser 6247e7bc38 cloudstack: move common code to module_utils (#17635) 9 years ago
René Moser 3f6f4617dc 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.
9 years ago
René Moser 0f5f5fffee cloudstack: handle unicode API results in has_changed (#16601)
* cloudstack: handle unicode API results in has_changed

* cloudstack: add more case sensitve keys
10 years ago
René Moser 7aca70b4b0 cloudstack: simplify tag handling (#16188)
Fixes tag support in projects.
10 years ago
Rene Moser 62c424797a cloudstack: add common network code
Also used for VPC support.
10 years ago
Rene Moser fe05c5e35a cloudstack: add VPC support 10 years ago
Rene Moser 65e61e340a cloudstack: fix bug, api_secret always None
In case if api args are used, api_secret is None in every cloudstack module.
10 years ago
Rene Moser 6c641fb6a8 cloudstack: add CS_HYPERVISORS constant 10 years ago
Rene Moser 766738ef7c cloudstack: fix case insensitivity
cloudstack: fix has_change reports changed for case insensitivity values
10 years ago
Rene Moser 1d59caed07 cloudstack: change order of tags handling, fixes update of tag value does not work 10 years ago
Rene Moser 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.
10 years ago
Toshio Kuratomi 1bc75374dc Add imports for stdlib modules that are used.
This is cleanup that will aid us when we get ziploader implemented for 2.1
10 years ago
Rene Moser c09a34bb10 cloudstack: clean up unneeded ";" 10 years ago
gduke 744679601f Remove mutable default arguments. 10 years ago
Rene Moser b43939dfd6 cloudstack: make tags handling idempotence
Credits to @jeffersongirao, who provided the patch.
10 years ago
Rene Moser 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,
10 years ago
Rene Moser c9a3801a25 cloudstack: common argument_spec and requried_together to utils 10 years ago
Rene Moser 3db4039ad1 cloudstack: implement general api_region support, update docs 10 years ago
Rene Moser d16429b59c cloudstack: rename returns for consistency 10 years ago
Rene Moser 2913d2b44d cloudstack: add more common returns 11 years ago
Rene Moser 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
11 years ago
Rene Moser e62fbf5fba cloudstack: add get_result() in utils to return common results 11 years ago
Rene Moser 7952723530 cloudstack: fix domain name is not unique, use full path 11 years ago
Rene Moser b9b1e294d7 cloudstack: add get_or_failback() 11 years ago
Rene Moser 0b074c449b cloudstack: methods renaming 11 years ago
Rene Moser 7b3dd55c3d cloudstack: remove unused methods used for backward compatibility 11 years ago
Rene Moser 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.
11 years ago
Rene Moser caf3cf6930 cloudstack: add timeout to utils 11 years ago