diff options
author | Zim Kalinowski <zikalino@microsoft.com> | 2018-01-17 08:05:45 +0800 |
---|---|---|
committer | Jordan Borean <jborean93@gmail.com> | 2018-01-17 10:05:45 +1000 |
commit | 7d05a86bbca5accde08254c9909be17c0d0148be (patch) | |
tree | 542f728a87faeb7a6e2207faf624b5779f1fdb67 /test/integration/targets/azure_rm_containerinstance | |
parent | 5fa1edc15d5ac62ded3c76a517e5bb1c57d18148 (diff) | |
download | ansible-7d05a86bbca5accde08254c9909be17c0d0148be.tar.gz |
[new module] Add Azure Container Instance support - cloud/azure/azure_rm_containerinstance (#32025)
* first dirty container instance
* added my name ;-)
* more updates
* more updates
* removed unnecessary stuff
* container instance updates
* several fixes
* undo changes in common
* removed unnecessary references, fixed delete
* added / updated parameters
* updated samples & comments
* updated docs, comments, samples and added registry credentials
* added ip address and port
* query existing container instance (but result not used yet)
* some major changes to the module
* more fixes
* added requirement for containerinstance module
* adding integration test
* fixes for pull request
* updated version
* updated version to 2.5
* updated version
* updated integration.cloud.azure.txt as requested by test framework
* removed due to merge reasons
* updated requirements-azure.txt
* undone azure-rm-common
* lf
* properly update test requirements
* first dirty container instance
* container instance updates
* several fixes
* review related updates
* review related fixes
* undo changes in common
* added / updated parameters
* query existing container instance (but result not used yet)
* updated version to 2.5
* updated version
* removed due to merge reasons
* updated requirements-azure.txt
* undone azure-rm-common
* properly update test requirements
* minor fix - sanity
* fix one issue after rebasing
* removed files accidentally added while rebasing
* removed checking for changes
* several fixes
* fixed sanity
* updates as requested by reviewers
* removed ci as it doesn't work
* reenabled ci
* renamed container instance, removed required: false
* removed default: null
* final updates according to the review
* one more fix
* first dirty container instance
* added my name ;-)
* more updates
* more updates
* removed unnecessary stuff
* container instance updates
* several fixes
* undo changes in common
* removed unnecessary references, fixed delete
* added / updated parameters
* updated samples & comments
* updated docs, comments, samples and added registry credentials
* added ip address and port
* query existing container instance (but result not used yet)
* some major changes to the module
* more fixes
* adding integration test
* fixes for pull request
* updated version
* updated version to 2.5
* updated version
* updated integration.cloud.azure.txt as requested by test framework
* removed due to merge reasons
* updated requirements-azure.txt
* undone azure-rm-common
* lf
* properly update test requirements
* review related updates
* first dirty container instance
* container instance updates
* several fixes
* review related fixes
* undo changes in common
* added / updated parameters
* query existing container instance (but result not used yet)
* updated version to 2.5
* updated version
* removed due to merge reasons
* updated requirements-azure.txt
* undone azure-rm-common
* properly update test requirements
* minor fix - sanity
* fix one issue after rebasing
* removed files accidentally added while rebasing
* removed checking for changes
* several fixes
* fixed sanity
* updates as requested by reviewers
* removed ci as it doesn't work
* reenabled ci
* renamed container instance, removed required: false
* removed default: null
* final updates according to the review
* one more fix
* changed location as default from resource group can't handle containers
* updates to container instance
* fixed mistakes during merge
* one more fix
* another mistake
* container instance fixes
* several fixes to container instance
* return value fix
* minor update
* just one api version right now
* fixed api version
* container instance does not suppurt api version
* removed unnecessary try blocks
* removed tags related things
* fixed pep8
* final fixes?
* final updates to the module
* more fixes
Diffstat (limited to 'test/integration/targets/azure_rm_containerinstance')
3 files changed, 130 insertions, 0 deletions
diff --git a/test/integration/targets/azure_rm_containerinstance/aliases b/test/integration/targets/azure_rm_containerinstance/aliases new file mode 100644 index 0000000000..6c7565a14c --- /dev/null +++ b/test/integration/targets/azure_rm_containerinstance/aliases @@ -0,0 +1,3 @@ +cloud/azure +destructive +posix/ci/cloud/group2/azure
\ No newline at end of file diff --git a/test/integration/targets/azure_rm_containerinstance/meta/main.yml b/test/integration/targets/azure_rm_containerinstance/meta/main.yml new file mode 100644 index 0000000000..95e1952f98 --- /dev/null +++ b/test/integration/targets/azure_rm_containerinstance/meta/main.yml @@ -0,0 +1,2 @@ +dependencies: + - setup_azure diff --git a/test/integration/targets/azure_rm_containerinstance/tasks/main.yml b/test/integration/targets/azure_rm_containerinstance/tasks/main.yml new file mode 100644 index 0000000000..f9a38320f3 --- /dev/null +++ b/test/integration/targets/azure_rm_containerinstance/tasks/main.yml @@ -0,0 +1,125 @@ +- name: Create sample container instance + azure_rm_containerinstance: + resource_group: "{{ resource_group }}" + name: "aci{{ resource_group | hash('md5') | truncate(7, True, '') }}" + os_type: linux + ip_address: public + location: eastus + ports: + - 80 + containers: + - name: mycontainer1 + image: httpd + memory: 1.5 + ports: + - 80 + - 81 + - name: mycontainer2 + image: httpd + memory: 1.5 + register: output + +- name: Assert the container instance is well created + assert: + that: + - output.changed + - output.provisioning_state == 'Creating' + +- name: Create sample container instance + azure_rm_containerinstance: + resource_group: "{{ resource_group }}" + name: "aci{{ resource_group | hash('md5') | truncate(7, True, '') }}" + os_type: linux + ip_address: public + location: eastus + ports: + - 80 + containers: + - name: mycontainer1 + image: httpd + memory: 1.5 + ports: + - 80 + - 81 + - name: mycontainer2 + image: httpd + memory: 1.5 + register: output + +- name: Assert the container instance is well created + assert: + that: + - output.changed == False + +- name: Create sample container instance + azure_rm_containerinstance: + resource_group: "{{ resource_group }}" + name: "aci{{ resource_group | hash('md5') | truncate(7, True, '') }}" + os_type: linux + ip_address: public + location: eastus + ports: + - 80 + containers: + - name: mycontainer1 + image: httpd + memory: 1.5 + ports: + - 80 + - 81 + force_update: yes + register: output + +- name: Assert the container instance is well created + assert: + that: + - output.changed + - output.provisioning_state == 'Creating' + +- name: Remove container instance + azure_rm_containerinstance: + resource_group: "{{ resource_group }}" + name: "aci{{ resource_group | hash('md5') | truncate(7, True, '') }}" + os_type: linux + ip_address: public + location: eastus + ports: + - 80 + containers: + - name: mycontainer1 + image: httpd + memory: 1.5 + ports: + - 80 + - 81 + state: absent + register: output + +- name: Assert the container instance is deleted + assert: + that: + - output.changed + +- name: Remove container instance again + azure_rm_containerinstance: + resource_group: "{{ resource_group }}" + name: "aci{{ resource_group | hash('md5') | truncate(7, True, '') }}" + os_type: linux + ip_address: public + location: eastus + ports: + - 80 + containers: + - name: mycontainer1 + image: httpd + memory: 1.5 + ports: + - 80 + - 81 + state: absent + register: output + +- name: Assert the changed is false + assert: + that: + - output.changed == False |