RouteMap Class
Use this class to create and configure route-map entries.
Arguments:
- name: The name of the route-map, a string.
- sequence: The sequence number of the RouteMap, an integer.
- type: The type of routemap, can be either 'permit' or 'deny'.
Returns: RouteMap object on success
create
Creates the routemap entry associated with this RouteMap object.
Arguments: None
Returns: True on success
delete
Deletes the routemap entry associated with this RouteMap object.
Arguments: None
Returns: True on success
add_description
Adds a description to the routemap.
Arguments:
- description: A string of up to 90 characters describing this RouteMap object.
Optional Arguments:
- no: A boolean, set to true to remove any existing description.
Returns: True on success
match_as_number
Matches BGP Peer AS number.
Arguments:
- as_number: A string representing the Autonomous System (AS) number in the following format: ’<1-65535>[.<0-65535>]’
Optional Arguments:
- no: A boolean, set to True to remove a BGP peer from the match list
Returns: True on success
match_as_path
Matches AS path access list(s).
Arguments:
- lists: A string containing a space separated list of Autonomous System (AS) path list names.
Optional Arguments:
- no: A boolean, set to True to remove an AS path list from the match list
Returns: True on success
match_as_path_list
Matches AS path access list(s).
Arguments:
- lists: A string containing a space separated list of AS path list names.
Optional Arguments:
- no: A boolean, set to True to remove an AS path list from the match list
Returns: True on success
Matches BGP community list(s).
Arguments:
- lists: A string containing a space separated list of community list names
Optional args:
- exact_match: A boolean, set to True to do exact matching of communities
- no: A boolean, set to True to remove a community list from the match list
Returns: True on success
Matches BGP Extended community list(s).
Arguments:
- lists: A string containing a space separated list of Extended community list names
Optional args:
- exact_match: A boolean, set to True to do exact matching of communities
- no: A boolean, set to True to remove a community list from the match list
Returns: True on success
match_interface
Matches first hop interface of route.
Arguments:
- interface: A string representing an interface on the switch. Can be Ethernet, loopback, mgmt, port-channel or a VLAN in either expanded or short forms, such as 'e1/1.2', 'Ethernet1/1.2'
Optional args:
- no: A boolean, set to True to remove an interface from the match list
Returns: True on success
match_ip_access_list
Matches IP access list(s).
Arguments:
- list: An IP access list name.
Optional args:
- no: A boolean, set to True to remove an IP access list from the match list.
Returns: True on success
match_ip_prefix_list
Matches IP prefix list(s).
Arguments:
- lists: A string containing a space separated list of IP prefix list names.
Optional Arguments:
- no: A boolean, set to True to remove an IP prefix list from the match list.
Returns: True on success
match_ipv6_access_list
Matches IPv6 access list(s).
Arguments:
- list: A IPv6 access list name.
Optional args:
- no: A boolean, set to True to remove an IPv6 access list from the match list.
Returns: True on success
match_ipv6_prefix_list
Matches IPv6 prefix list(s).
Arguments:
- lists: A string containing a space separated list of IPv6 prefix list names.
Optional Arguments:
- no: A boolean, set to True to remove an IPv6 prefix list from the match list.
Returns: True on success
match_mac_list
Matches mac-list(s).
Arguments:
- lists: A string containing a space separated list of mac-list names.
Optional Arguments:
- no: A boolean, set to True to remove a mac-list from the match list.
Returns: True on success
match_packet_length
Matches a range of packet lengths.
Arguments:
- min: An integer ranging from 0 to 2147483647.
- max: An integer ranging from 0 to 2147483647.
Optional Arguments:
- no: A boolean, set to True to remove packet length matching.
Returns: True on success
match_route_type
Matches route-type of route.
Optional Arguments:
- external: Boolean, set to True to match external routes (BGP, EIGRP and OSPF type 1 or 2)
- internal: Boolean, set to True to match internal routes (including OSPF intra/inter area)
- level_1: Boolean, set to True to match IS-IS level-1 routes
- level_2: Boolean, set to True to match IS_IS level-2 routes
- local: Boolean, set to True to match locally generated routes
- nssa_external: Boolean, set to True to match Nssa-external routes (OSPF type 1 or 2)
- type_1: Boolean, set to True to match OSPF external type 1 routes
- type_2: Boolean, set to True to match OSPF external type 2 routes
- intra_area: Boolean, set to True to match OSPF intra area route
- inter_area: Boolean, set to True to match OSPF inter area route
- no: Boolean, set to True to stop matching the route-type of any other parameter that was sent in
Returns: True on success
match_source_protocol
Matches source protocol.
Arguments:
- lists: A string containing a space separated list of protocol instance names.
Optional Arguments:
- no: A boolean, set to True to remove a source protocol from the match list.
Returns: True on success.
match_tag
Matches tag of route.
Arguments:
- lists: A string containing a space separated list of tags where each tag is <0-4294967295>.
Optional args:
- no: A boolean, set to True to remove a tag from the match list.
Returns: True on success.
match_vlan
Matches VLAN ID(s).
Arguments:
- lists: A string containing a comma separated list of VLANs and/or VLAN ranges where each VLAN can range from <1-3967, 4048-4093>. e.g. 1-5, 10 or 2-5,7-19.
Optional Arguments:
- no: A boolean, set to True to remove a list of VLANs and/or VLAN ranges from the match list.
Returns: True on success.
set_as_path_prepend
Prepends string for a BGP AS-path attribute.
Arguments:
- list: A string containing a space separated list of autonomous system (AS) numbers where each AS number is in the following format: <1-4294967295>|<1-65535>[.<0-65535>]
Optional Arguments:
- no: A boolean, set to True to remove AS numbers from the prepend string.
Returns: True on success.
set_as_path_tag
Sets the tag as an AS-path attribute.
Arguments: None
Optional Arguments:
- no: A boolean, set to True to remove this configuration.
Returns: True on success.
set_comm_list_delete
Sets BGP community list (for deletion).
Arguments:
- list: A string up to 63 characters representing a community list name.
Optional Arguments:
- no: A boolean, set to True to remove this configuration.
Returns: True on success.
set_extcomm_list_delete
Sets BGP External community list (for deletion).
Arguments:
- list: A string up to 63 characters representing a external community list name.
Optional Arguments:
- no: A boolean, set to True to remove this configuration.
Returns: True on success.
set_forwarding_address
Sets the forwarding address.
Arguments: None
Optional Arguments:
- no: A boolean, set to True to remove this configuration.
Returns: True on success.
set_vrf
Sets the VRF for next-hop resolution.
Arguments:
- vrf: A string representing an existing VRF on the switch.
Optional Arguments:
- no: A boolean, set to True to remove a VRF from next-hop resolution.
Returns: True on success.
set_weight
Sets BGP weight for routing table. Routes with a higher weight value have preference when multiple routes to the same destination exist.
Arguments:
- weight: An integer ranging from 1 to 65535
Optional Arguments:
- no: A boolean, set to True to remove this configuration
Returns: True on success.