| 1 |
FILTER_KEY_MAP = { |
| 2 |
"both-way": "filterRelationships", |
| 3 |
"consumer-to-provider": "filterRelationshipsConsumerToProvider", |
| 4 |
"provider-to-consumer": "filterRelationshipsProviderToConsumer", |
| 5 |
} |
| 6 |
|
| 7 |
PRIORITY_MAP = { |
| 8 |
"default": "default", |
| 9 |
"lowest_priority": "level1", |
| 10 |
"medium_priority": "level2", |
| 11 |
"highest_priority": "level3", |
| 12 |
} |
| 13 |
|
| 14 |
SERVICE_NODE_CONNECTOR_MAP = { |
| 15 |
"bd": {"id": "bd", "connector_type": "general"} |
| 16 |
# 'external_epg': {'id': 'externalEpg', 'connector_type': 'route-peering'} |
| 17 |
} |
| 18 |
|
| 19 |
YES_OR_NO_TO_BOOL_STRING_MAP = {"yes": "true", "no": "false", True: "yes", False: "no"} |
| 20 |
|
| 21 |
ENABLED_OR_DISABLED_TO_BOOL_STRING_MAP = {"enabled": True, "disabled": False} |
| 22 |
BOOL_TO_ENABLED_OR_DISABLED_STRING_MAP = {True: "enabled", False: "disabled"} |
| 23 |
|
| 24 |
NDO_4_UNIQUE_IDENTIFIERS = ["templateID", "autoRouteTargetImport", "autoRouteTargetExport"] |
| 25 |
|
| 26 |
NDO_API_VERSION_FORMAT = "/mso/api/{api_version}" |
| 27 |
NDO_API_VERSION_PATH_FORMAT = "/mso/api/{api_version}/{path}" |
| 28 |
|
| 29 |
NDO_CIPHER_SUITE_MAP = { |
| 30 |
"128_gcm_aes": "128GcmAes", |
| 31 |
"128_gcm_aes_xpn": "128GcmAesXpn", |
| 32 |
"256_gcm_aes": "256GcmAes", |
| 33 |
"256_gcm_aes_xpn": "256GcmAesXpn", |
| 34 |
} |
| 35 |
|
| 36 |
NDO_SECURITY_POLICY_MAP = { |
| 37 |
"should_secure": "shouldSecure", |
| 38 |
"must_secure": "mustSecure", |
| 39 |
} |
| 40 |
|
| 41 |
EPG_U_SEG_ATTR_TYPE_MAP = { |
| 42 |
"ip": "ip", |
| 43 |
"mac": "mac", |
| 44 |
"dns": "dns", |
| 45 |
"vm_datacenter": "rootContName", |
| 46 |
"vm_hypervisor_identifier": "hv", |
| 47 |
"vm_operating_system": "guest-os", |
| 48 |
"vm_tag": "tag", |
| 49 |
"vm_identifier": "vm", |
| 50 |
"vmm_domain": "domain", |
| 51 |
"vm_name": "vm-name", |
| 52 |
"vnic_dn": "vnic", |
| 53 |
} |
| 54 |
|
| 55 |
EPG_U_SEG_ATTR_OPERATOR_LIST = ["equals", "contains", "starts_with", "ends_with"] |
| 56 |
|
| 57 |
AZURE_L4L7_CONNECTOR_TYPE_MAP = { |
| 58 |
"none": "none", |
| 59 |
"redirect": "redir", |
| 60 |
"source_nat": "snat", |
| 61 |
"destination_nat": "dnat", |
| 62 |
"source_and_destination_nat": "snat_dnat", |
| 63 |
} |
| 64 |
|
| 65 |
LISTENER_PROTOCOLS = ["http", "https", "tcp", "udp", "tls", "inherit"] |
| 66 |
|
| 67 |
LISTENER_SECURITY_POLICY_MAP = { |
| 68 |
"default": "default", |
| 69 |
"elb_sec_2016_18": "eLBSecurityPolicy-2016-08", |
| 70 |
"elb_sec_fs_2018_06": "eLBSecurityPolicy-FS-2018-06", |
| 71 |
"elb_sec_tls_1_2_2017_01": "eLBSecurityPolicy-TLS-1-2-2017-01", |
| 72 |
"elb_sec_tls_1_2_ext_2018_06": "eLBSecurityPolicy-TLS-1-2-Ext-2018-06", |
| 73 |
"elb_sec_tls_1_1_2017_01": "eLBSecurityPolicy-TLS-1-1-2017-01", |
| 74 |
"elb_sec_2015_05": "eLBSecurityPolicy-2015-05", |
| 75 |
"elb_sec_tls_1_0_2015_04": "eLBSecurityPolicy-TLS-1-0-2015-04", |
| 76 |
"app_gw_ssl_default": "AppGwSslPolicyDefault", |
| 77 |
"app_gw_ssl_2015_501": "AppGwSslPolicy20150501", |
| 78 |
"app_gw_ssl_2017_401": "AppGwSslPolicy20170401", |
| 79 |
"app_gw_ssl_2017_401s": "AppGwSslPolicy20170401S", |
| 80 |
} |
| 81 |
|
| 82 |
LISTENER_ACTION_TYPE_MAP = {"fixed_response": "fixedResponse", "forward": "forward", "redirect": "redirect", "ha_port": "haPort"} |
| 83 |
|
| 84 |
LISTENER_CONTENT_TYPE_MAP = {"text_plain": "textPlain", "text_css": "textCSS", "text_html": "textHtml", "app_js": "appJS", "app_json": "appJson"} |
| 85 |
|
| 86 |
LISTENER_REDIRECT_CODE_MAP = { |
| 87 |
"unknown": "unknown", |
| 88 |
"permanently_moved": "permMoved", |
| 89 |
"found": "found", |
| 90 |
"see_other": "seeOther", |
| 91 |
"temporary_redirect": "temporary", |
| 92 |
} |
| 93 |
|
| 94 |
PORT_CHANNEL_MODE_MAP = { |
| 95 |
"lacp_active": "active", |
| 96 |
"lacp_passive": "passive", |
| 97 |
"static_channel_mode_on": "off", |
| 98 |
"mac_pinning": "mac-pin", |
| 99 |
"mac_pinning_physical_nic_load": "mac-pin-nicload", |
| 100 |
"use_explicit_failover_order": "explicit-failover", |
| 101 |
} |
| 102 |
|
| 103 |
CONTROL_MAP = { |
| 104 |
"fast_sel_hot_stdby": "fast-sel-hot-stdby", |
| 105 |
"graceful_conv": "graceful-conv", |
| 106 |
"susp_individual": "susp-individual", |
| 107 |
"load_defer": "load-defer", |
| 108 |
"symmetric_hash": "symmetric-hash", |
| 109 |
} |
| 110 |
|
| 111 |
LINK_LEVEL_FEC_MAP = { |
| 112 |
"inherit": "inherit", |
| 113 |
"cl74_fc_fec": "cl74-fc-fec", |
| 114 |
"cl91_rs_fec": "cl91-rs-fec", |
| 115 |
"cons16_rs_fec": "cons16-rs-fec", |
| 116 |
"ieee_rs_fec": "ieee-rs-fec", |
| 117 |
"kp_fec": "kp-fec", |
| 118 |
"disable_fec": "disable-fec", |
| 119 |
} |
| 120 |
|
| 121 |
L2_INTERFACE_QINQ_MAP = { |
| 122 |
"double_q_tag_port": "doubleQtagPort", |
| 123 |
"core_port": "corePort", |
| 124 |
"edge_port": "edgePort", |
| 125 |
"disabled": "disabled", |
| 126 |
} |
| 127 |
|
| 128 |
LOAD_BALANCE_HASHING_MAP = { |
| 129 |
"destination_ip": "dst-ip", |
| 130 |
"layer_4_destination_ip": "l4-dst-port", |
| 131 |
"layer_4_source_ip": "l4-src-port", |
| 132 |
"source_ip": "src-ip", |
| 133 |
} |
| 134 |
|
| 135 |
TEMPLATE_TYPES = { |
| 136 |
"tenant": { |
| 137 |
"template_type": "tenantPolicy", # templateType in payload |
| 138 |
"template_type_container": "tenantPolicyTemplate", # templateType container in payload |
| 139 |
"tenant": True, # tenant required |
| 140 |
"site_amount": 2, # 1 = 1 site, 2 = multiple sites |
| 141 |
"template_container": True, # configuration is set in template container in payload |
| 142 |
}, |
| 143 |
"l3out": { |
| 144 |
"template_type": "l3out", |
| 145 |
"template_type_container": "l3outTemplate", |
| 146 |
"tenant": True, |
| 147 |
"site_amount": 1, |
| 148 |
"template_container": False, |
| 149 |
}, |
| 150 |
"fabric_policy": { |
| 151 |
"template_type": "fabricPolicy", |
| 152 |
"template_type_container": "fabricPolicyTemplate", |
| 153 |
"tenant": False, |
| 154 |
"site_amount": 2, |
| 155 |
"template_container": True, |
| 156 |
}, |
| 157 |
"fabric_resource": { |
| 158 |
"template_type": "fabricResource", |
| 159 |
"template_type_container": "fabricResourceTemplate", |
| 160 |
"tenant": False, |
| 161 |
"site_amount": 2, |
| 162 |
"template_container": True, |
| 163 |
}, |
| 164 |
"monitoring_tenant": { |
| 165 |
"template_type": "monitoring", |
| 166 |
"template_type_container": "monitoringTemplate", |
| 167 |
"tenant": True, |
| 168 |
"site_amount": 1, |
| 169 |
"template_container": True, |
| 170 |
}, |
| 171 |
"monitoring_access": { |
| 172 |
"template_type": "monitoring", |
| 173 |
"template_type_container": "monitoringTemplate", |
| 174 |
"tenant": False, |
| 175 |
"site_amount": 1, |
| 176 |
"template_container": True, |
| 177 |
}, |
| 178 |
"service_device": { |
| 179 |
"template_type": "serviceDevice", |
| 180 |
"template_type_container": "deviceTemplate", |
| 181 |
"tenant": True, |
| 182 |
"site_amount": 2, |
| 183 |
"template_container": True, |
| 184 |
}, |
| 185 |
"application": { |
| 186 |
"template_type": "application", |
| 187 |
"template_type_container": "appTemplate", |
| 188 |
"tenant": True, |
| 189 |
"site_amount": 2, |
| 190 |
"template_container": True, |
| 191 |
}, |
| 192 |
} |
| 193 |
|
| 194 |
TARGET_DSCP_MAP = { |
| 195 |
"af11": "af11", |
| 196 |
"af12": "af12", |
| 197 |
"af13": "af13", |
| 198 |
"af21": "af21", |
| 199 |
"af22": "af22", |
| 200 |
"af23": "af23", |
| 201 |
"af31": "af31", |
| 202 |
"af32": "af32", |
| 203 |
"af33": "af33", |
| 204 |
"af41": "af41", |
| 205 |
"af42": "af42", |
| 206 |
"af43": "af43", |
| 207 |
"cs0": "cs0", |
| 208 |
"cs1": "cs1", |
| 209 |
"cs2": "cs2", |
| 210 |
"cs3": "cs3", |
| 211 |
"cs4": "cs4", |
| 212 |
"cs5": "cs5", |
| 213 |
"cs6": "cs6", |
| 214 |
"cs7": "cs7", |
| 215 |
"expedited_forwarding": "expeditedForwarding", |
| 216 |
"voice_admit": "voiceAdmit", |
| 217 |
"unspecified": "unspecified", |
| 218 |
} |
| 219 |
|
| 220 |
ORIGINATE_DEFAULT_ROUTE = {"only": "only", "in_addition": "inAddition", "": ""} |
| 221 |
L3OUT_ROUTING_PROTOCOLS = {"bgp": ["bgp"], "ospf": ["ospf"], "bgpOspf": ["bgp", "ospf"], None: [None], "": None, "bgpospf": "bgpOspf", "ospfbgp": "bgpOspf"} |
| 222 |
|
| 223 |
QOS_LEVEL = ["unspecified", "level1", "level2", "level3", "level4", "level5", "level6"] |
| 224 |
SYNC_E_QUALITY_LEVEL_OPTION = {"option_1": "op1", "option_2_generation_1": "op2g1", "option_2_generation_2": "op2g2"} |
| 225 |
PROFILE_TEMPLATE = {"aes67_2015": "aes67", "default": "default", "smpte_2059_2": "smpte", "telecom_8275_1": "telecomFullPath"} |
| 226 |
|
| 227 |
TARGET_COS_MAP = { |
| 228 |
"background": "cos0", |
| 229 |
"best_effort": "cos1", |
| 230 |
"excellent_effort": "cos2", |
| 231 |
"critical_applications": "cos3", |
| 232 |
"video": "cos4", |
| 233 |
"voice": "cos5", |
| 234 |
"internetwork_control": "cos6", |
| 235 |
"network_control": "cos7", |
| 236 |
"unspecified": "cos8", |
| 237 |
} |
| 238 |
|
| 239 |
DSCP_COS_KEY_MAP = { |
| 240 |
"dscp_from": "dscpFrom", |
| 241 |
"dscp_to": "dscpTo", |
| 242 |
"dot1p_from": "dot1pFrom", |
| 243 |
"dot1p_to": "dot1pTo", |
| 244 |
"dscp_target": "dscpTarget", |
| 245 |
"target_cos": "targetCos", |
| 246 |
"qos_priority": "priority", |
| 247 |
} |
| 248 |
|
| 249 |
LOCAL_ASN_CONFIG = {"none": "none", "no_prepend": "no-prepend", "dual_as": "dual-as", "replace_as": "replace-as"} |
| 250 |
|
| 251 |
QOS_CONGESTION_ALGORITHM_MAP = {"tail_drop": "tailDrop", "wred": "wred"} |
| 252 |
QOS_SCHEDULING_ALGORITHM_MAP = {"strict_priority": "strictPriority", "weighted_round_robin": "wrr"} |
| 253 |
QOS_PFC_SCOPE_MAP = {"fabric_wide": "fabricWide", "intra_tor": "intraTor"} |
| 254 |
COS_VALUES = ["cos0", "cos1", "cos2", "cos3", "cos4", "cos5", "cos6", "cos7", "unspecified"] |
| 255 |
|
| 256 |
PORT_MAPPING = { |
| 257 |
"dns": "53", |
| 258 |
"ftp_data": "20", |
| 259 |
"http": "80", |
| 260 |
"https": "443", |
| 261 |
"pop3": "110", |
| 262 |
"rtsp": "554", |
| 263 |
"smtp": "25", |
| 264 |
"ssh": "22", |
| 265 |
"unspecified": "0", |
| 266 |
} |
| 267 |
|
| 268 |
IP_PROTOCOL_MAPPING = { |
| 269 |
"unspecified": "0", |
| 270 |
"egp": "8", |
| 271 |
"eigrp": "88", |
| 272 |
"icmp": "1", |
| 273 |
"icmpv6": "58", |
| 274 |
"igmp": "2", |
| 275 |
"igp": "9", |
| 276 |
"l2tp": "115", |
| 277 |
"ospfigp": "89", |
| 278 |
"pim": "103", |
| 279 |
"tcp": "6", |
| 280 |
"udp": "17", |
| 281 |
} |
| 282 |
|
| 283 |
CONTRACT_SERVICE_CHAIN_NODE_FILTER_MAP = {"allow_all": "allow-all", "filters_from_contract": "filters-from-contract"} |
| 284 |
|
| 285 |
PTP_MODES = {"multicast_dynamic": "multicast", "multicast_master": "multicastMaster", "unicast_master": "unicastMaster"} |
| 286 |
|
| 287 |
DOMAIN_TYPE_MAP = {"vmm": "vmmDomain", "physical": "physicalDomain"} |
| 288 |
|
| 289 |
VM_DOMAIN_PROVIDER_MAP = { |
| 290 |
"cloudfoundry": "CloudFoundry", |
| 291 |
"kubernetes": "Kubernetes", |
| 292 |
"microsoft": "Microsoft", |
| 293 |
"openshift": "OpenShift", |
| 294 |
"openstack": "OpenStack", |
| 295 |
"redhat": "Redhat", |
| 296 |
"vmware": "VMware", |
| 297 |
"nutanix": "Nutanix", |
| 298 |
} |
| 299 |
|
| 300 |
MATCH_COMMUNITY_SCOPE_MAP = {"transitive": "transitive", "non_transitive": "non-transitive"} |
| 301 |
|
| 302 |
ROUTE_MAP_METRIC_TYPE_MAP = { |
| 303 |
"type1": "ospf-type1", |
| 304 |
"ospf_type1": "ospf-type1", |
| 305 |
"type2": "ospf-type2", |
| 306 |
"ospf_type2": "ospf-type2", |
| 307 |
"": "", |
| 308 |
} |
| 309 |
|
| 310 |
ROUTE_MAP_POLICY_MATCH_TYPE = {"prefix_and_routing_policy": "combinable", "routing_policy_only": "global"} |
| 311 |
|
| 312 |
MATCH_PARAMETER_MAP = { |
| 313 |
"destination_ip": "dstIP", |
| 314 |
"destination_ipv4": "dstIPv4", |
| 315 |
"destination_ipv6": "dstIPv6", |
| 316 |
"destination_mac": "dstMac", |
| 317 |
"destination_port": "dstPort", |
| 318 |
"ethertype": "ethertype", |
| 319 |
"ip_protocol": "proto", |
| 320 |
"source_ip": "srcIP", |
| 321 |
"source_ipv4": "srcIPv4", |
| 322 |
"source_ipv6": "srcIPv6", |
| 323 |
"source_mac": "srcMac", |
| 324 |
"source_port": "srcPort", |
| 325 |
} |