878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
|
# File 'lib/cisco_node_utils/route_map.rb', line 878
def match_metric=(list)
clist = match_metric
unless clist.empty?
str = ''
clist.each do |metric, deviation|
str.concat(metric + ' ')
str.concat('+ ' + deviation + ' ') unless deviation == '0'
end
set_args_keys(state: 'no', metric: str)
config_set('route_map', 'match_metric', @set_args)
end
return if list.empty?
str = ''
list.each do |metric, deviation|
str.concat(metric + ' ')
str.concat('+ ' + deviation + ' ') unless deviation == '0'
end
set_args_keys(state: '', metric: str)
config_set('route_map', 'match_metric', @set_args)
end
|