-
Notifications
You must be signed in to change notification settings - Fork 342
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
ec2_eni: parameter device_index expects integer from user, but further in the code it is expected string but passed the integer #870
Comments
Files identified in the description:
If these files are inaccurate, please update the |
ansibullbot
added
bug
This issue/PR relates to a bug
module
module
needs_triage
plugins
plugin (any type)
python3
traceback
labels
Jun 8, 2022
dahorak
changed the title
ec2_eni: Parameter validation failed:\nInvalid type for parameter Filters[1].Values[0], value: 1, type: <class 'int'>, valid types: <class 'str'>
ec2_eni: parameter device_index expects integer from user, but further in the code it is expected string but passed the integer
Jun 9, 2022
softwarefactory-project-zuul bot
pushed a commit
that referenced
this issue
Jun 22, 2022
… api as expected by api call (#877) ec2_eni: change data type of `device_index` to str when passing it to api as expected by api call SUMMARY Currently the data type for parameter device_index here while being passed to api call is integer but one of the API calls later used here in the module (describe_network_interfaces) expects it to be string as per boto3 api documentation. Fixes #870 ISSUE TYPE Bugfix Pull Request COMPONENT NAME ec2_eni Reviewed-by: Mark Chappell <None> Reviewed-by: Jill R <None> Reviewed-by: Alina Buzachis <None>
jatorcasso
pushed a commit
to jatorcasso/amazon.aws
that referenced
this issue
Jun 27, 2022
… api as expected by api call (ansible-collections#877) ec2_eni: change data type of `device_index` to str when passing it to api as expected by api call SUMMARY Currently the data type for parameter device_index here while being passed to api call is integer but one of the API calls later used here in the module (describe_network_interfaces) expects it to be string as per boto3 api documentation. Fixes ansible-collections#870 ISSUE TYPE Bugfix Pull Request COMPONENT NAME ec2_eni Reviewed-by: Mark Chappell <None> Reviewed-by: Jill R <None> Reviewed-by: Alina Buzachis <None>
abikouo
pushed a commit
to abikouo/amazon.aws
that referenced
this issue
Sep 18, 2023
… integration tests (ansible-collections#870) Add support for tagging certificates. Fix deprecated tasks in aws_acm integration tests SUMMARY This PR adds support for configuring arbitrary tags when importing a certificate using the aws_acm module. Previously, it was only possible to set the 'Name' tag. Additionally, this PR fixes issues with the aws_acm integration tests. The integration tests were using deprecated tasks or attributes, such as openssl_certificate. ISSUE TYPE Bugfix Pull Request COMPONENT NAME aws_acm ADDITIONAL INFORMATION Changes to the aws_acm.py module: Add new tags and purge_tags attributes. The certificate_arn attribute is now allowed when state='present'. A playbook should be allowed to modify an existing certificate entry by providing the ARN. For example, a play may want to add, modify, remove tags on an existing certificate. The aws_acm module returns the updated tags. See example below. Refactor aws_acm.py to improve code reuse and make it possible to set arbitrary tags. This should also help to 1) improve readability. 2) prepare for ansible-collections#869 which I am planning to work on next. Backwards-compatibility is retained, even though it might make sense to normalize some of the attributes. Example return value: "certificate": { "arn": "arn:aws:acm:us-west-1:account:certificate/f85abf9d-4bda-4dcc-98c3-770664a68243", "domain_name": "acm1.949058644.ansible.com", "tags": { "Application": "search", "Environment": "development", "Name": "ansible-test-78006277-398b5796f999_949058644_1" } } Integration tests: The openssl_certificate task is deprecated. Migrate to x509_certificate. The signature_algorithms attribute is no longer supported by the new x509_certificate task. Using selfsigned_digest instead. The integration tests for the aws_acm module pass locally. I see ansible/ansible#67788 has been closed, but tests/integration/targets/aws_acm/aliases still has unstable. I am not sure what to do about it. I was able to run the tests in my local workspace after making the above changes. Reviewed-by: Markus Bergholz <[email protected]> Reviewed-by: Sebastien Rosset <None> Reviewed-by: Mark Woolley <[email protected]> Reviewed-by: Alina Buzachis <None>
abikouo
pushed a commit
to abikouo/amazon.aws
that referenced
this issue
Sep 18, 2023
… integration tests (ansible-collections#870) Add support for tagging certificates. Fix deprecated tasks in aws_acm integration tests SUMMARY This PR adds support for configuring arbitrary tags when importing a certificate using the aws_acm module. Previously, it was only possible to set the 'Name' tag. Additionally, this PR fixes issues with the aws_acm integration tests. The integration tests were using deprecated tasks or attributes, such as openssl_certificate. ISSUE TYPE Bugfix Pull Request COMPONENT NAME aws_acm ADDITIONAL INFORMATION Changes to the aws_acm.py module: Add new tags and purge_tags attributes. The certificate_arn attribute is now allowed when state='present'. A playbook should be allowed to modify an existing certificate entry by providing the ARN. For example, a play may want to add, modify, remove tags on an existing certificate. The aws_acm module returns the updated tags. See example below. Refactor aws_acm.py to improve code reuse and make it possible to set arbitrary tags. This should also help to 1) improve readability. 2) prepare for ansible-collections#869 which I am planning to work on next. Backwards-compatibility is retained, even though it might make sense to normalize some of the attributes. Example return value: "certificate": { "arn": "arn:aws:acm:us-west-1:account:certificate/f85abf9d-4bda-4dcc-98c3-770664a68243", "domain_name": "acm1.949058644.ansible.com", "tags": { "Application": "search", "Environment": "development", "Name": "ansible-test-78006277-398b5796f999_949058644_1" } } Integration tests: The openssl_certificate task is deprecated. Migrate to x509_certificate. The signature_algorithms attribute is no longer supported by the new x509_certificate task. Using selfsigned_digest instead. The integration tests for the aws_acm module pass locally. I see ansible/ansible#67788 has been closed, but tests/integration/targets/aws_acm/aliases still has unstable. I am not sure what to do about it. I was able to run the tests in my local workspace after making the above changes. Reviewed-by: Markus Bergholz <[email protected]> Reviewed-by: Sebastien Rosset <None> Reviewed-by: Mark Woolley <[email protected]> Reviewed-by: Alina Buzachis <None>
abikouo
pushed a commit
to abikouo/amazon.aws
that referenced
this issue
Oct 24, 2023
… integration tests (ansible-collections#870) Add support for tagging certificates. Fix deprecated tasks in aws_acm integration tests SUMMARY This PR adds support for configuring arbitrary tags when importing a certificate using the aws_acm module. Previously, it was only possible to set the 'Name' tag. Additionally, this PR fixes issues with the aws_acm integration tests. The integration tests were using deprecated tasks or attributes, such as openssl_certificate. ISSUE TYPE Bugfix Pull Request COMPONENT NAME aws_acm ADDITIONAL INFORMATION Changes to the aws_acm.py module: Add new tags and purge_tags attributes. The certificate_arn attribute is now allowed when state='present'. A playbook should be allowed to modify an existing certificate entry by providing the ARN. For example, a play may want to add, modify, remove tags on an existing certificate. The aws_acm module returns the updated tags. See example below. Refactor aws_acm.py to improve code reuse and make it possible to set arbitrary tags. This should also help to 1) improve readability. 2) prepare for ansible-collections#869 which I am planning to work on next. Backwards-compatibility is retained, even though it might make sense to normalize some of the attributes. Example return value: "certificate": { "arn": "arn:aws:acm:us-west-1:account:certificate/f85abf9d-4bda-4dcc-98c3-770664a68243", "domain_name": "acm1.949058644.ansible.com", "tags": { "Application": "search", "Environment": "development", "Name": "ansible-test-78006277-398b5796f999_949058644_1" } } Integration tests: The openssl_certificate task is deprecated. Migrate to x509_certificate. The signature_algorithms attribute is no longer supported by the new x509_certificate task. Using selfsigned_digest instead. The integration tests for the aws_acm module pass locally. I see ansible/ansible#67788 has been closed, but tests/integration/targets/aws_acm/aliases still has unstable. I am not sure what to do about it. I was able to run the tests in my local workspace after making the above changes. Reviewed-by: Markus Bergholz <[email protected]> Reviewed-by: Sebastien Rosset <None> Reviewed-by: Mark Woolley <[email protected]> Reviewed-by: Alina Buzachis <None>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Summary
When I try to create second interface and attach it to EC2 instance using
ec2_eni
module it fails with python traceback:I tried it also with different version of Python (3.7, 3.10), but if fails with the same error.
If I tried to define the
device_index
as string (device_index: 1 | str
), it fails with error:"msg": "argument device_index is of type <class 'str'> and we were unable to convert to int: <class 'str'> cannot be converted to an int"
Issue Type
Bug Report
Component Name
ec2_eni
Ansible Version
Collection Versions
AWS SDK versions
Configuration
$ ansible-config dump --only-changed
OS / Environment
CentOS Stream release 8
Fedora release 36 (Thirty Six)
Steps to Reproduce
Expected Results
It should create interface and attach it to instance.
Actual Results
Code of Conduct
The text was updated successfully, but these errors were encountered: