mpenning / ciscoconfparse

Parse, Audit, Query, Build, and Modify Arista / Cisco / Juniper / Palo Alto / F5 configurations.
http://www.pennington.net/py/ciscoconfparse/
GNU General Public License v3.0
793 stars 220 forks source link

Prepend "default " to unconfigure physical interfaces in Cisco IOS/NX-OS #228

Closed kornoa closed 2 years ago

kornoa commented 2 years ago

Method CiscoConfParse.sync_diff prepends "no " to unconfigure interfaces. This is correct for logical interfaces (sub-interfaces, loopbacks, tunnel, ...) but wrong for physical installed interfaces (Ethernet, Serial, ...).

Current behavior: loaded config:

[
    "interface Loopback0"
    "interface GigabitEthernet1/0",
    "interface Tunnel1001",
    "interface Serial2/0"
]

reference config: [] returns:

[
'no interface Loopback0',
'no interface GigabitEthernet1/0',
'no interface Tunnel1001',
'no interface Serial2/0'
]

Suggested behavior: Returns:

[
'no interface Loopback0',
'default interface GigabitEthernet1/0',
'no interface Tunnel1001',
'default interface Serial2/0'
]

If you accept the feature request, I can provide changes to classes IOSCfgLine and NXOSCfgLine and create a pull request.

github-actions[bot] commented 2 years ago

This issue has automatically been marked stale due to inactivity. The issue will close unless further activity occurs. Please understand that the CiscoConfParse team is not obligated to comment on every issue. For more detailed information, please refer to our CONTRIBUTING guidance -> https://github.com/mpenning/ciscoconfparse/blob/main/.github/CONTRIBUTING.md

github-actions[bot] commented 2 years ago

This issue has automatically been marked stale due to inactivity. The issue will close unless further activity occurs. Please understand that the CiscoConfParse team is not obligated to comment on every issue. For more detailed information, please refer to our CONTRIBUTING guidance -> https://github.com/mpenning/ciscoconfparse/blob/main/.github/CONTRIBUTING.md

github-actions[bot] commented 2 years ago

Due to inactivity, CiscoConfParse's maintainers are closing this issue. Please refrain from further comments. In the future, CiscoConfParse's maintainers may reopen it solely at their own discretion. For more detailed information, please refer to our CONTRIBUTING guidance -> https://github.com/mpenning/ciscoconfparse/blob/main/.github/CONTRIBUTING.md