Skip to content

Commit bd3b73f

Browse files
committed
Merge branch 'develop' of https://github.com/cisco/cisco-network-node-utils into develop
2 parents 0bfae5a + 64c1fbf commit bd3b73f

File tree

4 files changed

+3
-41
lines changed

4 files changed

+3
-41
lines changed

CHANGELOG.md

+3
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@ Changelog
3030
| `private_vlan_association` | `pvlan_association`
3131
| `private_vlan_type` | `pvlan_type`
3232

33+
- Removed interface attribute:
34+
* `purge_config`
35+
3336
### Issues Addressed
3437

3538
## [v2.0.2]

lib/cisco_node_utils/cmd_ref/interface.yaml

-9
Original file line numberDiff line numberDiff line change
@@ -386,15 +386,6 @@ pim_bfd:
386386
set_value: "<state> ip pim bfd-instance"
387387
default_value: false
388388

389-
purge_config:
390-
_exclude: [ios_xr]
391-
multiple:
392-
set_context: ~
393-
set_value: "default interface <name>"
394-
get_command: "show running interface"
395-
get_value: '/(.*)/'
396-
default_value: ~
397-
398389
pvlan_any:
399390
multiple:
400391
get_value: '/switchport private-vlan/'

lib/cisco_node_utils/interface.rb

-19
Original file line numberDiff line numberDiff line change
@@ -2096,24 +2096,5 @@ def set_range_based_params(list, param_name)
20962096
end
20972097
end
20982098
end
2099-
2100-
def purge_config=(val)
2101-
return unless val
2102-
fail ArgumentError,
2103-
'purge_config is only supported on Ethernet interfaces' unless
2104-
@name[/ethernet/]
2105-
config_set('interface', 'purge_config', name: @name) if val
2106-
end
2107-
2108-
def purge_config
2109-
# This getter is only supported on ethernet interfaces
2110-
return nil unless @name[/ethernet/]
2111-
state = config_get('interface', 'purge_config', @get_args)
2112-
state.nil? ? true : default_purge_config
2113-
end
2114-
2115-
def default_purge_config
2116-
config_get_default('interface', 'purge_config')
2117-
end
21182099
end # Class
21192100
end # Module

tests/test_interface.rb

-13
Original file line numberDiff line numberDiff line change
@@ -1955,17 +1955,4 @@ def test_default_physical
19551955
int.destroy
19561956
assert(int.default?)
19571957
end
1958-
1959-
def test_purge_config
1960-
name = interfaces[0]
1961-
int = Interface.new(name)
1962-
int.switchport_mode = :disabled
1963-
1964-
int.description = 'destroy_pysical'
1965-
int.ipv4_addr_mask_set('192.168.0.1', '24')
1966-
refute(int.purge_config)
1967-
1968-
int.purge_config = true
1969-
assert(int.purge_config)
1970-
end
19711958
end

0 commit comments

Comments
 (0)