-
Notifications
You must be signed in to change notification settings - Fork 23.7k
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
New module: aci_access_port_block_to_access_port and deprecations in aci_access_port_to_interface_policy_leaf_profile #46182
New module: aci_access_port_block_to_access_port and deprecations in aci_access_port_to_interface_policy_leaf_profile #46182
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need integration tests now, but the module itself looks fine.
leaf_interface_profile=dict(type='str', aliases=['leaf_interface_profile_name']), # Not required for querying all objects | ||
access_port_selector=dict(type='str', aliases=['name', 'access_port_selector_name']), # Not required for querying all objects | ||
leaf_port_blk=dict(type='str', aliases=['leaf_port_blk_name']), # Not required for querying all objects | ||
from_port=dict(type='str', aliases=['from', 'fromPort', 'from_port_range']), # Not required for querying all objects and deleting port blocks |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not in favor of having fromPort and toPort in there. As we use snake_case in Ansible.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If any existing modules do this, it's a backward compatible thing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yep you are right. But they are also in aci_access_port_to_interface_policy_leaf_profile
thats why I added them here also. So should we delete them in both modules?
@@ -39,29 +39,53 @@ | |||
- The description to assign to the C(access_port_selector) | |||
leaf_port_blk: | |||
description: | |||
- B(Deprecated) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't like this way of deprecating parameters. In fact the parameters can be deprecated by adding something to the argument_spec. And what we usually do is not mention the parameters in the documentation so people won't start using it (the people still using it get a deprecation warning).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok. So it would be better to remove them completely from the docstring. But can you give me some more hints how exactly you think it would be done then (especially the deprecation warning)?
Hi @smnmtzgr, Thank you for the pullrequest, just so you are aware we have a dedicated Working Group for network. |
This comment has been minimized.
This comment has been minimized.
lib/ansible/modules/network/aci/aci_access_port_block_to_access_port.py
Outdated
Show resolved
Hide resolved
Looks ok |
@smnmtzgr Thanks for your contribution, this will ship with Ansible v2.8 ! |
rebuild_merge |
SUMMARY
A new Cisco ACI module is needed, this fixes #43106
ISSUE TYPE
COMPONENT NAME
aci_access_port_block_to_access_port
ANSIBLE VERSION
Goal is to add the new module and also the deprecation information with Ansible 2.8. Deprecation will be effective with Ansible 2.12
ADDITIONAL INFORMATION
Like discussed in the Issue #43106 this new module is needed so that we can also safely delete things (e.g. port blocks) without deleting a complete Port Selector/Access Port. We don`t have 1:1 relationship between a port selector and an access port block. Its 1:x !