mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 13:22:48 +00:00
Dms endpoint module (#54660)
* - initial commit for the modules and tests * initial implementation based on ec2_asg * docstring implemtation and further methods initial implementation * refactoring and pylint changes * further implementation and integration tests * added examples and parameter documentation * removed files that were essentially templates * added waiter for delete and updated the tests * removed unit test * fixed pep8 failure * fixed pep8 failure * fixed pep8 password field issue * fixed pep8 password field issue * fixed syntax issues * fixed pep8 defaults * password property documentation was breaking yaml * fixed pep8 defaults * fixed lack of defaults for wait parameter * added default to boolean parameter * pep8 fix * fixed author entry * adding type to wait parameter * adding type to wait parameter * fixed linting issues * updated description and removed default from docs * added metaclass changed default for boolean * changed declared defaults * - fixe the delete function - solved the yaml syntax issue * added missing defaults for timeout, retry and removed the one for endpointtype as it should be None, becasue parameter is Required anyway * fixed RETURN documentation issue * trying to fix the import placement error * trying to fix the doc error for missing params * pep8 issues * added endpoint aliases * - added documentation * pep8 * changed to unsupported tag * changed no_log fact to yes in the integration tests * added suggested changes to the integration tests * - making severname use resource_prefix as well as a more generic domain - removing test fact
This commit is contained in:
2
test/integration/targets/dms_endpoint/aliases
Normal file
2
test/integration/targets/dms_endpoint/aliases
Normal file
@@ -0,0 +1,2 @@
|
||||
cloud/aws
|
||||
unsupported
|
||||
136
test/integration/targets/dms_endpoint/tasks/main.yml
Normal file
136
test/integration/targets/dms_endpoint/tasks/main.yml
Normal file
@@ -0,0 +1,136 @@
|
||||
---
|
||||
|
||||
- name: set connection information for all tasks
|
||||
set_fact:
|
||||
aws_connection_info: &aws_connection_info
|
||||
aws_access_key: "{{ aws_access_key }}"
|
||||
aws_secret_key: "{{ aws_secret_key }}"
|
||||
region: "{{ aws_region }}"
|
||||
dms_identifier: "{{ resource_prefix }}-dms"
|
||||
no_log: yes
|
||||
|
||||
- block:
|
||||
- name: create endpoints
|
||||
dms_endpoint:
|
||||
state: present
|
||||
endpointidentifier: "{{ dms_identifier }}"
|
||||
endpointtype: source
|
||||
enginename: aurora
|
||||
username: testing
|
||||
password: testint1234
|
||||
servername: "{{ resource_prefix }}.exampledomain.com"
|
||||
port: 3306
|
||||
databasename: 'testdb'
|
||||
sslmode: none
|
||||
<<: *aws_connection_info
|
||||
register: result
|
||||
|
||||
- assert:
|
||||
that:
|
||||
- result is changed
|
||||
- result is not failed
|
||||
|
||||
- name: create endpoints no change
|
||||
dms_endpoint:
|
||||
state: present
|
||||
endpointidentifier: "{{ dms_identifier }}"
|
||||
endpointtype: source
|
||||
enginename: aurora
|
||||
username: testing
|
||||
password: testint1234
|
||||
servername: "{{ resource_prefix }}.exampledomain.com"
|
||||
port: 3306
|
||||
databasename: 'testdb'
|
||||
sslmode: none
|
||||
<<: *aws_connection_info
|
||||
register: result
|
||||
|
||||
- assert:
|
||||
that:
|
||||
- result is not changed
|
||||
- result is not failed
|
||||
|
||||
- name: update endpoints
|
||||
dms_endpoint:
|
||||
state: present
|
||||
endpointidentifier: "{{ dms_identifier }}"
|
||||
endpointtype: source
|
||||
enginename: aurora
|
||||
username: testing
|
||||
password: testint1234
|
||||
servername: "{{ resource_prefix }}.exampledomain.com"
|
||||
port: 3306
|
||||
databasename: 'testdb2'
|
||||
sslmode: none
|
||||
<<: *aws_connection_info
|
||||
register: result
|
||||
|
||||
- assert:
|
||||
that:
|
||||
- result is changed
|
||||
- result is not failed
|
||||
|
||||
- name: update endpoints no change
|
||||
dms_endpoint:
|
||||
state: present
|
||||
endpointidentifier: "{{ dms_identifier }}"
|
||||
endpointtype: source
|
||||
enginename: aurora
|
||||
username: testing
|
||||
password: testint1234
|
||||
servername: "{{ resource_prefix }}.exampledomain.com"
|
||||
port: 3306
|
||||
databasename: 'testdb2'
|
||||
sslmode: none
|
||||
<<: *aws_connection_info
|
||||
register: result
|
||||
|
||||
- assert:
|
||||
that:
|
||||
- result is not changed
|
||||
- result is not failed
|
||||
|
||||
always:
|
||||
- name: delete endpoints
|
||||
dms_endpoint:
|
||||
state: absent
|
||||
endpointidentifier: "{{ dms_identifier }}"
|
||||
endpointtype: source
|
||||
enginename: aurora
|
||||
username: testing
|
||||
password: testint1234
|
||||
servername: "{{ resource_prefix }}.exampledomain.com"
|
||||
port: 3306
|
||||
databasename: 'testdb'
|
||||
sslmode: none
|
||||
wait: True
|
||||
timeout: 60
|
||||
retries: 10
|
||||
<<: *aws_connection_info
|
||||
register: result
|
||||
|
||||
- assert:
|
||||
that:
|
||||
- result is changed
|
||||
- result is not failed
|
||||
|
||||
- name: delete endpoints no change
|
||||
dms_endpoint:
|
||||
state: absent
|
||||
endpointidentifier: "{{ dms_identifier }}"
|
||||
endpointtype: source
|
||||
enginename: aurora
|
||||
username: testing
|
||||
password: testint1234
|
||||
servername: "{{ resource_prefix }}.exampledomain.com"
|
||||
port: 3306
|
||||
databasename: 'testdb'
|
||||
sslmode: none
|
||||
wait: False
|
||||
<<: *aws_connection_info
|
||||
register: result
|
||||
|
||||
- assert:
|
||||
that:
|
||||
- result is not changed
|
||||
- result is not failed
|
||||
Reference in New Issue
Block a user