Method: Cisco::RouteMap#match_interface=

Defined in:
lib/cisco_node_utils/route_map.rb

#match_interface=(list) ⇒ Object



255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
# File 'lib/cisco_node_utils/route_map.rb', line 255

def match_interface=(list)
  carr = match_interface
  cstr = ''
  carr.each do |elem|
    cstr = cstr.concat(elem + ' ')
  end
  unless cstr.empty?
    set_args_keys(state: 'no', int: cstr)
    # reset the current config
    config_set('route_map', 'match_interface', @set_args)
  end
  nstr = ''
  list.each do |elem|
    nstr = nstr.concat(elem + ' ')
  end
  return if nstr.empty?
  set_args_keys(state: '', int: nstr)
  config_set('route_map', 'match_interface', @set_args)
end