Skip to content

Commit 1f5aa6d

Browse files
gmicollhercot
authored andcommitted
[ignore] Modify documentations and check sanity tests for all modules related to aci_route_control_profile.
1 parent 7106558 commit 1f5aa6d

8 files changed

+183
-153
lines changed

plugins/modules/aci_context_policy.py

Lines changed: 44 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@
1212

1313
DOCUMENTATION = r"""
1414
---
15-
module: aci_route_control_profile
16-
short_description: Manage Context Policy (rtcrtl:CtxP)
15+
module: aci_context_policy
16+
short_description: Manage Route Context Policy (rtcrtl:CtxP)
1717
description:
18-
- Manage Context Policies for the Route Control Profiles on Cisco ACI fabrics.
18+
- Manage Route Context Policies for the Route Control Profiles on Cisco ACI fabrics.
1919
options:
2020
tenant:
2121
description:
@@ -42,6 +42,20 @@
4242
- The action required when the condition is met.
4343
type: str
4444
choices: [ deny, permit ]
45+
action_rule:
46+
description:
47+
- Name of the action rule profile to be associated with this route context policy.
48+
- Set the rules for a Route Map.
49+
- See module M(cisco.aci.aci_tenant_action_rule_profile).
50+
type: str
51+
aliases: [ action_rule_name ]
52+
subject_profile:
53+
description:
54+
- Name of the subject profile to be associated with this route context policy.
55+
- Set the associated Matched rules.
56+
- See module M(cisco.aci.aci_subject_profile).
57+
type: str
58+
aliases: [ subject_name ]
4559
order:
4660
description:
4761
- The order of the policy context.
@@ -199,11 +213,11 @@ def main():
199213
argument_spec.update(
200214
tenant=dict(type="str", aliases=["tenant_name"]), # Not required for querying all objects
201215
l3out=dict(type="str", aliases=["l3out_name"]), # Not required for querying all objects
202-
route_control_profile=dict(type="str", aliases=["rtctrl_profile_name"]), # Not required for querying all objects
203-
context_policy=dict(type="str", aliases=["name", "context_name"]), # Not required for querying all objects
216+
route_control_profile=dict(type="str", aliases=["rtctrl_profile_name"]), # Not required for querying all objects
217+
context_policy=dict(type="str", aliases=["name", "context_name"]), # Not required for querying all objects
204218
subject_profile=dict(type="str", aliases=["subject_name"]),
205219
action_rule=dict(type="str", aliases=["action_rule_name"]),
206-
action = dict(type="str", choices=["deny", "permit"]),
220+
action=dict(type="str", choices=["deny", "permit"]),
207221
order=dict(type="int"),
208222
description=dict(type="str", aliases=["descr"]),
209223
name_alias=dict(type="str"),
@@ -236,26 +250,26 @@ def main():
236250
child_classes = ["rtctrlRsCtxPToSubjP", "rtctrlScope"]
237251

238252
tenant_url_config = dict(
239-
aci_class="fvTenant",
240-
aci_rn="tn-{0}".format(tenant),
241-
module_object=tenant,
242-
target_filter={"name": tenant},
243-
)
244-
253+
aci_class="fvTenant",
254+
aci_rn="tn-{0}".format(tenant),
255+
module_object=tenant,
256+
target_filter={"name": tenant},
257+
)
258+
245259
route_control_profile_url_config = dict(
246-
aci_class="rtctrlProfile",
247-
aci_rn="prof-{0}".format(route_control_profile),
248-
module_object=route_control_profile,
249-
target_filter={"name": route_control_profile},
250-
)
251-
260+
aci_class="rtctrlProfile",
261+
aci_rn="prof-{0}".format(route_control_profile),
262+
module_object=route_control_profile,
263+
target_filter={"name": route_control_profile},
264+
)
265+
252266
context_policy_url_config = dict(
253-
aci_class="rtctrlCtxP",
254-
aci_rn="ctx-{0}".format(context_policy),
255-
module_object=context_policy,
256-
target_filter={"name": context_policy},
257-
)
258-
267+
aci_class="rtctrlCtxP",
268+
aci_rn="ctx-{0}".format(context_policy),
269+
module_object=context_policy,
270+
target_filter={"name": context_policy},
271+
)
272+
259273
if l3out is not None:
260274
aci.construct_url(
261275
root_class=tenant_url_config,
@@ -285,9 +299,11 @@ def main():
285299
child_configs.append({"rtctrlRsCtxPToSubjP": {"attributes": {"tnRtctrlSubjPName": subject_profile}}})
286300
if action_rule is not None:
287301
child_configs.append(
288-
{"rtctrlScope": {"attributes": {"descr": ""},
289-
"children": [{"rtctrlRsScopeToAttrP": {"attributes": {"tnRtctrlAttrPName": action_rule}}}],
290-
}
302+
{
303+
"rtctrlScope": {
304+
"attributes": {"descr": ""},
305+
"children": [{"rtctrlRsScopeToAttrP": {"attributes": {"tnRtctrlAttrPName": action_rule}}}],
306+
}
291307
}
292308
)
293309

@@ -314,4 +330,4 @@ def main():
314330

315331

316332
if __name__ == "__main__":
317-
main()
333+
main()

plugins/modules/aci_match_as_path_regex_term.py

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
DOCUMENTATION = r"""
1414
---
15-
module: aci_subject_profile
15+
module: aci_match_as_path_regex_term
1616
short_description: Manage Match Regular Expression AS-Path Term (rtctrl:MatchAsPathRegexTerm)
1717
description:
1818
- Manage Match Rule Based on Route Regular Expression AS-Path for Subject Profiles on Cisco ACI fabrics.
@@ -187,7 +187,7 @@ def main():
187187
argument_spec.update(aci_owner_spec())
188188
argument_spec.update(
189189
tenant=dict(type="str", aliases=["tenant_name"]), # Not required for querying all objects
190-
subject_profile=dict(type="str", aliases=["subject_name"]), # Not required for querying all objects
190+
subject_profile=dict(type="str", aliases=["subject_name"]), # Not required for querying all objects
191191
match_as_path_regex_term=dict(type="str", aliases=["name", "match_rule_name"]),
192192
regex=dict(type="str"),
193193
description=dict(type="str", aliases=["descr"]),
@@ -216,23 +216,23 @@ def main():
216216

217217
aci.construct_url(
218218
root_class=dict(
219-
aci_class="fvTenant",
220-
aci_rn="tn-{0}".format(tenant),
221-
module_object=tenant,
222-
target_filter={"name": tenant},
223-
),
219+
aci_class="fvTenant",
220+
aci_rn="tn-{0}".format(tenant),
221+
module_object=tenant,
222+
target_filter={"name": tenant},
223+
),
224224
subclass_1=dict(
225-
aci_class="rtctrlSubjP",
226-
aci_rn="subj-{0}".format(subject_profile),
227-
module_object=subject_profile,
228-
target_filter={"name": subject_profile},
229-
),
225+
aci_class="rtctrlSubjP",
226+
aci_rn="subj-{0}".format(subject_profile),
227+
module_object=subject_profile,
228+
target_filter={"name": subject_profile},
229+
),
230230
subclass_2=dict(
231-
aci_class="rtctrlMatchAsPathRegexTerm",
232-
aci_rn="aspathrxtrm-{0}".format(match_as_path_regex_term),
233-
module_object=match_as_path_regex_term,
234-
target_filter={"name": match_as_path_regex_term},
235-
),
231+
aci_class="rtctrlMatchAsPathRegexTerm",
232+
aci_rn="aspathrxtrm-{0}".format(match_as_path_regex_term),
233+
module_object=match_as_path_regex_term,
234+
target_filter={"name": match_as_path_regex_term},
235+
),
236236
)
237237

238238
aci.get_existing()
@@ -259,4 +259,4 @@ def main():
259259

260260

261261
if __name__ == "__main__":
262-
main()
262+
main()

plugins/modules/aci_match_community_factor.py

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
DOCUMENTATION = r"""
1414
---
15-
module: aci_subject_profile
15+
module: aci_match_community_factor
1616
short_description: Manage Match Community Factor (rtctrl:MatchCommFactor)
1717
description:
1818
- Manage Match Community Factors for Match Rules Based on Community on Cisco ACI fabrics.
@@ -194,8 +194,8 @@ def main():
194194
argument_spec.update(aci_owner_spec())
195195
argument_spec.update(
196196
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
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
199199
community=dict(type="str"),
200200
scope=dict(type="str", choices=["transitive", "non-transitive"]),
201201
description=dict(type="str", aliases=["descr"]),
@@ -225,29 +225,29 @@ def main():
225225

226226
aci.construct_url(
227227
root_class=dict(
228-
aci_class="fvTenant",
229-
aci_rn="tn-{0}".format(tenant),
230-
module_object=tenant,
231-
target_filter={"name": tenant},
232-
),
228+
aci_class="fvTenant",
229+
aci_rn="tn-{0}".format(tenant),
230+
module_object=tenant,
231+
target_filter={"name": tenant},
232+
),
233233
subclass_1=dict(
234-
aci_class="rtctrlSubjP",
235-
aci_rn="subj-{0}".format(subject_profile),
236-
module_object=subject_profile,
237-
target_filter={"name": subject_profile},
238-
),
234+
aci_class="rtctrlSubjP",
235+
aci_rn="subj-{0}".format(subject_profile),
236+
module_object=subject_profile,
237+
target_filter={"name": subject_profile},
238+
),
239239
subclass_2=dict(
240-
aci_class="rtctrlMatchCommTerm",
241-
aci_rn="commtrm-{0}".format(match_community_term),
242-
module_object=match_community_term,
243-
target_filter={"name": match_community_term},
244-
),
240+
aci_class="rtctrlMatchCommTerm",
241+
aci_rn="commtrm-{0}".format(match_community_term),
242+
module_object=match_community_term,
243+
target_filter={"name": match_community_term},
244+
),
245245
subclass_3=dict(
246-
aci_class="rtctrlMatchCommFactor",
247-
aci_rn="commfct-{0}".format(community),
248-
module_object=community,
249-
target_filter={"community": community},
250-
),
246+
aci_class="rtctrlMatchCommFactor",
247+
aci_rn="commfct-{0}".format(community),
248+
module_object=community,
249+
target_filter={"community": community},
250+
),
251251
)
252252

253253
aci.get_existing()
@@ -274,4 +274,4 @@ def main():
274274

275275

276276
if __name__ == "__main__":
277-
main()
277+
main()

plugins/modules/aci_match_community_regex_term.py

Lines changed: 20 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
DOCUMENTATION = r"""
1414
---
15-
module: aci_subject_profile
15+
module: aci_match_community_regex_term
1616
short_description: Manage Match Regular Expression Community Term (rtctrl:MatchCommRegexTerm)
1717
description:
1818
- Manage Match Rule Based on Route Regular Expression Community for Subject Profiles on Cisco ACI fabrics.
@@ -37,6 +37,7 @@
3737
- The Community Type.
3838
type: str
3939
choices: [ extended, regular ]
40+
default: regular
4041
regex:
4142
description:
4243
- The Regular Expression.
@@ -192,8 +193,8 @@ def main():
192193
argument_spec.update(aci_annotation_spec())
193194
argument_spec.update(aci_owner_spec())
194195
argument_spec.update(
195-
tenant=dict(type="str", aliases=["tenant_name"]), # Not required for querying all objects
196-
subject_profile=dict(type="str", aliases=["subject_name"]), # Not required for querying all objects
196+
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
197198
match_community_regex_term=dict(type="str", aliases=["name", "match_rule_name"]),
198199
community_type=dict(type="str", default="regular", choices=["extended", "regular"]),
199200
regex=dict(type="str"),
@@ -224,23 +225,23 @@ def main():
224225

225226
aci.construct_url(
226227
root_class=dict(
227-
aci_class="fvTenant",
228-
aci_rn="tn-{0}".format(tenant),
229-
module_object=tenant,
230-
target_filter={"name": tenant},
231-
),
228+
aci_class="fvTenant",
229+
aci_rn="tn-{0}".format(tenant),
230+
module_object=tenant,
231+
target_filter={"name": tenant},
232+
),
232233
subclass_1=dict(
233-
aci_class="rtctrlSubjP",
234-
aci_rn="subj-{0}".format(subject_profile),
235-
module_object=subject_profile,
236-
target_filter={"name": subject_profile},
237-
),
234+
aci_class="rtctrlSubjP",
235+
aci_rn="subj-{0}".format(subject_profile),
236+
module_object=subject_profile,
237+
target_filter={"name": subject_profile},
238+
),
238239
subclass_2=dict(
239-
aci_class="rtctrlMatchCommRegexTerm",
240-
aci_rn="commrxtrm-{0}".format(community_type),
241-
module_object=community_type,
242-
target_filter={"commType": community_type},
243-
),
240+
aci_class="rtctrlMatchCommRegexTerm",
241+
aci_rn="commrxtrm-{0}".format(community_type),
242+
module_object=community_type,
243+
target_filter={"commType": community_type},
244+
),
244245
)
245246

246247
aci.get_existing()
@@ -268,4 +269,4 @@ def main():
268269

269270

270271
if __name__ == "__main__":
271-
main()
272+
main()

plugins/modules/aci_match_community_term.py

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
DOCUMENTATION = r"""
1414
---
15-
module: aci_subject_profile
15+
module: aci_match_community_term
1616
short_description: Manage Match Community Term (rtctrl:MatchCommTerm)
1717
description:
1818
- Manage Match Rule Based on Community for Subject Profiles on Cisco ACI fabrics.
@@ -183,7 +183,7 @@ def main():
183183
argument_spec.update(aci_owner_spec())
184184
argument_spec.update(
185185
tenant=dict(type="str", aliases=["tenant_name"]), # Not required for querying all objects
186-
subject_profile=dict(type="str", aliases=["subject_name"]), # Not required for querying all objects
186+
subject_profile=dict(type="str", aliases=["subject_name"]), # Not required for querying all objects
187187
match_community_term=dict(type="str", aliases=["name", "match_rule_name"]),
188188
description=dict(type="str", aliases=["descr"]),
189189
name_alias=dict(type="str"),
@@ -210,23 +210,23 @@ def main():
210210

211211
aci.construct_url(
212212
root_class=dict(
213-
aci_class="fvTenant",
214-
aci_rn="tn-{0}".format(tenant),
215-
module_object=tenant,
216-
target_filter={"name": tenant},
217-
),
213+
aci_class="fvTenant",
214+
aci_rn="tn-{0}".format(tenant),
215+
module_object=tenant,
216+
target_filter={"name": tenant},
217+
),
218218
subclass_1=dict(
219-
aci_class="rtctrlSubjP",
220-
aci_rn="subj-{0}".format(subject_profile),
221-
module_object=subject_profile,
222-
target_filter={"name": subject_profile},
223-
),
219+
aci_class="rtctrlSubjP",
220+
aci_rn="subj-{0}".format(subject_profile),
221+
module_object=subject_profile,
222+
target_filter={"name": subject_profile},
223+
),
224224
subclass_2=dict(
225-
aci_class="rtctrlMatchCommTerm",
226-
aci_rn="commtrm-{0}".format(match_community_term),
227-
module_object=match_community_term,
228-
target_filter={"name": match_community_term},
229-
),
225+
aci_class="rtctrlMatchCommTerm",
226+
aci_rn="commtrm-{0}".format(match_community_term),
227+
module_object=match_community_term,
228+
target_filter={"name": match_community_term},
229+
),
230230
)
231231

232232
aci.get_existing()
@@ -252,4 +252,4 @@ def main():
252252

253253

254254
if __name__ == "__main__":
255-
main()
255+
main()

0 commit comments

Comments
 (0)