Method: Cisco::RouteMap#match_tag=

Defined in:
lib/cisco_node_utils/route_map.rb

#match_tag=(list) ⇒ Object



285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
# File 'lib/cisco_node_utils/route_map.rb', line 285

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