Method: Rbeapi::Api::Bgp#remove_network

Defined in:
lib/rbeapi/api/bgp.rb

#remove_network(prefix, masklen, route_map = nil) ⇒ Boolean

remove_network removes the instance of a BGP network on the node.

Commands

router bgp <bgp_as>
  {no} shutdown

Parameters:

  • prefix (String)

    The IPv4 prefix to configure as part of the network statement. The value must be a valid IPv4 prefix.

  • masklen (String)

    The IPv4 subnet mask length in bits. The masklen must be in the valid range of 1 to 32.

  • route_map (String) (defaults to: nil)

    The route-map name to apply to the network statement when configured.

Returns:

  • (Boolean)

    Returns true if the command complete successfully.



432
433
434
435
436
# File 'lib/rbeapi/api/bgp.rb', line 432

def remove_network(prefix, masklen, route_map = nil)
  cmd = "no network #{prefix}/#{masklen}"
  cmd << " route-map #{route_map}" if route_map
  configure_bgp(cmd)
end