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

added aci_interface_policy_leaf_policy_group module #34968

Merged

Conversation

brunocalogero
Copy link
Contributor

SUMMARY

Adding aci_interface_policy_leaf_policy_group module, creates the following ACI objects: infra:AccPortGrp and infra:AccBndlGrp

ISSUE TYPE
  • New Module Pull Request
COMPONENT NAME

aci_interface_policy_leaf_policy_group

ANSIBLE VERSION
2.5

@ansibot
Copy link
Contributor

ansibot commented Jan 17, 2018

@ansibot ansibot added WIP This issue/PR is a work in progress. Nevertheless it was shared for getting input from peers. aci Cisco ACI community affects_2.5 This issue/PR affects Ansible v2.5 module This issue/PR relates to a module. needs_triage Needs a first human triage before being processed. networking Network category new_module This PR includes a new module. new_plugin This PR includes a new plugin. support:community This issue/PR relates to code supported by the Ansible community. labels Jan 17, 2018
@ansible ansible deleted a comment from ansibot Jan 17, 2018
@sivel sivel removed the needs_triage Needs a first human triage before being processed. label Jan 17, 2018


def main():
argument_spec = aci_argument_spec
Copy link
Member

Choose a reason for hiding this comment

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

aci_argument_spec has been updated to be a function. This line should be updated as:

argument_spec = aci_argument_spec()

Copy link
Contributor Author

Choose a reason for hiding this comment

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

alrighty ! 👍

@brunocalogero
Copy link
Contributor Author

2018-01-17 21:33:18 ERROR: Found 14 validate-modules issue(s) which need to be resolved: 2018-01-17 21:33:18 ERROR: lib/ansible/modules/network/aci/aci_interface_policy_leaf_policy_group.py:0:0: E322 "cert_key" is listed in the argument_spec, but not documented in the module (75%) 2018-01-17 21:33:18 ERROR: lib/ansible/modules/network/aci/aci_interface_policy_leaf_policy_group.py:0:0: E322 "cert_name" is listed in the argument_spec, but not documented in the module (75%) 2018-01-17 21:33:18 ERROR: lib/ansible/modules/network/aci/aci_interface_policy_leaf_policy_group.py:0:0: E322 "certificate_name" is listed in the argument_spec, but not documented in the module (75%) 2018-01-17 21:33:18 ERROR: lib/ansible/modules/network/aci/aci_interface_policy_leaf_policy_group.py:0:0: E322 "host" is listed in the argument_spec, but not documented in the module (75%) 2018-01-17 21:33:18 ERROR: lib/ansible/modules/network/aci/aci_interface_policy_leaf_policy_group.py:0:0: E322 "hostname" is listed in the argument_spec, but not documented in the module (75%) 2018-01-17 21:33:18 ERROR: lib/ansible/modules/network/aci/aci_interface_policy_leaf_policy_group.py:0:0: E322 "password" is listed in the argument_spec, but not documented in the module (75%) 2018-01-17 21:33:18 ERROR: lib/ansible/modules/network/aci/aci_interface_policy_leaf_policy_group.py:0:0: E322 "private_key" is listed in the argument_spec, but not documented in the module (75%) 2018-01-17 21:33:18 ERROR: lib/ansible/modules/network/aci/aci_interface_policy_leaf_policy_group.py:0:0: E322 "protocol" is listed in the argument_spec, but not documented in the module (75%) 2018-01-17 21:33:18 ERROR: lib/ansible/modules/network/aci/aci_interface_policy_leaf_policy_group.py:0:0: E322 "timeout" is listed in the argument_spec, but not documented in the module (75%) 2018-01-17 21:33:18 ERROR: lib/ansible/modules/network/aci/aci_interface_policy_leaf_policy_group.py:0:0: E322 "use_proxy" is listed in the argument_spec, but not documented in the module (75%) 2018-01-17 21:33:18 ERROR: lib/ansible/modules/network/aci/aci_interface_policy_leaf_policy_group.py:0:0: E322 "use_ssl" is listed in the argument_spec, but not documented in the module (75%) 2018-01-17 21:33:18 ERROR: lib/ansible/modules/network/aci/aci_interface_policy_leaf_policy_group.py:0:0: E322 "user" is listed in the argument_spec, but not documented in the module (75%) 2018-01-17 21:33:18 ERROR: lib/ansible/modules/network/aci/aci_interface_policy_leaf_policy_group.py:0:0: E322 "username" is listed in the argument_spec, but not documented in the module (75%) 2018-01-17 21:33:18 ERROR: lib/ansible/modules/network/aci/aci_interface_policy_leaf_policy_group.py:0:0: E322 "validate_certs" is listed in the argument_spec, but not documented in the module (75%), are there new documentation rules ?

@sivel
Copy link
Member

sivel commented Jan 17, 2018

are there new documentation rules

Yes, the new rules were activated today after testing.

The errors indicate inconsistencies between the DOCUMENTATION and the argument_spec. Looking at those errors, it may indicate at a minimum that you are missing a extends_documentation_fragment in your DOCUMENTATION.

The bot should likely also be updating this PR with a comment soon in regards to those errors.

@ansibot ansibot added the ci_verified Changes made in this PR are causing tests to fail. label Jan 17, 2018
@brunocalogero
Copy link
Contributor Author

@sivel hey what do you suggest to fix the protocol documentation error ? what are the possible options for protocol, strange that adding extends_documentation_fragment: aci fixed everything except this one

@sivel
Copy link
Member

sivel commented Jan 17, 2018

@dagwieers is protocol one of the arguments that is purposefully not documented?

@brunocalogero brunocalogero force-pushed the aci_interface_policy_leaf_policy_group branch from 3e895cf to f310252 Compare January 18, 2018 18:51
@ansibot ansibot removed the ci_verified Changes made in this PR are causing tests to fail. label Jan 18, 2018
@dagwieers
Copy link
Contributor

dagwieers commented Jan 18, 2018

@sivel Yes, it's replaced with use_ssl (in line with other modules). It's now fixed as we moved protocol out of the standard aci_argument_spec since it's being deprecated and only used for v2.4 modules, not the new stuff.

@ansible ansible deleted a comment from ansibot Jan 18, 2018
@ansible ansible deleted a comment from ansibot Jan 18, 2018
@ansible ansible deleted a comment from ansibot Jan 18, 2018
@ansibot ansibot added the ci_verified Changes made in this PR are causing tests to fail. label Jan 18, 2018
@ansibot ansibot removed the ci_verified Changes made in this PR are causing tests to fail. label Jan 18, 2018
@brunocalogero brunocalogero changed the title WIP: added aci_interface_policy_leaf_policy_group module added aci_interface_policy_leaf_policy_group module Jan 18, 2018
@ansibot ansibot added needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. and removed WIP This issue/PR is a work in progress. Nevertheless it was shared for getting input from peers. labels Jan 18, 2018
@ansible ansible deleted a comment from ansibot Jan 18, 2018
attached_entity_profile:
description:
- Choice of attached_entity_profile (AEP) to be used as part of the leaf policy group to be created.
aliases: [ attached_entity_profile_name, AEP, AEP_name ]
Copy link
Contributor

Choose a reason for hiding this comment

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

We use aep as the default parameter in other modules and we never used AEP, AEP_name or attached_entity_profile. So please use the same parameter name as the aci_aep module !

link_aggregation_type:
description:
- Selector for the type of leaf policy group we want to create.
aliases: [ link_aggregation_type_name ]
Copy link
Contributor

Choose a reason for hiding this comment

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

I wonder if this wouldn't be better named lag_type either as the default name, or an alias. As LAG seems to be a common term (at least I know this term).
cc @rsmeyers @jmcgill298

Copy link
Contributor Author

Choose a reason for hiding this comment

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

agreed, was just wondering if we should make it same as GUI or not 👍

- Bruno Calogero (@brunocalogero)
version_added: '2.5'
notes:
- When using the module please select the appropriate link_aggregation_type. 'link'(PC)/'node'(VPC), 'leaf'(Leaf Access Port Policy Group)
Copy link
Contributor

Choose a reason for hiding this comment

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

You should be doing: C(link) for PC, C(node) for VPC and C(leaf) for Leaf Access Port Policy Group.

Maybe also use the full name for PC and VPC as well ?

argument_spec = aci_argument_spec()
argument_spec.update({
'policy_group': dict(type='str', aliases=['name', 'policy_group_name']),
'description': dict(type='str', aliases=['descr', 'description']),
Copy link
Contributor

Choose a reason for hiding this comment

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

Please remove `description' from the aliases.

Copy link
Contributor

@dagwieers dagwieers left a comment

Choose a reason for hiding this comment

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

LGTM

@brunocalogero
Copy link
Contributor Author

@sivel can you approve changes ?

@sivel
Copy link
Member

sivel commented Jan 19, 2018

I've approved the changes I asked for. I'll leave this in @dagwieers' hands, as I have no expertise in this specific area (aci).

@ansibot
Copy link
Contributor

ansibot commented Jan 19, 2018

@jmcgill298 @schunduri

As a maintainer of a module in the same namespace this new module has been submitted to, your vote counts for shipits. Please review this module and add shipit if you would like to see it merged.

click here for bot help

@ansibot ansibot added community_review In order to be merged, this PR must follow the community review workflow. and removed needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. labels Jan 19, 2018
@dagwieers dagwieers merged commit 04f1b14 into ansible:devel Jan 19, 2018
@dagwieers
Copy link
Contributor

I made one more commit to it, but lost track waiting for it to be validated.

@dagwieers
Copy link
Contributor

PS Please don't forget to add the integration test in due time.

@dagwieers dagwieers added the cisco Cisco technologies label Feb 23, 2019
@ansible ansible locked and limited conversation to collaborators Apr 26, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
aci Cisco ACI community affects_2.5 This issue/PR affects Ansible v2.5 cisco Cisco technologies community_review In order to be merged, this PR must follow the community review workflow. module This issue/PR relates to a module. networking Network category new_module This PR includes a new module. new_plugin This PR includes a new plugin. support:community This issue/PR relates to code supported by the Ansible community.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants