From af3bd6c032f34d728c62ceffcc77c01ebfd553df Mon Sep 17 00:00:00 2001 From: "smigopal@cisco.com" Date: Thu, 11 Feb 2016 07:38:57 -0500 Subject: [PATCH] Adding destroy method for pim, needed for resource=absent --- lib/cisco_node_utils/pim.rb | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lib/cisco_node_utils/pim.rb b/lib/cisco_node_utils/pim.rb index 720da3e5..ec93e587 100644 --- a/lib/cisco_node_utils/pim.rb +++ b/lib/cisco_node_utils/pim.rb @@ -111,5 +111,14 @@ def ssm_range=(range) set_args_keys(state: state, ssm_range: range) config_set('pim', 'ssm_range', @set_args) end + + # This destroy method is different than most because pim does not have a + # "container" for properties, they simply exist in a given vrf context. + # For that reason destroy needs to explicitly set each property + # to its default state. + def destroy + set_args_keys(state: 'no', ssm_range: 'none') + config_set('pim', 'ssm_range', @set_args) + end end # Class end # Module