diff --git a/plugins/module_utils/constants.py b/plugins/module_utils/constants.py index 489cd55e..8bc3b0f8 100644 --- a/plugins/module_utils/constants.py +++ b/plugins/module_utils/constants.py @@ -211,3 +211,5 @@ ORIGINATE_DEFAULT_ROUTE = {"only": "only", "in_addition": "inAddition", "": ""} L3OUT_ROUTING_PROTOCOLS = {"bgp": ["bgp"], "ospf": ["ospf"], "bgpOspf": ["bgp", "ospf"], None: [None], "": None, "bgpospf": "bgpOspf", "ospfbgp": "bgpOspf"} + +QOS_LEVEL = ["unspecified", "level1", "level2", "level3", "level4", "level5", "level6"] diff --git a/plugins/modules/mso_schema_template_anp_epg.py b/plugins/modules/mso_schema_template_anp_epg.py index f4313fd0..3c0fd1c0 100644 --- a/plugins/modules/mso_schema_template_anp_epg.py +++ b/plugins/modules/mso_schema_template_anp_epg.py @@ -158,6 +158,7 @@ - Quality of Service (QoS) allows you to classify the network traffic in the fabric. - It helps prioritize and police the traffic flow to help avoid congestion in the network. - The Contract QoS Level parameter is supported on versions of MSO that are 3.1 or greater. + choices: [ unspecified, level1, level2, level3, level4, level5, level6 ] type: str epg_type: description: @@ -278,6 +279,7 @@ from ansible.module_utils.basic import AnsibleModule from ansible_collections.cisco.mso.plugins.module_utils.mso import MSOModule, mso_argument_spec, mso_reference_spec, mso_epg_subnet_spec +from ansible_collections.cisco.mso.plugins.module_utils.constants import QOS_LEVEL def main(): @@ -296,7 +298,7 @@ def main(): intersite_multicast_source=dict(type="bool"), proxy_arp=dict(type="bool"), subnets=dict(type="list", elements="dict", options=mso_epg_subnet_spec()), - qos_level=dict(type="str"), + qos_level=dict(type="str", choices=QOS_LEVEL), epg_type=dict(type="str", choices=["application", "service"]), deployment_type=dict(type="str", choices=["cloud_native", "cloud_native_managed", "third_party"]), service_type=dict(type="str"), diff --git a/plugins/modules/mso_schema_template_contract_filter.py b/plugins/modules/mso_schema_template_contract_filter.py index cb2ac1b0..e4c08012 100644 --- a/plugins/modules/mso_schema_template_contract_filter.py +++ b/plugins/modules/mso_schema_template_contract_filter.py @@ -169,7 +169,7 @@ from ansible.module_utils.basic import AnsibleModule from ansible_collections.cisco.mso.plugins.module_utils.mso import MSOModule, mso_argument_spec -from ansible_collections.cisco.mso.plugins.module_utils.constants import FILTER_KEY_MAP, PRIORITY_MAP +from ansible_collections.cisco.mso.plugins.module_utils.constants import FILTER_KEY_MAP, PRIORITY_MAP, QOS_LEVEL def main(): @@ -188,7 +188,7 @@ def main(): filter_template=dict(type="str"), filter_schema=dict(type="str"), filter_type=dict(type="str", default="both-way", choices=list(FILTER_KEY_MAP), aliases=["type"]), - qos_level=dict(type="str", choices=["unspecified", "level1", "level2", "level3", "level4", "level5", "level6"]), + qos_level=dict(type="str", choices=QOS_LEVEL), action=dict(type="str", choices=["permit", "deny"]), priority=dict(type="str", choices=["default", "lowest_priority", "medium_priority", "highest_priority"]), state=dict(type="str", default="present", choices=["absent", "present", "query"]), diff --git a/plugins/modules/mso_schema_template_external_epg.py b/plugins/modules/mso_schema_template_external_epg.py index 8b7fd725..f45f9449 100644 --- a/plugins/modules/mso_schema_template_external_epg.py +++ b/plugins/modules/mso_schema_template_external_epg.py @@ -201,6 +201,7 @@ from ansible.module_utils.basic import AnsibleModule from ansible_collections.cisco.mso.plugins.module_utils.mso import MSOModule, mso_argument_spec, mso_reference_spec +from ansible_collections.cisco.mso.plugins.module_utils.constants import QOS_LEVEL def main(): @@ -216,7 +217,7 @@ def main(): anp=dict(type="dict", options=mso_reference_spec()), preferred_group=dict(type="bool"), type=dict(type="str", default="on-premise", choices=["on-premise", "cloud"]), - qos_level=dict(type="str", choices=["unspecified", "level1", "level2", "level3", "level4", "level5", "level6"]), + qos_level=dict(type="str", choices=QOS_LEVEL), state=dict(type="str", default="present", choices=["absent", "present", "query"]), )