2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
|
# File 'lib/cisco_node_utils/route_map.rb', line 2444
def
str = config_get('route_map', 'set_extcommunity_cost', @get_args)
return if
str.nil? || !str.include?('pre-bestpath')
arr = str.split
ret_arr = []
index = arr.index('pre-bestpath')
while index
larr = []
larr << arr[index + 1]
larr << arr[index + 2]
ret_arr << larr
arr.delete_at(index)
arr.delete_at(index)
arr.delete_at(index)
index = arr.index('pre-bestpath')
end
ret_arr
end
|