1515module: aci_match_community_factor
1616short_description: Manage Match Community Factor (rtctrl:MatchCommFactor)
1717description:
18- - Manage Match Community Factors for Match Rules Based on Community on Cisco ACI fabrics.
18+ - Manage Match Community Factors for Match Terms Based on Community on Cisco ACI fabrics.
1919options:
2020 tenant:
2121 description:
2222 - The name of an existing tenant.
2323 type: str
2424 aliases: [ tenant_name ]
25- subject_profile :
25+ match_rule :
2626 description:
27- - Name of an exising subject profile.
27+ - The name of an exising match rule profile.
2828 type: str
29- aliases: [ subject_name ]
29+ aliases: [ match_rule_name ]
3030 match_community_term:
3131 description:
32- - Name of an existing match community term.
32+ - The name of an existing match community term.
3333 type: str
34- aliases: [ match_rule_name ]
34+ aliases: [ match_community_term_name ]
3535 community:
3636 description:
3737 - The match community value.
3838 type: str
3939 scope:
4040 description:
4141 - The item scope.
42- - if the scope is transitive, this community may be passed between ASs.
43- - if the scope is Non transitive, this community should be carried only within the local AS.
42+ - If the scope is transitive, this community may be passed between ASs.
43+ - If the scope is Non transitive, this community should be carried only within the local AS.
4444 type: str
4545 choices: [ transitive, non-transitive ]
4646 description:
4747 description:
48- - The description for the Match Community Term .
48+ - The description for the match community factor .
4949 type: str
5050 aliases: [ descr ]
5151 state:
6565- cisco.aci.owner
6666
6767notes:
68- - The C(tenant), the C(subject_profile ) and the C(match_community_term) used must exist before using this module in your playbook.
69- The M(cisco.aci.aci_tenant), the M(cisco.aci.subject_profile ) and M(cisco.aci.match_community_term ) modules can be used for this.
68+ - The C(tenant), the C(match_rule ) and the C(match_community_term) used must exist before using this module in your playbook.
69+ The M(cisco.aci.aci_tenant), the M(cisco.aci.aci_match_rule ) and M(cisco.aci.aci_match_community_term ) modules can be used for this.
7070seealso:
7171- module: cisco.aci.aci_tenant
72+ - module: cisco.aci.aci_match_rule
73+ - module: cisco.aci.aci_match_community_term
7274- name: APIC Management Information Model reference
7375 description: More information about the internal APIC class B(rtctrl:MatchCommFactor).
7476 link: https://developer.cisco.com/docs/apic-mim-ref/
7779"""
7880
7981EXAMPLES = r"""
82+ - name: Create a match match AS-path regex term
83+ cisco.aci.match_community_term:
84+ host: apic
85+ username: admin
86+ password: SomeSecretPassword
87+ match_rule: prod_match_rule
88+ match_community_term: prod_match_community_term
89+ community: regular:as2-nn2:4:15
90+ scope: transitive
91+ tenant: production
92+ state: present
93+ delegate_to: localhost
94+
95+ - name: Delete a match match AS-path regex term
96+ cisco.aci.match_community_term:
97+ host: apic
98+ username: admin
99+ password: SomeSecretPassword
100+ match_rule: prod_match_rule
101+ tenant: production
102+ match_community_term: prod_match_community_term
103+ community: regular:as2-nn2:4:15
104+ state: absent
105+ delegate_to: localhost
106+
107+ - name: Query all match AS-path regex terms
108+ cisco.aci.match_community_term:
109+ host: apic
110+ username: admin
111+ password: SomeSecretPassword
112+ state: query
113+ delegate_to: localhost
114+ register: query_result
115+
116+ - name: Query a specific match match AS-path regex term
117+ cisco.aci.match_community_term:
118+ host: apic
119+ username: admin
120+ password: SomeSecretPassword
121+ match_rule: prod_match_rule
122+ tenant: production
123+ match_community_term: prod_match_community_term
124+ community: regular:as2-nn2:4:15
125+ state: query
126+ delegate_to: localhost
127+ register: query_result
80128"""
81129
82130RETURN = r"""
@@ -194,8 +242,8 @@ def main():
194242 argument_spec .update (aci_owner_spec ())
195243 argument_spec .update (
196244 tenant = dict (type = "str" , aliases = ["tenant_name" ]), # Not required for querying all objects
197- subject_profile = dict (type = "str" , aliases = ["subject_name " ]), # Not required for querying all objects
198- match_community_term = dict (type = "str" , aliases = ["match_rule_name " ]), # Not required for querying all objects
245+ match_rule = dict (type = "str" , aliases = ["match_rule_name " ]), # Not required for querying all objects
246+ match_community_term = dict (type = "str" , aliases = ["match_community_term_name " ]), # Not required for querying all objects
199247 community = dict (type = "str" ),
200248 scope = dict (type = "str" , choices = ["transitive" , "non-transitive" ]),
201249 description = dict (type = "str" , aliases = ["descr" ]),
@@ -207,8 +255,8 @@ def main():
207255 argument_spec = argument_spec ,
208256 supports_check_mode = True ,
209257 required_if = [
210- ["state" , "absent" , ["community" , "tenant" , "subject_profile " , "match_community_term" ]],
211- ["state" , "present" , ["community" , "tenant" , "subject_profile " , "match_community_term" ]],
258+ ["state" , "absent" , ["community" , "tenant" , "match_rule " , "match_community_term" ]],
259+ ["state" , "present" , ["community" , "tenant" , "match_rule " , "match_community_term" ]],
212260 ],
213261 )
214262
@@ -217,7 +265,7 @@ def main():
217265 description = module .params .get ("description" )
218266 state = module .params .get ("state" )
219267 tenant = module .params .get ("tenant" )
220- subject_profile = module .params .get ("subject_profile " )
268+ match_rule = module .params .get ("match_rule " )
221269 match_community_term = module .params .get ("match_community_term" )
222270 name_alias = module .params .get ("name_alias" )
223271
@@ -232,9 +280,9 @@ def main():
232280 ),
233281 subclass_1 = dict (
234282 aci_class = "rtctrlSubjP" ,
235- aci_rn = "subj-{0}" .format (subject_profile ),
236- module_object = subject_profile ,
237- target_filter = {"name" : subject_profile },
283+ aci_rn = "subj-{0}" .format (match_rule ),
284+ module_object = match_rule ,
285+ target_filter = {"name" : match_rule },
238286 ),
239287 subclass_2 = dict (
240288 aci_class = "rtctrlMatchCommTerm" ,
0 commit comments