-
Notifications
You must be signed in to change notification settings - Fork 66
ADVA OS ConfigParser Support #747
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
architekture
wants to merge
12
commits into
develop
Choose a base branch
from
adva-os
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
8732ede
Added ADVAConfigParser class.
1e08e1b
Added parser base mock test.
3e2a1da
Added compliance testing for adva_fsp150f3 driver.
277bccb
Renamed FSP150F3 test files for clarity.
b2880a9
Added FSP150F2 support.
da53212
Updated files with RUFF formatting.
c58011c
Added changelog fragment.
40807ef
Renamed changelog fragment.
cb1f648
Fixed fragment based on J. Kala's notes.
2bdf884
Revert "Fixed fragment based on J. Kala's notes."
04e55d9
Corrected changelog fragment.
5fe91d3
Ran development_docs.py script.
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| Parsing ADVA AOS device configs for compliance. FSP150F2 and FSP150F3 map to discrete Netmiko drivers and support different hardware generations. | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
101 changes: 101 additions & 0 deletions
101
tests/unit/mock/config/compliance/compliance/adva_fsp150f2/adva_fsp150f2_basic_backup.txt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,101 @@ | ||
| remark #################################################################### | ||
| remark # | ||
| remark # Database Version: 13.0 | ||
| remark # | ||
| remark #################################################################### | ||
| remark # | ||
| remark # System | ||
| remark # | ||
| configure system | ||
| sysname "x-dngr-rm-01" | ||
| cli-prompt "X-DNGR-RM-01" | ||
| contact "XNOC 888-555-1963" | ||
| location "1407 Graymalkin LN, North Salem, NY 10560" | ||
| ip-address 192.168.0.63 255.255.255.0 | ||
| security-prompt enable | ||
| serial enable | ||
| telnet disable | ||
| web enable | ||
| snmp-dying-gasp enable | ||
| temperature-monitoring enable | ||
| bwp-mode information-rate | ||
| clock timezone utc | ||
| sntpclient mode unicast | ||
| sntpclient dhcp-supplied disable | ||
| sntpclient server 198.51.100.251 | ||
| syslogclient dhcp-supplied disable | ||
| syslogclient server 198.51.100.252 | ||
| security-banner "Any changes to this system require a change ticket or trouble ticket. Do you really want to proceed?\\n\\nBe sure to notify the XNOC of work being performed BEFORE changes are made.\\n\\nXNOC - 888-555-1963" | ||
| pae authentication-control enable | ||
| exit | ||
|
|
||
| configure system | ||
| jumbo-frame enable | ||
| exit | ||
|
|
||
| remark # | ||
| remark # Scheduled Ping | ||
| remark # | ||
| configure sched ping | ||
| frequency 1 | ||
| severity minor | ||
| threshold 1 | ||
| exit | ||
|
|
||
| remark # | ||
| remark # Interface: e100-lan-3 | ||
| remark # | ||
| configure interface e100-lan-3 | ||
| portmode Connection-oriented | ||
| remark # | ||
| remark # Temporarily assign the interface while configuring it. | ||
| remark # Final value will be assignstate disable. | ||
| remark # | ||
| assignstate enable | ||
| media copper | ||
| speed 100full | ||
| description "P2P-Circuit-2-PORT-DISABLED" | ||
| frame-loss-ratio 1.00 | ||
| evc-mode tls | ||
| circuit-name "NO-CIRCUIT-NAME-ASSIGNED" | ||
| ingress-buffersize 1274 | ||
| ingress-cbs 32 | ||
| ingress-ebs 0 | ||
| egress-limiting enable | ||
| ingress-eir 0 | ||
| ingress-cir 1024000 | ||
| egress-buffersize 1274 | ||
| egress-cbs 32 | ||
| egress-ebs 64 | ||
| egress-eir 0 | ||
| egress-cir 1024000 | ||
| flowcontrol receive disable | ||
| flowcontrol send disable | ||
| tagged-frame enable | ||
| untagged-frame enable | ||
| ctag push 103-0 disable | ||
| stag none | ||
| wan-if e1000-wan-1 | ||
| no propagate-fault | ||
| qq-ethertype 0x8100 | ||
| efm-oam localmode passive | ||
| cpd-filter efm-oam discard | ||
| adminstate enable | ||
| port-policing enable | ||
|
|
||
| elmi | ||
| async-status enable | ||
| min-async-status-interval 1 | ||
| n393 4 | ||
| t392 15 | ||
| exit | ||
|
|
||
| exit | ||
|
|
||
| configure interface e100-lan-3 | ||
| remark # | ||
| remark # Temporarily disable the interface while configuring it. | ||
| remark # Final value will be adminstate enable. | ||
| remark # | ||
| adminstate disable | ||
| exit |
5 changes: 5 additions & 0 deletions
5
tests/unit/mock/config/compliance/compliance/adva_fsp150f2/adva_fsp150f2_basic_feature.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| features = [ | ||
| {"name": "system", "ordered": False, "section": ["configure system"]}, | ||
| {"name": "ping", "ordered": False, "section": ["configure sched ping"]}, | ||
| {"name": "interface", "ordered": False, "section": ["configure interface"]}, | ||
| ] |
101 changes: 101 additions & 0 deletions
101
tests/unit/mock/config/compliance/compliance/adva_fsp150f2/adva_fsp150f2_basic_intended.txt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,101 @@ | ||
| remark #################################################################### | ||
| remark # | ||
| remark # Database Version: 13.0 | ||
| remark # | ||
| remark #################################################################### | ||
| remark # | ||
| remark # System | ||
| remark # | ||
| configure system | ||
| sysname "x-dngr-rm-01" | ||
| cli-prompt "X-DNGR-RM-01" | ||
| contact "XNOC 888-555-1963" | ||
| location "1407 Graymalkin LN, North Salem, NY 10560" | ||
| ip-address 192.168.0.75 255.255.255.0 | ||
| security-prompt enable | ||
| serial enable | ||
| telnet disable | ||
| web enable | ||
| snmp-dying-gasp enable | ||
| temperature-monitoring enable | ||
| bwp-mode information-rate | ||
| clock timezone utc | ||
| sntpclient mode unicast | ||
| sntpclient dhcp-supplied disable | ||
| sntpclient server 198.51.100.251 | ||
| syslogclient dhcp-supplied disable | ||
| syslogclient server 198.51.100.252 | ||
| security-banner "Any changes to this system require a change ticket or trouble ticket. Do you really want to proceed?\\n\\nBe sure to notify the XNOC of work being performed BEFORE changes are made.\\n\\nXNOC - 888-555-1963" | ||
| pae authentication-control enable | ||
| exit | ||
|
|
||
| configure system | ||
| jumbo-frame enable | ||
| exit | ||
|
|
||
| remark # | ||
| remark # Scheduled Ping | ||
| remark # | ||
| configure sched ping | ||
| frequency 3 | ||
| severity minor | ||
| threshold 5 | ||
| exit | ||
|
|
||
| remark # | ||
| remark # Interface: e100-lan-3 | ||
| remark # | ||
| configure interface e100-lan-3 | ||
| portmode Connection-oriented | ||
| remark # | ||
| remark # Temporarily assign the interface while configuring it. | ||
| remark # Final value will be assignstate disable. | ||
| remark # | ||
| assignstate enable | ||
| media copper | ||
| speed 100full | ||
| description "P2P-Circuit-2-PORT-DISABLED" | ||
| frame-loss-ratio 1.00 | ||
| evc-mode tls | ||
| circuit-name "NO-CIRCUIT-NAME-ASSIGNED" | ||
| ingress-buffersize 1274 | ||
| ingress-cbs 32 | ||
| ingress-ebs 0 | ||
| egress-limiting enable | ||
| ingress-eir 0 | ||
| ingress-cir 1024000 | ||
| egress-buffersize 1274 | ||
| egress-cbs 32 | ||
| egress-ebs 64 | ||
| egress-eir 0 | ||
| egress-cir 1024000 | ||
| flowcontrol receive enable | ||
| flowcontrol send enable | ||
| tagged-frame enable | ||
| untagged-frame enable | ||
| ctag push 103-0 disable | ||
| stag none | ||
| wan-if e1000-wan-1 | ||
| no propagate-fault | ||
| qq-ethertype 0x8100 | ||
| efm-oam localmode passive | ||
| cpd-filter efm-oam discard | ||
| adminstate enable | ||
| port-policing enable | ||
|
|
||
| elmi | ||
| async-status enable | ||
| min-async-status-interval 1 | ||
| n393 4 | ||
| t392 15 | ||
| exit | ||
|
|
||
| exit | ||
|
|
||
| configure interface e100-lan-3 | ||
| remark # | ||
| remark # Temporarily disable the interface while configuring it. | ||
| remark # Final value will be adminstate enable. | ||
| remark # | ||
| adminstate disable | ||
| exit |
32 changes: 32 additions & 0 deletions
32
tests/unit/mock/config/compliance/compliance/adva_fsp150f2/adva_fsp150f2_basic_received.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| { | ||
| "interface": { | ||
| "actual": "configure interface e100-lan-3\n portmode Connection-oriented\n assignstate enable\n media copper\n speed 100full\n description \"P2P-Circuit-2-PORT-DISABLED\"\n frame-loss-ratio 1.00\n evc-mode tls\n circuit-name \"NO-CIRCUIT-NAME-ASSIGNED\"\n ingress-buffersize 1274\n ingress-cbs 32\n ingress-ebs 0\n egress-limiting enable\n ingress-eir 0\n ingress-cir 1024000\n egress-buffersize 1274\n egress-cbs 32\n egress-ebs 64\n egress-eir 0\n egress-cir 1024000\n flowcontrol receive disable\n flowcontrol send disable\n tagged-frame enable\n untagged-frame enable\n ctag push 103-0 disable\n stag none\n wan-if e1000-wan-1\n no propagate-fault\n qq-ethertype 0x8100\n efm-oam localmode passive\n cpd-filter efm-oam discard\n adminstate enable\n port-policing enable\n elmi\n async-status enable\n min-async-status-interval 1\n n393 4\n t392 15\nconfigure interface e100-lan-3\n adminstate disable", | ||
| "cannot_parse": true, | ||
| "compliant": false, | ||
| "extra": "configure interface e100-lan-3\n flowcontrol receive disable\n flowcontrol send disable", | ||
| "intended": "configure interface e100-lan-3\n portmode Connection-oriented\n assignstate enable\n media copper\n speed 100full\n description \"P2P-Circuit-2-PORT-DISABLED\"\n frame-loss-ratio 1.00\n evc-mode tls\n circuit-name \"NO-CIRCUIT-NAME-ASSIGNED\"\n ingress-buffersize 1274\n ingress-cbs 32\n ingress-ebs 0\n egress-limiting enable\n ingress-eir 0\n ingress-cir 1024000\n egress-buffersize 1274\n egress-cbs 32\n egress-ebs 64\n egress-eir 0\n egress-cir 1024000\n flowcontrol receive enable\n flowcontrol send enable\n tagged-frame enable\n untagged-frame enable\n ctag push 103-0 disable\n stag none\n wan-if e1000-wan-1\n no propagate-fault\n qq-ethertype 0x8100\n efm-oam localmode passive\n cpd-filter efm-oam discard\n adminstate enable\n port-policing enable\n elmi\n async-status enable\n min-async-status-interval 1\n n393 4\n t392 15\nconfigure interface e100-lan-3\n adminstate disable", | ||
| "missing": "configure interface e100-lan-3\n flowcontrol receive enable\n flowcontrol send enable", | ||
| "ordered_compliant": false, | ||
| "unordered_compliant": false | ||
| }, | ||
| "ping": { | ||
| "actual": "configure sched ping\n frequency 1\n severity minor\n threshold 1", | ||
| "cannot_parse": true, | ||
| "compliant": false, | ||
| "extra": "configure sched ping\n frequency 1\n threshold 1", | ||
| "intended": "configure sched ping\n frequency 3\n severity minor\n threshold 5", | ||
| "missing": "configure sched ping\n frequency 3\n threshold 5", | ||
| "ordered_compliant": false, | ||
| "unordered_compliant": false | ||
| }, | ||
| "system": { | ||
| "actual": "configure system\n sysname \"x-dngr-rm-01\"\n cli-prompt \"X-DNGR-RM-01\"\n contact \"XNOC 888-555-1963\"\n location \"1407 Graymalkin LN, North Salem, NY 10560\"\n ip-address 192.168.0.63 255.255.255.0\n security-prompt enable\n serial enable\n telnet disable\n web enable\n snmp-dying-gasp enable\n temperature-monitoring enable\n bwp-mode information-rate\n clock timezone utc\n sntpclient mode unicast\n sntpclient dhcp-supplied disable\n sntpclient server 198.51.100.251\n syslogclient dhcp-supplied disable\n syslogclient server 198.51.100.252\n security-banner \"Any changes to this system require a change ticket or trouble ticket. Do you really want to proceed?\\\\n\\\\nBe sure to notify the XNOC of work being performed BEFORE changes are made.\\\\n\\\\nXNOC - 888-555-1963\"\nconfigure system\n jumbo-frame enable", | ||
| "cannot_parse": true, | ||
| "compliant": false, | ||
| "extra": "configure system\n ip-address 192.168.0.63 255.255.255.0", | ||
| "intended": "configure system\n sysname \"x-dngr-rm-01\"\n cli-prompt \"X-DNGR-RM-01\"\n contact \"XNOC 888-555-1963\"\n location \"1407 Graymalkin LN, North Salem, NY 10560\"\n ip-address 192.168.0.75 255.255.255.0\n security-prompt enable\n serial enable\n telnet disable\n web enable\n snmp-dying-gasp enable\n temperature-monitoring enable\n bwp-mode information-rate\n clock timezone utc\n sntpclient mode unicast\n sntpclient dhcp-supplied disable\n sntpclient server 198.51.100.251\n syslogclient dhcp-supplied disable\n syslogclient server 198.51.100.252\n security-banner \"Any changes to this system require a change ticket or trouble ticket. Do you really want to proceed?\\\\n\\\\nBe sure to notify the XNOC of work being performed BEFORE changes are made.\\\\n\\\\nXNOC - 888-555-1963\"\nconfigure system\n jumbo-frame enable", | ||
| "missing": "configure system\n ip-address 192.168.0.75 255.255.255.0", | ||
| "ordered_compliant": false, | ||
| "unordered_compliant": false | ||
| } | ||
| } |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.