| 1 |
VALID_IP_PROTOCOLS = ["eigrp", "egp", "icmp", "icmpv6", "igmp", "igp", "l2tp", "ospfigp", "pim", "tcp", "udp", "unspecified"] |
| 2 |
|
| 3 |
FILTER_PORT_MAPPING = {"443": "https", "25": "smtp", "80": "http", "53": "dns", "110": "pop3", "554": "rtsp", "20": "ftpData", "ftp": "ftpData"} |
| 4 |
|
| 5 |
VALID_ETHER_TYPES = ["arp", "fcoe", "ip", "ipv4", "ipv6", "mac_security", "mpls_ucast", "trill", "unspecified"] |
| 6 |
|
| 7 |
VALID_QOS_CLASSES = ["unspecified", "level1", "level2", "level3", "level4", "level5", "level6"] |
| 8 |
|
| 9 |
# mapping dicts are used to normalize the proposed data to what the APIC expects, which will keep diffs accurate |
| 10 |
ARP_FLAG_MAPPING = dict(arp_reply="reply", arp_request="req", unspecified="unspecified") |
| 11 |
|
| 12 |
# ICMPv4 Types Mapping |
| 13 |
ICMP4_MAPPING = dict( |
| 14 |
dst_unreachable="dst-unreach", echo="echo", echo_reply="echo-rep", src_quench="src-quench", time_exceeded="time-exceeded", unspecified="unspecified" |
| 15 |
) |
| 16 |
|
| 17 |
# ICMPv6 Types Mapping |
| 18 |
ICMP6_MAPPING = dict( |
| 19 |
dst_unreachable="dst-unreach", |
| 20 |
echo_request="echo-req", |
| 21 |
echo_reply="echo-rep", |
| 22 |
neighbor_advertisement="nbr-advert", |
| 23 |
neighbor_solicitation="nbr-solicit", |
| 24 |
redirect="redirect", |
| 25 |
time_exceeded="time-exceeded", |
| 26 |
unspecified="unspecified", |
| 27 |
) |
| 28 |
|
| 29 |
TCP_FLAGS = dict(acknowledgment="ack", established="est", finish="fin", reset="rst", synchronize="syn", unspecified="unspecified") |
| 30 |
|
| 31 |
SUBNET_CONTROL_MAPPING = {"nd_ra_prefix": "nd", "no_default_gateway": "no-default-gateway", "querier_ip": "querier", "unspecified": ""} |
| 32 |
SUBNET_CONTROL_MAPPING_BD_SUBNET = {"nd_ra": "nd", "no_gw": "no-default-gateway", "querier_ip": "querier", "unspecified": ""} |
| 33 |
|
| 34 |
NODE_TYPE_MAPPING = {"tier_2": "tier-2-leaf", "remote": "remote-leaf-wan", "virtual": "virtual", "unspecified": "unspecified"} |
| 35 |
|
| 36 |
SPAN_DIRECTION_MAP = {"incoming": "in", "outgoing": "out", "both": "both"} |
| 37 |
|
| 38 |
MATCH_TYPE_MAPPING = {"all": "All", "at_least_one": "AtleastOne", "at_most_one": "AtmostOne", "none": "None"} |
| 39 |
|
| 40 |
IPV4_REGEX = r"^((25[0-5]|(2[0-4]|1\d|[1-9]|)\d)\.?\b){4}$" |
| 41 |
|
| 42 |
VM_PROVIDER_MAPPING = dict( |
| 43 |
cloudfoundry="CloudFoundry", |
| 44 |
kubernetes="Kubernetes", |
| 45 |
microsoft="Microsoft", |
| 46 |
openshift="OpenShift", |
| 47 |
openstack="OpenStack", |
| 48 |
redhat="Redhat", |
| 49 |
vmware="VMware", |
| 50 |
nutanix="Nutanix", |
| 51 |
) |
| 52 |
|
| 53 |
SYSLOG_FORMATS = {"enhanced_log": "rfc5424-ts", "nxos": "nxos", "aci": "aci", "rfc5424_ts": "rfc5424-ts"} |
| 54 |
|
| 55 |
VM_SCOPE_MAPPING = dict( |
| 56 |
cloudfoundry="cloudfoundry", |
| 57 |
kubernetes="kubernetes", |
| 58 |
microsoft="MicrosoftSCVMM", |
| 59 |
openshift="openshift", |
| 60 |
openstack="openstack", |
| 61 |
redhat="rhev", |
| 62 |
vmware="vm", |
| 63 |
nutanix="nutanix", |
| 64 |
) |
| 65 |
|
| 66 |
MATCH_TYPE_GROUP_MAPPING = {"all": "ALL", "all_in_pod": "ALL_IN_POD", "range": "range"} |
| 67 |
|
| 68 |
MATCH_FC_FILL_PATTERN_MAPPING = {"arbff": "ARBFF", "idle": "IDLE"} |
| 69 |
|
| 70 |
MATCH_FIRMWARE_NODES_TYPE_MAPPING = { |
| 71 |
"c_apic_patch": "cApicPatch", |
| 72 |
"catalog": "catalog", |
| 73 |
"config": "config", |
| 74 |
"controller": "controller", |
| 75 |
"controller_patch": "controllerPatch", |
| 76 |
"plugin": "plugin", |
| 77 |
"plugin_package": "pluginPackage", |
| 78 |
"switch": "switch", |
| 79 |
"switch_patch": "switchPatch", |
| 80 |
"vpod": "vpod", |
| 81 |
} |
| 82 |
|
| 83 |
MATCH_TRIGGER_MAPPING = { |
| 84 |
"trigger": "trigger", |
| 85 |
"trigger_immediate": "trigger-immediate", |
| 86 |
"triggered": "triggered", |
| 87 |
"untriggered": "untriggered", |
| 88 |
} |
| 89 |
|
| 90 |
INTERFACE_POLICY_FC_SPEED_LIST = ["auto", "unknown", "2G", "4G", "8G", "16G", "32G"] |
| 91 |
|
| 92 |
MATCH_RUN_MODE_MAPPING = dict( |
| 93 |
pause_always_between_sets="pauseAlwaysBetweenSets", |
| 94 |
pause_only_on_failures="pauseOnlyOnFailures", |
| 95 |
pause_never="pauseNever", |
| 96 |
) |
| 97 |
|
| 98 |
MATCH_NOTIFY_CONDITION_MAPPING = dict( |
| 99 |
notify_always_between_sets="notifyAlwaysBetweenSets", |
| 100 |
notify_never="notifyNever", |
| 101 |
notify_only_on_failures="notifyOnlyOnFailures", |
| 102 |
) |
| 103 |
|
| 104 |
MATCH_SMU_OPERATION_MAPPING = dict(smu_install="smuInstall", smu_uninstall="smuUninstall") |
| 105 |
|
| 106 |
MATCH_SMU_OPERATION_FLAGS_MAPPING = dict(smu_reload_immediate="smuReloadImmediate", smu_reload_skip="smuReloadSkip") |
| 107 |
|
| 108 |
MATCH_BEST_PATH_CONTROL_MAPPING = dict(enable="asPathMultipathRelax", disable="") |
| 109 |
|
| 110 |
MATCH_GRACEFUL_RESTART_CONTROLS_MAPPING = dict(helper="helper", complete="") |
| 111 |
|
| 112 |
EP_LOOP_PROTECTION_ACTION_MAPPING = {"bd": "bd-learn-disable", "port": "port-disable"} |
| 113 |
|
| 114 |
FABRIC_POD_SELECTOR_TYPE_MAPPING = dict(all="ALL", range="range") |
| 115 |
|
| 116 |
OPFLEX_TLS_MAPPING = {"tls_v1.0": "TLSv1", "tls_v1.1": "TLSv1.1", "tls_v1.2": "TLSv1.2"} |
| 117 |
|
| 118 |
HTTP_TLS_MAPPING = {"tls_v1.0": "TLSv1", "tls_v1.1": "TLSv1.1", "tls_v1.2": "TLSv1.2", "tls_v1.3": "TLSv1.3"} |
| 119 |
|
| 120 |
ACI_ACCESS_SWITCH_POLICY_GROUP_CLASS_MAPPING = dict( |
| 121 |
spine=dict( |
| 122 |
class_name="infraSpineAccNodePGrp", |
| 123 |
rn="infra/funcprof/spaccnodepgrp-{0}", |
| 124 |
copp_pre_filter_policy=dict(class_name="infraRsIaclSpineProfile", tn_name="tnIaclSpineProfileName"), |
| 125 |
bfd_ipv4_policy=dict(class_name="infraRsSpineBfdIpv4InstPol", tn_name="tnBfdIpv4InstPolName"), |
| 126 |
bfd_ipv6_policy=dict(class_name="infraRsSpineBfdIpv6InstPol", tn_name="tnBfdIpv6InstPolName"), |
| 127 |
copp_policy=dict(class_name="infraRsSpineCoppProfile", tn_name="tnCoppSpineProfileName"), |
| 128 |
cdp_policy=dict(class_name="infraRsSpinePGrpToCdpIfPol", tn_name="tnCdpIfPolName"), |
| 129 |
lldp_policy=dict(class_name="infraRsSpinePGrpToLldpIfPol", tn_name="tnLldpIfPolName"), |
| 130 |
usb_configuration_policy=dict(class_name="infraRsSpineTopoctrlUsbConfigProfilePol", tn_name="tnTopoctrlUsbConfigProfilePolName"), |
| 131 |
), |
| 132 |
leaf=dict( |
| 133 |
class_name="infraAccNodePGrp", |
| 134 |
rn="infra/funcprof/accnodepgrp-{0}", |
| 135 |
copp_pre_filter_policy=dict(class_name="infraRsIaclLeafProfile", tn_name="tnIaclLeafProfileName"), |
| 136 |
bfd_ipv4_policy=dict(class_name="infraRsBfdIpv4InstPol", tn_name="tnBfdIpv4InstPolName"), |
| 137 |
bfd_ipv6_policy=dict(class_name="infraRsBfdIpv6InstPol", tn_name="tnBfdIpv6InstPolName"), |
| 138 |
copp_policy=dict(class_name="infraRsLeafCoppProfile", tn_name="tnCoppLeafProfileName"), |
| 139 |
cdp_policy=dict(class_name="infraRsLeafPGrpToCdpIfPol", tn_name="tnCdpIfPolName"), |
| 140 |
lldp_policy=dict(class_name="infraRsLeafPGrpToLldpIfPol", tn_name="tnLldpIfPolName"), |
| 141 |
usb_configuration_policy=dict(class_name="infraRsLeafTopoctrlUsbConfigProfilePol", tn_name="tnTopoctrlUsbConfigProfilePolName"), |
| 142 |
), |
| 143 |
) |
| 144 |
|
| 145 |
PIM_SETTING_CONTROL_STATE_MAPPING = {"fast": "fast-conv", "strict": "strict-rfc-compliant"} |
| 146 |
|
| 147 |
ACI_CLASS_MAPPING = dict( |
| 148 |
consumer={ |
| 149 |
"class": "fvRsCons", |
| 150 |
"rn": "rscons-", |
| 151 |
"name": "tnVzBrCPName", |
| 152 |
}, |
| 153 |
provider={ |
| 154 |
"class": "fvRsProv", |
| 155 |
"rn": "rsprov-", |
| 156 |
"name": "tnVzBrCPName", |
| 157 |
}, |
| 158 |
oob_provider={ |
| 159 |
"class": "mgmtRsOoBProv", |
| 160 |
"rn": "rsooBProv-", |
| 161 |
"name": "tnVzOOBBrCPName", |
| 162 |
}, |
| 163 |
taboo={ |
| 164 |
"class": "fvRsProtBy", |
| 165 |
"rn": "rsprotBy-", |
| 166 |
"name": "tnVzTabooName", |
| 167 |
}, |
| 168 |
interface={ |
| 169 |
"class": "fvRsConsIf", |
| 170 |
"rn": "rsconsIf-", |
| 171 |
"name": "tnVzCPIfName", |
| 172 |
}, |
| 173 |
intra_epg={ |
| 174 |
"class": "fvRsIntraEpg", |
| 175 |
"rn": "rsintraEpg-", |
| 176 |
"name": "tnVzBrCPName", |
| 177 |
}, |
| 178 |
intra_esg={ |
| 179 |
"class": "fvRsIntraEpg", |
| 180 |
"rn": "rsintraEpg-", |
| 181 |
"name": "tnVzBrCPName", |
| 182 |
}, |
| 183 |
) |
| 184 |
|
| 185 |
PROVIDER_MATCH_MAPPING = dict( |
| 186 |
all="All", |
| 187 |
at_least_one="AtleastOne", |
| 188 |
at_most_one="AtmostOne", |
| 189 |
none="None", |
| 190 |
) |
| 191 |
|
| 192 |
CONTRACT_LABEL_MAPPING = dict( |
| 193 |
consumer="vzConsLbl", |
| 194 |
provider="vzProvLbl", |
| 195 |
) |
| 196 |
|
| 197 |
SUBJ_LABEL_MAPPING = dict( |
| 198 |
consumer="vzConsSubjLbl", |
| 199 |
provider="vzProvSubjLbl", |
| 200 |
) |
| 201 |
|
| 202 |
SUBJ_LABEL_RN = dict( |
| 203 |
consumer="conssubjlbl-", |
| 204 |
provider="provsubjlbl-", |
| 205 |
) |
| 206 |
|
| 207 |
MATCH_ACTION_RULE_SET_METRIC_TYPE_MAPPING = {"ospf_type_1": "ospf-type1", "ospf_type_2": "ospf-type2", "": ""} |
| 208 |
|
| 209 |
MATCH_EIGRP_INTERFACE_POLICY_DELAY_UNIT_MAPPING = dict(picoseconds="pico", tens_of_microseconds="tens-of-micro") |
| 210 |
|
| 211 |
MATCH_EIGRP_INTERFACE_POLICY_CONTROL_STATE_MAPPING = dict(bfd="bfd", nexthop_self="nh-self", passive="passive", split_horizon="split-horizon") |
| 212 |
|
| 213 |
MATCH_TARGET_COS_MAPPING = { |
| 214 |
"background": "0", |
| 215 |
"best_effort": "1", |
| 216 |
"excellent_effort": "2", |
| 217 |
"critical_applications": "3", |
| 218 |
"video": "4", |
| 219 |
"voice": "5", |
| 220 |
"internetwork_control": "6", |
| 221 |
"network_control": "7", |
| 222 |
"unspecified": "unspecified", |
| 223 |
} |
| 224 |
|
| 225 |
MATCH_PIM_INTERFACE_POLICY_CONTROL_STATE_MAPPING = dict(multicast_domain_boundary="border", strict_rfc_compliant="strict-rfc-compliant", passive="passive") |
| 226 |
|
| 227 |
MATCH_PIM_INTERFACE_POLICY_AUTHENTICATION_TYPE_MAPPING = dict(none="none", md5_hmac="ah-md5") |
| 228 |
|
| 229 |
MATCH_COLLECT_NETFLOW_RECORD_MAPPING = dict( |
| 230 |
bytes_counter="count-bytes", |
| 231 |
pkts_counter="count-pkts", |
| 232 |
pkt_disposition="pkt-disp", |
| 233 |
sampler_id="sampler-id", |
| 234 |
source_interface="src-intf", |
| 235 |
tcp_flags="tcp-flags", |
| 236 |
first_pkt_timestamp="ts-first", |
| 237 |
recent_pkt_timestamp="ts-recent", |
| 238 |
) |
| 239 |
|
| 240 |
MATCH_MATCH_NETFLOW_RECORD_MAPPING = dict( |
| 241 |
destination_ipv4_v6="dst-ip", |
| 242 |
destination_ipv4="dst-ipv4", |
| 243 |
destination_ipv6="dst-ipv6", |
| 244 |
destination_mac="dst-mac", |
| 245 |
destination_port="dst-port", |
| 246 |
ethertype="ethertype", |
| 247 |
ip_protocol="proto", |
| 248 |
source_ipv4_v6="src-ip", |
| 249 |
source_ipv4="src-ipv4", |
| 250 |
source_ipv6="src-ipv6", |
| 251 |
source_mac="src-mac", |
| 252 |
source_port="src-port", |
| 253 |
ip_tos="tos", |
| 254 |
unspecified="unspecified", |
| 255 |
vlan="vlan", |
| 256 |
) |
| 257 |
|
| 258 |
MATCH_SOURCE_IP_TYPE_NETFLOW_EXPORTER_MAPPING = dict( |
| 259 |
custom_source_ip="custom-src-ip", |
| 260 |
inband_management_ip="inband-mgmt-ip", |
| 261 |
out_of_band_management_ip="oob-mgmt-ip", |
| 262 |
ptep="ptep", |
| 263 |
) |
| 264 |
|
| 265 |
ECC_CURVE = {"P256": "prime256v1", "P384": "secp384r1", "P521": "secp521r1", "none": "none"} |
| 266 |
|
| 267 |
THROTTLE_UNIT = dict(requests_per_second="r/s", requests_per_minute="r/m") |
| 268 |
|
| 269 |
SSH_CIPHERS = dict( |
| 270 |
aes128_ctr="aes128-ctr", |
| 271 |
aes192_ctr="aes192-ctr", |
| 272 |
aes256_ctr="aes256-ctr", |
| 273 |
aes128_gcm="[email protected]", |
| 274 |
aes256_gcm="[email protected]", |
| 275 |
chacha20="[email protected]", |
| 276 |
) |
| 277 |
|
| 278 |
SSH_MACS = dict( |
| 279 |
sha1="hmac-sha1", |
| 280 |
sha2_256="hmac-sha2-256", |
| 281 |
sha2_512="hmac-sha2-512", |
| 282 |
sha2_256_etm="[email protected]", |
| 283 |
sha2_512_etm="[email protected]", |
| 284 |
) |
| 285 |
|
| 286 |
KEX_ALGORITHMS = dict( |
| 287 |
dh_sha1="diffie-hellman-group14-sha1", |
| 288 |
dh_sha256="diffie-hellman-group14-sha256", |
| 289 |
dh_sha512="diffie-hellman-group16-sha512", |
| 290 |
curve_sha256="curve25519-sha256", |
| 291 |
curve_sha256_libssh="[email protected]", |
| 292 |
ecdh_256="ecdh-sha2-nistp256", |
| 293 |
ecdh_384="ecdh-sha2-nistp384", |
| 294 |
ecdh_521="ecdh-sha2-nistp521", |
| 295 |
) |
| 296 |
|
| 297 |
USEG_ATTRIBUTE_MAPPING = dict( |
| 298 |
ip=dict(attribute_type="ip", attribute_class="fvIpAttr", rn_format="ipattr-{0}"), |
| 299 |
mac=dict(attribute_type="mac", attribute_class="fvMacAttr", rn_format="macattr-{0}"), |
| 300 |
dns=dict(attribute_type="dns", attribute_class="fvDnsAttr", rn_format="dnsattr-{0}"), |
| 301 |
ad_group=dict(attribute_type="ad", attribute_class="fvIdGroupAttr", rn_format="idgattr-[{0}]"), |
| 302 |
vm_custom_attr=dict(attribute_type="custom-label", attribute_class="fvVmAttr", rn_format="vmattr-{0}"), |
| 303 |
vm_vmm_domain=dict(attribute_type="domain", attribute_class="fvVmAttr", rn_format="vmattr-{0}"), |
| 304 |
vm_operating_system=dict(attribute_type="guest-os", attribute_class="fvVmAttr", rn_format="vmattr-{0}"), |
| 305 |
vm_hypervisor_id=dict(attribute_type="hv", attribute_class="fvVmAttr", rn_format="vmattr-{0}"), |
| 306 |
vm_datacenter=dict(attribute_type="rootContName", attribute_class="fvVmAttr", rn_format="vmattr-{0}"), |
| 307 |
vm_id=dict(attribute_type="vm", attribute_class="fvVmAttr", rn_format="vmattr-{0}"), |
| 308 |
vm_name=dict(attribute_type="vm-name", attribute_class="fvVmAttr", rn_format="vmattr-{0}"), |
| 309 |
vm_folder=dict(attribute_type="vm-folder", attribute_class="fvVmAttr", rn_format="vmattr-{0}"), |
| 310 |
vm_folder_path=dict(attribute_type="vmfolder-path", attribute_class="fvVmAttr", rn_format="vmattr-{0}"), |
| 311 |
vm_vnic=dict(attribute_type="vnic", attribute_class="fvVmAttr", rn_format="vmattr-{0}"), |
| 312 |
vm_tag=dict(attribute_type="tag", attribute_class="fvVmAttr", rn_format="vmattr-{0}"), |
| 313 |
) |
| 314 |
|
| 315 |
OPERATOR_MAPPING = dict(equals="equals", contains="contains", starts_with="startsWith", ends_with="endsWith") |
| 316 |
|
| 317 |
MATCH_STORM_CONTROL_POLICY_TYPE_MAPPING = dict(all_types="Invalid", unicast_broadcast_multicast="Valid") |
| 318 |
|
| 319 |
POLICY_LABEL_COLORS = [ |
| 320 |
"alice_blue", |
| 321 |
"antique_white", |
| 322 |
"aqua", |
| 323 |
"aquamarine", |
| 324 |
"azure", |
| 325 |
"beige", |
| 326 |
"bisque", |
| 327 |
"black", |
| 328 |
"blanched_almond", |
| 329 |
"blue", |
| 330 |
"blue_violet", |
| 331 |
"brown", |
| 332 |
"burlywood", |
| 333 |
"cadet_blue", |
| 334 |
"chartreuse", |
| 335 |
"chocolate", |
| 336 |
"coral", |
| 337 |
"cornflower_blue", |
| 338 |
"cornsilk", |
| 339 |
"crimson", |
| 340 |
"cyan", |
| 341 |
"dark_blue", |
| 342 |
"dark_cyan", |
| 343 |
"dark_goldenrod", |
| 344 |
"dark_gray", |
| 345 |
"dark_green", |
| 346 |
"dark_khaki", |
| 347 |
"dark_magenta", |
| 348 |
"dark_olive_green", |
| 349 |
"dark_orange", |
| 350 |
"dark_orchid", |
| 351 |
"dark_red", |
| 352 |
"dark_salmon", |
| 353 |
"dark_sea_green", |
| 354 |
"dark_slate_blue", |
| 355 |
"dark_slate_gray", |
| 356 |
"dark_turquoise", |
| 357 |
"dark_violet", |
| 358 |
"deep_pink", |
| 359 |
"deep_sky_blue", |
| 360 |
"dim_gray", |
| 361 |
"dodger_blue", |
| 362 |
"fire_brick", |
| 363 |
"floral_white", |
| 364 |
"forest_green", |
| 365 |
"fuchsia", |
| 366 |
"gainsboro", |
| 367 |
"ghost_white", |
| 368 |
"gold", |
| 369 |
"goldenrod", |
| 370 |
"gray", |
| 371 |
"green", |
| 372 |
"green_yellow", |
| 373 |
"honeydew", |
| 374 |
"hot_pink", |
| 375 |
"indian_red", |
| 376 |
"indigo", |
| 377 |
"ivory", |
| 378 |
"khaki", |
| 379 |
"lavender", |
| 380 |
"lavender_blush", |
| 381 |
"lawn_green", |
| 382 |
"lemon_chiffon", |
| 383 |
"light_blue", |
| 384 |
"light_coral", |
| 385 |
"light_cyan", |
| 386 |
"light_goldenrod_yellow", |
| 387 |
"light_gray", |
| 388 |
"light_green", |
| 389 |
"light_pink", |
| 390 |
"light_salmon", |
| 391 |
"light_sea_green", |
| 392 |
"light_sky_blue", |
| 393 |
"light_slate_gray", |
| 394 |
"light_steel_blue", |
| 395 |
"light_yellow", |
| 396 |
"lime", |
| 397 |
"lime_green", |
| 398 |
"linen", |
| 399 |
"magenta", |
| 400 |
"maroon", |
| 401 |
"medium_aquamarine", |
| 402 |
"medium_blue", |
| 403 |
"medium_orchid", |
| 404 |
"medium_purple", |
| 405 |
"medium_sea_green", |
| 406 |
"medium_slate_blue", |
| 407 |
"medium_spring_green", |
| 408 |
"medium_turquoise", |
| 409 |
"medium_violet_red", |
| 410 |
"midnight_blue", |
| 411 |
"mint_cream", |
| 412 |
"misty_rose", |
| 413 |
"moccasin", |
| 414 |
"navajo_white", |
| 415 |
"navy", |
| 416 |
"old_lace", |
| 417 |
"olive", |
| 418 |
"olive_drab", |
| 419 |
"orange", |
| 420 |
"orange_red", |
| 421 |
"orchid", |
| 422 |
"pale_goldenrod", |
| 423 |
"pale_green", |
| 424 |
"pale_turquoise", |
| 425 |
"pale_violet_red", |
| 426 |
"papaya_whip", |
| 427 |
"peachpuff", |
| 428 |
"peru", |
| 429 |
"pink", |
| 430 |
"plum", |
| 431 |
"powder_blue", |
| 432 |
"purple", |
| 433 |
"red", |
| 434 |
"rosy_brown", |
| 435 |
"royal_blue", |
| 436 |
"saddle_brown", |
| 437 |
"salmon", |
| 438 |
"sandy_brown", |
| 439 |
"sea_green", |
| 440 |
"seashell", |
| 441 |
"sienna", |
| 442 |
"silver", |
| 443 |
"sky_blue", |
| 444 |
"slate_blue", |
| 445 |
"slate_gray", |
| 446 |
"snow", |
| 447 |
"spring_green", |
| 448 |
"steel_blue", |
| 449 |
"tan", |
| 450 |
"teal", |
| 451 |
"thistle", |
| 452 |
"tomato", |
| 453 |
"turquoise", |
| 454 |
"violet", |
| 455 |
"wheat", |
| 456 |
"white", |
| 457 |
"white_smoke", |
| 458 |
"yellow", |
| 459 |
"yellow_green", |
| 460 |
] |
| 461 |
|
| 462 |
MATCH_ACCESS_POLICIES_SELECTOR_TYPE = dict(range="range", all="ALL") |
| 463 |
|
| 464 |
MANAGEMENT_EPG_TYPE = dict(ooband="oob", inband="inb") |
| 465 |
|
| 466 |
MANAGEMENT_EPG_CLASS_MAPPING = dict(in_band={"epg_class": "mgmtInB", "epg_rn": "inb-"}, out_of_band={"epg_class": "mgmtOoB", "epg_rn": "oob-"}) |
| 467 |
|
| 468 |
NODE_TYPE_MAPPING = {"tier_2": "tier-2-leaf", "remote": "remote-leaf-wan", "virtual": "virtual", "unspecified": "unspecified"} |
| 469 |
|
| 470 |
SPAN_DIRECTION_MAP = {"incoming": "in", "outgoing": "out", "both": "both"} |
| 471 |
|
| 472 |
HTTP_VERSIONS_MAPPING = {"1.0": "HTTP10", "1.1": "HTTP11"} |
| 473 |
|
| 474 |
L4L7_FUNC_TYPES_MAPPING = {"go_to": "GoTo", "go_through": "GoThrough", "l1": "L1", "l2": "L2"} |
| 475 |
|
| 476 |
L4L7_HASH_ALGORITHMS_MAPPING = {"source_ip": "sip", "destination_ip": "dip", "ip_and_protocol": "sip-dip-prototype"} |
| 477 |
|
| 478 |
L4L7_FUNCTIONAL_TEMPLATE_TYPES_MAPPING = { |
| 479 |
"adc_one_arm": "ADC_ONE_ARM", |
| 480 |
"adc_two_arm": "ADC_TWO_ARM", |
| 481 |
"cloud_native_fw": "CLOUD_NATIVE_FW", |
| 482 |
"cloud_native_lb": "CLOUD_NATIVE_LB", |
| 483 |
"cloud_vendor_fw": "CLOUD_VENDOR_FW", |
| 484 |
"cloud_vendor_lb": "CLOUD_VENDOR_LB", |
| 485 |
"fw_routed": "FW_ROUTED", |
| 486 |
"fw_trans": "FW_TRANS", |
| 487 |
"other": "OTHER", |
| 488 |
} |
| 489 |
|
| 490 |
L4L7_UI_TEMPLATE_TYPE = { |
| 491 |
"ndo_implicit_template": "NDO_IMPLICIT_TEMPLATE", |
| 492 |
"one_node_adc_one_arm": "ONE_NODE_ADC_ONE_ARM", |
| 493 |
"one_node_adc_one_arm_l3ext": "ONE_NODE_ADC_ONE_ARM_L3EXT", |
| 494 |
"one_node_adc_two_arm": "ONE_NODE_ADC_TWO_ARM", |
| 495 |
"one_node_fw_routed": "ONE_NODE_FW_ROUTED", |
| 496 |
"one_node_fw_trans": "ONE_NODE_FW_TRANS", |
| 497 |
"two_node_fw_routed_adc_one_arm": "TWO_NODE_FW_ROUTED_ADC_ONE_ARM", |
| 498 |
"two_node_fw_routed_adc_one_arm_l3ext": "TWO_NODE_FW_ROUTED_ADC_ONE_ARM_L3EXT", |
| 499 |
"two_node_fw_routed_adc_two_arm": "TWO_NODE_FW_ROUTED_ADC_TWO_ARM", |
| 500 |
"two_node_fw_trans_adc_one_arm": "TWO_NODE_FW_TRANS_ADC_ONE_ARM", |
| 501 |
"two_node_fw_trans_adc_one_arm_l3ext": "TWO_NODE_FW_TRANS_ADC_ONE_ARM_L3EXT", |
| 502 |
"two_node_fw_trans_adc_two_arm": "TWO_NODE_FW_TRANS_ADC_TWO_ARM", |
| 503 |
"unspecified": "UNSPECIFIED", |
| 504 |
} |
| 505 |
|
| 506 |
COS_MAPPING = {"cos_0": "Cos0", "cos_1": "Cos1", "cos_2": "Cos2", "cos_3": "Cos3", "cos_4": "Cos4", "cos_5": "Cos5", "cos_6": "Cos6", "cos_7": "Cos7"} |
| 507 |
|
| 508 |
RESERVED_ANSIBLE_INVENTORY_KEYS = { |
| 509 |
"serial": "_serial", |
| 510 |
"name": "_name", |
| 511 |
} |
| 512 |
|
| 513 |
MOCKED_CONSTRUCTED_INVENTORY_ARGUMENT_SPEC = dict( |
| 514 |
plugin=dict(type="str"), |
| 515 |
use_vars_plugins=dict(type="bool"), |
| 516 |
strict=dict(type="bool"), |
| 517 |
compose=dict(type="dict"), |
| 518 |
groups=dict(type="dict"), |
| 519 |
keyed_groups=dict( |
| 520 |
type="list", |
| 521 |
elements="dict", |
| 522 |
options=dict( |
| 523 |
parent_group=dict(type="str"), |
| 524 |
prefix=dict(type="str"), |
| 525 |
separator=dict(type="str"), |
| 526 |
key=dict(type="str"), |
| 527 |
default_value=dict(type="str"), |
| 528 |
trailing_separator=dict(type="bool"), |
| 529 |
), |
| 530 |
), |
| 531 |
use_extra_vars=dict(type="bool"), |
| 532 |
leading_separator=dict(type="bool"), |
| 533 |
) |
| 534 |
|
| 535 |
SWITCH_CONFIG_FORMAT_MAP = { |
| 536 |
"fabricNodeConfig": { |
| 537 |
"rn": "fabric/nodeconfnode-{0}", |
| 538 |
"type": "fabric", |
| 539 |
"spine": "uni/fabric/funcprof/spnodepgrp-{0}", |
| 540 |
"leaf": "uni/fabric/funcprof/lenodepgrp-{0}", |
| 541 |
}, |
| 542 |
"infraNodeConfig": { |
| 543 |
"rn": "infra/nodeconfnode-{0}", |
| 544 |
"type": "access", |
| 545 |
"spine": "uni/infra/funcprof/spaccnodepgrp-{0}", |
| 546 |
"leaf": "uni/infra/funcprof/accnodepgrp-{0}", |
| 547 |
}, |
| 548 |
} |
| 549 |
|
| 550 |
CONTRACT_CLASS_MAPPING = {"standard": {"class": "vzBrCP", "rn": "brc-{0}"}, "oob": {"class": "vzOOBBrCP", "rn": "oobbrc-{0}"}} |