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

add uptime parameter for ec2_instance_info module in minutes #356

Merged
merged 4 commits into from
Jan 13, 2021

Conversation

IPvSean
Copy link
Contributor

@IPvSean IPvSean commented Jan 12, 2021

SUMMARY

with tons of help from Yanis, we now have uptime in there

this PR is based on the PR #316

example:

    - name: grab info
      community.aws.ec2_instance_info:
        region: "{{ ec2_region }}"
        uptime: 10200
        filters:
          instance-state-name: [ "running" ]
      register: ec2_node_info

this would only register instances that have been up for 10200 minutes (or 170 hours or ~7 days)

ISSUE TYPE
  • Feature Pull Request
COMPONENT NAME

ec2_instance_info

ADDITIONAL INFORMATION

see #316 for the commentary on the last PR where I fixed information for @jillr and @gravesm

with tons of help from Yanis, we now have uptime in there
@ansibullbot
Copy link

@ansibullbot ansibullbot added feature This issue/PR relates to a feature request integration tests/integration module module needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR needs_triage new_contributor Help guide this first time contributor plugins plugin (any type) tests tests labels Jan 13, 2021
Copy link
Contributor

@tremble tremble left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for taking the time to submit this PR.

Some minor issues, but nothing significant from my side.

plugins/modules/ec2_instance_info.py Show resolved Hide resolved
plugins/modules/ec2_instance_info.py Outdated Show resolved Hide resolved
plugins/modules/ec2_instance_info.py Outdated Show resolved Hide resolved
plugins/modules/ec2_instance_info.py Outdated Show resolved Hide resolved
plugins/modules/ec2_instance_info.py Outdated Show resolved Hide resolved
plugins/modules/ec2_instance_info.py Outdated Show resolved Hide resolved
@IPvSean
Copy link
Contributor Author

IPvSean commented Jan 13, 2021

@tremble , I think I made all the changes... can you verify for me 🙏

@IPvSean IPvSean requested a review from tremble January 13, 2021 15:42
Copy link
Member

@gravesm gravesm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks pretty good from my side. Could you add a changelog fragment? https://docs.ansible.com/ansible/latest/community/development_process.html#community-changelogs

adding changelog fragment per @gravesm suggestion
@IPvSean
Copy link
Contributor Author

IPvSean commented Jan 13, 2021

should be there now @gravesm !

Copy link
Contributor

@tremble tremble left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor tweak in wording, but otherwise I think we're good

@@ -0,0 +1,3 @@
---
minor_changes:
- adding minimum_uptime and alias uptime to filter instances that have only been online for certain duration of time in minutes
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- adding minimum_uptime and alias uptime to filter instances that have only been online for certain duration of time in minutes
- ec2_instance_info - added ``minimum_uptime`` option with alias ``uptime`` for filtering instances that have only been online for certain duration of time in minutes (https://github.com/ansible-collections/community.aws/pull/356).

@IPvSean
Copy link
Contributor Author

IPvSean commented Jan 13, 2021

ok made the change, thanks for all the help @tremble

@tremble tremble requested a review from gravesm January 13, 2021 17:26
@gravesm gravesm merged commit 7ff2133 into ansible-collections:main Jan 13, 2021
jillr pushed a commit to jillr/amazon.aws that referenced this pull request May 3, 2021
…-collections#356)

* syncing module and tests for uptime

with tons of help from Yanis, we now have uptime in there

* updating pr with fixes from suggestions

adding to ansible-collections/community.aws#356 with comments from @tremble and @duderamos

* Create 356_add_minimum_uptime_parameter.yaml

adding changelog fragment per @gravesm suggestion

* Update 356_add_minimum_uptime_parameter.yaml

last comment from @tremble

Co-authored-by: Sean Cavanaugh <[email protected]>
jillr pushed a commit to jillr/amazon.aws that referenced this pull request May 10, 2021
…-collections#356)

* syncing module and tests for uptime

with tons of help from Yanis, we now have uptime in there

* updating pr with fixes from suggestions

adding to ansible-collections/community.aws#356 with comments from @tremble and @duderamos

* Create 356_add_minimum_uptime_parameter.yaml

adding changelog fragment per @gravesm suggestion

* Update 356_add_minimum_uptime_parameter.yaml

last comment from @tremble

Co-authored-by: Sean Cavanaugh <[email protected]>
jillr pushed a commit to jillr/amazon.aws that referenced this pull request May 10, 2021
…-collections#356)

* syncing module and tests for uptime

with tons of help from Yanis, we now have uptime in there

* updating pr with fixes from suggestions

adding to ansible-collections/community.aws#356 with comments from @tremble and @duderamos

* Create 356_add_minimum_uptime_parameter.yaml

adding changelog fragment per @gravesm suggestion

* Update 356_add_minimum_uptime_parameter.yaml

last comment from @tremble

Co-authored-by: Sean Cavanaugh <[email protected]>
jillr pushed a commit to jillr/amazon.aws that referenced this pull request May 13, 2021
…-collections#356)

* syncing module and tests for uptime

with tons of help from Yanis, we now have uptime in there

* updating pr with fixes from suggestions

adding to ansible-collections/community.aws#356 with comments from @tremble and @duderamos

* Create 356_add_minimum_uptime_parameter.yaml

adding changelog fragment per @gravesm suggestion

* Update 356_add_minimum_uptime_parameter.yaml

last comment from @tremble

Co-authored-by: Sean Cavanaugh <[email protected]>
alinabuzachis pushed a commit to alinabuzachis/community.aws that referenced this pull request Jul 19, 2021
…-collections#356)

* syncing module and tests for uptime

with tons of help from Yanis, we now have uptime in there

* updating pr with fixes from suggestions

adding to ansible-collections#356 with comments from @tremble and @duderamos

* Create 356_add_minimum_uptime_parameter.yaml

adding changelog fragment per @gravesm suggestion

* Update 356_add_minimum_uptime_parameter.yaml

last comment from @tremble

Co-authored-by: Sean Cavanaugh <[email protected]>
alinabuzachis pushed a commit to alinabuzachis/community.aws that referenced this pull request Jul 19, 2021
…-collections#356)

* syncing module and tests for uptime

with tons of help from Yanis, we now have uptime in there

* updating pr with fixes from suggestions

adding to ansible-collections#356 with comments from @tremble and @duderamos

* Create 356_add_minimum_uptime_parameter.yaml

adding changelog fragment per @gravesm suggestion

* Update 356_add_minimum_uptime_parameter.yaml

last comment from @tremble

Co-authored-by: Sean Cavanaugh <[email protected]>
danielcotton pushed a commit to danielcotton/community.aws that referenced this pull request Nov 23, 2021
…-collections#356)

* syncing module and tests for uptime

with tons of help from Yanis, we now have uptime in there

* updating pr with fixes from suggestions

adding to ansible-collections#356 with comments from @tremble and @duderamos

* Create 356_add_minimum_uptime_parameter.yaml

adding changelog fragment per @gravesm suggestion

* Update 356_add_minimum_uptime_parameter.yaml

last comment from @tremble

Co-authored-by: Sean Cavanaugh <[email protected]>
alinabuzachis pushed a commit to alinabuzachis/community.aws that referenced this pull request May 25, 2022
abikouo pushed a commit to abikouo/amazon.aws that referenced this pull request Sep 18, 2023
…-collections#356)

* syncing module and tests for uptime

with tons of help from Yanis, we now have uptime in there

* updating pr with fixes from suggestions

adding to ansible-collections/community.aws#356 with comments from @tremble and @duderamos

* Create 356_add_minimum_uptime_parameter.yaml

adding changelog fragment per @gravesm suggestion

* Update 356_add_minimum_uptime_parameter.yaml

last comment from @tremble

Co-authored-by: Sean Cavanaugh <[email protected]>
abikouo pushed a commit to abikouo/amazon.aws that referenced this pull request Sep 18, 2023
…-collections#356)

* syncing module and tests for uptime

with tons of help from Yanis, we now have uptime in there

* updating pr with fixes from suggestions

adding to ansible-collections/community.aws#356 with comments from @tremble and @duderamos

* Create 356_add_minimum_uptime_parameter.yaml

adding changelog fragment per @gravesm suggestion

* Update 356_add_minimum_uptime_parameter.yaml

last comment from @tremble

Co-authored-by: Sean Cavanaugh <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature This issue/PR relates to a feature request integration tests/integration module module needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR needs_triage new_contributor Help guide this first time contributor plugins plugin (any type) tests tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants