ansible-aci
ansible-aci copied to clipboard
ACI Contract Subject Labels
Community Note
- Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
- Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
- If you are interested in working on this issue or have submitted a pull request, please leave a comment
Description
!new_module
- New module to create/query/delete consumer and provider subject labels under existing contracts
New or Affected Module(s):
- aci_contract_subject + vz:ConsSubjLbl + vz:ProvSubjLbl
APIC version and APIC Platform
- V 3.0+ and all.
Collection versions
- cisco.aci 2.2.0+
References
- #309
#309
Hi @markciecior,
Thank you for your issue raise and contribution. I would like to ask you a few things in regards to your contribution, could you please follow the following documentation/process: https://github.com/shrsr/ansible/blob/devel/docs/docsite/rst/dev_guide/developing_modules_general_aci.rst. This includes creating tests for the developed module.
Besides this I was wondering your exact use-case and if you were aware of the https://github.com/CiscoDevNet/ansible-aci/blob/master/plugins/modules/aci_epg_to_contract.py module. Code wise this could provide some insights for simplification of your code.
Also this raises a question to me if we need a separate module for this functionality or if this can be included into existing module, what are your thoughts on this?
Hi @akinross,
I'm aware my contribution doesn't include any tests today. If the use case is deemed legitimate I will add those.
When a subject and/or provider labels are used with contracts, those labels need to be added to the EPG (which is possible using the module above), and to the contract subject. I didn't see any mechanism to add the labels to the contract subject, which is what sent me down this path.
As for folding this into another module, I see the child_classes construct now. That would make more sense than a separate module. I will pursue that path instead. Thanks.
I created a new PR using the technique mentioned above in #319.