Juniper / apstra-go-sdk

Go SDK for Apstra
Apache License 2.0
4 stars 1 forks source link

Add support for Apstra 4.2.1 #173

Open bwJuniper opened 9 months ago

bwJuniper commented 9 months ago

The URL /api/blueprints/bpid/fabric-settings is a new thing and we need to fix the anti-affinity and the fabric addressing logic to work in 4.2.1

bwJuniper commented 9 months ago

FYI for our reference:

junos_evpn_duplicate_mac_recovery_time integer minimum: 5 maximum: 360 Configures auto recovery time that the Juniper device waits before the duplicate MAC address is unsuppressed. frr_rd_vlan_offset string enum: disabled | enabled Default enabled for new blueprints. On upgrade, this value will default to disabled to prevent disruption. This knob is used to increase the 'vlan_id' component of a route distinguisher in FRR EVPN VXLAN rendering by 10,000 to avoid a race condition between the kernel instantiating kernel vteps and FRR immediately reacting to them potentially allocating a duplicate :, which is automatically assigned from an internal RD ID pool in FRR. When a virtual network's VLAN overlaps with the FRR internal RD ID, Zebra fails to install the EVPN IMET route correctly into the kernel and does not generate Type3 routes to other devices. This causes significant traffic disruption in an EVPN network. Setting this option to 'enabled' may be disruptive while the network reconverges with the new overlap-free design. This changes the RD from 192.168.1.1:100 to 192.168.1.1:10100. max_external_routes integer minimum: 0 maximum: 4294967295 default: null Maximum number of routes to accept from external routers. The default (None) will not render any maximum-route commands on BGP sessions, implying that only vendor defaults are used. An integer between 1-232-1 will set a maximum limit of routes in BGP config. The value 0 (zero) intends the device to never apply a limit to number of EVPN routes (effectively unlimited).It is suggested this value is value is effectively unlimited on evpn blueprints, to permit the high number of /32 and /128 routes to be advertised and received between VRFs in the event an external router is providing a form of route leaking functionality. esi_mac_msb integer minimum: 0 maximum: 254 This indicates the value of the most significant byte used by Apstra to generate ESI MACs in the blueprint. This has to be an even number to ensure we dont generate multicast MACs that are best avoided for this purpose. Default value is 2. Updating this value will result in regeneration of all existing ESI MACs. junos_graceful_restart string enum: disabled | enabled Enables configuring the graceful restart on Junos devices.Default is set to enabled optimise_sz_footprint string enum: disabled | enabled When enable: routing zones will not be rendered on leafs where it is not required, which results in less resource consumption. Routing zone will only be rendered for systems which have other structures configured on top of routing zone, such as virtual networks, protocol sessions, static routes, subinterfaces, etc. When disabled: routing zones are rendered on every leaf. junos_evpn_routing_instance_type string enum: default | vlan_aware Selects Junos EVPN mac-vrf rendering mode. default indicates EVPN configuration will be added to the default switch instance on junos. vlan_aware will transition junos to a single evpn mac-vrf vlan-aware instance named evpn-1, similar to Junos EVO config rendering in Apstra. evpn_generate_type5_host_routes string enum: disabled | enabled default: null Default disabled. When enabled all EVPN vteps in the fabric will redistribute ARP/IPV6 ND (when possible on NOS type) as EVPN type 5 /32 routes in the routing table. Currently, this option is only certified for Juniper JunOS. FRR (SONiC/Cumulus) does this implicitly and cannot be disabled. This setting will be ignored. On Arista and Cisco, no configuration is rendered and will result in a blueprint warning that it is not supported by Apstra. This value is disabled by default, as it generates a very large number of routes in the BGP routing table and takes large amounts of TCAM allocation space. When these /32 & /128 routes are generated, it assists in direct unicast routing to host destinations on VNIs that are not stretched to the ingress vtep, and avoids a route lookup to a subnet (eg, /24) that may be hosted on many leafs. The directed host route prevents a double lookup to one of many vteps may hosts the /24 and instead routes the destination directly to the correct vtep. max_fabric_routes integer minimum: 0 maximum: 4294967295 default: null Maximum number of routes to accept between spine and leaf, and spine and superspine in the fabric, or between leafs in L3 Collapsed blueprints. This includes the default VRF. Setting this option may be required in the event of leaking EVPN routes from a routing zone into the default routing zone (VRF) which could generate a large number of /32 and /128 routes. It is suggested that this value is effectively unlimited on all blueprints to ensure the network stability of spine-leaf bgp sessions and evpn underlay. Unlimited is also suggested for non-evpn blueprints considering the impact to traffic if spine-leaf sessions go offline. An integer between 1-232-1 will set a maximum limit of routes in BGP config. The value 0 (zero) intends the device to never apply a limit to number of fabric routes (effectively unlimited). max_mlag_routes integer minimum: 0 maximum: 4294967295 default: null Maximum number of routes to accept across MLAG peer switches. The default (None) will not render any maximum-route commands on BGP sessions, implying that only vendor defaults are used. An integer between 1-232-1 will set a maximum limit of routes in BGP config. The value 0 (zero) intends the device to never apply a limit to number of EVPN routes (effectively unlimited). Note: Device vendors typically shut down BGP sessions if maximums are exceeded on a session. For EVPN blueprints, this should be combined with max_evpn_routes to permit routes across the l3 peer link which may contain many /32 and /128 from EVPN type-2 routes that convert into BGP route advertisements. junos_ex_overlay_ecmp string enum: disabled | enabled Enables configuring the overlay_ecmp on ex devices.Default is set to enabled default_svi_l3_mtu integer minimum: 1280 maximum: 9216 default: null Default L3 MTU for SVI interfaces. junos_evpn_max_nexthop_and_interface_number string enum: disabled | enabled Enables configuring the maximum number of nexthops and interface numbers reserved for use in EVPN-VXLAN overlay network on Junos leaf devices. Default is set to enabled fabric_l3_mtu integer minimum: 1280 maximum: 9216 default: null Specifies maximal size (in bytes) of the IP packet that can be transmitted by the IP Fabric underlay without fragmentation. ipv6_enabled boolean Indicates global blueprint IPv6 support overlay_control_protocol string enum: evpn default: null Control protocol for VXLANs. If None, then no control plane is used, and head-end replication in data plane is used exclusively for MAC learning. If "evpn", then EVPN control protocol run on leafs and spines. Please refer to Apstra documentation for matrix of supported fabric control protocols vs device vendors / models. external_router_mtu integer minimum: 68 maximum: 9216 default: null Specify fabric-wide external router interface IP MTU. Larger MTU may be required to provide EVPN DCI Functionality or to support fabric wide Jumbo frame functionality. MTU of 9050 recommended for EVPN-DCI. A null (default) value implies Apstra will not render a user-overridden MTU. default_fabric_evi_route_target string default: null max_evpn_routes integer minimum: 0 maximum: 4294967295 default: null Maximum number of EVPN routes to accept on an EVPN switch. The default (None) will not render any maximum-route commands on BGP sessions, implying that only vendor defaults are used. An integer between 1-232-1 will set a maximum limit of routes in BGP config. The value 0 (zero) intends the device to never apply a limit to number of EVPN routes (effectively unlimited). Note: Device vendors typically shut down BGP sessions if maximums are exceeded on a session. anti_affinity mode string enum: disabled | enabled_strict | enabled_loose Disabled - policy is not enabled in blueprint. Enabled_loose - policy is applied, but is not allowed to override user-defined cabling. Enabled_strict - the policy completely controls the port distribution and can override user-defined assignments. algorithm string enum: heuristic The heuristic port assignment algorithm allocates interfaces in a greedy way, satisfying max_links_per_slot, max_links_per_port, max_per_system_links_per_slot and max_per_system_links_per_port constraints. It guarantees the anti-affinity constraint fulfilment, but due to heuristic nature may not find a distribution when it exists. max_links_per_slot integer minimum: 0 maximum: 255 Maximal total number of links connected to the ports / interfaces of the specific slot regardless of the system they are targeted to. max_links_per_port integer minimum: 0 maximum: 255 Maximal total number of links connected to the interfaces of the specific port regardless of the system they are targeted to. max_per_system_links_per_slot integer minimum: 0 maximum: 255 Restricts the number of links to a certain system connected to the ports / interfaces in a specific slot. max_per_system_links_per_port integer minimum: 0 maximum: 255 Restricts the number interfaces on a port used to connect to a certain system.