|
|
|
@ -370,6 +370,124 @@ def main():
|
|
|
|
|
lagT=lag_type,
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
child_configs = [
|
|
|
|
|
dict(
|
|
|
|
|
infraRsCdpIfPol=dict(
|
|
|
|
|
attributes=dict(
|
|
|
|
|
tnCdpIfPolName=cdp_policy,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
dict(
|
|
|
|
|
infraRsFcIfPol=dict(
|
|
|
|
|
attributes=dict(
|
|
|
|
|
tnFcIfPolName=fibre_channel_interface_policy,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
dict(
|
|
|
|
|
infraRsHIfPol=dict(
|
|
|
|
|
attributes=dict(
|
|
|
|
|
tnFabricHIfPolName=link_level_policy,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
dict(
|
|
|
|
|
infraRsL2IfPol=dict(
|
|
|
|
|
attributes=dict(
|
|
|
|
|
tnL2IfPolName=l2_interface_policy,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
dict(
|
|
|
|
|
infraRsL2PortSecurityPol=dict(
|
|
|
|
|
attributes=dict(
|
|
|
|
|
tnL2PortSecurityPolName=port_security_policy,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
dict(
|
|
|
|
|
infraRsLacpPol=dict(
|
|
|
|
|
attributes=dict(
|
|
|
|
|
tnLacpLagPolName=port_channel_policy,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
dict(
|
|
|
|
|
infraRsLldpIfPol=dict(
|
|
|
|
|
attributes=dict(
|
|
|
|
|
tnLldpIfPolName=lldp_policy,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
dict(
|
|
|
|
|
infraRsMcpIfPol=dict(
|
|
|
|
|
attributes=dict(
|
|
|
|
|
tnMcpIfPolName=mcp_policy,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
dict(
|
|
|
|
|
infraRsMonIfInfraPol=dict(
|
|
|
|
|
attributes=dict(
|
|
|
|
|
tnMonInfraPolName=monitoring_policy,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
dict(
|
|
|
|
|
infraRsQosEgressDppIfPol=dict(
|
|
|
|
|
attributes=dict(
|
|
|
|
|
tnQosDppPolName=egress_data_plane_policing_policy,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
dict(
|
|
|
|
|
infraRsQosIngressDppIfPol=dict(
|
|
|
|
|
attributes=dict(
|
|
|
|
|
tnQosDppPolName=ingress_data_plane_policing_policy,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
dict(
|
|
|
|
|
infraRsQosPfcIfPol=dict(
|
|
|
|
|
attributes=dict(
|
|
|
|
|
tnQosPfcIfPolName=priority_flow_control_policy,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
dict(
|
|
|
|
|
infraRsQosSdIfPol=dict(
|
|
|
|
|
attributes=dict(
|
|
|
|
|
tnQosSdIfPolName=slow_drain_policy,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
dict(
|
|
|
|
|
infraRsStormctrlIfPol=dict(
|
|
|
|
|
attributes=dict(
|
|
|
|
|
tnStormctrlIfPolName=storm_control_interface_policy,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
dict(
|
|
|
|
|
infraRsStpIfPol=dict(
|
|
|
|
|
attributes=dict(
|
|
|
|
|
tnStpIfPolName=stp_interface_policy,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
# Add infraRsattEntP binding only when aep was defined
|
|
|
|
|
if aep is not None:
|
|
|
|
|
child_configs.append(dict(
|
|
|
|
|
infraRsAttEntP=dict(
|
|
|
|
|
attributes=dict(
|
|
|
|
|
tDn='uni/infra/attentp-{0}'.format(aep),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
))
|
|
|
|
|
|
|
|
|
|
aci = ACIModule(module)
|
|
|
|
|
aci.construct_url(
|
|
|
|
|
root_class=dict(
|
|
|
|
@ -404,120 +522,7 @@ def main():
|
|
|
|
|
aci.payload(
|
|
|
|
|
aci_class=aci_class_name,
|
|
|
|
|
class_config=class_config_dict,
|
|
|
|
|
child_configs=[
|
|
|
|
|
dict(
|
|
|
|
|
infraRsAttEntP=dict(
|
|
|
|
|
attributes=dict(
|
|
|
|
|
tDn='uni/infra/attentp-{0}'.format(aep),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
dict(
|
|
|
|
|
infraRsCdpIfPol=dict(
|
|
|
|
|
attributes=dict(
|
|
|
|
|
tnCdpIfPolName=cdp_policy,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
dict(
|
|
|
|
|
infraRsFcIfPol=dict(
|
|
|
|
|
attributes=dict(
|
|
|
|
|
tnFcIfPolName=fibre_channel_interface_policy,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
dict(
|
|
|
|
|
infraRsHIfPol=dict(
|
|
|
|
|
attributes=dict(
|
|
|
|
|
tnFabricHIfPolName=link_level_policy,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
dict(
|
|
|
|
|
infraRsL2IfPol=dict(
|
|
|
|
|
attributes=dict(
|
|
|
|
|
tnL2IfPolName=l2_interface_policy,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
dict(
|
|
|
|
|
infraRsL2PortSecurityPol=dict(
|
|
|
|
|
attributes=dict(
|
|
|
|
|
tnL2PortSecurityPolName=port_security_policy,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
dict(
|
|
|
|
|
infraRsLacpPol=dict(
|
|
|
|
|
attributes=dict(
|
|
|
|
|
tnLacpLagPolName=port_channel_policy,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
dict(
|
|
|
|
|
infraRsLldpIfPol=dict(
|
|
|
|
|
attributes=dict(
|
|
|
|
|
tnLldpIfPolName=lldp_policy,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
dict(
|
|
|
|
|
infraRsMcpIfPol=dict(
|
|
|
|
|
attributes=dict(
|
|
|
|
|
tnMcpIfPolName=mcp_policy,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
dict(
|
|
|
|
|
infraRsMonIfInfraPol=dict(
|
|
|
|
|
attributes=dict(
|
|
|
|
|
tnMonInfraPolName=monitoring_policy,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
dict(
|
|
|
|
|
infraRsQosEgressDppIfPol=dict(
|
|
|
|
|
attributes=dict(
|
|
|
|
|
tnQosDppPolName=egress_data_plane_policing_policy,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
dict(
|
|
|
|
|
infraRsQosIngressDppIfPol=dict(
|
|
|
|
|
attributes=dict(
|
|
|
|
|
tnQosDppPolName=ingress_data_plane_policing_policy,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
dict(
|
|
|
|
|
infraRsQosPfcIfPol=dict(
|
|
|
|
|
attributes=dict(
|
|
|
|
|
tnQosPfcIfPolName=priority_flow_control_policy,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
dict(
|
|
|
|
|
infraRsQosSdIfPol=dict(
|
|
|
|
|
attributes=dict(
|
|
|
|
|
tnQosSdIfPolName=slow_drain_policy,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
dict(
|
|
|
|
|
infraRsStormctrlIfPol=dict(
|
|
|
|
|
attributes=dict(
|
|
|
|
|
tnStormctrlIfPolName=storm_control_interface_policy,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
dict(
|
|
|
|
|
infraRsStpIfPol=dict(
|
|
|
|
|
attributes=dict(
|
|
|
|
|
tnStpIfPolName=stp_interface_policy,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
child_configs=child_configs,
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
aci.get_diff(aci_class=aci_class_name)
|
|
|
|
|