Method: Rbeapi::Api::Ospf#set_router_id
- Defined in:
- lib/rbeapi/api/ospf.rb
#set_router_id(pid, opts = {}) ⇒ Object
118 119 120 121 122 123 124 125 126 127 128 129 130 |
# File 'lib/rbeapi/api/ospf.rb', line 118 def set_router_id(pid, opts = {}) value = opts[:value] default = opts[:default] || false cmds = ["router ospf #{pid}"] case default when true cmds << 'default router-id' when false cmds << (value ? "router-id #{value}" : 'no router-id') end configure cmds end |