Method: Cisco::RouteMap#match_ospf_area=

Defined in:
lib/cisco_node_utils/route_map.rb

#match_ospf_area=(list) ⇒ Object



1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
# File 'lib/cisco_node_utils/route_map.rb', line 1113

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