diff --git a/plugins/module_utils/constants.py b/plugins/module_utils/constants.py index 165b63431..3f153aa91 100644 --- a/plugins/module_utils/constants.py +++ b/plugins/module_utils/constants.py @@ -98,3 +98,5 @@ FABRIC_POD_SELECTOR_TYPE_MAPPING = dict(all="ALL", range="range") TLS_MAPPING = {"tls_v1.0": "TLSv1", "tls_v1.1": "TLSv1.1", "tls_v1.2": "TLSv1.2"} + +PIM_SETTING_CONTROL_STATE_MAPPING = {"fast": "fast-conv", "strict": "strict-rfc-compliant"} diff --git a/plugins/modules/aci_vrf_multicast.py b/plugins/modules/aci_vrf_multicast.py new file mode 100644 index 000000000..be0d3fa51 --- /dev/null +++ b/plugins/modules/aci_vrf_multicast.py @@ -0,0 +1,702 @@ +#!/usr/bin/python +# -*- coding: utf-8 -*- + +# Copyright: (c) 2023, Tim Cragg (@timcragg) +# Copyright: (c) 2023, Akini Ross (@akinross) +# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt) + +from __future__ import absolute_import, division, print_function + +__metaclass__ = type + +ANSIBLE_METADATA = {"metadata_version": "1.1", "status": ["preview"], "supported_by": "community"} + +DOCUMENTATION = r""" +--- +module: aci_vrf_multicast +short_description: Manage VRF Multicast objects (pim:CtxP). +description: +- Manage VRF Multicast objects on Cisco ACI fabrics. +- Creating I(state=present) enables Protocol Independent Multicast (PIM) on a VRF +- Deleting I(state=absent) disables Protocol Independent Multicast (PIM) on a VRF. +options: + tenant: + description: + - The name of an existing tenant. + type: str + aliases: [ tenant_name ] + vrf: + description: + - The name of an existing VRF. + type: str + aliases: [ vrf_name ] + pim_setting: + description: Configuration container for Protocol Independent Multicast (PIM) settings. + type: dict + suboptions: + mtu: + description: + - The MTU size supported for multicast. + - The APIC defaults to C(1500) when unset during creation. + type: int + control_state: + description: + - The action(s) to take when a loop is detected. + - Specify C([]) to remove the control state configuration. + type: list + elements: str + aliases: [ control, ctrl ] + choices: [ fast, strict ] + resource_policy: + description: Configuration container for Protocol Independent Multicast (PIM) resource policy. + type: dict + suboptions: + maximum_limit: + description: + - The Max Multicast Entries. + - The APIC defaults to C(unlimited) when unset during creation. + - Specify C(0) to reset to C(unlimited). + type: int + aliases: [ max ] + reserved_multicast_entries: + description: + - The Reserved Multicast Entries. + - The APIC defaults to C(undefined) when unset during creation. + - Required when C(reserved_route_map) is provided. + type: int + aliases: [ rsvd ] + reserved_route_map: + description: + - The DN of the Route Map. + - Specify C("") to remove the Route Map configuration. + - Required when C(reserved_multicast_entries) is provided. + type: str + aliases: [ route_map, route_map_dn ] + any_source_multicast: + description: Configuration container for Protocol Independent Multicast (PIM) Any Source Multicast (ASM) settings. + type: dict + aliases: [ asm, any_source ] + suboptions: + shared_range_route_map: + description: + - The DN of the Route Map. + - Specify C("") to remove the Route Map configuration. + type: str + aliases: [ shared_range_policy ] + source_group_expiry_route_map: + description: + - The DN of the Route Map. + - Specify C("") to remove the Route Map configuration. + type: str + aliases: [ sg_expiry_route_map ] + expiry: + description: + - The expiry time in seconds. + - The APIC defaults to C(default-timeout) when unset during creation. + - Specify C(0) to reset to C(default-timeout). + type: int + aliases: [ expiry_seconds ] + max_rate: + description: + - The maximum rate per second. + - The APIC defaults to C(65535) when unset during creation. + type: int + aliases: [ max_rate_per_second ] + source_ip: + description: + - The source IP address. + type: str + aliases: [ source, source_ip_address ] + source_specific_multicast: + description: Configuration container for Protocol Independent Multicast (PIM) Source Specific Multicast (SSM) settings. + type: dict + aliases: [ ssm, specific_source ] + suboptions: + group_range_route_map: + description: + - The DN of the Route Map. + - Specify C("") to remove the Route Map configuration. + type: str + aliases: [ group_range_policy ] + bootstrap_router: + description: Configuration container for Protocol Independent Multicast (PIM) Bootstrap Router (BSR) settings. + type: dict + aliases: [ bsr, bootstrap ] + suboptions: + bsr_filter: + description: + - The DN of the Route Map. + - Specify C("") to remove the Route Map configuration. + type: str + aliases: [ filter, route_map, route_map_dn ] + rp_updates: + description: + - The control state of the Bootstrap Router (BSR) policy. + - Specify C([]) to remove the control state configuration. + type: list + elements: str + aliases: [ control, ctrl ] + choices: [ forward, listen ] + auto_rp: + description: Configuration container for Protocol Independent Multicast (PIM) Auto-Rendezvous Point (Auto-RP) settings. + type: dict + aliases: [ auto ] + suboptions: + ma_filter: + description: + - The DN of the Route Map. + - Specify C("") to remove the Route Map configuration. + type: str + aliases: [ filter, route_map, route_map_dn ] + rp_updates: + description: + - The control state of the Auto-Rendezvous Point (Auto-RP) policy. + - Specify C([]) to remove the control state configuration. + type: list + elements: str + aliases: [ control, ctrl ] + choices: [ forward, listen ] + state: + description: + - Use C(present) or C(absent) for adding or removing. + - Use C(query) for listing an object or multiple objects. + type: str + choices: [ absent, present, query ] + default: present +extends_documentation_fragment: +- cisco.aci.aci +- cisco.aci.annotation +- cisco.aci.owner + +notes: +- The I(tenant) and I(vrf) must exist before using this module in your playbook. + The M(cisco.aci.aci_tenant) and M(cisco.aci.aci_vrf) modules can be used for this. +seealso: +- name: APIC Management Information Model reference + description: More information about the internal APIC class B(pim:CtxP). + link: https://developer.cisco.com/docs/apic-mim-ref/ +author: +- Tim Cragg (@timcragg) +- Akini Ross (@akinross) +""" + +EXAMPLES = r""" +- name: Enable Multicast on a VRF + cisco.aci.aci_vrf_multicast: + host: apic + username: admin + password: SomeSecretePassword + tenant: ansible_tenant + vrf: ansible_vrf + state: present + delegate_to: localhost + +- name: Change Multicast PIM Settings on a VRF + cisco.aci.aci_vrf_multicast: + host: apic + username: admin + password: SomeSecretePassword + tenant: ansible_tenant + vrf: ansible_vrf + pim_setting: + mtu: 2000 + control_state: [ fast, strict ] + state: present + delegate_to: localhost + +- name: Change Multicast Resource Policy on a VRF + cisco.aci.aci_vrf_multicast: + host: apic + username: admin + password: SomeSecretePassword + tenant: ansible_tenant + vrf: ansible_vrf + resource_policy: + maximum_limit: 100 + reserved_multicast_entries: 20 + reserved_route_map: uni/tn-ansible_test/rtmap-ansible_test + state: present + delegate_to: localhost + +- name: Remove Route-Map from Multicast Resource Policy on a VRF + cisco.aci.aci_vrf_multicast: + host: apic + username: admin + password: SomeSecretePassword + tenant: ansible_tenant + vrf: ansible_vrf + resource_policy: + reserved_route_map: "" + state: present + delegate_to: localhost + +- name: Change Multicast Any Source Multicast (ASM) Settings on a VRF + cisco.aci.aci_vrf_multicast: + host: apic + username: admin + password: SomeSecretePassword + tenant: ansible_tenant + vrf: ansible_vrf + any_source_multicast: + shared_range_route_map: uni/tn-ansible_test/rtmap-ansible_test + source_group_expiry_route_map: uni/tn-ansible_test/rtmap-ansible_test + expiry: 500 + max_rate: 64000 + source_ip: 1.1.1.1 + state: present + delegate_to: localhost + +- name: Change Multicast Source Specific Multicast (SSM) Settings on a VRF + cisco.aci.aci_vrf_multicast: + host: apic + username: admin + password: SomeSecretePassword + tenant: ansible_tenant + vrf: ansible_vrf + source_specific_multicast: + group_range_route_map: uni/tn-ansible_test/rtmap-ansible_test + state: present + delegate_to: localhost + +- name: Change Multicast Bootstrap Router (BSR) Settings on a VRF + cisco.aci.aci_vrf_multicast: + host: apic + username: admin + password: SomeSecretePassword + tenant: ansible_tenant + vrf: ansible_vrf + bootstrap_router: + bsr_filter: uni/tn-ansible_test/rtmap-ansible_test + rp_updates: [ forward, listen ] + state: present + delegate_to: localhost + +- name: Change Multicast Auto-Rendezvous Point (Auto-RP) Settings on a VRF + cisco.aci.aci_vrf_multicast: + host: apic + username: admin + password: SomeSecretePassword + tenant: ansible_tenant + vrf: ansible_vrf + auto_rp: + ma_filter: uni/tn-ansible_test/rtmap-ansible_test + rp_updates: [ forward, listen ] + state: present + delegate_to: localhost + +- name: Disable Multicast on a VRF + cisco.aci.aci_vrf_multicast: + host: apic + username: admin + password: SomeSecretePassword + tenant: ansible_tenant + vrf: ansible_vrf + state: absent + delegate_to: localhost + +- name: Query Multicast Settings for a VRF + cisco.aci.aci_vrf_multicast: + host: apic + username: admin + password: SomeSecretePassword + tenant: ansible_tenant + vrf: ansible_vrf + state: query + delegate_to: localhost + register: query_result + +- name: Query Multicast Settings for all VRFs + cisco.aci.aci_vrf_multicast: + host: apic + username: admin + password: SomeSecretePassword + state: query + delegate_to: localhost + register: query_result +""" + +RETURN = r""" + current: + description: The existing configuration from the APIC after the module has finished + returned: success + type: list + sample: + [ + { + "fvTenant": { + "attributes": { + "descr": "Production environment", + "dn": "uni/tn-production", + "name": "production", + "nameAlias": "", + "ownerKey": "", + "ownerTag": "" + } + } + } + ] + error: + description: The error information as returned from the APIC + returned: failure + type: dict + sample: + { + "code": "122", + "text": "unknown managed object class foo" + } + raw: + description: The raw output returned by the APIC REST API (xml or json) + returned: parse error + type: str + sample: '' + sent: + description: The actual/minimal configuration pushed to the APIC + returned: info + type: list + sample: + { + "fvTenant": { + "attributes": { + "descr": "Production environment" + } + } + } + previous: + description: The original configuration from the APIC before the module has started + returned: info + type: list + sample: + [ + { + "fvTenant": { + "attributes": { + "descr": "Production", + "dn": "uni/tn-production", + "name": "production", + "nameAlias": "", + "ownerKey": "", + "ownerTag": "" + } + } + } + ] + proposed: + description: The assembled configuration from the user-provided parameters + returned: info + type: dict + sample: + { + "fvTenant": { + "attributes": { + "descr": "Production environment", + "name": "production" + } + } + } + filter_string: + description: The filter string used for the request + returned: failure or debug + type: str + sample: ?rsp-prop-include=config-only + method: + description: The HTTP method used for the request to the APIC + returned: failure or debug + type: str + sample: POST + response: + description: The HTTP response from the APIC + returned: failure or debug + type: str + sample: OK (30 bytes) + status: + description: The HTTP status from the APIC + returned: failure or debug + type: int + sample: 200 + url: + description: The HTTP url used for the request to the APIC + returned: failure or debug + type: str + sample: https://10.11.12.13/api/mo/uni/tn-production.json + """ + +from ansible.module_utils.basic import AnsibleModule +from ansible_collections.cisco.aci.plugins.module_utils.aci import ACIModule, aci_argument_spec, aci_annotation_spec, aci_owner_spec +from ansible_collections.cisco.aci.plugins.module_utils.constants import PIM_SETTING_CONTROL_STATE_MAPPING + + +def main(): + argument_spec = aci_argument_spec() + argument_spec.update(aci_annotation_spec()) + argument_spec.update(aci_owner_spec()) + argument_spec.update( + tenant=dict(type="str", aliases=["tenant_name"]), + vrf=dict(type="str", aliases=["vrf_name"]), + pim_setting=dict( + type="dict", + options=dict( + mtu=dict(type="int"), + control_state=dict(type="list", elements="str", choices=["fast", "strict"], aliases=["control", "ctrl"]), + ), + ), + resource_policy=dict( + type="dict", + options=dict( + maximum_limit=dict(type="int", aliases=["max"]), + reserved_multicast_entries=dict(type="int", aliases=["rsvd"]), + reserved_route_map=dict(type="str", aliases=["route_map", "route_map_dn"]), + ), + ), + any_source_multicast=dict( + type="dict", + options=dict( + shared_range_route_map=dict(type="str", aliases=["shared_range_policy"]), + source_group_expiry_route_map=dict(type="str", aliases=["sg_expiry_route_map"]), + expiry=(dict(type="int", aliases=["expiry_seconds"])), + max_rate=(dict(type="int", aliases=["max_rate_per_second"])), + source_ip=(dict(type="str", aliases=["source", "source_ip_address"])), + ), + aliases=["asm", "any_source"], + ), + source_specific_multicast=dict( + type="dict", + options=dict( + group_range_route_map=dict(type="str", aliases=["group_range_policy"]), + ), + aliases=["ssm", "specific_source"], + ), + bootstrap_router=dict( + type="dict", + options=dict( + bsr_filter=dict(type="str", aliases=["filter", "route_map", "route_map_dn"]), + rp_updates=dict(type="list", elements="str", choices=["forward", "listen"], aliases=["control", "ctrl"]), + ), + aliases=["bsr", "bootstrap"], + ), + auto_rp=dict( + type="dict", + options=dict( + ma_filter=dict(type="str", aliases=["filter", "route_map", "route_map_dn"]), + rp_updates=dict(type="list", elements="str", choices=["forward", "listen"], aliases=["control", "ctrl"]), + ), + aliases=["auto"], + ), + state=dict(type="str", default="present", choices=["absent", "present", "query"]), + ) + + module = AnsibleModule( + argument_spec=argument_spec, + supports_check_mode=True, + required_if=[ + ["state", "absent", ["tenant", "vrf"]], + ["state", "present", ["tenant", "vrf"]], + ], + ) + + aci = ACIModule(module) + + tenant = module.params.get("tenant") + vrf = module.params.get("vrf") + pim_setting = module.params.get("pim_setting") + resource_policy = module.params.get("resource_policy") + any_source_multicast = module.params.get("any_source_multicast") + source_specific_multicast = module.params.get("source_specific_multicast") + bootstrap_router = module.params.get("bootstrap_router") + auto_rp = module.params.get("auto_rp") + state = module.params.get("state") + + if resource_policy and resource_policy.get("reserved_multicast_entries") and resource_policy.get("reserved_route_map") is None: + aci.fail_json(msg="parameters are mutually exclusive: reserved_route_map|reserved_multicast_entries") + elif resource_policy and resource_policy.get("reserved_route_map") and not resource_policy.get("reserved_multicast_entries"): + aci.fail_json(msg="C(reserved_multicast_entries) must be provided and greater than 0 when C(reserved_route_map) is provided") + + aci.construct_url( + root_class=dict( + aci_class="fvTenant", + aci_rn="tn-{0}".format(tenant), + module_object=tenant, + target_filter={"name": tenant}, + ), + subclass_1=dict( + aci_class="fvCtx", + aci_rn="ctx-{0}".format(vrf), + module_object=vrf, + target_filter={"name": vrf}, + ), + subclass_2=dict( + aci_class="pimCtxP", + aci_rn="pimctxp", + target_filter={"name": ""}, + ), + child_classes=["pimResPol", "pimASMPatPol", "pimSSMPatPol", "pimAutoRPPol", "pimBSRPPol"], + ) + + aci.get_existing() + + if state == "present": + existing_config = aci.existing[0] if aci.existing else {} + child_configs = [] + + resource_policy_config = dict(pimResPol=dict(attributes=dict(name=""), children=[])) + if resource_policy: + max = "unlimited" if resource_policy.get("maximum_limit") == 0 else resource_policy.get("maximum_limit") + if max is not None: + resource_policy_config["pimResPol"]["attributes"]["max"] = str(max) + + reserved_route_map = resource_policy.get("reserved_route_map") + if reserved_route_map is not None: + existing_rrm = get_child_from_existing_config(existing_config, ["pimCtxP", "pimResPol", "rtdmcRsFilterToRtMapPol"]) + rsvd = resource_policy.get("reserved_multicast_entries") + + if (existing_rrm or reserved_route_map != "") and rsvd: + resource_policy_config["pimResPol"]["attributes"]["rsvd"] = str(rsvd) + elif existing_rrm and reserved_route_map == "": + resource_policy_config["pimResPol"]["attributes"]["rsvd"] = "undefined" + + set_route_map_config( + existing_config, + resource_policy_config["pimResPol"]["children"], + ["pimCtxP", "pimResPol", "rtdmcRsFilterToRtMapPol"], + reserved_route_map, + ) + + child_configs.append(resource_policy_config) + + any_source_multicast_config = dict( + pimASMPatPol=dict( + attributes=dict(name=""), + children=[ + dict(pimSharedRangePol=dict(attributes=dict(name=""), children=[])), + dict(pimSGRangeExpPol=dict(attributes=dict(name=""), children=[])), + dict(pimRegTrPol=dict(attributes=dict(name=""), children=[])), + ], + ) + ) + if any_source_multicast: + if any_source_multicast.get("shared_range_route_map") is not None: + set_route_map_config( + existing_config, + any_source_multicast_config["pimASMPatPol"]["children"][0]["pimSharedRangePol"]["children"], + ["pimCtxP", "pimASMPatPol", "pimSharedRangePol", "rtdmcRsFilterToRtMapPol"], + any_source_multicast.get("shared_range_route_map"), + ) + + if any_source_multicast.get("source_group_expiry_route_map") is not None: + set_route_map_config( + existing_config, + any_source_multicast_config["pimASMPatPol"]["children"][1]["pimSGRangeExpPol"]["children"], + ["pimCtxP", "pimASMPatPol", "pimSGRangeExpPol", "rtdmcRsFilterToRtMapPol"], + any_source_multicast.get("source_group_expiry_route_map"), + ) + + expiry = any_source_multicast.get("expiry") + if expiry is not None: + sg_expiry_config = "default-timeout" if any_source_multicast.get("expiry") == 0 else any_source_multicast.get("expiry") + any_source_multicast_config["pimASMPatPol"]["children"][1]["pimSGRangeExpPol"]["attributes"]["sgExpItvl"] = str(sg_expiry_config) + + if any_source_multicast.get("max_rate") is not None: + any_source_multicast_config["pimASMPatPol"]["children"][2]["pimRegTrPol"]["attributes"]["maxRate"] = str(any_source_multicast.get("max_rate")) + + if any_source_multicast.get("source_ip") is not None: + any_source_multicast_config["pimASMPatPol"]["children"][2]["pimRegTrPol"]["attributes"]["srcIp"] = any_source_multicast.get("source_ip") + + child_configs.append(any_source_multicast_config) + + source_specific_multicast_config = dict( + pimSSMPatPol=dict( + attributes=dict(name=""), + children=[ + dict(pimSSMRangePol=dict(attributes=dict(name=""), children=[])), + ], + ) + ) + if source_specific_multicast and source_specific_multicast.get("group_range_route_map") is not None: + set_route_map_config( + existing_config, + source_specific_multicast_config["pimSSMPatPol"]["children"][0]["pimSSMRangePol"]["children"], + ["pimCtxP", "pimSSMPatPol", "pimSSMRangePol", "rtdmcRsFilterToRtMapPol"], + source_specific_multicast.get("group_range_route_map"), + ) + + child_configs.append(source_specific_multicast_config) + + if bootstrap_router: + bsr_config = dict(pimBSRPPol=dict(attributes=dict(name=""), children=[dict(pimBSRFilterPol=dict(attributes=dict(name=""), children=[]))])) + if bootstrap_router.get("bsr_filter") is not None: + set_route_map_config( + existing_config, + bsr_config["pimBSRPPol"]["children"][0]["pimBSRFilterPol"]["children"], + ["pimCtxP", "pimBSRPPol", "pimBSRFilterPol", "rtdmcRsFilterToRtMapPol"], + bootstrap_router.get("bsr_filter"), + ) + + rp_updates = bootstrap_router.get("rp_updates") + if rp_updates is not None: + bsr_config["pimBSRPPol"]["attributes"]["ctrl"] = ",".join(sorted(rp_updates)) + + child_configs.append(bsr_config) + + if auto_rp: + auto_rp_config = dict(pimAutoRPPol=dict(attributes=dict(name=""), children=[dict(pimMAFilterPol=dict(attributes=dict(name=""), children=[]))])) + + if auto_rp.get("ma_filter") is not None: + set_route_map_config( + existing_config, + auto_rp_config["pimAutoRPPol"]["children"][0]["pimMAFilterPol"]["children"], + ["pimCtxP", "pimAutoRPPol", "pimMAFilterPol", "rtdmcRsFilterToRtMapPol"], + auto_rp.get("ma_filter"), + ) + + rp_updates = auto_rp.get("rp_updates") + if rp_updates is not None: + auto_rp_config["pimAutoRPPol"]["attributes"]["ctrl"] = ",".join(sorted(rp_updates)) + + child_configs.append(auto_rp_config) + + mtu = None + control_state = None + if pim_setting: + mtu = pim_setting.get("mtu") + control_state = ( + ",".join(sorted([PIM_SETTING_CONTROL_STATE_MAPPING.get(v) for v in pim_setting.get("control_state")])) + if pim_setting.get("control_state") is not None + else None + ) + + aci.payload( + aci_class="pimCtxP", + class_config=dict(mtu=mtu, ctrl=control_state), + child_configs=child_configs, + ) + + aci.get_diff(aci_class="pimCtxP") + + aci.post_config() + + elif state == "absent": + aci.delete_config() + + aci.exit_json() + + +def get_child_from_existing_config(config, class_names): + parent = class_names[0] + class_names.remove(parent) + + for child in config.get(parent, {}).get("children", []): + if len(class_names) == 1 and class_names[0] in child.keys(): + return child + elif child.get(class_names[0], {}).get("children"): + return get_child_from_existing_config(child, class_names) + + +def set_route_map_config(existing_config, new_config, class_names, route_map): + existing_route_map = get_child_from_existing_config(existing_config, class_names) + if route_map == "" and existing_route_map: + new_config.append(dict(rtdmcRsFilterToRtMapPol=dict(attributes=dict(tDn=route_map, status="deleted")))) + elif route_map: + new_config.append(dict(rtdmcRsFilterToRtMapPol=dict(attributes=dict(tDn=route_map)))) + + +if __name__ == "__main__": + main() diff --git a/tests/integration/targets/aci_vrf_multicast/aliases b/tests/integration/targets/aci_vrf_multicast/aliases new file mode 100644 index 000000000..209b793f9 --- /dev/null +++ b/tests/integration/targets/aci_vrf_multicast/aliases @@ -0,0 +1,2 @@ +# No ACI simulator yet, so not enabled +# unsupported diff --git a/tests/integration/targets/aci_vrf_multicast/tasks/main.yml b/tests/integration/targets/aci_vrf_multicast/tasks/main.yml new file mode 100644 index 000000000..a377a0d14 --- /dev/null +++ b/tests/integration/targets/aci_vrf_multicast/tasks/main.yml @@ -0,0 +1,1133 @@ +# Test code for the ACI modules +# Copyright: (c) 2023, Tim Cragg (@timcragg) +# Copyright: (c) 2023, Akini Ross (@akinross) + +# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt) + +- name: Test that we have an ACI APIC host, ACI username and ACI password + ansible.builtin.fail: + msg: 'Please define the following variables: aci_hostname, aci_username and aci_password.' + when: aci_hostname is not defined or aci_username is not defined or aci_password is not defined + +# SET VARS + +- name: Set vars + ansible.builtin.set_fact: + aci_info: &aci_info + host: '{{ aci_hostname }}' + username: '{{ aci_username }}' + password: '{{ aci_password }}' + validate_certs: '{{ aci_validate_certs | default(false) }}' + use_ssl: '{{ aci_use_ssl | default(true) }}' + use_proxy: '{{ aci_use_proxy | default(true) }}' + output_level: '{{ aci_output_level | default("info") }}' + +# CLEAN ENVIRONMENT + +- name: Remove ansible_tenant + cisco.aci.aci_tenant: &aci_tenant_absent + <<: *aci_info + tenant: ansible_tenant + state: absent + +- name: Create ansible_tenant + cisco.aci.aci_tenant: &aci_tenant + <<: *aci_tenant_absent + state: present + +- name: Create ansible_vrf + cisco.aci.aci_vrf: &aci_ansible_vrf_1 + <<: *aci_tenant + vrf: ansible_vrf_1 + state: present + +- name: Create ansible_second_vrf + cisco.aci.aci_vrf: &aci_ansible_vrf_2 + <<: *aci_tenant + vrf: ansible_vrf_2 + state: present + +# ENABLE MULTICAST + +- name: Enable multicast on VRF 1 (check mode) + cisco.aci.aci_vrf_multicast: + <<: *aci_ansible_vrf_1 + check_mode: yes + register: cm_enable_multicast + +- name: Enable multicast on VRF 1 (normal mode) + cisco.aci.aci_vrf_multicast: + <<: *aci_ansible_vrf_1 + register: nm_enable_multicast + +- name: Enable multicast on VRF 1 again + cisco.aci.aci_vrf_multicast: + <<: *aci_ansible_vrf_1 + register: nm_enable_multicast_again + +- name: Verify create multicast VRF 1 + ansible.builtin.assert: + that: + - cm_enable_multicast is changed + - cm_enable_multicast.current == [] + - cm_enable_multicast.previous == [] + - cm_enable_multicast.proposed.pimCtxP.attributes.annotation == "orchestrator:ansible" + - cm_enable_multicast.proposed.pimCtxP.attributes.dn == "uni/tn-ansible_tenant/ctx-ansible_vrf_1/pimctxp" + - cm_enable_multicast.proposed.pimCtxP.children.0.pimResPol.children == [] + - cm_enable_multicast.proposed.pimCtxP.children.1.pimASMPatPol.children.0.pimSharedRangePol.children == [] + - cm_enable_multicast.proposed.pimCtxP.children.1.pimASMPatPol.children.1.pimSGRangeExpPol.children == [] + - cm_enable_multicast.proposed.pimCtxP.children.1.pimASMPatPol.children.2.pimRegTrPol.children == [] + - cm_enable_multicast.proposed.pimCtxP.children.2.pimSSMPatPol.children.0.pimSSMRangePol.children == [] + - nm_enable_multicast is changed + - nm_enable_multicast.current.0.pimCtxP.attributes.annotation == "orchestrator:ansible" + - nm_enable_multicast.current.0.pimCtxP.attributes.dn == "uni/tn-ansible_tenant/ctx-ansible_vrf_1/pimctxp" + - nm_enable_multicast.current.0.pimCtxP.attributes.mtu == "1500" + - nm_enable_multicast.current.0.pimCtxP.attributes.ctrl == "" + - nm_enable_multicast.current.0.pimCtxP.children.0.pimSSMPatPol.children.0.pimSSMRangePol.attributes.name == "" + - nm_enable_multicast.current.0.pimCtxP.children.1.pimASMPatPol.children.0.pimSharedRangePol.attributes.name == "" + - nm_enable_multicast.current.0.pimCtxP.children.1.pimASMPatPol.children.1.pimSGRangeExpPol.attributes.sgExpItvl == "default-timeout" + - nm_enable_multicast.current.0.pimCtxP.children.1.pimASMPatPol.children.2.pimRegTrPol.attributes.maxRate == "65535" + - nm_enable_multicast.current.0.pimCtxP.children.1.pimASMPatPol.children.2.pimRegTrPol.attributes.srcIp == "0.0.0.0" + - nm_enable_multicast.current.0.pimCtxP.children.2.pimResPol.attributes.max == "unlimited" + - nm_enable_multicast.current.0.pimCtxP.children.2.pimResPol.attributes.rsvd == "undefined" + - nm_enable_multicast.previous == [] + - nm_enable_multicast_again is not changed + - nm_enable_multicast_again.current.0.pimCtxP.attributes.annotation == "orchestrator:ansible" + - nm_enable_multicast_again.current.0.pimCtxP.attributes.dn == "uni/tn-ansible_tenant/ctx-ansible_vrf_1/pimctxp" + - nm_enable_multicast_again.current.0.pimCtxP.attributes.mtu == "1500" + - nm_enable_multicast_again.current.0.pimCtxP.attributes.ctrl == "" + - nm_enable_multicast_again.current.0.pimCtxP.children.0.pimSSMPatPol.children.0.pimSSMRangePol.attributes.name == "" + - nm_enable_multicast_again.current.0.pimCtxP.children.1.pimASMPatPol.children.0.pimSharedRangePol.attributes.name == "" + - nm_enable_multicast_again.current.0.pimCtxP.children.1.pimASMPatPol.children.1.pimSGRangeExpPol.attributes.sgExpItvl == "default-timeout" + - nm_enable_multicast_again.current.0.pimCtxP.children.1.pimASMPatPol.children.2.pimRegTrPol.attributes.maxRate == "65535" + - nm_enable_multicast_again.current.0.pimCtxP.children.1.pimASMPatPol.children.2.pimRegTrPol.attributes.srcIp == "0.0.0.0" + - nm_enable_multicast_again.current.0.pimCtxP.children.2.pimResPol.attributes.max == "unlimited" + - nm_enable_multicast_again.current.0.pimCtxP.children.2.pimResPol.attributes.rsvd == "undefined" + - nm_enable_multicast_again.previous.0.pimCtxP.attributes.annotation == "orchestrator:ansible" + - nm_enable_multicast_again.previous.0.pimCtxP.attributes.dn == "uni/tn-ansible_tenant/ctx-ansible_vrf_1/pimctxp" + - nm_enable_multicast_again.previous.0.pimCtxP.attributes.mtu == "1500" + - nm_enable_multicast_again.previous.0.pimCtxP.attributes.ctrl == "" + - nm_enable_multicast_again.previous.0.pimCtxP.children.0.pimSSMPatPol.children.0.pimSSMRangePol.attributes.name == "" + - nm_enable_multicast_again.previous.0.pimCtxP.children.1.pimASMPatPol.children.0.pimSharedRangePol.attributes.name == "" + - nm_enable_multicast_again.previous.0.pimCtxP.children.1.pimASMPatPol.children.1.pimSGRangeExpPol.attributes.sgExpItvl == "default-timeout" + - nm_enable_multicast_again.previous.0.pimCtxP.children.1.pimASMPatPol.children.2.pimRegTrPol.attributes.maxRate == "65535" + - nm_enable_multicast_again.previous.0.pimCtxP.children.1.pimASMPatPol.children.2.pimRegTrPol.attributes.srcIp == "0.0.0.0" + - nm_enable_multicast_again.previous.0.pimCtxP.children.2.pimResPol.attributes.max == "unlimited" + - nm_enable_multicast_again.previous.0.pimCtxP.children.2.pimResPol.attributes.rsvd == "undefined" + +# UPDATE MULTICAST SETTINGS + +- name: Update pim setting on VRF 1 + cisco.aci.aci_vrf_multicast: + <<: *aci_ansible_vrf_1 + pim_setting: + mtu: 2000 + control_state: [ fast, strict ] + register: nm_update_pim_setting + +- name: Remove control_state from pim setting on VRF 1 + cisco.aci.aci_vrf_multicast: + <<: *aci_ansible_vrf_1 + pim_setting: + control_state: [] + register: nm_update_pim_setting_remove_control_state + +- name: Verify update pim setting on VRF 1 + ansible.builtin.assert: + that: + - nm_update_pim_setting is changed + - nm_update_pim_setting.current.0.pimCtxP.attributes.annotation == "orchestrator:ansible" + - nm_update_pim_setting.current.0.pimCtxP.attributes.dn == "uni/tn-ansible_tenant/ctx-ansible_vrf_1/pimctxp" + - nm_update_pim_setting.current.0.pimCtxP.attributes.mtu == "2000" + - nm_update_pim_setting.current.0.pimCtxP.attributes.ctrl == "fast-conv,strict-rfc-compliant" + - nm_update_pim_setting.current.0.pimCtxP.children.0.pimSSMPatPol.children.0.pimSSMRangePol.attributes.name == "" + - nm_update_pim_setting.current.0.pimCtxP.children.1.pimASMPatPol.children.0.pimSharedRangePol.attributes.name == "" + - nm_update_pim_setting.current.0.pimCtxP.children.1.pimASMPatPol.children.1.pimSGRangeExpPol.attributes.sgExpItvl == "default-timeout" + - nm_update_pim_setting.current.0.pimCtxP.children.1.pimASMPatPol.children.2.pimRegTrPol.attributes.maxRate == "65535" + - nm_update_pim_setting.current.0.pimCtxP.children.1.pimASMPatPol.children.2.pimRegTrPol.attributes.srcIp == "0.0.0.0" + - nm_update_pim_setting.current.0.pimCtxP.children.2.pimResPol.attributes.max == "unlimited" + - nm_update_pim_setting.current.0.pimCtxP.children.2.pimResPol.attributes.rsvd == "undefined" + - nm_update_pim_setting.previous.0.pimCtxP.attributes.annotation == "orchestrator:ansible" + - nm_update_pim_setting.previous.0.pimCtxP.attributes.dn == "uni/tn-ansible_tenant/ctx-ansible_vrf_1/pimctxp" + - nm_update_pim_setting.previous.0.pimCtxP.attributes.mtu == "1500" + - nm_update_pim_setting.previous.0.pimCtxP.attributes.ctrl == "" + - nm_update_pim_setting.previous.0.pimCtxP.children.0.pimSSMPatPol.children.0.pimSSMRangePol.attributes.name == "" + - nm_update_pim_setting.previous.0.pimCtxP.children.1.pimASMPatPol.children.0.pimSharedRangePol.attributes.name == "" + - nm_update_pim_setting.previous.0.pimCtxP.children.1.pimASMPatPol.children.1.pimSGRangeExpPol.attributes.sgExpItvl == "default-timeout" + - nm_update_pim_setting.previous.0.pimCtxP.children.1.pimASMPatPol.children.2.pimRegTrPol.attributes.maxRate == "65535" + - nm_update_pim_setting.previous.0.pimCtxP.children.1.pimASMPatPol.children.2.pimRegTrPol.attributes.srcIp == "0.0.0.0" + - nm_update_pim_setting.previous.0.pimCtxP.children.2.pimResPol.attributes.max == "unlimited" + - nm_update_pim_setting.previous.0.pimCtxP.children.2.pimResPol.attributes.rsvd == "undefined" + - nm_update_pim_setting_remove_control_state is changed + - nm_update_pim_setting_remove_control_state.current.0.pimCtxP.attributes.annotation == "orchestrator:ansible" + - nm_update_pim_setting_remove_control_state.current.0.pimCtxP.attributes.dn == "uni/tn-ansible_tenant/ctx-ansible_vrf_1/pimctxp" + - nm_update_pim_setting_remove_control_state.current.0.pimCtxP.attributes.mtu == "2000" + - nm_update_pim_setting_remove_control_state.current.0.pimCtxP.attributes.ctrl == "" + - nm_update_pim_setting_remove_control_state.current.0.pimCtxP.children.0.pimSSMPatPol.children.0.pimSSMRangePol.attributes.name == "" + - nm_update_pim_setting_remove_control_state.current.0.pimCtxP.children.1.pimASMPatPol.children.0.pimSharedRangePol.attributes.name == "" + - nm_update_pim_setting_remove_control_state.current.0.pimCtxP.children.1.pimASMPatPol.children.1.pimSGRangeExpPol.attributes.sgExpItvl == "default-timeout" + - nm_update_pim_setting_remove_control_state.current.0.pimCtxP.children.1.pimASMPatPol.children.2.pimRegTrPol.attributes.maxRate == "65535" + - nm_update_pim_setting_remove_control_state.current.0.pimCtxP.children.1.pimASMPatPol.children.2.pimRegTrPol.attributes.srcIp == "0.0.0.0" + - nm_update_pim_setting_remove_control_state.current.0.pimCtxP.children.2.pimResPol.attributes.max == "unlimited" + - nm_update_pim_setting_remove_control_state.current.0.pimCtxP.children.2.pimResPol.attributes.rsvd == "undefined" + - nm_update_pim_setting_remove_control_state.previous.0.pimCtxP.attributes.annotation == "orchestrator:ansible" + - nm_update_pim_setting_remove_control_state.previous.0.pimCtxP.attributes.dn == "uni/tn-ansible_tenant/ctx-ansible_vrf_1/pimctxp" + - nm_update_pim_setting_remove_control_state.previous.0.pimCtxP.attributes.mtu == "2000" + - nm_update_pim_setting_remove_control_state.previous.0.pimCtxP.attributes.ctrl == "fast-conv,strict-rfc-compliant" + - nm_update_pim_setting_remove_control_state.previous.0.pimCtxP.children.0.pimSSMPatPol.children.0.pimSSMRangePol.attributes.name == "" + - nm_update_pim_setting_remove_control_state.previous.0.pimCtxP.children.1.pimASMPatPol.children.0.pimSharedRangePol.attributes.name == "" + - nm_update_pim_setting_remove_control_state.previous.0.pimCtxP.children.1.pimASMPatPol.children.1.pimSGRangeExpPol.attributes.sgExpItvl == "default-timeout" + - nm_update_pim_setting_remove_control_state.previous.0.pimCtxP.children.1.pimASMPatPol.children.2.pimRegTrPol.attributes.maxRate == "65535" + - nm_update_pim_setting_remove_control_state.previous.0.pimCtxP.children.1.pimASMPatPol.children.2.pimRegTrPol.attributes.srcIp == "0.0.0.0" + - nm_update_pim_setting_remove_control_state.previous.0.pimCtxP.children.2.pimResPol.attributes.max == "unlimited" + - nm_update_pim_setting_remove_control_state.previous.0.pimCtxP.children.2.pimResPol.attributes.rsvd == "undefined" + +# UPDATE MULTICAST RESOURCE POLICY + +- name: Update resource policy on VRF 1 + cisco.aci.aci_vrf_multicast: + <<: *aci_ansible_vrf_1 + resource_policy: + maximum_limit: 100 + register: nm_update_resource_policy + +- name: Add a routemap to resource policy on VRF 1 + cisco.aci.aci_vrf_multicast: + <<: *aci_ansible_vrf_1 + resource_policy: + reserved_multicast_entries: 10 + reserved_route_map: uni/tn-ansible_test/rtmap-ansible_test + register: nm_update_resource_policy_add_route_map + +- name: Update maximum limit from resource policy with routemap on VRF 1 + cisco.aci.aci_vrf_multicast: + <<: *aci_ansible_vrf_1 + resource_policy: + maximum_limit: 50 + register: nm_update_resource_policy_with_route_map + +- name: Remove maximum limit from resource policy on VRF 1 + cisco.aci.aci_vrf_multicast: + <<: *aci_ansible_vrf_1 + resource_policy: + maximum_limit: 0 + register: nm_update_resource_policy_with_route_map_remove_maximum_limit + +- name: Update reserved multicast entries from resource policy on VRF 1 + cisco.aci.aci_vrf_multicast: + <<: *aci_ansible_vrf_1 + resource_policy: + reserved_multicast_entries: 20 + reserved_route_map: uni/tn-ansible_test/rtmap-ansible_test + register: nm_update_resource_policy_change_reserved_multicast_entries + +- name: Remove a routemap from resource policy on VRF 1 + cisco.aci.aci_vrf_multicast: + <<: *aci_ansible_vrf_1 + resource_policy: + reserved_route_map: "" + register: nm_update_resource_policy_remove_route_map + +- name: Remove a routemap from resource policy on VRF 1 again + cisco.aci.aci_vrf_multicast: + <<: *aci_ansible_vrf_1 + resource_policy: + reserved_route_map: "" + register: nm_update_resource_policy_remove_route_map_again + +- name: Verify update resource policy on VRF 1 + ansible.builtin.assert: + that: + - nm_update_resource_policy is changed + - nm_update_resource_policy.current.0.pimCtxP.attributes.annotation == "orchestrator:ansible" + - nm_update_resource_policy.current.0.pimCtxP.attributes.dn == "uni/tn-ansible_tenant/ctx-ansible_vrf_1/pimctxp" + - nm_update_resource_policy.current.0.pimCtxP.attributes.mtu == "2000" + - nm_update_resource_policy.current.0.pimCtxP.attributes.ctrl == "" + - nm_update_resource_policy.current.0.pimCtxP.children.0.pimSSMPatPol.children.0.pimSSMRangePol.attributes.name == "" + - nm_update_resource_policy.current.0.pimCtxP.children.1.pimASMPatPol.children.0.pimSharedRangePol.attributes.name == "" + - nm_update_resource_policy.current.0.pimCtxP.children.1.pimASMPatPol.children.1.pimSGRangeExpPol.attributes.sgExpItvl == "default-timeout" + - nm_update_resource_policy.current.0.pimCtxP.children.1.pimASMPatPol.children.2.pimRegTrPol.attributes.maxRate == "65535" + - nm_update_resource_policy.current.0.pimCtxP.children.1.pimASMPatPol.children.2.pimRegTrPol.attributes.srcIp == "0.0.0.0" + - nm_update_resource_policy.current.0.pimCtxP.children.2.pimResPol.attributes.max == "100" + - nm_update_resource_policy.current.0.pimCtxP.children.2.pimResPol.attributes.rsvd == "undefined" + - nm_update_resource_policy.previous.0.pimCtxP.attributes.annotation == "orchestrator:ansible" + - nm_update_resource_policy.previous.0.pimCtxP.attributes.dn == "uni/tn-ansible_tenant/ctx-ansible_vrf_1/pimctxp" + - nm_update_resource_policy.previous.0.pimCtxP.attributes.mtu == "2000" + - nm_update_resource_policy.previous.0.pimCtxP.attributes.ctrl == "" + - nm_update_resource_policy.previous.0.pimCtxP.children.0.pimSSMPatPol.children.0.pimSSMRangePol.attributes.name == "" + - nm_update_resource_policy.previous.0.pimCtxP.children.1.pimASMPatPol.children.0.pimSharedRangePol.attributes.name == "" + - nm_update_resource_policy.previous.0.pimCtxP.children.1.pimASMPatPol.children.1.pimSGRangeExpPol.attributes.sgExpItvl == "default-timeout" + - nm_update_resource_policy.previous.0.pimCtxP.children.1.pimASMPatPol.children.2.pimRegTrPol.attributes.maxRate == "65535" + - nm_update_resource_policy.previous.0.pimCtxP.children.1.pimASMPatPol.children.2.pimRegTrPol.attributes.srcIp == "0.0.0.0" + - nm_update_resource_policy.previous.0.pimCtxP.children.2.pimResPol.attributes.max == "unlimited" + - nm_update_resource_policy.previous.0.pimCtxP.children.2.pimResPol.attributes.rsvd == "undefined" + - nm_update_resource_policy_add_route_map is changed + - nm_update_resource_policy_add_route_map.current.0.pimCtxP.attributes.annotation == "orchestrator:ansible" + - nm_update_resource_policy_add_route_map.current.0.pimCtxP.attributes.dn == "uni/tn-ansible_tenant/ctx-ansible_vrf_1/pimctxp" + - nm_update_resource_policy_add_route_map.current.0.pimCtxP.attributes.mtu == "2000" + - nm_update_resource_policy_add_route_map.current.0.pimCtxP.attributes.ctrl == "" + - nm_update_resource_policy_add_route_map.current.0.pimCtxP.children.0.pimSSMPatPol.children.0.pimSSMRangePol.attributes.name == "" + - nm_update_resource_policy_add_route_map.current.0.pimCtxP.children.1.pimASMPatPol.children.0.pimSharedRangePol.attributes.name == "" + - nm_update_resource_policy_add_route_map.current.0.pimCtxP.children.1.pimASMPatPol.children.1.pimSGRangeExpPol.attributes.sgExpItvl == "default-timeout" + - nm_update_resource_policy_add_route_map.current.0.pimCtxP.children.1.pimASMPatPol.children.2.pimRegTrPol.attributes.maxRate == "65535" + - nm_update_resource_policy_add_route_map.current.0.pimCtxP.children.1.pimASMPatPol.children.2.pimRegTrPol.attributes.srcIp == "0.0.0.0" + - nm_update_resource_policy_add_route_map.current.0.pimCtxP.children.2.pimResPol.attributes.max == "100" + - nm_update_resource_policy_add_route_map.current.0.pimCtxP.children.2.pimResPol.attributes.rsvd == "10" + - nm_update_resource_policy_add_route_map.current.0.pimCtxP.children.2.pimResPol.children.0.rtdmcRsFilterToRtMapPol.attributes.tDn == "uni/tn-ansible_test/rtmap-ansible_test" + - nm_update_resource_policy_add_route_map.previous.0.pimCtxP.attributes.annotation == "orchestrator:ansible" + - nm_update_resource_policy_add_route_map.previous.0.pimCtxP.attributes.dn == "uni/tn-ansible_tenant/ctx-ansible_vrf_1/pimctxp" + - nm_update_resource_policy_add_route_map.previous.0.pimCtxP.attributes.mtu == "2000" + - nm_update_resource_policy_add_route_map.previous.0.pimCtxP.attributes.ctrl == "" + - nm_update_resource_policy_add_route_map.previous.0.pimCtxP.children.0.pimSSMPatPol.children.0.pimSSMRangePol.attributes.name == "" + - nm_update_resource_policy_add_route_map.previous.0.pimCtxP.children.1.pimASMPatPol.children.0.pimSharedRangePol.attributes.name == "" + - nm_update_resource_policy_add_route_map.previous.0.pimCtxP.children.1.pimASMPatPol.children.1.pimSGRangeExpPol.attributes.sgExpItvl == "default-timeout" + - nm_update_resource_policy_add_route_map.previous.0.pimCtxP.children.1.pimASMPatPol.children.2.pimRegTrPol.attributes.maxRate == "65535" + - nm_update_resource_policy_add_route_map.previous.0.pimCtxP.children.1.pimASMPatPol.children.2.pimRegTrPol.attributes.srcIp == "0.0.0.0" + - nm_update_resource_policy_add_route_map.previous.0.pimCtxP.children.2.pimResPol.attributes.max == "100" + - nm_update_resource_policy_add_route_map.previous.0.pimCtxP.children.2.pimResPol.attributes.rsvd == "undefined" + - "'children' not in nm_update_resource_policy_add_route_map.previous.0.pimCtxP.children.2.pimResPol" + - nm_update_resource_policy_with_route_map is changed + - nm_update_resource_policy_with_route_map.current.0.pimCtxP.attributes.annotation == "orchestrator:ansible" + - nm_update_resource_policy_with_route_map.current.0.pimCtxP.attributes.dn == "uni/tn-ansible_tenant/ctx-ansible_vrf_1/pimctxp" + - nm_update_resource_policy_with_route_map.current.0.pimCtxP.attributes.mtu == "2000" + - nm_update_resource_policy_with_route_map.current.0.pimCtxP.attributes.ctrl == "" + - nm_update_resource_policy_with_route_map.current.0.pimCtxP.children.0.pimSSMPatPol.children.0.pimSSMRangePol.attributes.name == "" + - nm_update_resource_policy_with_route_map.current.0.pimCtxP.children.1.pimASMPatPol.children.0.pimSharedRangePol.attributes.name == "" + - nm_update_resource_policy_with_route_map.current.0.pimCtxP.children.1.pimASMPatPol.children.1.pimSGRangeExpPol.attributes.sgExpItvl == "default-timeout" + - nm_update_resource_policy_with_route_map.current.0.pimCtxP.children.1.pimASMPatPol.children.2.pimRegTrPol.attributes.maxRate == "65535" + - nm_update_resource_policy_with_route_map.current.0.pimCtxP.children.1.pimASMPatPol.children.2.pimRegTrPol.attributes.srcIp == "0.0.0.0" + - nm_update_resource_policy_with_route_map.current.0.pimCtxP.children.2.pimResPol.attributes.max == "50" + - nm_update_resource_policy_with_route_map.current.0.pimCtxP.children.2.pimResPol.attributes.rsvd == "10" + - nm_update_resource_policy_with_route_map.current.0.pimCtxP.children.2.pimResPol.children.0.rtdmcRsFilterToRtMapPol.attributes.tDn == "uni/tn-ansible_test/rtmap-ansible_test" + - nm_update_resource_policy_with_route_map.previous.0.pimCtxP.attributes.annotation == "orchestrator:ansible" + - nm_update_resource_policy_with_route_map.previous.0.pimCtxP.attributes.dn == "uni/tn-ansible_tenant/ctx-ansible_vrf_1/pimctxp" + - nm_update_resource_policy_with_route_map.previous.0.pimCtxP.attributes.mtu == "2000" + - nm_update_resource_policy_with_route_map.previous.0.pimCtxP.attributes.ctrl == "" + - nm_update_resource_policy_with_route_map.previous.0.pimCtxP.children.0.pimSSMPatPol.children.0.pimSSMRangePol.attributes.name == "" + - nm_update_resource_policy_with_route_map.previous.0.pimCtxP.children.1.pimASMPatPol.children.0.pimSharedRangePol.attributes.name == "" + - nm_update_resource_policy_with_route_map.previous.0.pimCtxP.children.1.pimASMPatPol.children.1.pimSGRangeExpPol.attributes.sgExpItvl == "default-timeout" + - nm_update_resource_policy_with_route_map.previous.0.pimCtxP.children.1.pimASMPatPol.children.2.pimRegTrPol.attributes.maxRate == "65535" + - nm_update_resource_policy_with_route_map.previous.0.pimCtxP.children.1.pimASMPatPol.children.2.pimRegTrPol.attributes.srcIp == "0.0.0.0" + - nm_update_resource_policy_with_route_map.previous.0.pimCtxP.children.2.pimResPol.attributes.max == "100" + - nm_update_resource_policy_with_route_map.previous.0.pimCtxP.children.2.pimResPol.attributes.rsvd == "10" + - nm_update_resource_policy_with_route_map.previous.0.pimCtxP.children.2.pimResPol.children.0.rtdmcRsFilterToRtMapPol.attributes.tDn == "uni/tn-ansible_test/rtmap-ansible_test" + - nm_update_resource_policy_with_route_map_remove_maximum_limit is changed + - nm_update_resource_policy_with_route_map_remove_maximum_limit.current.0.pimCtxP.attributes.annotation == "orchestrator:ansible" + - nm_update_resource_policy_with_route_map_remove_maximum_limit.current.0.pimCtxP.attributes.dn == "uni/tn-ansible_tenant/ctx-ansible_vrf_1/pimctxp" + - nm_update_resource_policy_with_route_map_remove_maximum_limit.current.0.pimCtxP.attributes.mtu == "2000" + - nm_update_resource_policy_with_route_map_remove_maximum_limit.current.0.pimCtxP.attributes.ctrl == "" + - nm_update_resource_policy_with_route_map_remove_maximum_limit.current.0.pimCtxP.children.0.pimSSMPatPol.children.0.pimSSMRangePol.attributes.name == "" + - nm_update_resource_policy_with_route_map_remove_maximum_limit.current.0.pimCtxP.children.1.pimASMPatPol.children.0.pimSharedRangePol.attributes.name == "" + - nm_update_resource_policy_with_route_map_remove_maximum_limit.current.0.pimCtxP.children.1.pimASMPatPol.children.1.pimSGRangeExpPol.attributes.sgExpItvl == "default-timeout" + - nm_update_resource_policy_with_route_map_remove_maximum_limit.current.0.pimCtxP.children.1.pimASMPatPol.children.2.pimRegTrPol.attributes.maxRate == "65535" + - nm_update_resource_policy_with_route_map_remove_maximum_limit.current.0.pimCtxP.children.1.pimASMPatPol.children.2.pimRegTrPol.attributes.srcIp == "0.0.0.0" + - nm_update_resource_policy_with_route_map_remove_maximum_limit.current.0.pimCtxP.children.2.pimResPol.attributes.max == "unlimited" + - nm_update_resource_policy_with_route_map_remove_maximum_limit.current.0.pimCtxP.children.2.pimResPol.attributes.rsvd == "10" + - nm_update_resource_policy_with_route_map_remove_maximum_limit.current.0.pimCtxP.children.2.pimResPol.children.0.rtdmcRsFilterToRtMapPol.attributes.tDn == "uni/tn-ansible_test/rtmap-ansible_test" + - nm_update_resource_policy_with_route_map_remove_maximum_limit.previous.0.pimCtxP.attributes.annotation == "orchestrator:ansible" + - nm_update_resource_policy_with_route_map_remove_maximum_limit.previous.0.pimCtxP.attributes.dn == "uni/tn-ansible_tenant/ctx-ansible_vrf_1/pimctxp" + - nm_update_resource_policy_with_route_map_remove_maximum_limit.previous.0.pimCtxP.attributes.mtu == "2000" + - nm_update_resource_policy_with_route_map_remove_maximum_limit.previous.0.pimCtxP.attributes.ctrl == "" + - nm_update_resource_policy_with_route_map_remove_maximum_limit.previous.0.pimCtxP.children.0.pimSSMPatPol.children.0.pimSSMRangePol.attributes.name == "" + - nm_update_resource_policy_with_route_map_remove_maximum_limit.previous.0.pimCtxP.children.1.pimASMPatPol.children.0.pimSharedRangePol.attributes.name == "" + - nm_update_resource_policy_with_route_map_remove_maximum_limit.previous.0.pimCtxP.children.1.pimASMPatPol.children.1.pimSGRangeExpPol.attributes.sgExpItvl == "default-timeout" + - nm_update_resource_policy_with_route_map_remove_maximum_limit.previous.0.pimCtxP.children.1.pimASMPatPol.children.2.pimRegTrPol.attributes.maxRate == "65535" + - nm_update_resource_policy_with_route_map_remove_maximum_limit.previous.0.pimCtxP.children.1.pimASMPatPol.children.2.pimRegTrPol.attributes.srcIp == "0.0.0.0" + - nm_update_resource_policy_with_route_map_remove_maximum_limit.previous.0.pimCtxP.children.2.pimResPol.attributes.max == "50" + - nm_update_resource_policy_with_route_map_remove_maximum_limit.previous.0.pimCtxP.children.2.pimResPol.attributes.rsvd == "10" + - nm_update_resource_policy_with_route_map_remove_maximum_limit.previous.0.pimCtxP.children.2.pimResPol.children.0.rtdmcRsFilterToRtMapPol.attributes.tDn == "uni/tn-ansible_test/rtmap-ansible_test" + - nm_update_resource_policy_change_reserved_multicast_entries is changed + - nm_update_resource_policy_change_reserved_multicast_entries.current.0.pimCtxP.attributes.annotation == "orchestrator:ansible" + - nm_update_resource_policy_change_reserved_multicast_entries.current.0.pimCtxP.attributes.dn == "uni/tn-ansible_tenant/ctx-ansible_vrf_1/pimctxp" + - nm_update_resource_policy_change_reserved_multicast_entries.current.0.pimCtxP.attributes.mtu == "2000" + - nm_update_resource_policy_change_reserved_multicast_entries.current.0.pimCtxP.attributes.ctrl == "" + - nm_update_resource_policy_change_reserved_multicast_entries.current.0.pimCtxP.children.0.pimSSMPatPol.children.0.pimSSMRangePol.attributes.name == "" + - nm_update_resource_policy_change_reserved_multicast_entries.current.0.pimCtxP.children.1.pimASMPatPol.children.0.pimSharedRangePol.attributes.name == "" + - nm_update_resource_policy_change_reserved_multicast_entries.current.0.pimCtxP.children.1.pimASMPatPol.children.1.pimSGRangeExpPol.attributes.sgExpItvl == "default-timeout" + - nm_update_resource_policy_change_reserved_multicast_entries.current.0.pimCtxP.children.1.pimASMPatPol.children.2.pimRegTrPol.attributes.maxRate == "65535" + - nm_update_resource_policy_change_reserved_multicast_entries.current.0.pimCtxP.children.1.pimASMPatPol.children.2.pimRegTrPol.attributes.srcIp == "0.0.0.0" + - nm_update_resource_policy_change_reserved_multicast_entries.current.0.pimCtxP.children.2.pimResPol.attributes.max == "unlimited" + - nm_update_resource_policy_change_reserved_multicast_entries.current.0.pimCtxP.children.2.pimResPol.attributes.rsvd == "20" + - nm_update_resource_policy_change_reserved_multicast_entries.current.0.pimCtxP.children.2.pimResPol.children.0.rtdmcRsFilterToRtMapPol.attributes.tDn == "uni/tn-ansible_test/rtmap-ansible_test" + - nm_update_resource_policy_change_reserved_multicast_entries.previous.0.pimCtxP.attributes.annotation == "orchestrator:ansible" + - nm_update_resource_policy_change_reserved_multicast_entries.previous.0.pimCtxP.attributes.dn == "uni/tn-ansible_tenant/ctx-ansible_vrf_1/pimctxp" + - nm_update_resource_policy_change_reserved_multicast_entries.previous.0.pimCtxP.attributes.mtu == "2000" + - nm_update_resource_policy_change_reserved_multicast_entries.previous.0.pimCtxP.attributes.ctrl == "" + - nm_update_resource_policy_change_reserved_multicast_entries.previous.0.pimCtxP.children.0.pimSSMPatPol.children.0.pimSSMRangePol.attributes.name == "" + - nm_update_resource_policy_change_reserved_multicast_entries.previous.0.pimCtxP.children.1.pimASMPatPol.children.0.pimSharedRangePol.attributes.name == "" + - nm_update_resource_policy_change_reserved_multicast_entries.previous.0.pimCtxP.children.1.pimASMPatPol.children.1.pimSGRangeExpPol.attributes.sgExpItvl == "default-timeout" + - nm_update_resource_policy_change_reserved_multicast_entries.previous.0.pimCtxP.children.1.pimASMPatPol.children.2.pimRegTrPol.attributes.maxRate == "65535" + - nm_update_resource_policy_change_reserved_multicast_entries.previous.0.pimCtxP.children.1.pimASMPatPol.children.2.pimRegTrPol.attributes.srcIp == "0.0.0.0" + - nm_update_resource_policy_change_reserved_multicast_entries.previous.0.pimCtxP.children.2.pimResPol.attributes.max == "unlimited" + - nm_update_resource_policy_change_reserved_multicast_entries.previous.0.pimCtxP.children.2.pimResPol.attributes.rsvd == "10" + - nm_update_resource_policy_change_reserved_multicast_entries.previous.0.pimCtxP.children.2.pimResPol.children.0.rtdmcRsFilterToRtMapPol.attributes.tDn == "uni/tn-ansible_test/rtmap-ansible_test" + - nm_update_resource_policy_remove_route_map is changed + - nm_update_resource_policy_remove_route_map.current.0.pimCtxP.attributes.annotation == "orchestrator:ansible" + - nm_update_resource_policy_remove_route_map.current.0.pimCtxP.attributes.dn == "uni/tn-ansible_tenant/ctx-ansible_vrf_1/pimctxp" + - nm_update_resource_policy_remove_route_map.current.0.pimCtxP.attributes.mtu == "2000" + - nm_update_resource_policy_remove_route_map.current.0.pimCtxP.attributes.ctrl == "" + - nm_update_resource_policy_remove_route_map.current.0.pimCtxP.children.0.pimSSMPatPol.children.0.pimSSMRangePol.attributes.name == "" + - nm_update_resource_policy_remove_route_map.current.0.pimCtxP.children.1.pimASMPatPol.children.0.pimSharedRangePol.attributes.name == "" + - nm_update_resource_policy_remove_route_map.current.0.pimCtxP.children.1.pimASMPatPol.children.1.pimSGRangeExpPol.attributes.sgExpItvl == "default-timeout" + - nm_update_resource_policy_remove_route_map.current.0.pimCtxP.children.1.pimASMPatPol.children.2.pimRegTrPol.attributes.maxRate == "65535" + - nm_update_resource_policy_remove_route_map.current.0.pimCtxP.children.1.pimASMPatPol.children.2.pimRegTrPol.attributes.srcIp == "0.0.0.0" + - nm_update_resource_policy_remove_route_map.current.0.pimCtxP.children.2.pimResPol.attributes.max == "unlimited" + - nm_update_resource_policy_remove_route_map.current.0.pimCtxP.children.2.pimResPol.attributes.rsvd == "undefined" + - "'children' not in nm_update_resource_policy_remove_route_map.current.0.pimCtxP.children.2.pimResPol" + - nm_update_resource_policy_remove_route_map.previous.0.pimCtxP.attributes.annotation == "orchestrator:ansible" + - nm_update_resource_policy_remove_route_map.previous.0.pimCtxP.attributes.dn == "uni/tn-ansible_tenant/ctx-ansible_vrf_1/pimctxp" + - nm_update_resource_policy_remove_route_map.previous.0.pimCtxP.attributes.mtu == "2000" + - nm_update_resource_policy_remove_route_map.previous.0.pimCtxP.attributes.ctrl == "" + - nm_update_resource_policy_remove_route_map.previous.0.pimCtxP.children.0.pimSSMPatPol.children.0.pimSSMRangePol.attributes.name == "" + - nm_update_resource_policy_remove_route_map.previous.0.pimCtxP.children.1.pimASMPatPol.children.0.pimSharedRangePol.attributes.name == "" + - nm_update_resource_policy_remove_route_map.previous.0.pimCtxP.children.1.pimASMPatPol.children.1.pimSGRangeExpPol.attributes.sgExpItvl == "default-timeout" + - nm_update_resource_policy_remove_route_map.previous.0.pimCtxP.children.1.pimASMPatPol.children.2.pimRegTrPol.attributes.maxRate == "65535" + - nm_update_resource_policy_remove_route_map.previous.0.pimCtxP.children.1.pimASMPatPol.children.2.pimRegTrPol.attributes.srcIp == "0.0.0.0" + - nm_update_resource_policy_remove_route_map.previous.0.pimCtxP.children.2.pimResPol.attributes.max == "unlimited" + - nm_update_resource_policy_remove_route_map.previous.0.pimCtxP.children.2.pimResPol.attributes.rsvd == "20" + - nm_update_resource_policy_remove_route_map.previous.0.pimCtxP.children.2.pimResPol.children.0.rtdmcRsFilterToRtMapPol.attributes.tDn == "uni/tn-ansible_test/rtmap-ansible_test" + - nm_update_resource_policy_remove_route_map_again is not changed + +# UPDATE MULTICAST ASM + +- name: Add a shared range routemap to any source multicast on VRF 1 + cisco.aci.aci_vrf_multicast: + <<: *aci_ansible_vrf_1 + any_source_multicast: + shared_range_route_map: uni/tn-ansible_test/rtmap-ansible_test + register: nm_update_any_source_multicast_add_shared_range_route_map + +- name: Remove a shared range routemap from any source multicast on VRF 1 + cisco.aci.aci_vrf_multicast: + <<: *aci_ansible_vrf_1 + any_source_multicast: + shared_range_route_map: "" + register: nm_update_any_source_multicast_remove_shared_range_route_map + +- name: Remove a shared range routemap from any source multicast on VRF 1 again + cisco.aci.aci_vrf_multicast: + <<: *aci_ansible_vrf_1 + any_source_multicast: + shared_range_route_map: "" + register: nm_update_any_source_multicast_remove_shared_range_route_map_again + +- name: Update expiry seconds for any source multicast on VRF 1 + cisco.aci.aci_vrf_multicast: + <<: *aci_ansible_vrf_1 + any_source_multicast: + expiry: 500 + register: nm_update_any_source_multicast_expiry_seconds + +- name: Remove expiry seconds for any source multicast on VRF 1 + cisco.aci.aci_vrf_multicast: + <<: *aci_ansible_vrf_1 + any_source_multicast: + expiry: 0 + register: nm_update_any_source_multicast_remove_expiry_seconds + +- name: Add a source group expiry routemap to any source multicast on VRF 1 + cisco.aci.aci_vrf_multicast: + <<: *aci_ansible_vrf_1 + any_source_multicast: + source_group_expiry_route_map: uni/tn-ansible_test/rtmap-ansible_test + register: nm_update_any_source_multicast_add_source_group_expiry_route_map + +- name: Remove a source group expiry routemap from any source multicast on VRF 1 + cisco.aci.aci_vrf_multicast: + <<: *aci_ansible_vrf_1 + any_source_multicast: + source_group_expiry_route_map: "" + register: nm_update_any_source_multicast_remove_source_group_expiry_route_map + +- name: Remove a source group expiry routemap from any source multicast on VRF 1 again + cisco.aci.aci_vrf_multicast: + <<: *aci_ansible_vrf_1 + any_source_multicast: + source_group_expiry_route_map: "" + register: nm_update_any_source_multicast_remove_source_group_expiry_route_map_again + +- name: Update max rate for any source multicast on VRF 1 + cisco.aci.aci_vrf_multicast: + <<: *aci_ansible_vrf_1 + any_source_multicast: + max_rate: 64000 + register: nm_update_any_source_multicast_max_rate + +- name: Remove max rate for any source multicast on VRF 1 + cisco.aci.aci_vrf_multicast: + <<: *aci_ansible_vrf_1 + any_source_multicast: + source_ip: 1.1.1.1 + register: nm_update_any_source_multicast_ip + +- name: Verify update any source multicast on VRF 1 + ansible.builtin.assert: + that: + - nm_update_any_source_multicast_add_shared_range_route_map is changed + - nm_update_any_source_multicast_add_shared_range_route_map.current.0.pimCtxP.attributes.annotation == "orchestrator:ansible" + - nm_update_any_source_multicast_add_shared_range_route_map.current.0.pimCtxP.attributes.dn == "uni/tn-ansible_tenant/ctx-ansible_vrf_1/pimctxp" + - nm_update_any_source_multicast_add_shared_range_route_map.current.0.pimCtxP.attributes.mtu == "2000" + - nm_update_any_source_multicast_add_shared_range_route_map.current.0.pimCtxP.attributes.ctrl == "" + - nm_update_any_source_multicast_add_shared_range_route_map.current.0.pimCtxP.children.0.pimSSMPatPol.children.0.pimSSMRangePol.attributes.name == "" + - nm_update_any_source_multicast_add_shared_range_route_map.current.0.pimCtxP.children.1.pimASMPatPol.children.0.pimSharedRangePol.attributes.name == "" + - nm_update_any_source_multicast_add_shared_range_route_map.current.0.pimCtxP.children.1.pimASMPatPol.children.0.pimSharedRangePol.children.0.rtdmcRsFilterToRtMapPol.attributes.tDn == "uni/tn-ansible_test/rtmap-ansible_test" + - nm_update_any_source_multicast_add_shared_range_route_map.current.0.pimCtxP.children.1.pimASMPatPol.children.1.pimSGRangeExpPol.attributes.sgExpItvl == "default-timeout" + - nm_update_any_source_multicast_add_shared_range_route_map.current.0.pimCtxP.children.1.pimASMPatPol.children.2.pimRegTrPol.attributes.maxRate == "65535" + - nm_update_any_source_multicast_add_shared_range_route_map.current.0.pimCtxP.children.1.pimASMPatPol.children.2.pimRegTrPol.attributes.srcIp == "0.0.0.0" + - nm_update_any_source_multicast_add_shared_range_route_map.current.0.pimCtxP.children.2.pimResPol.attributes.max == "unlimited" + - nm_update_any_source_multicast_add_shared_range_route_map.current.0.pimCtxP.children.2.pimResPol.attributes.rsvd == "undefined" + - nm_update_any_source_multicast_add_shared_range_route_map.previous.0.pimCtxP.attributes.annotation == "orchestrator:ansible" + - nm_update_any_source_multicast_add_shared_range_route_map.previous.0.pimCtxP.attributes.dn == "uni/tn-ansible_tenant/ctx-ansible_vrf_1/pimctxp" + - nm_update_any_source_multicast_add_shared_range_route_map.previous.0.pimCtxP.attributes.mtu == "2000" + - nm_update_any_source_multicast_add_shared_range_route_map.previous.0.pimCtxP.attributes.ctrl == "" + - nm_update_any_source_multicast_add_shared_range_route_map.previous.0.pimCtxP.children.0.pimSSMPatPol.children.0.pimSSMRangePol.attributes.name == "" + - nm_update_any_source_multicast_add_shared_range_route_map.previous.0.pimCtxP.children.1.pimASMPatPol.children.0.pimSharedRangePol.attributes.name == "" + - "'children' not in nm_update_any_source_multicast_remove_shared_range_route_map.current.0.pimCtxP.children.1.pimASMPatPol.children.0.pimSharedRangePol" + - nm_update_any_source_multicast_add_shared_range_route_map.previous.0.pimCtxP.children.1.pimASMPatPol.children.1.pimSGRangeExpPol.attributes.sgExpItvl == "default-timeout" + - nm_update_any_source_multicast_add_shared_range_route_map.previous.0.pimCtxP.children.1.pimASMPatPol.children.2.pimRegTrPol.attributes.maxRate == "65535" + - nm_update_any_source_multicast_add_shared_range_route_map.previous.0.pimCtxP.children.1.pimASMPatPol.children.2.pimRegTrPol.attributes.srcIp == "0.0.0.0" + - nm_update_any_source_multicast_add_shared_range_route_map.previous.0.pimCtxP.children.2.pimResPol.attributes.max == "unlimited" + - nm_update_any_source_multicast_add_shared_range_route_map.previous.0.pimCtxP.children.2.pimResPol.attributes.rsvd == "undefined" + - nm_update_any_source_multicast_remove_shared_range_route_map is changed + - nm_update_any_source_multicast_remove_shared_range_route_map.current.0.pimCtxP.attributes.annotation == "orchestrator:ansible" + - nm_update_any_source_multicast_remove_shared_range_route_map.current.0.pimCtxP.attributes.dn == "uni/tn-ansible_tenant/ctx-ansible_vrf_1/pimctxp" + - nm_update_any_source_multicast_remove_shared_range_route_map.current.0.pimCtxP.attributes.mtu == "2000" + - nm_update_any_source_multicast_remove_shared_range_route_map.current.0.pimCtxP.attributes.ctrl == "" + - nm_update_any_source_multicast_remove_shared_range_route_map.current.0.pimCtxP.children.0.pimSSMPatPol.children.0.pimSSMRangePol.attributes.name == "" + - nm_update_any_source_multicast_remove_shared_range_route_map.current.0.pimCtxP.children.1.pimASMPatPol.children.0.pimSharedRangePol.attributes.name == "" + - "'children' not in nm_update_any_source_multicast_remove_shared_range_route_map.current.0.pimCtxP.children.1.pimASMPatPol.children.0.pimSharedRangePol" + - nm_update_any_source_multicast_remove_shared_range_route_map.current.0.pimCtxP.children.1.pimASMPatPol.children.1.pimSGRangeExpPol.attributes.sgExpItvl == "default-timeout" + - nm_update_any_source_multicast_remove_shared_range_route_map.current.0.pimCtxP.children.1.pimASMPatPol.children.2.pimRegTrPol.attributes.maxRate == "65535" + - nm_update_any_source_multicast_remove_shared_range_route_map.current.0.pimCtxP.children.1.pimASMPatPol.children.2.pimRegTrPol.attributes.srcIp == "0.0.0.0" + - nm_update_any_source_multicast_remove_shared_range_route_map.current.0.pimCtxP.children.2.pimResPol.attributes.max == "unlimited" + - nm_update_any_source_multicast_remove_shared_range_route_map.current.0.pimCtxP.children.2.pimResPol.attributes.rsvd == "undefined" + - nm_update_any_source_multicast_remove_shared_range_route_map.previous.0.pimCtxP.attributes.annotation == "orchestrator:ansible" + - nm_update_any_source_multicast_remove_shared_range_route_map.previous.0.pimCtxP.attributes.dn == "uni/tn-ansible_tenant/ctx-ansible_vrf_1/pimctxp" + - nm_update_any_source_multicast_remove_shared_range_route_map.previous.0.pimCtxP.attributes.mtu == "2000" + - nm_update_any_source_multicast_remove_shared_range_route_map.previous.0.pimCtxP.attributes.ctrl == "" + - nm_update_any_source_multicast_remove_shared_range_route_map.previous.0.pimCtxP.children.0.pimSSMPatPol.children.0.pimSSMRangePol.attributes.name == "" + - nm_update_any_source_multicast_remove_shared_range_route_map.previous.0.pimCtxP.children.1.pimASMPatPol.children.0.pimSharedRangePol.attributes.name == "" + - nm_update_any_source_multicast_remove_shared_range_route_map.previous.0.pimCtxP.children.1.pimASMPatPol.children.0.pimSharedRangePol.children.0.rtdmcRsFilterToRtMapPol.attributes.tDn == "uni/tn-ansible_test/rtmap-ansible_test" + - nm_update_any_source_multicast_remove_shared_range_route_map.previous.0.pimCtxP.children.1.pimASMPatPol.children.1.pimSGRangeExpPol.attributes.sgExpItvl == "default-timeout" + - nm_update_any_source_multicast_remove_shared_range_route_map.previous.0.pimCtxP.children.1.pimASMPatPol.children.2.pimRegTrPol.attributes.maxRate == "65535" + - nm_update_any_source_multicast_remove_shared_range_route_map.previous.0.pimCtxP.children.1.pimASMPatPol.children.2.pimRegTrPol.attributes.srcIp == "0.0.0.0" + - nm_update_any_source_multicast_remove_shared_range_route_map.previous.0.pimCtxP.children.2.pimResPol.attributes.max == "unlimited" + - nm_update_any_source_multicast_remove_shared_range_route_map.previous.0.pimCtxP.children.2.pimResPol.attributes.rsvd == "undefined" + - nm_update_any_source_multicast_remove_shared_range_route_map_again is not changed + - nm_update_any_source_multicast_expiry_seconds is changed + - nm_update_any_source_multicast_expiry_seconds.current.0.pimCtxP.attributes.annotation == "orchestrator:ansible" + - nm_update_any_source_multicast_expiry_seconds.current.0.pimCtxP.attributes.dn == "uni/tn-ansible_tenant/ctx-ansible_vrf_1/pimctxp" + - nm_update_any_source_multicast_expiry_seconds.current.0.pimCtxP.attributes.mtu == "2000" + - nm_update_any_source_multicast_expiry_seconds.current.0.pimCtxP.attributes.ctrl == "" + - nm_update_any_source_multicast_expiry_seconds.current.0.pimCtxP.children.0.pimSSMPatPol.children.0.pimSSMRangePol.attributes.name == "" + - nm_update_any_source_multicast_expiry_seconds.current.0.pimCtxP.children.1.pimASMPatPol.children.0.pimSharedRangePol.attributes.name == "" + - nm_update_any_source_multicast_expiry_seconds.current.0.pimCtxP.children.1.pimASMPatPol.children.1.pimSGRangeExpPol.attributes.sgExpItvl == "500" + - nm_update_any_source_multicast_expiry_seconds.current.0.pimCtxP.children.1.pimASMPatPol.children.2.pimRegTrPol.attributes.maxRate == "65535" + - nm_update_any_source_multicast_expiry_seconds.current.0.pimCtxP.children.1.pimASMPatPol.children.2.pimRegTrPol.attributes.srcIp == "0.0.0.0" + - nm_update_any_source_multicast_expiry_seconds.current.0.pimCtxP.children.2.pimResPol.attributes.max == "unlimited" + - nm_update_any_source_multicast_expiry_seconds.current.0.pimCtxP.children.2.pimResPol.attributes.rsvd == "undefined" + - nm_update_any_source_multicast_expiry_seconds.previous.0.pimCtxP.attributes.annotation == "orchestrator:ansible" + - nm_update_any_source_multicast_expiry_seconds.previous.0.pimCtxP.attributes.dn == "uni/tn-ansible_tenant/ctx-ansible_vrf_1/pimctxp" + - nm_update_any_source_multicast_expiry_seconds.previous.0.pimCtxP.attributes.mtu == "2000" + - nm_update_any_source_multicast_expiry_seconds.previous.0.pimCtxP.attributes.ctrl == "" + - nm_update_any_source_multicast_expiry_seconds.previous.0.pimCtxP.children.0.pimSSMPatPol.children.0.pimSSMRangePol.attributes.name == "" + - nm_update_any_source_multicast_expiry_seconds.previous.0.pimCtxP.children.1.pimASMPatPol.children.0.pimSharedRangePol.attributes.name == "" + - nm_update_any_source_multicast_expiry_seconds.previous.0.pimCtxP.children.1.pimASMPatPol.children.1.pimSGRangeExpPol.attributes.sgExpItvl == "default-timeout" + - nm_update_any_source_multicast_expiry_seconds.previous.0.pimCtxP.children.1.pimASMPatPol.children.2.pimRegTrPol.attributes.maxRate == "65535" + - nm_update_any_source_multicast_expiry_seconds.previous.0.pimCtxP.children.1.pimASMPatPol.children.2.pimRegTrPol.attributes.srcIp == "0.0.0.0" + - nm_update_any_source_multicast_expiry_seconds.previous.0.pimCtxP.children.2.pimResPol.attributes.max == "unlimited" + - nm_update_any_source_multicast_expiry_seconds.previous.0.pimCtxP.children.2.pimResPol.attributes.rsvd == "undefined" + - nm_update_any_source_multicast_remove_expiry_seconds is changed + - nm_update_any_source_multicast_remove_expiry_seconds.current.0.pimCtxP.attributes.annotation == "orchestrator:ansible" + - nm_update_any_source_multicast_remove_expiry_seconds.current.0.pimCtxP.attributes.dn == "uni/tn-ansible_tenant/ctx-ansible_vrf_1/pimctxp" + - nm_update_any_source_multicast_remove_expiry_seconds.current.0.pimCtxP.attributes.mtu == "2000" + - nm_update_any_source_multicast_remove_expiry_seconds.current.0.pimCtxP.attributes.ctrl == "" + - nm_update_any_source_multicast_remove_expiry_seconds.current.0.pimCtxP.children.0.pimSSMPatPol.children.0.pimSSMRangePol.attributes.name == "" + - nm_update_any_source_multicast_remove_expiry_seconds.current.0.pimCtxP.children.1.pimASMPatPol.children.0.pimSharedRangePol.attributes.name == "" + - nm_update_any_source_multicast_remove_expiry_seconds.current.0.pimCtxP.children.1.pimASMPatPol.children.1.pimSGRangeExpPol.attributes.sgExpItvl == "default-timeout" + - nm_update_any_source_multicast_remove_expiry_seconds.current.0.pimCtxP.children.1.pimASMPatPol.children.2.pimRegTrPol.attributes.maxRate == "65535" + - nm_update_any_source_multicast_remove_expiry_seconds.current.0.pimCtxP.children.1.pimASMPatPol.children.2.pimRegTrPol.attributes.srcIp == "0.0.0.0" + - nm_update_any_source_multicast_remove_expiry_seconds.current.0.pimCtxP.children.2.pimResPol.attributes.max == "unlimited" + - nm_update_any_source_multicast_remove_expiry_seconds.current.0.pimCtxP.children.2.pimResPol.attributes.rsvd == "undefined" + - nm_update_any_source_multicast_remove_expiry_seconds.previous.0.pimCtxP.attributes.annotation == "orchestrator:ansible" + - nm_update_any_source_multicast_remove_expiry_seconds.previous.0.pimCtxP.attributes.dn == "uni/tn-ansible_tenant/ctx-ansible_vrf_1/pimctxp" + - nm_update_any_source_multicast_remove_expiry_seconds.previous.0.pimCtxP.attributes.mtu == "2000" + - nm_update_any_source_multicast_remove_expiry_seconds.previous.0.pimCtxP.attributes.ctrl == "" + - nm_update_any_source_multicast_remove_expiry_seconds.previous.0.pimCtxP.children.0.pimSSMPatPol.children.0.pimSSMRangePol.attributes.name == "" + - nm_update_any_source_multicast_remove_expiry_seconds.previous.0.pimCtxP.children.1.pimASMPatPol.children.0.pimSharedRangePol.attributes.name == "" + - nm_update_any_source_multicast_remove_expiry_seconds.previous.0.pimCtxP.children.1.pimASMPatPol.children.1.pimSGRangeExpPol.attributes.sgExpItvl == "500" + - nm_update_any_source_multicast_remove_expiry_seconds.previous.0.pimCtxP.children.1.pimASMPatPol.children.2.pimRegTrPol.attributes.maxRate == "65535" + - nm_update_any_source_multicast_remove_expiry_seconds.previous.0.pimCtxP.children.1.pimASMPatPol.children.2.pimRegTrPol.attributes.srcIp == "0.0.0.0" + - nm_update_any_source_multicast_remove_expiry_seconds.previous.0.pimCtxP.children.2.pimResPol.attributes.max == "unlimited" + - nm_update_any_source_multicast_remove_expiry_seconds.previous.0.pimCtxP.children.2.pimResPol.attributes.rsvd == "undefined" + - nm_update_any_source_multicast_add_source_group_expiry_route_map is changed + - nm_update_any_source_multicast_add_source_group_expiry_route_map.current.0.pimCtxP.attributes.annotation == "orchestrator:ansible" + - nm_update_any_source_multicast_add_source_group_expiry_route_map.current.0.pimCtxP.attributes.dn == "uni/tn-ansible_tenant/ctx-ansible_vrf_1/pimctxp" + - nm_update_any_source_multicast_add_source_group_expiry_route_map.current.0.pimCtxP.attributes.mtu == "2000" + - nm_update_any_source_multicast_add_source_group_expiry_route_map.current.0.pimCtxP.attributes.ctrl == "" + - nm_update_any_source_multicast_add_source_group_expiry_route_map.current.0.pimCtxP.children.0.pimSSMPatPol.children.0.pimSSMRangePol.attributes.name == "" + - nm_update_any_source_multicast_add_source_group_expiry_route_map.current.0.pimCtxP.children.1.pimASMPatPol.children.0.pimSharedRangePol.attributes.name == "" + - nm_update_any_source_multicast_add_source_group_expiry_route_map.current.0.pimCtxP.children.1.pimASMPatPol.children.1.pimSGRangeExpPol.attributes.sgExpItvl == "default-timeout" + - nm_update_any_source_multicast_add_source_group_expiry_route_map.current.0.pimCtxP.children.1.pimASMPatPol.children.1.pimSGRangeExpPol.children.0.rtdmcRsFilterToRtMapPol.attributes.tDn == "uni/tn-ansible_test/rtmap-ansible_test" + - nm_update_any_source_multicast_add_source_group_expiry_route_map.current.0.pimCtxP.children.1.pimASMPatPol.children.2.pimRegTrPol.attributes.maxRate == "65535" + - nm_update_any_source_multicast_add_source_group_expiry_route_map.current.0.pimCtxP.children.1.pimASMPatPol.children.2.pimRegTrPol.attributes.srcIp == "0.0.0.0" + - nm_update_any_source_multicast_add_source_group_expiry_route_map.current.0.pimCtxP.children.2.pimResPol.attributes.max == "unlimited" + - nm_update_any_source_multicast_add_source_group_expiry_route_map.current.0.pimCtxP.children.2.pimResPol.attributes.rsvd == "undefined" + - nm_update_any_source_multicast_add_source_group_expiry_route_map.previous.0.pimCtxP.attributes.annotation == "orchestrator:ansible" + - nm_update_any_source_multicast_add_source_group_expiry_route_map.previous.0.pimCtxP.attributes.dn == "uni/tn-ansible_tenant/ctx-ansible_vrf_1/pimctxp" + - nm_update_any_source_multicast_add_source_group_expiry_route_map.previous.0.pimCtxP.attributes.mtu == "2000" + - nm_update_any_source_multicast_add_source_group_expiry_route_map.previous.0.pimCtxP.attributes.ctrl == "" + - nm_update_any_source_multicast_add_source_group_expiry_route_map.previous.0.pimCtxP.children.0.pimSSMPatPol.children.0.pimSSMRangePol.attributes.name == "" + - nm_update_any_source_multicast_add_source_group_expiry_route_map.previous.0.pimCtxP.children.1.pimASMPatPol.children.0.pimSharedRangePol.attributes.name == "" + - nm_update_any_source_multicast_add_source_group_expiry_route_map.previous.0.pimCtxP.children.1.pimASMPatPol.children.1.pimSGRangeExpPol.attributes.sgExpItvl == "default-timeout" + - "'children' not in nm_update_any_source_multicast_add_source_group_expiry_route_map.previous.0.pimCtxP.children.1.pimASMPatPol.children.1.pimSGRangeExpPol" + - nm_update_any_source_multicast_add_source_group_expiry_route_map.previous.0.pimCtxP.children.1.pimASMPatPol.children.2.pimRegTrPol.attributes.maxRate == "65535" + - nm_update_any_source_multicast_add_source_group_expiry_route_map.previous.0.pimCtxP.children.1.pimASMPatPol.children.2.pimRegTrPol.attributes.srcIp == "0.0.0.0" + - nm_update_any_source_multicast_add_source_group_expiry_route_map.previous.0.pimCtxP.children.2.pimResPol.attributes.max == "unlimited" + - nm_update_any_source_multicast_add_source_group_expiry_route_map.previous.0.pimCtxP.children.2.pimResPol.attributes.rsvd == "undefined" + - nm_update_any_source_multicast_remove_source_group_expiry_route_map is changed + - nm_update_any_source_multicast_remove_source_group_expiry_route_map.current.0.pimCtxP.attributes.annotation == "orchestrator:ansible" + - nm_update_any_source_multicast_remove_source_group_expiry_route_map.current.0.pimCtxP.attributes.dn == "uni/tn-ansible_tenant/ctx-ansible_vrf_1/pimctxp" + - nm_update_any_source_multicast_remove_source_group_expiry_route_map.current.0.pimCtxP.attributes.mtu == "2000" + - nm_update_any_source_multicast_remove_source_group_expiry_route_map.current.0.pimCtxP.attributes.ctrl == "" + - nm_update_any_source_multicast_remove_source_group_expiry_route_map.current.0.pimCtxP.children.0.pimSSMPatPol.children.0.pimSSMRangePol.attributes.name == "" + - nm_update_any_source_multicast_remove_source_group_expiry_route_map.current.0.pimCtxP.children.1.pimASMPatPol.children.0.pimSharedRangePol.attributes.name == "" + - nm_update_any_source_multicast_remove_source_group_expiry_route_map.current.0.pimCtxP.children.1.pimASMPatPol.children.1.pimSGRangeExpPol.attributes.sgExpItvl == "default-timeout" + - "'children' not in nm_update_any_source_multicast_remove_source_group_expiry_route_map.current.0.pimCtxP.children.1.pimASMPatPol.children.1.pimSGRangeExpPol" + - nm_update_any_source_multicast_remove_source_group_expiry_route_map.current.0.pimCtxP.children.1.pimASMPatPol.children.2.pimRegTrPol.attributes.maxRate == "65535" + - nm_update_any_source_multicast_remove_source_group_expiry_route_map.current.0.pimCtxP.children.1.pimASMPatPol.children.2.pimRegTrPol.attributes.srcIp == "0.0.0.0" + - nm_update_any_source_multicast_remove_source_group_expiry_route_map.current.0.pimCtxP.children.2.pimResPol.attributes.max == "unlimited" + - nm_update_any_source_multicast_remove_source_group_expiry_route_map.current.0.pimCtxP.children.2.pimResPol.attributes.rsvd == "undefined" + - nm_update_any_source_multicast_remove_source_group_expiry_route_map.previous.0.pimCtxP.attributes.annotation == "orchestrator:ansible" + - nm_update_any_source_multicast_remove_source_group_expiry_route_map.previous.0.pimCtxP.attributes.dn == "uni/tn-ansible_tenant/ctx-ansible_vrf_1/pimctxp" + - nm_update_any_source_multicast_remove_source_group_expiry_route_map.previous.0.pimCtxP.attributes.mtu == "2000" + - nm_update_any_source_multicast_remove_source_group_expiry_route_map.previous.0.pimCtxP.attributes.ctrl == "" + - nm_update_any_source_multicast_remove_source_group_expiry_route_map.previous.0.pimCtxP.children.0.pimSSMPatPol.children.0.pimSSMRangePol.attributes.name == "" + - nm_update_any_source_multicast_remove_source_group_expiry_route_map.previous.0.pimCtxP.children.1.pimASMPatPol.children.0.pimSharedRangePol.attributes.name == "" + - nm_update_any_source_multicast_remove_source_group_expiry_route_map.previous.0.pimCtxP.children.1.pimASMPatPol.children.1.pimSGRangeExpPol.attributes.sgExpItvl == "default-timeout" + - nm_update_any_source_multicast_remove_source_group_expiry_route_map.previous.0.pimCtxP.children.1.pimASMPatPol.children.1.pimSGRangeExpPol.children.0.rtdmcRsFilterToRtMapPol.attributes.tDn == "uni/tn-ansible_test/rtmap-ansible_test" + - nm_update_any_source_multicast_remove_source_group_expiry_route_map.previous.0.pimCtxP.children.1.pimASMPatPol.children.2.pimRegTrPol.attributes.maxRate == "65535" + - nm_update_any_source_multicast_remove_source_group_expiry_route_map.previous.0.pimCtxP.children.1.pimASMPatPol.children.2.pimRegTrPol.attributes.srcIp == "0.0.0.0" + - nm_update_any_source_multicast_remove_source_group_expiry_route_map.previous.0.pimCtxP.children.2.pimResPol.attributes.max == "unlimited" + - nm_update_any_source_multicast_remove_source_group_expiry_route_map.previous.0.pimCtxP.children.2.pimResPol.attributes.rsvd == "undefined" + - nm_update_any_source_multicast_remove_source_group_expiry_route_map_again is not changed + - nm_update_any_source_multicast_max_rate is changed + - nm_update_any_source_multicast_max_rate.current.0.pimCtxP.attributes.annotation == "orchestrator:ansible" + - nm_update_any_source_multicast_max_rate.current.0.pimCtxP.attributes.dn == "uni/tn-ansible_tenant/ctx-ansible_vrf_1/pimctxp" + - nm_update_any_source_multicast_max_rate.current.0.pimCtxP.attributes.mtu == "2000" + - nm_update_any_source_multicast_max_rate.current.0.pimCtxP.attributes.ctrl == "" + - nm_update_any_source_multicast_max_rate.current.0.pimCtxP.children.0.pimSSMPatPol.children.0.pimSSMRangePol.attributes.name == "" + - nm_update_any_source_multicast_max_rate.current.0.pimCtxP.children.1.pimASMPatPol.children.0.pimSharedRangePol.attributes.name == "" + - nm_update_any_source_multicast_max_rate.current.0.pimCtxP.children.1.pimASMPatPol.children.1.pimSGRangeExpPol.attributes.sgExpItvl == "default-timeout" + - nm_update_any_source_multicast_max_rate.current.0.pimCtxP.children.1.pimASMPatPol.children.2.pimRegTrPol.attributes.maxRate == "64000" + - nm_update_any_source_multicast_max_rate.current.0.pimCtxP.children.1.pimASMPatPol.children.2.pimRegTrPol.attributes.srcIp == "0.0.0.0" + - nm_update_any_source_multicast_max_rate.current.0.pimCtxP.children.2.pimResPol.attributes.max == "unlimited" + - nm_update_any_source_multicast_max_rate.current.0.pimCtxP.children.2.pimResPol.attributes.rsvd == "undefined" + - nm_update_any_source_multicast_max_rate.previous.0.pimCtxP.attributes.annotation == "orchestrator:ansible" + - nm_update_any_source_multicast_max_rate.previous.0.pimCtxP.attributes.dn == "uni/tn-ansible_tenant/ctx-ansible_vrf_1/pimctxp" + - nm_update_any_source_multicast_max_rate.previous.0.pimCtxP.attributes.mtu == "2000" + - nm_update_any_source_multicast_max_rate.previous.0.pimCtxP.attributes.ctrl == "" + - nm_update_any_source_multicast_max_rate.previous.0.pimCtxP.children.0.pimSSMPatPol.children.0.pimSSMRangePol.attributes.name == "" + - nm_update_any_source_multicast_max_rate.previous.0.pimCtxP.children.1.pimASMPatPol.children.0.pimSharedRangePol.attributes.name == "" + - nm_update_any_source_multicast_max_rate.previous.0.pimCtxP.children.1.pimASMPatPol.children.1.pimSGRangeExpPol.attributes.sgExpItvl == "default-timeout" + - nm_update_any_source_multicast_max_rate.previous.0.pimCtxP.children.1.pimASMPatPol.children.2.pimRegTrPol.attributes.maxRate == "65535" + - nm_update_any_source_multicast_max_rate.previous.0.pimCtxP.children.1.pimASMPatPol.children.2.pimRegTrPol.attributes.srcIp == "0.0.0.0" + - nm_update_any_source_multicast_max_rate.previous.0.pimCtxP.children.2.pimResPol.attributes.max == "unlimited" + - nm_update_any_source_multicast_max_rate.previous.0.pimCtxP.children.2.pimResPol.attributes.rsvd == "undefined" + - nm_update_any_source_multicast_ip is changed + - nm_update_any_source_multicast_ip.current.0.pimCtxP.attributes.annotation == "orchestrator:ansible" + - nm_update_any_source_multicast_ip.current.0.pimCtxP.attributes.dn == "uni/tn-ansible_tenant/ctx-ansible_vrf_1/pimctxp" + - nm_update_any_source_multicast_ip.current.0.pimCtxP.attributes.mtu == "2000" + - nm_update_any_source_multicast_ip.current.0.pimCtxP.attributes.ctrl == "" + - nm_update_any_source_multicast_ip.current.0.pimCtxP.children.0.pimSSMPatPol.children.0.pimSSMRangePol.attributes.name == "" + - nm_update_any_source_multicast_ip.current.0.pimCtxP.children.1.pimASMPatPol.children.0.pimSharedRangePol.attributes.name == "" + - nm_update_any_source_multicast_ip.current.0.pimCtxP.children.1.pimASMPatPol.children.1.pimSGRangeExpPol.attributes.sgExpItvl == "default-timeout" + - nm_update_any_source_multicast_ip.current.0.pimCtxP.children.1.pimASMPatPol.children.2.pimRegTrPol.attributes.maxRate == "64000" + - nm_update_any_source_multicast_ip.current.0.pimCtxP.children.1.pimASMPatPol.children.2.pimRegTrPol.attributes.srcIp == "1.1.1.1" + - nm_update_any_source_multicast_ip.current.0.pimCtxP.children.2.pimResPol.attributes.max == "unlimited" + - nm_update_any_source_multicast_ip.current.0.pimCtxP.children.2.pimResPol.attributes.rsvd == "undefined" + - nm_update_any_source_multicast_ip.previous.0.pimCtxP.attributes.annotation == "orchestrator:ansible" + - nm_update_any_source_multicast_ip.previous.0.pimCtxP.attributes.dn == "uni/tn-ansible_tenant/ctx-ansible_vrf_1/pimctxp" + - nm_update_any_source_multicast_ip.previous.0.pimCtxP.attributes.mtu == "2000" + - nm_update_any_source_multicast_ip.previous.0.pimCtxP.attributes.ctrl == "" + - nm_update_any_source_multicast_ip.previous.0.pimCtxP.children.0.pimSSMPatPol.children.0.pimSSMRangePol.attributes.name == "" + - nm_update_any_source_multicast_ip.previous.0.pimCtxP.children.1.pimASMPatPol.children.0.pimSharedRangePol.attributes.name == "" + - nm_update_any_source_multicast_ip.previous.0.pimCtxP.children.1.pimASMPatPol.children.1.pimSGRangeExpPol.attributes.sgExpItvl == "default-timeout" + - nm_update_any_source_multicast_ip.previous.0.pimCtxP.children.1.pimASMPatPol.children.2.pimRegTrPol.attributes.maxRate == "64000" + - nm_update_any_source_multicast_ip.previous.0.pimCtxP.children.1.pimASMPatPol.children.2.pimRegTrPol.attributes.srcIp == "0.0.0.0" + - nm_update_any_source_multicast_ip.previous.0.pimCtxP.children.2.pimResPol.attributes.max == "unlimited" + - nm_update_any_source_multicast_ip.previous.0.pimCtxP.children.2.pimResPol.attributes.rsvd == "undefined" + +# UPDATE MULTICAST SSM + +- name: Add a routemap to source specific multicast on VRF 1 + cisco.aci.aci_vrf_multicast: + <<: *aci_ansible_vrf_1 + source_specific_multicast: + group_range_route_map: uni/tn-ansible_test/rtmap-ansible_test + register: nm_update_source_specific_multicast_add_route_map + +- name: Remove a routemap from source specific multicast on VRF 1 + cisco.aci.aci_vrf_multicast: + <<: *aci_ansible_vrf_1 + source_specific_multicast: + group_range_route_map: "" + register: nm_update_source_specific_multicast_remove_route_map + +- name: Remove a routemap from source specific multicast on VRF 1 again + cisco.aci.aci_vrf_multicast: + <<: *aci_ansible_vrf_1 + source_specific_multicast: + group_range_route_map: "" + register: nm_update_source_specific_multicast_remove_route_map_again + +- name: Verify update source specific multicast on VRF 1 + ansible.builtin.assert: + that: + - nm_update_source_specific_multicast_add_route_map is changed + - nm_update_source_specific_multicast_add_route_map.current.0.pimCtxP.attributes.annotation == "orchestrator:ansible" + - nm_update_source_specific_multicast_add_route_map.current.0.pimCtxP.attributes.dn == "uni/tn-ansible_tenant/ctx-ansible_vrf_1/pimctxp" + - nm_update_source_specific_multicast_add_route_map.current.0.pimCtxP.attributes.mtu == "2000" + - nm_update_source_specific_multicast_add_route_map.current.0.pimCtxP.attributes.ctrl == "" + - nm_update_source_specific_multicast_add_route_map.current.0.pimCtxP.children.0.pimSSMPatPol.children.0.pimSSMRangePol.attributes.name == "" + - nm_update_source_specific_multicast_add_route_map.current.0.pimCtxP.children.0.pimSSMPatPol.children.0.pimSSMRangePol.children.0.rtdmcRsFilterToRtMapPol.attributes.tDn == "uni/tn-ansible_test/rtmap-ansible_test" + - nm_update_source_specific_multicast_add_route_map.current.0.pimCtxP.children.1.pimASMPatPol.children.0.pimSharedRangePol.attributes.name == "" + - nm_update_source_specific_multicast_add_route_map.current.0.pimCtxP.children.1.pimASMPatPol.children.1.pimSGRangeExpPol.attributes.sgExpItvl == "default-timeout" + - nm_update_source_specific_multicast_add_route_map.current.0.pimCtxP.children.1.pimASMPatPol.children.2.pimRegTrPol.attributes.maxRate == "64000" + - nm_update_source_specific_multicast_add_route_map.current.0.pimCtxP.children.1.pimASMPatPol.children.2.pimRegTrPol.attributes.srcIp == "1.1.1.1" + - nm_update_source_specific_multicast_add_route_map.current.0.pimCtxP.children.2.pimResPol.attributes.max == "unlimited" + - nm_update_source_specific_multicast_add_route_map.current.0.pimCtxP.children.2.pimResPol.attributes.rsvd == "undefined" + - nm_update_source_specific_multicast_add_route_map.previous.0.pimCtxP.attributes.annotation == "orchestrator:ansible" + - nm_update_source_specific_multicast_add_route_map.previous.0.pimCtxP.attributes.dn == "uni/tn-ansible_tenant/ctx-ansible_vrf_1/pimctxp" + - nm_update_source_specific_multicast_add_route_map.previous.0.pimCtxP.attributes.mtu == "2000" + - nm_update_source_specific_multicast_add_route_map.previous.0.pimCtxP.attributes.ctrl == "" + - nm_update_source_specific_multicast_add_route_map.previous.0.pimCtxP.children.0.pimSSMPatPol.children.0.pimSSMRangePol.attributes.name == "" + - "'children' not in nm_update_source_specific_multicast_add_route_map.previous.0.pimCtxP.children.0.pimSSMPatPol.children.0.pimSSMRangePol" + - nm_update_source_specific_multicast_add_route_map.previous.0.pimCtxP.children.1.pimASMPatPol.children.0.pimSharedRangePol.attributes.name == "" + - nm_update_source_specific_multicast_add_route_map.previous.0.pimCtxP.children.1.pimASMPatPol.children.1.pimSGRangeExpPol.attributes.sgExpItvl == "default-timeout" + - nm_update_source_specific_multicast_add_route_map.previous.0.pimCtxP.children.1.pimASMPatPol.children.2.pimRegTrPol.attributes.maxRate == "64000" + - nm_update_source_specific_multicast_add_route_map.previous.0.pimCtxP.children.1.pimASMPatPol.children.2.pimRegTrPol.attributes.srcIp == "1.1.1.1" + - nm_update_source_specific_multicast_add_route_map.previous.0.pimCtxP.children.2.pimResPol.attributes.max == "unlimited" + - nm_update_source_specific_multicast_add_route_map.previous.0.pimCtxP.children.2.pimResPol.attributes.rsvd == "undefined" + - nm_update_source_specific_multicast_remove_route_map is changed + - nm_update_source_specific_multicast_remove_route_map.current.0.pimCtxP.attributes.annotation == "orchestrator:ansible" + - nm_update_source_specific_multicast_remove_route_map.current.0.pimCtxP.attributes.dn == "uni/tn-ansible_tenant/ctx-ansible_vrf_1/pimctxp" + - nm_update_source_specific_multicast_remove_route_map.current.0.pimCtxP.attributes.mtu == "2000" + - nm_update_source_specific_multicast_remove_route_map.current.0.pimCtxP.attributes.ctrl == "" + - nm_update_source_specific_multicast_remove_route_map.current.0.pimCtxP.children.0.pimSSMPatPol.children.0.pimSSMRangePol.attributes.name == "" + - "'children' not in nm_update_source_specific_multicast_remove_route_map.current.0.pimCtxP.children.0.pimSSMPatPol.children.0.pimSSMRangePol" + - nm_update_source_specific_multicast_remove_route_map.current.0.pimCtxP.children.1.pimASMPatPol.children.0.pimSharedRangePol.attributes.name == "" + - nm_update_source_specific_multicast_remove_route_map.current.0.pimCtxP.children.1.pimASMPatPol.children.1.pimSGRangeExpPol.attributes.sgExpItvl == "default-timeout" + - nm_update_source_specific_multicast_remove_route_map.current.0.pimCtxP.children.1.pimASMPatPol.children.2.pimRegTrPol.attributes.maxRate == "64000" + - nm_update_source_specific_multicast_remove_route_map.current.0.pimCtxP.children.1.pimASMPatPol.children.2.pimRegTrPol.attributes.srcIp == "1.1.1.1" + - nm_update_source_specific_multicast_remove_route_map.current.0.pimCtxP.children.2.pimResPol.attributes.max == "unlimited" + - nm_update_source_specific_multicast_remove_route_map.current.0.pimCtxP.children.2.pimResPol.attributes.rsvd == "undefined" + - nm_update_source_specific_multicast_remove_route_map.previous.0.pimCtxP.attributes.annotation == "orchestrator:ansible" + - nm_update_source_specific_multicast_remove_route_map.previous.0.pimCtxP.attributes.dn == "uni/tn-ansible_tenant/ctx-ansible_vrf_1/pimctxp" + - nm_update_source_specific_multicast_remove_route_map.previous.0.pimCtxP.attributes.mtu == "2000" + - nm_update_source_specific_multicast_remove_route_map.previous.0.pimCtxP.attributes.ctrl == "" + - nm_update_source_specific_multicast_remove_route_map.previous.0.pimCtxP.children.0.pimSSMPatPol.children.0.pimSSMRangePol.attributes.name == "" + - nm_update_source_specific_multicast_remove_route_map.previous.0.pimCtxP.children.0.pimSSMPatPol.children.0.pimSSMRangePol.children.0.rtdmcRsFilterToRtMapPol.attributes.tDn == "uni/tn-ansible_test/rtmap-ansible_test" + - nm_update_source_specific_multicast_remove_route_map.previous.0.pimCtxP.children.1.pimASMPatPol.children.0.pimSharedRangePol.attributes.name == "" + - nm_update_source_specific_multicast_remove_route_map.previous.0.pimCtxP.children.1.pimASMPatPol.children.1.pimSGRangeExpPol.attributes.sgExpItvl == "default-timeout" + - nm_update_source_specific_multicast_remove_route_map.previous.0.pimCtxP.children.1.pimASMPatPol.children.2.pimRegTrPol.attributes.maxRate == "64000" + - nm_update_source_specific_multicast_remove_route_map.previous.0.pimCtxP.children.1.pimASMPatPol.children.2.pimRegTrPol.attributes.srcIp == "1.1.1.1" + - nm_update_source_specific_multicast_remove_route_map.previous.0.pimCtxP.children.2.pimResPol.attributes.max == "unlimited" + - nm_update_source_specific_multicast_remove_route_map.previous.0.pimCtxP.children.2.pimResPol.attributes.rsvd == "undefined" + - nm_update_source_specific_multicast_remove_route_map_again is not changed + +# UPDATE MULTICAST BOOTSTRAP ROUTER (BSR) + +- name: Add a routemap to bootstrap router on VRF 1 + cisco.aci.aci_vrf_multicast: + <<: *aci_ansible_vrf_1 + bootstrap_router: + bsr_filter: uni/tn-ansible_test/rtmap-ansible_test + register: nm_update_bootstrap_router_add_route_map + +- name: Remove a routemap to bootstrap router on VRF 1 + cisco.aci.aci_vrf_multicast: + <<: *aci_ansible_vrf_1 + bootstrap_router: + bsr_filter: "" + register: nm_update_bootstrap_router_remove_route_map + +- name: Update bootstrap router on VRF 1 + cisco.aci.aci_vrf_multicast: + <<: *aci_ansible_vrf_1 + bootstrap_router: + rp_updates: [ forward, listen ] + register: nm_update_bootstrap_router + +- name: Remove rp_updates for bootstrap router on VRF 1 + cisco.aci.aci_vrf_multicast: + <<: *aci_ansible_vrf_1 + bootstrap_router: + rp_updates: [] + register: nm_update_bootstrap_router_remove_rp_updates + +- name: Verify update bootstrap router on VRF 1 + ansible.builtin.assert: + that: + - nm_update_bootstrap_router_add_route_map is changed + - nm_update_bootstrap_router_add_route_map.current.0.pimCtxP.attributes.dn == "uni/tn-ansible_tenant/ctx-ansible_vrf_1/pimctxp" + - nm_update_bootstrap_router_add_route_map.current.0.pimCtxP.attributes.mtu == "2000" + - nm_update_bootstrap_router_add_route_map.current.0.pimCtxP.attributes.ctrl == "" + - nm_update_bootstrap_router_add_route_map.current.0.pimCtxP.children.0.pimSSMPatPol.children.0.pimSSMRangePol.attributes.name == "" + - nm_update_bootstrap_router_add_route_map.current.0.pimCtxP.children.1.pimResPol.attributes.max == "unlimited" + - nm_update_bootstrap_router_add_route_map.current.0.pimCtxP.children.1.pimResPol.attributes.rsvd == "undefined" + - nm_update_bootstrap_router_add_route_map.current.0.pimCtxP.children.2.pimASMPatPol.children.0.pimSharedRangePol.attributes.name == "" + - nm_update_bootstrap_router_add_route_map.current.0.pimCtxP.children.2.pimASMPatPol.children.1.pimSGRangeExpPol.attributes.sgExpItvl == "default-timeout" + - nm_update_bootstrap_router_add_route_map.current.0.pimCtxP.children.2.pimASMPatPol.children.2.pimRegTrPol.attributes.maxRate == "64000" + - nm_update_bootstrap_router_add_route_map.current.0.pimCtxP.children.2.pimASMPatPol.children.2.pimRegTrPol.attributes.srcIp == "1.1.1.1" + - nm_update_bootstrap_router_add_route_map.current.0.pimCtxP.children.3.pimBSRPPol.children.0.pimBSRFilterPol.children.0.rtdmcRsFilterToRtMapPol.attributes.tDn == "uni/tn-ansible_test/rtmap-ansible_test" + - nm_update_bootstrap_router_add_route_map.current.0.pimCtxP.children.3.pimBSRPPol.attributes.ctrl == "" + - nm_update_bootstrap_router_add_route_map.previous.0.pimCtxP.attributes.annotation == "orchestrator:ansible" + - nm_update_bootstrap_router_add_route_map.previous.0.pimCtxP.attributes.dn == "uni/tn-ansible_tenant/ctx-ansible_vrf_1/pimctxp" + - nm_update_bootstrap_router_add_route_map.previous.0.pimCtxP.attributes.mtu == "2000" + - nm_update_bootstrap_router_add_route_map.previous.0.pimCtxP.attributes.ctrl == "" + - nm_update_bootstrap_router_add_route_map.previous.0.pimCtxP.children.0.pimSSMPatPol.children.0.pimSSMRangePol.attributes.name == "" + - nm_update_bootstrap_router_add_route_map.previous.0.pimCtxP.children.1.pimASMPatPol.children.0.pimSharedRangePol.attributes.name == "" + - nm_update_bootstrap_router_add_route_map.previous.0.pimCtxP.children.1.pimASMPatPol.children.1.pimSGRangeExpPol.attributes.sgExpItvl == "default-timeout" + - nm_update_bootstrap_router_add_route_map.previous.0.pimCtxP.children.1.pimASMPatPol.children.2.pimRegTrPol.attributes.maxRate == "64000" + - nm_update_bootstrap_router_add_route_map.previous.0.pimCtxP.children.1.pimASMPatPol.children.2.pimRegTrPol.attributes.srcIp == "1.1.1.1" + - nm_update_bootstrap_router_add_route_map.previous.0.pimCtxP.children.2.pimResPol.attributes.max == "unlimited" + - nm_update_bootstrap_router_add_route_map.previous.0.pimCtxP.children.2.pimResPol.attributes.rsvd == "undefined" + - nm_update_bootstrap_router_add_route_map.previous.0.pimCtxP.children | length == 3 + - nm_update_bootstrap_router_remove_route_map is changed + - nm_update_bootstrap_router_remove_route_map.current.0.pimCtxP.attributes.dn == "uni/tn-ansible_tenant/ctx-ansible_vrf_1/pimctxp" + - nm_update_bootstrap_router_remove_route_map.current.0.pimCtxP.attributes.mtu == "2000" + - nm_update_bootstrap_router_remove_route_map.current.0.pimCtxP.attributes.ctrl == "" + - nm_update_bootstrap_router_remove_route_map.current.0.pimCtxP.children.0.pimSSMPatPol.children.0.pimSSMRangePol.attributes.name == "" + - nm_update_bootstrap_router_remove_route_map.current.0.pimCtxP.children.1.pimResPol.attributes.max == "unlimited" + - nm_update_bootstrap_router_remove_route_map.current.0.pimCtxP.children.1.pimResPol.attributes.rsvd == "undefined" + - nm_update_bootstrap_router_remove_route_map.current.0.pimCtxP.children.2.pimASMPatPol.children.0.pimSharedRangePol.attributes.name == "" + - nm_update_bootstrap_router_remove_route_map.current.0.pimCtxP.children.2.pimASMPatPol.children.1.pimSGRangeExpPol.attributes.sgExpItvl == "default-timeout" + - nm_update_bootstrap_router_remove_route_map.current.0.pimCtxP.children.2.pimASMPatPol.children.2.pimRegTrPol.attributes.maxRate == "64000" + - nm_update_bootstrap_router_remove_route_map.current.0.pimCtxP.children.2.pimASMPatPol.children.2.pimRegTrPol.attributes.srcIp == "1.1.1.1" + - "'children' not in nm_update_bootstrap_router_remove_route_map.current.0.pimCtxP.children.3.pimBSRPPol.children.0.pimBSRFilterPol" + - nm_update_bootstrap_router_remove_route_map.current.0.pimCtxP.children.3.pimBSRPPol.attributes.ctrl == "" + - nm_update_bootstrap_router_remove_route_map.previous.0.pimCtxP.attributes.dn == "uni/tn-ansible_tenant/ctx-ansible_vrf_1/pimctxp" + - nm_update_bootstrap_router_remove_route_map.previous.0.pimCtxP.attributes.mtu == "2000" + - nm_update_bootstrap_router_remove_route_map.previous.0.pimCtxP.attributes.ctrl == "" + - nm_update_bootstrap_router_remove_route_map.previous.0.pimCtxP.children.0.pimSSMPatPol.children.0.pimSSMRangePol.attributes.name == "" + - nm_update_bootstrap_router_remove_route_map.previous.0.pimCtxP.children.1.pimResPol.attributes.max == "unlimited" + - nm_update_bootstrap_router_remove_route_map.previous.0.pimCtxP.children.1.pimResPol.attributes.rsvd == "undefined" + - nm_update_bootstrap_router_remove_route_map.previous.0.pimCtxP.children.2.pimASMPatPol.children.0.pimSharedRangePol.attributes.name == "" + - nm_update_bootstrap_router_remove_route_map.previous.0.pimCtxP.children.2.pimASMPatPol.children.1.pimSGRangeExpPol.attributes.sgExpItvl == "default-timeout" + - nm_update_bootstrap_router_remove_route_map.previous.0.pimCtxP.children.2.pimASMPatPol.children.2.pimRegTrPol.attributes.maxRate == "64000" + - nm_update_bootstrap_router_remove_route_map.previous.0.pimCtxP.children.2.pimASMPatPol.children.2.pimRegTrPol.attributes.srcIp == "1.1.1.1" + - nm_update_bootstrap_router_remove_route_map.previous.0.pimCtxP.children.3.pimBSRPPol.children.0.pimBSRFilterPol.children.0.rtdmcRsFilterToRtMapPol.attributes.tDn == "uni/tn-ansible_test/rtmap-ansible_test" + - nm_update_bootstrap_router_remove_route_map.previous.0.pimCtxP.children.3.pimBSRPPol.attributes.ctrl == "" + - nm_update_bootstrap_router is changed + - nm_update_bootstrap_router.current.0.pimCtxP.attributes.dn == "uni/tn-ansible_tenant/ctx-ansible_vrf_1/pimctxp" + - nm_update_bootstrap_router.current.0.pimCtxP.attributes.mtu == "2000" + - nm_update_bootstrap_router.current.0.pimCtxP.attributes.ctrl == "" + - nm_update_bootstrap_router.current.0.pimCtxP.children.0.pimSSMPatPol.children.0.pimSSMRangePol.attributes.name == "" + - nm_update_bootstrap_router.current.0.pimCtxP.children.1.pimResPol.attributes.max == "unlimited" + - nm_update_bootstrap_router.current.0.pimCtxP.children.1.pimResPol.attributes.rsvd == "undefined" + - nm_update_bootstrap_router.current.0.pimCtxP.children.2.pimASMPatPol.children.0.pimSharedRangePol.attributes.name == "" + - nm_update_bootstrap_router.current.0.pimCtxP.children.2.pimASMPatPol.children.1.pimSGRangeExpPol.attributes.sgExpItvl == "default-timeout" + - nm_update_bootstrap_router.current.0.pimCtxP.children.2.pimASMPatPol.children.2.pimRegTrPol.attributes.maxRate == "64000" + - nm_update_bootstrap_router.current.0.pimCtxP.children.2.pimASMPatPol.children.2.pimRegTrPol.attributes.srcIp == "1.1.1.1" + - nm_update_bootstrap_router.current.0.pimCtxP.children.3.pimBSRPPol.attributes.ctrl == "forward,listen" + - nm_update_bootstrap_router.previous.0.pimCtxP.attributes.dn == "uni/tn-ansible_tenant/ctx-ansible_vrf_1/pimctxp" + - nm_update_bootstrap_router.previous.0.pimCtxP.attributes.mtu == "2000" + - nm_update_bootstrap_router.previous.0.pimCtxP.attributes.ctrl == "" + - nm_update_bootstrap_router.previous.0.pimCtxP.children.0.pimSSMPatPol.children.0.pimSSMRangePol.attributes.name == "" + - nm_update_bootstrap_router.previous.0.pimCtxP.children.1.pimResPol.attributes.max == "unlimited" + - nm_update_bootstrap_router.previous.0.pimCtxP.children.1.pimResPol.attributes.rsvd == "undefined" + - nm_update_bootstrap_router.previous.0.pimCtxP.children.2.pimASMPatPol.children.0.pimSharedRangePol.attributes.name == "" + - nm_update_bootstrap_router.previous.0.pimCtxP.children.2.pimASMPatPol.children.1.pimSGRangeExpPol.attributes.sgExpItvl == "default-timeout" + - nm_update_bootstrap_router.previous.0.pimCtxP.children.2.pimASMPatPol.children.2.pimRegTrPol.attributes.maxRate == "64000" + - nm_update_bootstrap_router.previous.0.pimCtxP.children.2.pimASMPatPol.children.2.pimRegTrPol.attributes.srcIp == "1.1.1.1" + - nm_update_bootstrap_router.previous.0.pimCtxP.children.3.pimBSRPPol.attributes.ctrl == "" + - nm_update_bootstrap_router_remove_rp_updates is changed + - nm_update_bootstrap_router_remove_rp_updates.current.0.pimCtxP.attributes.dn == "uni/tn-ansible_tenant/ctx-ansible_vrf_1/pimctxp" + - nm_update_bootstrap_router_remove_rp_updates.current.0.pimCtxP.attributes.mtu == "2000" + - nm_update_bootstrap_router_remove_rp_updates.current.0.pimCtxP.attributes.ctrl == "" + - nm_update_bootstrap_router_remove_rp_updates.current.0.pimCtxP.children.0.pimSSMPatPol.children.0.pimSSMRangePol.attributes.name == "" + - nm_update_bootstrap_router_remove_rp_updates.current.0.pimCtxP.children.1.pimResPol.attributes.max == "unlimited" + - nm_update_bootstrap_router_remove_rp_updates.current.0.pimCtxP.children.1.pimResPol.attributes.rsvd == "undefined" + - nm_update_bootstrap_router_remove_rp_updates.current.0.pimCtxP.children.2.pimASMPatPol.children.0.pimSharedRangePol.attributes.name == "" + - nm_update_bootstrap_router_remove_rp_updates.current.0.pimCtxP.children.2.pimASMPatPol.children.1.pimSGRangeExpPol.attributes.sgExpItvl == "default-timeout" + - nm_update_bootstrap_router_remove_rp_updates.current.0.pimCtxP.children.2.pimASMPatPol.children.2.pimRegTrPol.attributes.maxRate == "64000" + - nm_update_bootstrap_router_remove_rp_updates.current.0.pimCtxP.children.2.pimASMPatPol.children.2.pimRegTrPol.attributes.srcIp == "1.1.1.1" + - nm_update_bootstrap_router_remove_rp_updates.current.0.pimCtxP.children.3.pimBSRPPol.attributes.ctrl == "" + - nm_update_bootstrap_router_remove_rp_updates.previous.0.pimCtxP.attributes.dn == "uni/tn-ansible_tenant/ctx-ansible_vrf_1/pimctxp" + - nm_update_bootstrap_router_remove_rp_updates.previous.0.pimCtxP.attributes.mtu == "2000" + - nm_update_bootstrap_router_remove_rp_updates.previous.0.pimCtxP.attributes.ctrl == "" + - nm_update_bootstrap_router_remove_rp_updates.previous.0.pimCtxP.children.0.pimSSMPatPol.children.0.pimSSMRangePol.attributes.name == "" + - nm_update_bootstrap_router_remove_rp_updates.previous.0.pimCtxP.children.1.pimResPol.attributes.max == "unlimited" + - nm_update_bootstrap_router_remove_rp_updates.previous.0.pimCtxP.children.1.pimResPol.attributes.rsvd == "undefined" + - nm_update_bootstrap_router_remove_rp_updates.previous.0.pimCtxP.children.2.pimASMPatPol.children.0.pimSharedRangePol.attributes.name == "" + - nm_update_bootstrap_router_remove_rp_updates.previous.0.pimCtxP.children.2.pimASMPatPol.children.1.pimSGRangeExpPol.attributes.sgExpItvl == "default-timeout" + - nm_update_bootstrap_router_remove_rp_updates.previous.0.pimCtxP.children.2.pimASMPatPol.children.2.pimRegTrPol.attributes.maxRate == "64000" + - nm_update_bootstrap_router_remove_rp_updates.previous.0.pimCtxP.children.2.pimASMPatPol.children.2.pimRegTrPol.attributes.srcIp == "1.1.1.1" + - nm_update_bootstrap_router_remove_rp_updates.previous.0.pimCtxP.children.3.pimBSRPPol.attributes.ctrl == "forward,listen" + +# UPDATE MULTICAST AUTO-RP + +- name: Add a routemap to auro-rp on VRF 1 + cisco.aci.aci_vrf_multicast: + <<: *aci_ansible_vrf_1 + auto_rp: + ma_filter: uni/tn-ansible_test/rtmap-ansible_test + register: nm_update_auto_rp_add_route_map + +- name: Remove a routemap to auro-rp on VRF 1 + cisco.aci.aci_vrf_multicast: + <<: *aci_ansible_vrf_1 + auto_rp: + ma_filter: "" + register: nm_update_auto_rp_remove_route_map + +- name: Update auro-rp on VRF 1 + cisco.aci.aci_vrf_multicast: + <<: *aci_ansible_vrf_1 + auto_rp: + rp_updates: [ forward, listen ] + register: nm_update_auto_rp + +- name: Remove rp_updates for auro-rp on VRF 1 + cisco.aci.aci_vrf_multicast: + <<: *aci_ansible_vrf_1 + auto_rp: + rp_updates: [] + register: nm_update_auto_rp_remove_rp_updates + +- name: Verify update auro-rp on VRF 1 + ansible.builtin.assert: + that: + - nm_update_auto_rp_add_route_map is changed + - nm_update_auto_rp_add_route_map.current.0.pimCtxP.attributes.dn == "uni/tn-ansible_tenant/ctx-ansible_vrf_1/pimctxp" + - nm_update_auto_rp_add_route_map.current.0.pimCtxP.attributes.mtu == "2000" + - nm_update_auto_rp_add_route_map.current.0.pimCtxP.attributes.ctrl == "" + - nm_update_auto_rp_add_route_map.current.0.pimCtxP.children.0.pimSSMPatPol.children.0.pimSSMRangePol.attributes.name == "" + - nm_update_auto_rp_add_route_map.current.0.pimCtxP.children.1.pimASMPatPol.children.0.pimSharedRangePol.attributes.name == "" + - nm_update_auto_rp_add_route_map.current.0.pimCtxP.children.1.pimASMPatPol.children.1.pimSGRangeExpPol.attributes.sgExpItvl == "default-timeout" + - nm_update_auto_rp_add_route_map.current.0.pimCtxP.children.1.pimASMPatPol.children.2.pimRegTrPol.attributes.maxRate == "64000" + - nm_update_auto_rp_add_route_map.current.0.pimCtxP.children.1.pimASMPatPol.children.2.pimRegTrPol.attributes.srcIp == "1.1.1.1" + - nm_update_auto_rp_add_route_map.current.0.pimCtxP.children.2.pimBSRPPol.attributes.ctrl == "" + - nm_update_auto_rp_add_route_map.current.0.pimCtxP.children.3.pimResPol.attributes.max == "unlimited" + - nm_update_auto_rp_add_route_map.current.0.pimCtxP.children.3.pimResPol.attributes.rsvd == "undefined" + - nm_update_auto_rp_add_route_map.current.0.pimCtxP.children.4.pimAutoRPPol.attributes.ctrl == "" + - nm_update_auto_rp_add_route_map.current.0.pimCtxP.children.4.pimAutoRPPol.children.0.pimMAFilterPol.children.0.rtdmcRsFilterToRtMapPol.attributes.tDn == "uni/tn-ansible_test/rtmap-ansible_test" + - nm_update_auto_rp_add_route_map.previous.0.pimCtxP.attributes.annotation == "orchestrator:ansible" + - nm_update_auto_rp_add_route_map.previous.0.pimCtxP.attributes.dn == "uni/tn-ansible_tenant/ctx-ansible_vrf_1/pimctxp" + - nm_update_auto_rp_add_route_map.previous.0.pimCtxP.attributes.mtu == "2000" + - nm_update_auto_rp_add_route_map.previous.0.pimCtxP.attributes.ctrl == "" + - nm_update_auto_rp_add_route_map.previous.0.pimCtxP.children.0.pimSSMPatPol.children.0.pimSSMRangePol.attributes.name == "" + - nm_update_auto_rp_add_route_map.previous.0.pimCtxP.children.1.pimResPol.attributes.max == "unlimited" + - nm_update_auto_rp_add_route_map.previous.0.pimCtxP.children.1.pimResPol.attributes.rsvd == "undefined" + - nm_update_auto_rp_add_route_map.previous.0.pimCtxP.children.2.pimASMPatPol.children.0.pimSharedRangePol.attributes.name == "" + - nm_update_auto_rp_add_route_map.previous.0.pimCtxP.children.2.pimASMPatPol.children.1.pimSGRangeExpPol.attributes.sgExpItvl == "default-timeout" + - nm_update_auto_rp_add_route_map.previous.0.pimCtxP.children.2.pimASMPatPol.children.2.pimRegTrPol.attributes.maxRate == "64000" + - nm_update_auto_rp_add_route_map.previous.0.pimCtxP.children.2.pimASMPatPol.children.2.pimRegTrPol.attributes.srcIp == "1.1.1.1" + - nm_update_auto_rp_add_route_map.previous.0.pimCtxP.children.3.pimBSRPPol.attributes.ctrl == "" + - nm_update_auto_rp_add_route_map.previous.0.pimCtxP.children | length == 4 + - nm_update_auto_rp_remove_route_map is changed + - nm_update_auto_rp_remove_route_map.current.0.pimCtxP.attributes.dn == "uni/tn-ansible_tenant/ctx-ansible_vrf_1/pimctxp" + - nm_update_auto_rp_remove_route_map.current.0.pimCtxP.attributes.mtu == "2000" + - nm_update_auto_rp_remove_route_map.current.0.pimCtxP.attributes.ctrl == "" + - nm_update_auto_rp_remove_route_map.current.0.pimCtxP.children.0.pimSSMPatPol.children.0.pimSSMRangePol.attributes.name == "" + - nm_update_auto_rp_remove_route_map.current.0.pimCtxP.children.1.pimASMPatPol.children.0.pimSharedRangePol.attributes.name == "" + - nm_update_auto_rp_remove_route_map.current.0.pimCtxP.children.1.pimASMPatPol.children.1.pimSGRangeExpPol.attributes.sgExpItvl == "default-timeout" + - nm_update_auto_rp_remove_route_map.current.0.pimCtxP.children.1.pimASMPatPol.children.2.pimRegTrPol.attributes.maxRate == "64000" + - nm_update_auto_rp_remove_route_map.current.0.pimCtxP.children.1.pimASMPatPol.children.2.pimRegTrPol.attributes.srcIp == "1.1.1.1" + - nm_update_auto_rp_remove_route_map.current.0.pimCtxP.children.2.pimBSRPPol.attributes.ctrl == "" + - nm_update_auto_rp_remove_route_map.current.0.pimCtxP.children.3.pimResPol.attributes.max == "unlimited" + - nm_update_auto_rp_remove_route_map.current.0.pimCtxP.children.3.pimResPol.attributes.rsvd == "undefined" + - nm_update_auto_rp_remove_route_map.current.0.pimCtxP.children.4.pimAutoRPPol.attributes.ctrl == "" + - "'children' not in nm_update_auto_rp_remove_route_map.current.0.pimCtxP.children.4.pimAutoRPPol.children.0.pimMAFilterPol" + - nm_update_auto_rp_remove_route_map.previous.0.pimCtxP.attributes.dn == "uni/tn-ansible_tenant/ctx-ansible_vrf_1/pimctxp" + - nm_update_auto_rp_remove_route_map.previous.0.pimCtxP.attributes.mtu == "2000" + - nm_update_auto_rp_remove_route_map.previous.0.pimCtxP.attributes.ctrl == "" + - nm_update_auto_rp_remove_route_map.previous.0.pimCtxP.children.0.pimSSMPatPol.children.0.pimSSMRangePol.attributes.name == "" + - nm_update_auto_rp_remove_route_map.previous.0.pimCtxP.children.1.pimASMPatPol.children.0.pimSharedRangePol.attributes.name == "" + - nm_update_auto_rp_remove_route_map.previous.0.pimCtxP.children.1.pimASMPatPol.children.1.pimSGRangeExpPol.attributes.sgExpItvl == "default-timeout" + - nm_update_auto_rp_remove_route_map.previous.0.pimCtxP.children.1.pimASMPatPol.children.2.pimRegTrPol.attributes.maxRate == "64000" + - nm_update_auto_rp_remove_route_map.previous.0.pimCtxP.children.1.pimASMPatPol.children.2.pimRegTrPol.attributes.srcIp == "1.1.1.1" + - nm_update_auto_rp_remove_route_map.previous.0.pimCtxP.children.2.pimBSRPPol.attributes.ctrl == "" + - nm_update_auto_rp_remove_route_map.previous.0.pimCtxP.children.3.pimResPol.attributes.max == "unlimited" + - nm_update_auto_rp_remove_route_map.previous.0.pimCtxP.children.3.pimResPol.attributes.rsvd == "undefined" + - nm_update_auto_rp_remove_route_map.previous.0.pimCtxP.children.4.pimAutoRPPol.attributes.ctrl == "" + - nm_update_auto_rp_remove_route_map.previous.0.pimCtxP.children.4.pimAutoRPPol.children.0.pimMAFilterPol.children.0.rtdmcRsFilterToRtMapPol.attributes.tDn == "uni/tn-ansible_test/rtmap-ansible_test" + - nm_update_auto_rp is changed + - nm_update_auto_rp.current.0.pimCtxP.attributes.dn == "uni/tn-ansible_tenant/ctx-ansible_vrf_1/pimctxp" + - nm_update_auto_rp.current.0.pimCtxP.attributes.mtu == "2000" + - nm_update_auto_rp.current.0.pimCtxP.attributes.ctrl == "" + - nm_update_auto_rp.current.0.pimCtxP.children.0.pimSSMPatPol.children.0.pimSSMRangePol.attributes.name == "" + - nm_update_auto_rp.current.0.pimCtxP.children.1.pimASMPatPol.children.0.pimSharedRangePol.attributes.name == "" + - nm_update_auto_rp.current.0.pimCtxP.children.1.pimASMPatPol.children.1.pimSGRangeExpPol.attributes.sgExpItvl == "default-timeout" + - nm_update_auto_rp.current.0.pimCtxP.children.1.pimASMPatPol.children.2.pimRegTrPol.attributes.maxRate == "64000" + - nm_update_auto_rp.current.0.pimCtxP.children.1.pimASMPatPol.children.2.pimRegTrPol.attributes.srcIp == "1.1.1.1" + - nm_update_auto_rp.current.0.pimCtxP.children.2.pimBSRPPol.attributes.ctrl == "" + - nm_update_auto_rp.current.0.pimCtxP.children.3.pimResPol.attributes.max == "unlimited" + - nm_update_auto_rp.current.0.pimCtxP.children.3.pimResPol.attributes.rsvd == "undefined" + - nm_update_auto_rp.current.0.pimCtxP.children.4.pimAutoRPPol.attributes.ctrl == "forward,listen" + - nm_update_auto_rp.previous.0.pimCtxP.attributes.dn == "uni/tn-ansible_tenant/ctx-ansible_vrf_1/pimctxp" + - nm_update_auto_rp.previous.0.pimCtxP.attributes.mtu == "2000" + - nm_update_auto_rp.previous.0.pimCtxP.attributes.ctrl == "" + - nm_update_auto_rp.previous.0.pimCtxP.children.0.pimSSMPatPol.children.0.pimSSMRangePol.attributes.name == "" + - nm_update_auto_rp.previous.0.pimCtxP.children.1.pimASMPatPol.children.0.pimSharedRangePol.attributes.name == "" + - nm_update_auto_rp.previous.0.pimCtxP.children.1.pimASMPatPol.children.1.pimSGRangeExpPol.attributes.sgExpItvl == "default-timeout" + - nm_update_auto_rp.previous.0.pimCtxP.children.1.pimASMPatPol.children.2.pimRegTrPol.attributes.maxRate == "64000" + - nm_update_auto_rp.previous.0.pimCtxP.children.1.pimASMPatPol.children.2.pimRegTrPol.attributes.srcIp == "1.1.1.1" + - nm_update_auto_rp.previous.0.pimCtxP.children.2.pimBSRPPol.attributes.ctrl == "" + - nm_update_auto_rp.previous.0.pimCtxP.children.3.pimResPol.attributes.max == "unlimited" + - nm_update_auto_rp.previous.0.pimCtxP.children.3.pimResPol.attributes.rsvd == "undefined" + - nm_update_auto_rp.previous.0.pimCtxP.children.4.pimAutoRPPol.attributes.ctrl == "" + - nm_update_auto_rp_remove_rp_updates is changed + - nm_update_auto_rp_remove_rp_updates.current.0.pimCtxP.attributes.dn == "uni/tn-ansible_tenant/ctx-ansible_vrf_1/pimctxp" + - nm_update_auto_rp_remove_rp_updates.current.0.pimCtxP.attributes.mtu == "2000" + - nm_update_auto_rp_remove_rp_updates.current.0.pimCtxP.attributes.ctrl == "" + - nm_update_auto_rp_remove_rp_updates.current.0.pimCtxP.children.0.pimSSMPatPol.children.0.pimSSMRangePol.attributes.name == "" + - nm_update_auto_rp_remove_rp_updates.current.0.pimCtxP.children.1.pimASMPatPol.children.0.pimSharedRangePol.attributes.name == "" + - nm_update_auto_rp_remove_rp_updates.current.0.pimCtxP.children.1.pimASMPatPol.children.1.pimSGRangeExpPol.attributes.sgExpItvl == "default-timeout" + - nm_update_auto_rp_remove_rp_updates.current.0.pimCtxP.children.1.pimASMPatPol.children.2.pimRegTrPol.attributes.maxRate == "64000" + - nm_update_auto_rp_remove_rp_updates.current.0.pimCtxP.children.1.pimASMPatPol.children.2.pimRegTrPol.attributes.srcIp == "1.1.1.1" + - nm_update_auto_rp_remove_rp_updates.current.0.pimCtxP.children.2.pimBSRPPol.attributes.ctrl == "" + - nm_update_auto_rp_remove_rp_updates.current.0.pimCtxP.children.3.pimResPol.attributes.max == "unlimited" + - nm_update_auto_rp_remove_rp_updates.current.0.pimCtxP.children.3.pimResPol.attributes.rsvd == "undefined" + - nm_update_auto_rp_remove_rp_updates.current.0.pimCtxP.children.4.pimAutoRPPol.attributes.ctrl == "" + - nm_update_auto_rp_remove_rp_updates.previous.0.pimCtxP.attributes.dn == "uni/tn-ansible_tenant/ctx-ansible_vrf_1/pimctxp" + - nm_update_auto_rp_remove_rp_updates.previous.0.pimCtxP.attributes.mtu == "2000" + - nm_update_auto_rp_remove_rp_updates.previous.0.pimCtxP.attributes.ctrl == "" + - nm_update_auto_rp_remove_rp_updates.previous.0.pimCtxP.children.0.pimSSMPatPol.children.0.pimSSMRangePol.attributes.name == "" + - nm_update_auto_rp_remove_rp_updates.previous.0.pimCtxP.children.1.pimASMPatPol.children.0.pimSharedRangePol.attributes.name == "" + - nm_update_auto_rp_remove_rp_updates.previous.0.pimCtxP.children.1.pimASMPatPol.children.1.pimSGRangeExpPol.attributes.sgExpItvl == "default-timeout" + - nm_update_auto_rp_remove_rp_updates.previous.0.pimCtxP.children.1.pimASMPatPol.children.2.pimRegTrPol.attributes.maxRate == "64000" + - nm_update_auto_rp_remove_rp_updates.previous.0.pimCtxP.children.1.pimASMPatPol.children.2.pimRegTrPol.attributes.srcIp == "1.1.1.1" + - nm_update_auto_rp_remove_rp_updates.previous.0.pimCtxP.children.2.pimBSRPPol.attributes.ctrl == "" + - nm_update_auto_rp_remove_rp_updates.previous.0.pimCtxP.children.3.pimResPol.attributes.max == "unlimited" + - nm_update_auto_rp_remove_rp_updates.previous.0.pimCtxP.children.3.pimResPol.attributes.rsvd == "undefined" + - nm_update_auto_rp_remove_rp_updates.previous.0.pimCtxP.children.4.pimAutoRPPol.attributes.ctrl == "forward,listen" + +# QUERY MULTICAST SETTINGS + +- name: Enable multicast on VRF 2 + cisco.aci.aci_vrf_multicast: + <<: *aci_ansible_vrf_2 + register: nm_update_resource_policy + +- name: Query multicast on VRF 1 + cisco.aci.aci_vrf_multicast: + <<: *aci_ansible_vrf_1 + state: query + register: query_one + +- name: Query multicast on all VRFs + cisco.aci.aci_vrf_multicast: + <<: *aci_info + state: query + register: query_all + +- name: Verify multicast VRF queries + ansible.builtin.assert: + that: + - query_one is not changed + - query_one.current | length == 1 + - query_one.current.0.fvCtx.children.0.pimCtxP.attributes.rn == "pimctxp" + - query_one.current.0.fvCtx.children.0.pimCtxP.attributes.mtu == "2000" + - query_one.current.0.fvCtx.children.0.pimCtxP.attributes.ctrl == "" + - query_one.current.0.fvCtx.children.0.pimCtxP.children.0.pimSSMPatPol.children.0.pimSSMRangePol.attributes.name == "" + - query_one.current.0.fvCtx.children.0.pimCtxP.children.1.pimASMPatPol.children.0.pimSharedRangePol.attributes.name == "" + - query_one.current.0.fvCtx.children.0.pimCtxP.children.1.pimASMPatPol.children.1.pimSGRangeExpPol.attributes.sgExpItvl == "default-timeout" + - query_one.current.0.fvCtx.children.0.pimCtxP.children.1.pimASMPatPol.children.2.pimRegTrPol.attributes.maxRate == "64000" + - query_one.current.0.fvCtx.children.0.pimCtxP.children.1.pimASMPatPol.children.2.pimRegTrPol.attributes.srcIp == "1.1.1.1" + - query_one.current.0.fvCtx.children.0.pimCtxP.children.2.pimBSRPPol.attributes.ctrl == "" + - query_one.current.0.fvCtx.children.0.pimCtxP.children.3.pimResPol.attributes.max == "unlimited" + - query_one.current.0.fvCtx.children.0.pimCtxP.children.3.pimResPol.attributes.rsvd == "undefined" + - query_one.current.0.fvCtx.children.0.pimCtxP.children.4.pimAutoRPPol.attributes.ctrl == "" + - query_all is not changed + - query_all.current | length > 1 + +# DISABLE MULTICAST + +- name: Disable multicast on VRF + cisco.aci.aci_vrf_multicast: + <<: *aci_ansible_vrf_1 + state: absent + check_mode: true + register: cm_disable_multicast + +- name: Disable multicast on VRF + cisco.aci.aci_vrf_multicast: + <<: *aci_ansible_vrf_1 + state: absent + register: nm_disable_multicast + +- name: Disable multicast on VRF again + cisco.aci.aci_vrf_multicast: + <<: *aci_ansible_vrf_1 + state: absent + register: nm_disable_multicast_again + +- name: Verify disable multicast on VRF + ansible.builtin.assert: + that: + - cm_disable_multicast is changed + - cm_disable_multicast.proposed == {} + - cm_disable_multicast.previous.0.pimCtxP.attributes.dn == "uni/tn-ansible_tenant/ctx-ansible_vrf_1/pimctxp" + - cm_disable_multicast.previous.0.pimCtxP.attributes.mtu == "2000" + - cm_disable_multicast.previous.0.pimCtxP.attributes.ctrl == "" + - cm_disable_multicast.previous.0.pimCtxP.children.0.pimSSMPatPol.children.0.pimSSMRangePol.attributes.name == "" + - cm_disable_multicast.previous.0.pimCtxP.children.1.pimASMPatPol.children.0.pimSharedRangePol.attributes.name == "" + - cm_disable_multicast.previous.0.pimCtxP.children.1.pimASMPatPol.children.1.pimSGRangeExpPol.attributes.sgExpItvl == "default-timeout" + - cm_disable_multicast.previous.0.pimCtxP.children.1.pimASMPatPol.children.2.pimRegTrPol.attributes.maxRate == "64000" + - cm_disable_multicast.previous.0.pimCtxP.children.1.pimASMPatPol.children.2.pimRegTrPol.attributes.srcIp == "1.1.1.1" + - cm_disable_multicast.previous.0.pimCtxP.children.2.pimBSRPPol.attributes.ctrl == "" + - cm_disable_multicast.previous.0.pimCtxP.children.3.pimResPol.attributes.max == "unlimited" + - cm_disable_multicast.previous.0.pimCtxP.children.3.pimResPol.attributes.rsvd == "undefined" + - cm_disable_multicast.previous.0.pimCtxP.children.4.pimAutoRPPol.attributes.ctrl == "" + - nm_disable_multicast is changed + - nm_disable_multicast.current == [] + - nm_disable_multicast.previous.0.pimCtxP.attributes.dn == "uni/tn-ansible_tenant/ctx-ansible_vrf_1/pimctxp" + - nm_disable_multicast.previous.0.pimCtxP.attributes.mtu == "2000" + - nm_disable_multicast.previous.0.pimCtxP.attributes.ctrl == "" + - nm_disable_multicast.previous.0.pimCtxP.children.0.pimSSMPatPol.children.0.pimSSMRangePol.attributes.name == "" + - nm_disable_multicast.previous.0.pimCtxP.children.1.pimASMPatPol.children.0.pimSharedRangePol.attributes.name == "" + - nm_disable_multicast.previous.0.pimCtxP.children.1.pimASMPatPol.children.1.pimSGRangeExpPol.attributes.sgExpItvl == "default-timeout" + - nm_disable_multicast.previous.0.pimCtxP.children.1.pimASMPatPol.children.2.pimRegTrPol.attributes.maxRate == "64000" + - nm_disable_multicast.previous.0.pimCtxP.children.1.pimASMPatPol.children.2.pimRegTrPol.attributes.srcIp == "1.1.1.1" + - nm_disable_multicast.previous.0.pimCtxP.children.2.pimBSRPPol.attributes.ctrl == "" + - nm_disable_multicast.previous.0.pimCtxP.children.3.pimResPol.attributes.max == "unlimited" + - nm_disable_multicast.previous.0.pimCtxP.children.3.pimResPol.attributes.rsvd == "undefined" + - nm_disable_multicast.previous.0.pimCtxP.children.4.pimAutoRPPol.attributes.ctrl == "" + - nm_disable_multicast_again is not changed + - nm_disable_multicast_again.current == [] + - nm_disable_multicast_again.previous == [] + +# ERRORS + +- name: Mutually exclusive parameters resource_policy (error) + cisco.aci.aci_vrf_multicast: + <<: *aci_ansible_vrf_1 + resource_policy: + reserved_multicast_entries: 10 + ignore_errors: true + register: err_mutually_exclusive_resource_policy + +- name: Entries is 0 when routemap provided (error) + cisco.aci.aci_vrf_multicast: + <<: *aci_ansible_vrf_1 + resource_policy: + reserved_route_map: uni/tn-ansible_test/rtmap-ansible_test + reserved_multicast_entries: 0 + ignore_errors: true + register: err_reserved_multicast_entries_is_0 + +- name: Verify errors + ansible.builtin.assert: + that: + - err_mutually_exclusive_resource_policy is failed + - err_mutually_exclusive_resource_policy.msg == "parameters are mutually exclusive{{':'}} reserved_route_map|reserved_multicast_entries" + - err_reserved_multicast_entries_is_0 is failed + - err_reserved_multicast_entries_is_0.msg == "C(reserved_multicast_entries) must be provided and greater than 0 when C(reserved_route_map) is provided" + +# CLEAN ENVIRONMENT + +- name: Remove ansible_tenant + cisco.aci.aci_tenant: + <<: *aci_tenant_absent