Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate cloudwatch_metric_alarm* modules and tests #1028

Conversation

alinabuzachis
Copy link
Collaborator

@alinabuzachis alinabuzachis commented Sep 16, 2022

Depends-On: ansible/zuul-config#443

Migrate cloudwatch_metric_alarm* modules and tests

@alinabuzachis alinabuzachis changed the title DNM Migrate cloudwatch_metric_alarm* modules and tests Migrate cloudwatch_metric_alarm* modules and tests Sep 16, 2022
@ansibullbot
Copy link

@alinabuzachis: Greetings! Thanks for taking the time to open this pullrequest. In order for the community to handle your pullrequest effectively, we need a bit more information.

Here are the items we could not find in your description:

  • issue type

Please set the description of this pullrequest with this template:
https://raw.githubusercontent.com/ansible/ansible/devel/.github/PULL_REQUEST_TEMPLATE.md

click here for bot help

@ansibullbot
Copy link

@ansibullbot ansibullbot added integration tests/integration module module needs_info This issue requires further information. Please answer any outstanding questions needs_template This issue/PR has an incomplete description. Please fill in the proposed template correctly needs_triage new_module New module new_plugin New plugin plugins plugin (any type) tests tests labels Sep 16, 2022
@alinabuzachis alinabuzachis reopened this Sep 16, 2022
@github-actions
Copy link

github-actions bot commented Sep 16, 2022

Docs Build 📝

Thank you for contribution!✨

This PR has been merged and your docs changes will be incorporated when they are next published.

@alinabuzachis alinabuzachis force-pushed the promote_cloudwatch_metric_alarm branch 5 times, most recently from d7f3917 to b68f617 Compare September 16, 2022 16:18
@softwarefactory-project-zuul
Copy link
Contributor

Build succeeded.

✔️ ansible-galaxy-importer SUCCESS in 3m 43s
✔️ build-ansible-collection SUCCESS in 5m 19s
✔️ ansible-test-sanity-aws-ansible-python38 SUCCESS in 11m 05s
✔️ ansible-test-sanity-aws-ansible-2.12-python38 SUCCESS in 12m 50s
✔️ ansible-test-sanity-aws-ansible-2.13-python38 SUCCESS in 12m 03s
✔️ ansible-test-units-amazon-aws-python38 SUCCESS in 5m 51s
✔️ ansible-test-units-amazon-aws-python39 SUCCESS in 6m 11s
✔️ ansible-test-splitter SUCCESS in 2m 47s
✔️ integration-amazon.aws-1 SUCCESS in 10m 05s
⚠️ integration-amazon.aws-2 SKIPPED
⚠️ integration-amazon.aws-3 SKIPPED
⚠️ integration-amazon.aws-4 SKIPPED
⚠️ integration-amazon.aws-5 SKIPPED
⚠️ integration-amazon.aws-6 SKIPPED
⚠️ integration-amazon.aws-7 SKIPPED
⚠️ integration-amazon.aws-8 SKIPPED
⚠️ integration-amazon.aws-9 SKIPPED
⚠️ integration-amazon.aws-10 SKIPPED
⚠️ integration-amazon.aws-11 SKIPPED
⚠️ integration-amazon.aws-12 SKIPPED
⚠️ integration-amazon.aws-13 SKIPPED
⚠️ integration-amazon.aws-14 SKIPPED
⚠️ integration-amazon.aws-15 SKIPPED
⚠️ integration-amazon.aws-16 SKIPPED
⚠️ integration-amazon.aws-17 SKIPPED
⚠️ integration-amazon.aws-18 SKIPPED
✔️ integration-community.aws-1 SUCCESS in 10m 26s
⚠️ integration-community.aws-2 SKIPPED
⚠️ integration-community.aws-3 SKIPPED
⚠️ integration-community.aws-4 SKIPPED
⚠️ integration-community.aws-5 SKIPPED
⚠️ integration-community.aws-6 SKIPPED
⚠️ integration-community.aws-7 SKIPPED
⚠️ integration-community.aws-8 SKIPPED
⚠️ integration-community.aws-9 SKIPPED
⚠️ integration-community.aws-10 SKIPPED
⚠️ integration-community.aws-11 SKIPPED
⚠️ integration-community.aws-12 SKIPPED
⚠️ integration-community.aws-13 SKIPPED
⚠️ integration-community.aws-14 SKIPPED
⚠️ integration-community.aws-15 SKIPPED
⚠️ integration-community.aws-16 SKIPPED
⚠️ integration-community.aws-17 SKIPPED
⚠️ integration-community.aws-18 SKIPPED
✔️ ansible-test-changelog SUCCESS in 2m 20s

@jillr jillr added the mergeit Merge the PR (SoftwareFactory) label Sep 20, 2022
@softwarefactory-project-zuul
Copy link
Contributor

Build failed (gate pipeline). For information on how to proceed, see
http://docs.openstack.org/infra/manual/developers.html#automated-testing

✔️ ansible-galaxy-importer SUCCESS in 4m 15s
✔️ build-ansible-collection SUCCESS in 5m 26s
✔️ ansible-test-sanity-aws-ansible-python38 SUCCESS in 9m 22s
✔️ ansible-test-sanity-aws-ansible-2.12-python38 SUCCESS in 9m 13s
✔️ ansible-test-sanity-aws-ansible-2.13-python38 SUCCESS in 8m 35s
✔️ ansible-test-units-amazon-aws-python38 SUCCESS in 6m 46s
✔️ ansible-test-units-amazon-aws-python39 SUCCESS in 6m 13s
✔️ ansible-test-splitter SUCCESS in 2m 52s
✔️ integration-amazon.aws-1 SUCCESS in 7m 39s
⚠️ integration-amazon.aws-2 SKIPPED
⚠️ integration-amazon.aws-3 SKIPPED
⚠️ integration-amazon.aws-4 SKIPPED
⚠️ integration-amazon.aws-5 SKIPPED
⚠️ integration-amazon.aws-6 SKIPPED
⚠️ integration-amazon.aws-7 SKIPPED
⚠️ integration-amazon.aws-8 SKIPPED
⚠️ integration-amazon.aws-9 SKIPPED
⚠️ integration-amazon.aws-10 SKIPPED
⚠️ integration-amazon.aws-11 SKIPPED
⚠️ integration-amazon.aws-12 SKIPPED
⚠️ integration-amazon.aws-13 SKIPPED
⚠️ integration-amazon.aws-14 SKIPPED
⚠️ integration-amazon.aws-15 SKIPPED
⚠️ integration-amazon.aws-16 SKIPPED
⚠️ integration-amazon.aws-17 SKIPPED
⚠️ integration-amazon.aws-18 SKIPPED
integration-community.aws-1 RETRY_LIMIT in 1m 35s
⚠️ integration-community.aws-2 SKIPPED
⚠️ integration-community.aws-3 SKIPPED
⚠️ integration-community.aws-4 SKIPPED
⚠️ integration-community.aws-5 SKIPPED
⚠️ integration-community.aws-6 SKIPPED
⚠️ integration-community.aws-7 SKIPPED
⚠️ integration-community.aws-8 SKIPPED
⚠️ integration-community.aws-9 SKIPPED
⚠️ integration-community.aws-10 SKIPPED
⚠️ integration-community.aws-11 SKIPPED
⚠️ integration-community.aws-12 SKIPPED
⚠️ integration-community.aws-13 SKIPPED
⚠️ integration-community.aws-14 SKIPPED
⚠️ integration-community.aws-15 SKIPPED
⚠️ integration-community.aws-16 SKIPPED
⚠️ integration-community.aws-17 SKIPPED
⚠️ integration-community.aws-18 SKIPPED
✔️ ansible-test-changelog SUCCESS in 2m 22s

@softwarefactory-project-zuul
Copy link
Contributor

Merge Failed.

This change or one of its cross-repo dependencies was unable to be automatically merged with the current state of its repository. Please rebase the change and upload a new patchset.
Warning:
Error merging github.com/ansible-collections/amazon.aws for 1028,570c8f0df0610b69cc03959ded806c25e17ecbe3

@goneri goneri force-pushed the promote_cloudwatch_metric_alarm branch from 570c8f0 to 0d432fe Compare September 21, 2022 21:28
@goneri
Copy link
Member

goneri commented Sep 21, 2022

regate

@ansibullbot ansibullbot removed needs_rebase https://docs.ansible.com/ansible/devel/dev_guide/developing_rebasing.html needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR labels Sep 21, 2022
@softwarefactory-project-zuul
Copy link
Contributor

Build succeeded (gate pipeline).

✔️ ansible-galaxy-importer SUCCESS in 4m 20s
✔️ build-ansible-collection SUCCESS in 3m 10s
✔️ ansible-test-units-amazon-aws-python39 SUCCESS in 4m 47s

@softwarefactory-project-zuul
Copy link
Contributor

Pull request merge failed: Pull Request is not mergeable

@goneri goneri force-pushed the promote_cloudwatch_metric_alarm branch from 0d432fe to ddf9b54 Compare September 21, 2022 22:26
@goneri
Copy link
Member

goneri commented Sep 21, 2022

regate

@softwarefactory-project-zuul
Copy link
Contributor

Merge Failed.

This change or one of its cross-repo dependencies was unable to be automatically merged with the current state of its repository. Please rebase the change and upload a new patchset.
Warning:
Error merging github.com/ansible-collections/amazon.aws for 1028,ddf9b54291d051a638844c51c5a272e0116f8a9f

@ansibullbot ansibullbot added needs_rebase https://docs.ansible.com/ansible/devel/dev_guide/developing_rebasing.html needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR labels Sep 21, 2022
@softwarefactory-project-zuul
Copy link
Contributor

Merge Failed.

This change or one of its cross-repo dependencies was unable to be automatically merged with the current state of its repository. Please rebase the change and upload a new patchset.
Warning:
Error merging github.com/ansible-collections/amazon.aws for 1028,08916beed2bf524299e9244d1bedd92d93e0f99d

@goneri
Copy link
Member

goneri commented Sep 21, 2022

regate

tremble and others added 8 commits September 21, 2022 19:13
Rename cloudwatch metrics_alarm

SUMMARY
In line with the new naming guidelines rename ec2_metric_alarm to cloudwatch_metric_alarm
ISSUE TYPE

Feature Pull Request

COMPONENT NAME
plugins/modules/cloudwatch_metric_alarm.py
plugins/modules/ec2_metric_alarm.py
ADDITIONAL INFORMATION

Reviewed-by: Alina Buzachis <None>

This commit was initially merged in https://github.com/ansible-collections/community.aws
See: ansible-collections/community.aws@88c62c5
@goneri goneri force-pushed the promote_cloudwatch_metric_alarm branch from 08916be to 3b9860b Compare September 21, 2022 23:14
@goneri
Copy link
Member

goneri commented Sep 21, 2022

regate

@ansibullbot ansibullbot removed needs_rebase https://docs.ansible.com/ansible/devel/dev_guide/developing_rebasing.html needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR labels Sep 21, 2022
@softwarefactory-project-zuul
Copy link
Contributor

Build succeeded (gate pipeline).

✔️ ansible-galaxy-importer SUCCESS in 4m 45s
✔️ build-ansible-collection SUCCESS in 3m 20s
✔️ ansible-test-units-amazon-aws-python39 SUCCESS in 6m 30s

@softwarefactory-project-zuul softwarefactory-project-zuul bot merged commit 8f06ca9 into ansible-collections:main Sep 21, 2022
softwarefactory-project-zuul bot pushed a commit that referenced this pull request Sep 27, 2022
new module: cloudwatch_metric_alarm_info

SUMMARY
Depends-On: #1066
Should be merged only after #1028 is merged.

Adding a new module for retrieving cloudwatch metric alarms info.

Currently supports following boto API(s)
describe_alarms()
ISSUE TYPE


New Module Pull Request

COMPONENT NAME

cloudwatch_metric_alarm_info
ADDITIONAL INFORMATION


Will be useful in moving these tasks from aws cli commands to amazon.aws module.
https://github.com/ansible-collections/community.aws/blob/main/tests/integration/targets/cloudwatch_metric_alarm/tasks/main.yml#L63-L70
ansible-collections/community.aws#1440
The integration tests for this info module will be added to above tests, after the cloudwatch_metric_alarm module is migrated from community.aws to amazon.aws.

Sample playbook
---
- name: Create a metric alarm & get info
  hosts: localhost
  gather_facts: false
  tasks:
    - name: create alarm
      community.aws.cloudwatch_metric_alarm:
        state: present
        region: us-east-2
        name: "cpu-low-test-metric-alarm-1234"
        metric: "CPUUtilization"
        namespace: "AWS/EC2"
        statistic: Average
        comparison: "LessThanOrEqualToThreshold"
        threshold: 50.0
        period: 180
        evaluation_periods: 3
        unit: "Percent"
        description: "This will alarm when a instance's CPU usage average is lower than 50%"
        dimensions: {'InstanceId':'i-00a8b34xxxxxxxxxx'}

    - name: describe the metric alarm based on metric name and namespace
      amazon.aws.cloudwatch_metric_alarm_info:
        alarm_names:
          - cpu-low-test-metric-alarm-1234
      register: alarm_info

    - debug:
        var: alarm_info

Reviewed-by: Alina Buzachis <None>
Reviewed-by: Mandar Kulkarni <[email protected]>
Reviewed-by: Jill R <None>
Reviewed-by: Mark Chappell <None>
Reviewed-by: Gonéri Le Bouder <[email protected]>
abikouo pushed a commit to abikouo/amazon.aws that referenced this pull request Oct 24, 2023
Copy ignore-2.13.txt to ignore-2.14.txt

SUMMARY

Relates to ansible-collections/news-for-maintainers#13

ISSUE TYPE


Feature Pull Request

COMPONENT NAME

ADDITIONAL INFORMATION

Reviewed-by: Mark Chappell <None>
Reviewed-by: Markus Bergholz <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
integration tests/integration mergeit Merge the PR (SoftwareFactory) module module needs_info This issue requires further information. Please answer any outstanding questions needs_template This issue/PR has an incomplete description. Please fill in the proposed template correctly new_module New module new_plugin New plugin plugins plugin (any type) tests tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants