Method: Rbeapi::Api::Ospf#set_passive_interfaces
- Defined in:
- lib/rbeapi/api/ospf.rb
#set_passive_interfaces(pid, opts = {}) ⇒ Boolean
set_passive_interfaces sets router ospf passive interface with pid and options.
default.
299 300 301 302 303 304 305 306 307 308 309 310 311 312 |
# File 'lib/rbeapi/api/ospf.rb', line 299 def set_passive_interfaces(pid, opts = {}) values = opts[:value] current = get(pid)[:passive_interfaces] cmds = ["router ospf #{pid}"] current.each do |name| unless Array(values).include?(name) cmds << "no passive-interface #{name}" end end Array(values).each do |name| cmds << "passive-interface #{name}" end configure cmds end |