Method: Cisco::RouteMap#set_community_set
- Defined in:
- lib/cisco_node_utils/route_map.rb
#set_community_set(none, noadv, noexp, add, local, inter, asn) ⇒ Object
set community none set community (if only additive is configured) set internet 11:22 22:33 local-AS no-advertise no-export additive and combinations of the above
2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 |
# File 'lib/cisco_node_utils/route_map.rb', line 2283 def set_community_set(none, noadv, noexp, add, local, inter, asn) str = '' # reset first set_args_keys(state: 'no', string: str) config_set('route_map', 'set_community', @set_args) return unless none || noadv || noexp || add || local || inter || !asn.empty? str.concat('internet ') if inter asn.each do |elem| str.concat(elem + ' ') end str.concat('no-export ') if noexp str.concat('no-advertise ') if noadv str.concat('local-AS ') if local str.concat('additive ') if add str.concat('none') if none set_args_keys(state: '', string: str) config_set('route_map', 'set_community', @set_args) end |