Method: Cisco::RouterOspf#destroy

Defined in:
lib/cisco_node_utils/router_ospf.rb

#destroyObject

Destroy one router ospf instance



83
84
85
86
87
88
89
90
91
92
93
94
# File 'lib/cisco_node_utils/router_ospf.rb', line 83

def destroy
  ospf_ids = @@node.config_get("ospf", "router")
  return if ospf_ids.nil?
  if ospf_ids.size == 1
    RouterOspf.enable("no")
  else
    ospf_router(name, "no")
  end
rescue Cisco::CliError => e
  # cmd will syntax reject when feature is not enabled
  raise unless e.clierror =~ /Syntax error/
end