Skip to content

Commit f88eece

Browse files
authored
Merge pull request #961 from aknopper/showplat9400sw
Add switch level to paths for Show Environment All on C9400s
2 parents 84a79d7 + d437fc6 commit f88eece

File tree

7 files changed

+1736
-20
lines changed

7 files changed

+1736
-20
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
--------------------------------------------------------------------------------
2+
Fix
3+
--------------------------------------------------------------------------------
4+
* C9400
5+
* Modified/Revised ShowEnvironmentAll:
6+
* Changed schema to include "switch" for every switch in the stack.
7+
* Updated regex pattern to accomodate for "Switch:1" and "Switch: 1" outputs and use those as keys to the power supply and fantray parsing.

sdk_generator/outputs/github_parser.json

Lines changed: 44 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -27357,6 +27357,18 @@
2735727357
},
2735827358
"uid": "show_environment_all",
2735927359
"url": "https://github.com/CiscoTestAutomation/genieparser/tree/master/src/genie/libs/parser/iosxe/ie3k/show_platform.py#L559"
27360+
},
27361+
"rv2": {
27362+
"class": "ShowEnvironmentAll",
27363+
"doc": "Parser for show environment all\n show environment all | include {include}",
27364+
"module_name": "iosxe.rv2.show_platform",
27365+
"package": "genie.libs.parser",
27366+
"schema": "{\n Optional('critical_alarms'): int,\n Optional('major_alarms'): int,\n Optional('minor_alarms'): int,\n 'sensor_list': {\n Any('*'): {\n 'slot': {\n Any('*'): {\n 'sensor': {\n Any('*'): {\n 'state': str,\n 'reading': str,\n Optional('threshold'): {\n 'minor': int,\n 'major': int,\n 'critical': int,\n 'shutdown': int,\n 'unit': str,\n },\n },\n },\n },\n },\n },\n },\n 'switch': {\n Any('*'): {\n 'power_supply': {\n 'slot': {\n Any('*'): {\n 'model_no': str,\n 'type': str,\n 'capacity': str,\n 'status': str,\n 'fan_1_state': str,\n 'fan_2_state': str,\n },\n },\n 'current_configuration_mode': str,\n 'current_operating_state': str,\n 'currently_active': int,\n 'currently_available': int,\n },\n 'fantray': {\n 'status': str,\n 'power_consumed_by_fantray_watts': int,\n 'fantray_airflow_direction': str,\n 'fantray_beacon_led': str,\n 'fantray_status_led': str,\n 'system': str,\n },\n },\n },\n}",
27367+
"tokens": {
27368+
"revision": "2"
27369+
},
27370+
"uid": "show_environment_all",
27371+
"url": "https://github.com/CiscoTestAutomation/genieparser/tree/master/src/genie/libs/parser/iosxe/rv2/show_platform.py#L659"
2736027372
}
2736127373
},
2736227374
"module_name": "iosxe.show_platform",
@@ -27415,6 +27427,18 @@
2741527427
"tokens": {
2741627428
"platform": "cat9k"
2741727429
}
27430+
},
27431+
"rv2": {
27432+
"class": "ShowEnvironmentAll",
27433+
"doc": "Parser for show environment all\n show environment all | include {include}",
27434+
"module_name": "iosxe.rv2.show_platform",
27435+
"package": "genie.libs.parser",
27436+
"schema": "{\n Optional('critical_alarms'): int,\n Optional('major_alarms'): int,\n Optional('minor_alarms'): int,\n 'sensor_list': {\n Any('*'): {\n 'slot': {\n Any('*'): {\n 'sensor': {\n Any('*'): {\n 'state': str,\n 'reading': str,\n Optional('threshold'): {\n 'minor': int,\n 'major': int,\n 'critical': int,\n 'shutdown': int,\n 'unit': str,\n },\n },\n },\n },\n },\n },\n },\n 'switch': {\n Any('*'): {\n 'power_supply': {\n 'slot': {\n Any('*'): {\n 'model_no': str,\n 'type': str,\n 'capacity': str,\n 'status': str,\n 'fan_1_state': str,\n 'fan_2_state': str,\n },\n },\n 'current_configuration_mode': str,\n 'current_operating_state': str,\n 'currently_active': int,\n 'currently_available': int,\n },\n 'fantray': {\n 'status': str,\n 'power_consumed_by_fantray_watts': int,\n 'fantray_airflow_direction': str,\n 'fantray_beacon_led': str,\n 'fantray_status_led': str,\n 'system': str,\n },\n },\n },\n}",
27437+
"tokens": {
27438+
"revision": "2"
27439+
},
27440+
"uid": "show_environment_all___include_include",
27441+
"url": "https://github.com/CiscoTestAutomation/genieparser/tree/master/src/genie/libs/parser/iosxe/rv2/show_platform.py#L659"
2741827442
}
2741927443
},
2742027444
"tokens": {
@@ -100613,7 +100637,7 @@
100613100637
"os": "iosxe"
100614100638
},
100615100639
"uid": "show_run_policy-map_name",
100616-
"url": "https://github.com/CiscoTestAutomation/genieparser/tree/master/src/genie/libs/parser/iosxe/show_run.py#L70"
100640+
"url": "https://github.com/CiscoTestAutomation/genieparser/tree/master/src/genie/libs/parser/iosxe/show_run.py#L73"
100617100641
}
100618100642
}
100619100643
},
@@ -100677,7 +100701,7 @@
100677100701
"os": "iosxe"
100678100702
},
100679100703
"uid": "show_running-config_aaa",
100680-
"url": "https://github.com/CiscoTestAutomation/genieparser/tree/master/src/genie/libs/parser/iosxe/show_run.py#L3169"
100704+
"url": "https://github.com/CiscoTestAutomation/genieparser/tree/master/src/genie/libs/parser/iosxe/show_run.py#L3170"
100681100705
}
100682100706
}
100683100707
},
@@ -100693,7 +100717,7 @@
100693100717
"os": "iosxe"
100694100718
},
100695100719
"uid": "show_running-config_aaa_radius-server",
100696-
"url": "https://github.com/CiscoTestAutomation/genieparser/tree/master/src/genie/libs/parser/iosxe/show_run.py#L4921"
100720+
"url": "https://github.com/CiscoTestAutomation/genieparser/tree/master/src/genie/libs/parser/iosxe/show_run.py#L4922"
100697100721
}
100698100722
}
100699100723
},
@@ -100704,12 +100728,12 @@
100704100728
"doc": "Parser for:\n * 'show running-config aaa user-name'\n ",
100705100729
"module_name": "iosxe.show_run",
100706100730
"package": "genie.libs.parser",
100707-
"schema": "{\n 'username': {\n Any('*'): {\n Optional('creation_time'): int,\n Optional('password'): {\n Optional('type'): int,\n Optional('password'): str,\n },\n Optional('privilege'): int,\n Optional('common_criteria_policy'): str,\n Optional('view'): str,\n Optional('type'): str,\n Optional('onetime'): bool,\n Optional('secret'): {\n Optional('type'): int,\n Optional('secret'): str,\n },\n },\n },\n}",
100731+
"schema": "{\n 'username': {\n Any('*'): {\n Optional('creation_time'): int,\n Optional('password'): {\n Optional('type'): int,\n Optional('password'): str,\n },\n Optional('privilege'): int,\n Optional('common_criteria_policy'): str,\n Optional('view'): str,\n Optional('type'): str,\n Optional('autocommand'): str,\n Optional('onetime'): bool,\n Optional('nopassword'): bool,\n Optional('secret'): {\n Optional('type'): int,\n Optional('secret'): str,\n },\n },\n },\n}",
100708100732
"tokens": {
100709100733
"os": "iosxe"
100710100734
},
100711100735
"uid": "show_running-config_aaa_user-name",
100712-
"url": "https://github.com/CiscoTestAutomation/genieparser/tree/master/src/genie/libs/parser/iosxe/show_run.py#L2768"
100736+
"url": "https://github.com/CiscoTestAutomation/genieparser/tree/master/src/genie/libs/parser/iosxe/show_run.py#L2773"
100713100737
}
100714100738
}
100715100739
},
@@ -100720,12 +100744,12 @@
100720100744
"doc": "Parser for :\n * 'show running-config aaa username'\n ",
100721100745
"module_name": "iosxe.show_run",
100722100746
"package": "genie.libs.parser",
100723-
"schema": "{\n 'username': {\n Any('*'): {\n Optional('creation_time'): int,\n Optional('password'): {\n Optional('type'): int,\n Optional('password'): str,\n },\n Optional('privilege'): int,\n Optional('common_criteria_policy'): str,\n Optional('view'): str,\n Optional('type'): str,\n Optional('onetime'): bool,\n Optional('secret'): {\n Optional('type'): int,\n Optional('secret'): str,\n },\n },\n },\n}",
100747+
"schema": "{\n 'username': {\n Any('*'): {\n Optional('creation_time'): int,\n Optional('password'): {\n Optional('type'): int,\n Optional('password'): str,\n },\n Optional('privilege'): int,\n Optional('common_criteria_policy'): str,\n Optional('view'): str,\n Optional('type'): str,\n Optional('autocommand'): str,\n Optional('onetime'): bool,\n Optional('nopassword'): bool,\n Optional('secret'): {\n Optional('type'): int,\n Optional('secret'): str,\n },\n },\n },\n}",
100724100748
"tokens": {
100725100749
"os": "iosxe"
100726100750
},
100727100751
"uid": "show_running-config_aaa_username",
100728-
"url": "https://github.com/CiscoTestAutomation/genieparser/tree/master/src/genie/libs/parser/iosxe/show_run.py#L2887"
100752+
"url": "https://github.com/CiscoTestAutomation/genieparser/tree/master/src/genie/libs/parser/iosxe/show_run.py#L2892"
100729100753
}
100730100754
}
100731100755
},
@@ -100741,7 +100765,7 @@
100741100765
"os": "iosxe"
100742100766
},
100743100767
"uid": "show_running-config_all___sec_interface",
100744-
"url": "https://github.com/CiscoTestAutomation/genieparser/tree/master/src/genie/libs/parser/iosxe/show_run.py#L2258"
100768+
"url": "https://github.com/CiscoTestAutomation/genieparser/tree/master/src/genie/libs/parser/iosxe/show_run.py#L2261"
100745100769
}
100746100770
}
100747100771
},
@@ -100757,7 +100781,7 @@
100757100781
"os": "iosxe"
100758100782
},
100759100783
"uid": "show_running-config_all___section_^interface",
100760-
"url": "https://github.com/CiscoTestAutomation/genieparser/tree/master/src/genie/libs/parser/iosxe/show_run.py#L1802"
100784+
"url": "https://github.com/CiscoTestAutomation/genieparser/tree/master/src/genie/libs/parser/iosxe/show_run.py#L1805"
100761100785
}
100762100786
}
100763100787
},
@@ -100773,7 +100797,7 @@
100773100797
"os": "iosxe"
100774100798
},
100775100799
"uid": "show_running-config_all___section_class_class_map",
100776-
"url": "https://github.com/CiscoTestAutomation/genieparser/tree/master/src/genie/libs/parser/iosxe/show_run.py#L4858"
100800+
"url": "https://github.com/CiscoTestAutomation/genieparser/tree/master/src/genie/libs/parser/iosxe/show_run.py#L4859"
100777100801
}
100778100802
}
100779100803
},
@@ -100821,7 +100845,7 @@
100821100845
"os": "iosxe"
100822100846
},
100823100847
"uid": "show_running-config_flow_monitor",
100824-
"url": "https://github.com/CiscoTestAutomation/genieparser/tree/master/src/genie/libs/parser/iosxe/show_run.py#L3059"
100848+
"url": "https://github.com/CiscoTestAutomation/genieparser/tree/master/src/genie/libs/parser/iosxe/show_run.py#L3060"
100825100849
}
100826100850
}
100827100851
},
@@ -100885,7 +100909,7 @@
100885100909
"os": "iosxe"
100886100910
},
100887100911
"uid": "show_running-config_interface_interface",
100888-
"url": "https://github.com/CiscoTestAutomation/genieparser/tree/master/src/genie/libs/parser/iosxe/show_run.py#L483"
100912+
"url": "https://github.com/CiscoTestAutomation/genieparser/tree/master/src/genie/libs/parser/iosxe/show_run.py#L486"
100889100913
},
100890100914
"nxos": {
100891100915
"class": "ShowRunningConfigInterface",
@@ -100913,7 +100937,7 @@
100913100937
"os": "iosxe"
100914100938
},
100915100939
"uid": "show_running-config_mdns-sd",
100916-
"url": "https://github.com/CiscoTestAutomation/genieparser/tree/master/src/genie/libs/parser/iosxe/show_run.py#L1907"
100940+
"url": "https://github.com/CiscoTestAutomation/genieparser/tree/master/src/genie/libs/parser/iosxe/show_run.py#L1910"
100917100941
}
100918100942
}
100919100943
},
@@ -100977,7 +101001,7 @@
100977101001
"os": "iosxe"
100978101002
},
100979101003
"uid": "show_running-config_nve",
100980-
"url": "https://github.com/CiscoTestAutomation/genieparser/tree/master/src/genie/libs/parser/iosxe/show_run.py#L3502"
101004+
"url": "https://github.com/CiscoTestAutomation/genieparser/tree/master/src/genie/libs/parser/iosxe/show_run.py#L3503"
100981101005
}
100982101006
}
100983101007
},
@@ -100993,7 +101017,7 @@
100993101017
"os": "iosxe"
100994101018
},
100995101019
"uid": "show_running-config_vrf",
100996-
"url": "https://github.com/CiscoTestAutomation/genieparser/tree/master/src/genie/libs/parser/iosxe/show_run.py#L5069"
101020+
"url": "https://github.com/CiscoTestAutomation/genieparser/tree/master/src/genie/libs/parser/iosxe/show_run.py#L5070"
100997101021
}
100998101022
}
100999101023
},
@@ -101185,7 +101209,7 @@
101185101209
"os": "iosxe"
101186101210
},
101187101211
"uid": "show_running-config___section_^interface",
101188-
"url": "https://github.com/CiscoTestAutomation/genieparser/tree/master/src/genie/libs/parser/iosxe/show_run.py#L483"
101212+
"url": "https://github.com/CiscoTestAutomation/genieparser/tree/master/src/genie/libs/parser/iosxe/show_run.py#L486"
101189101213
},
101190101214
"nxos": {
101191101215
"class": "ShowRunningConfigInterface",
@@ -101213,7 +101237,7 @@
101213101237
"os": "iosxe"
101214101238
},
101215101239
"uid": "show_running-config___section_bgp",
101216-
"url": "https://github.com/CiscoTestAutomation/genieparser/tree/master/src/genie/libs/parser/iosxe/show_run.py#L4464"
101240+
"url": "https://github.com/CiscoTestAutomation/genieparser/tree/master/src/genie/libs/parser/iosxe/show_run.py#L4465"
101217101241
}
101218101242
}
101219101243
},
@@ -101245,7 +101269,7 @@
101245101269
"os": "iosxe"
101246101270
},
101247101271
"uid": "show_running-config___section_mac_address",
101248-
"url": "https://github.com/CiscoTestAutomation/genieparser/tree/master/src/genie/libs/parser/iosxe/show_run.py#L4806"
101272+
"url": "https://github.com/CiscoTestAutomation/genieparser/tree/master/src/genie/libs/parser/iosxe/show_run.py#L4807"
101249101273
}
101250101274
}
101251101275
},
@@ -101277,7 +101301,7 @@
101277101301
"os": "iosxe"
101278101302
},
101279101303
"uid": "show_running-config___section_route",
101280-
"url": "https://github.com/CiscoTestAutomation/genieparser/tree/master/src/genie/libs/parser/iosxe/show_run.py#L4379"
101304+
"url": "https://github.com/CiscoTestAutomation/genieparser/tree/master/src/genie/libs/parser/iosxe/show_run.py#L4380"
101281101305
}
101282101306
}
101283101307
},
@@ -101293,7 +101317,7 @@
101293101317
"os": "iosxe"
101294101318
},
101295101319
"uid": "show_running-config___section_vrf_definition",
101296-
"url": "https://github.com/CiscoTestAutomation/genieparser/tree/master/src/genie/libs/parser/iosxe/show_run.py#L4716"
101320+
"url": "https://github.com/CiscoTestAutomation/genieparser/tree/master/src/genie/libs/parser/iosxe/show_run.py#L4717"
101297101321
}
101298101322
}
101299101323
},

0 commit comments

Comments
 (0)