Class: Cisco::IpMulticast
Overview
node_utils class for evpn_multisite
Instance Method Summary
collapse
Methods inherited from NodeUtil
client, #client, config_get, #config_get, #config_get_default, config_get_default, config_set, #config_set, #get, #ios_xr?, #nexus?, #node, node, platform, #platform, supports?, #supports?
Constructor Details
#initialize(instantiate = true) ⇒ IpMulticast
Returns a new instance of IpMulticast.
24
25
26
27
|
# File 'lib/cisco_node_utils/ip_multicast.rb', line 24
def initialize(instantiate=true)
@get_args = @set_args = {}
enable_features if instantiate
end
|
Instance Method Details
#default_overlay_distributed_dr ⇒ Object
62
63
64
|
# File 'lib/cisco_node_utils/ip_multicast.rb', line 62
def default_overlay_distributed_dr
config_get_default('ip_multicast', 'overlay_distributed_dr')
end
|
#default_overlay_spt_only ⇒ Object
77
78
79
80
81
82
83
84
85
86
87
88
|
# File 'lib/cisco_node_utils/ip_multicast.rb', line 77
def default_overlay_spt_only
val = config_get_default('ip_multicast', 'overlay_spt_only')
node.os_version[/7\.0\(3\)I7\([1-3]\)/] ? !val : val
end
|
#destroy ⇒ Object
29
30
31
32
33
34
|
# File 'lib/cisco_node_utils/ip_multicast.rb', line 29
def destroy
@set_args[:state] = 'no'
config_set('ip_multicast', 'overlay_distributed_dr', @set_args)
config_set('ip_multicast', 'overlay_spt_only', @set_args)
Feature.ngmvpn_disable
end
|
#enable_features ⇒ Object
#overlay_distributed_dr ⇒ Object
46
47
48
|
# File 'lib/cisco_node_utils/ip_multicast.rb', line 46
def overlay_distributed_dr
config_get('ip_multicast', 'overlay_distributed_dr')
end
|
#overlay_distributed_dr=(bool) ⇒ Object
50
51
52
53
54
55
56
57
58
59
60
|
# File 'lib/cisco_node_utils/ip_multicast.rb', line 50
def overlay_distributed_dr=(bool)
fail TypeError unless [true, false].include?(bool)
@set_args[:state] = bool ? '' : 'no'
if @set_args[:state] == 'no'
unless overlay_distributed_dr == default_overlay_distributed_dr
config_set('ip_multicast', 'overlay_distributed_dr', @set_args)
end
else
config_set('ip_multicast', 'overlay_distributed_dr', @set_args)
end
end
|
#overlay_spt_only ⇒ Object
66
67
68
69
|
# File 'lib/cisco_node_utils/ip_multicast.rb', line 66
def overlay_spt_only
result = config_get('ip_multicast', 'overlay_spt_only')
result.nil? ? false : result
end
|
#overlay_spt_only=(bool) ⇒ Object
71
72
73
74
75
|
# File 'lib/cisco_node_utils/ip_multicast.rb', line 71
def overlay_spt_only=(bool)
fail TypeError unless [true, false].include?(bool)
@set_args[:state] = bool ? '' : 'no'
config_set('ip_multicast', 'overlay_spt_only', @set_args)
end
|