-
Notifications
You must be signed in to change notification settings - Fork 104
Addition of a new module for enhanced_lag_policy (DCNE-422) #768
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
base: master
Are you sure you want to change the base?
Addition of a new module for enhanced_lag_policy (DCNE-422) #768
Conversation
state: query | ||
register: query_all_result | ||
|
||
- name: Ensure idempotency when creating an Enhanced LACP Policy |
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.
dont think we include this type of example in other modules
vm_provider: vmware | ||
state: absent | ||
|
||
- name: Simulate deletion of an Enhanced LACP Policy (Check Mode) |
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.
dont think we include this type of example in other modules
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.
Noted, I have deleted that example. Thank you for the clarification.
argument_spec.update( | ||
domain=dict(type="str", aliases=["domain_name", "domain_profile"]), | ||
state=dict(type="str", default="present", choices=["absent", "present", "query"]), | ||
vm_provider=dict(type="str", choices=list(VM_PROVIDER_MAPPING.keys())), |
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.
don't think the keys()
is needed and list function can be called directly on the MAP
vm_provider=dict(type="str", choices=list(VM_PROVIDER_MAPPING.keys())), | |
vm_provider=dict(type="str", choices=list(VM_PROVIDER_MAPPING)), |
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.
Fixed, removed the .keys() function and maintained functionality across all tests. Thanks for the feedback.
aci_owner_spec, | ||
) | ||
|
||
VM_PROVIDER_MAPPING = dict( |
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.
You can import and use the VM_PROVIDER_MAPPING defined in module_utils/constants.py
number_uplinks: 4 | ||
state: present | ||
|
||
- name: Simulate creation of an Enhanced LACP Policy (Check Mode) |
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.
dont think we include this type of example in other modules
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.
Not sure I understand the thumbs up here? Has this been decided to include?
description: | ||
- Manage Enhanced LACP Policy (lacpEnhancedLagPol) for VMM domains on Cisco ACI fabrics. | ||
- The Enhanced LACP Policy allows you to configure advanced Link Aggregation Control Protocol (LACP) settings for virtual switches in VMM domains. | ||
- This policy is a child of the C(vmmVSwitchPolicyCont) class. |
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.
is children something we decided to add to the descriptions?
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.
Not sure I understand the thumbs up here? Has this been decided?
DOCUMENTATION = r""" | ||
--- | ||
module: aci_vmm_enhanced_lag_policy | ||
short_description: Manage Enhanced LACP Policy for Virtual Machine Manager (VMM) in Cisco ACI |
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.
In other modules I think we include the classname to the short description (lacp:EnhancedLagPol) at the end. If not mistaken this was done for search-ability of classes in documentation
module: aci_vmm_enhanced_lag_policy | ||
short_description: Manage Enhanced LACP Policy for Virtual Machine Manager (VMM) in Cisco ACI | ||
description: | ||
- Manage Enhanced LACP Policy (lacpEnhancedLagPol) for VMM domains on Cisco ACI fabrics. |
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.
don't think we put class names in the descriptions
…and replaced names with vendor in target_filter
Co-authored-by: Akini Ross <akinross@cisco.com>
… can use this module in a playbook
description: | ||
- Manage Enhanced LACP Policy (lacpEnhancedLagPol) for VMM domains on Cisco ACI fabrics. | ||
- The Enhanced LACP Policy allows you to configure advanced Link Aggregation Control Protocol (LACP) settings for virtual switches in VMM domains. | ||
- This policy is a child of the C(vmmVSwitchPolicyCont) class. |
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.
Not sure I understand the thumbs up here? Has this been decided?
number_uplinks: 4 | ||
state: present | ||
|
||
- name: Simulate creation of an Enhanced LACP Policy (Check Mode) |
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.
Not sure I understand the thumbs up here? Has this been decided to include?
aci_class="vmmVSwitchPolicyCont", | ||
aci_rn="vswitchpolcont", | ||
module_object="vswitchpolcont", | ||
target_filter={"name": "vswitchpolcont"}, |
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 would start by testing the behaviour with and without for both module_object and target_filter.
The target_filter is referencing a property now that exist but is not configurable according to the model, so is it always vswitchpolcont
?
- The I(vmm_domain) and I(vSwitch_policy) must exist before using this module in a playbook. | ||
- The modules M(cisco.aci.aci_domain) and M(cisco.aci.aci_vmm_vswitch_policy) can be used for this. | ||
seealso: | ||
- module: cisco.aci.aci_domain |
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.
- module: cisco.aci.aci_domain | |
- module: cisco.aci.aci_domain | |
- module: cisco.aci. aci_vmm_vswitch_policy |
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.
Sorry about that, I have made the fix
aci_class="vmmVSwitchPolicyCont", | ||
aci_rn="vswitchpolcont", | ||
module_object="vswitchpolcont", | ||
target_filter={"name": "vswitchpolcont"}, |
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.
had a quick look and from what I read in code if module_object is defined that should be enough, target_filter is not used at all in the logic as far as I can tell so can be excluded, since it only uses the filter of the object defined in subclass_3. See _construct_url_4) function in aci.py
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.
LGTM
3ab2f57
to
bc2bc36
Compare
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.
LGTM
No description provided.