Method: Cisco::RouterBgpAF#default_metric=

Defined in:
lib/cisco_node_utils/bgp_af.rb

#default_metric=(val) ⇒ Object



364
365
366
367
368
369
370
371
# File 'lib/cisco_node_utils/bgp_af.rb', line 364

def default_metric=(val)
  # To remove the default_metric you can not use 'no default_metric'
  # dummy metric to work around this
  dummy_metric = 1
  set_args_keys(state: (val == default_default_metric) ? 'no' : '',
                num:   (val == default_default_metric) ? dummy_metric : val)
  config_set('bgp_af', 'default_metric', @set_args)
end