Skip to content

Commit

Permalink
Add netutils parse to lib mapper, alpha sort lib mapper, and clean up…
Browse files Browse the repository at this point in the history
… docs for lib mapper
  • Loading branch information
itdependsnetworks committed Aug 26, 2023
1 parent 565e2ba commit 2bbc28e
Show file tree
Hide file tree
Showing 10 changed files with 465 additions and 89 deletions.
48 changes: 36 additions & 12 deletions development_scripts.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,18 @@
"_dict": lib_mapper.ANSIBLE_LIB_MAPPER_REVERSE,
"_file": "docs/user/lib_mapper/ansible_reverse.md",
},
"hierconfig": {
"header_src": "HIERCONFIG",
"header_dst": "NORMALIZED",
"_dict": lib_mapper.HIERCONFIG_LIB_MAPPER,
"_file": "docs/user/lib_mapper/hierconfig.md",
},
"hierconfig_reverse": {
"header_src": "NORMALIZED",
"header_dst": "HIERCONFIG",
"_dict": lib_mapper.HIERCONFIG_LIB_MAPPER_REVERSE,
"_file": "docs/user/lib_mapper/hierconfig_reverse.md",
},
"napalm": {
"header_src": "NAPALM",
"header_dst": "NORMALIZED",
Expand All @@ -58,6 +70,30 @@
"_dict": lib_mapper.NAPALM_LIB_MAPPER_REVERSE,
"_file": "docs/user/lib_mapper/napalm_reverse.md",
},
"netmiko": {
"header_src": "NETMIKO",
"header_dst": "NORMALIZED",
"_dict": lib_mapper.NETMIKO_LIB_MAPPER,
"_file": "docs/user/lib_mapper/netmiko.md",
},
"netmiko_reverse": {
"header_src": "NORMALIZED",
"header_dst": "NETMIKO",
"_dict": lib_mapper.NETMIKO_LIB_MAPPER_REVERSE,
"_file": "docs/user/lib_mapper/netmiko_reverse.md",
},
"netutilsparser": {
"header_src": "NETUTILSPARSER",
"header_dst": "NORMALIZED",
"_dict": lib_mapper.NETUTILSPARSER_LIB_MAPPER,
"_file": "docs/user/lib_mapper/netutilsparser.md",
},
"netutilsparser_reverse": {
"header_src": "NORMALIZED",
"header_dst": "NETUTILSPARSER",
"_dict": lib_mapper.NETUTILSPARSER_LIB_MAPPER_REVERSE,
"_file": "docs/user/lib_mapper/netutilsparser_reverse.md",
},
"ntctemplates": {
"header_src": "NTCTEMPLATES",
"header_dst": "NORMALIZED",
Expand Down Expand Up @@ -106,18 +142,6 @@
"_dict": lib_mapper.SCRAPLI_LIB_MAPPER_REVERSE,
"_file": "docs/user/lib_mapper/scrapli_reverse.md",
},
"hierconfig": {
"header_src": "HIERCONFIG",
"header_dst": "NORMALIZED",
"_dict": lib_mapper.HIERCONFIG_LIB_MAPPER,
"_file": "docs/user/lib_mapper/hierconfig.md",
},
"hierconfig_reverse": {
"header_src": "NORMALIZED",
"header_dst": "HIERCONFIG",
"_dict": lib_mapper.HIERCONFIG_LIB_MAPPER_REVERSE,
"_file": "docs/user/lib_mapper/hierconfig_reverse.md",
},
},
"PARSER_MAPPER_TEMPLATE": {
"default": {
Expand Down
3 changes: 3 additions & 0 deletions docs/dev/dev_config.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,9 @@ There are a series of considerations documented below, when developing a new par
- The class must provide a `self.config_lines` that is a list of `ConfigLine` named tuples.
- Build tests for the `tests/unit/mock/config/compliance/compliance/{os_name}/*` and `tests/unit/mock/config/parser/base/{os_name}/*`.
- Add to `netutils/config/compliance.py` the `parser_map`, that maps the name of the parser to the Plugin.
- Ensure that the key name is based on `netutils.lib_mapper.MAIN_LIB_MAPPER_LIB_MAPPER` definitions.
- Ensure that it is alpha sorted.
- Ensure that it the key is added to `netutils.lib_mapper.NETUTILSPARSER_LIB_MAPPER` and `netutils.lib_mapper.NETUTILSPARSER_LIB_MAPPER_REVERSE`.
- Fill out docstrings in the class and methods within the class that describe the parameters and an Example that compiles.
- The following tips will generally be applicable.
- Generally a class method should provide a `comment_chars` and `banner_start` as well as sometimes `banner_end`.
Expand Down
110 changes: 110 additions & 0 deletions docs/user/lib_mapper/netmiko.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
| NETMIKO | | NORMALIZED |
| ---------- | -- | ------ |
| a10 || a10 |
| accedian || accedian |
| adtran_os || adtran_os |
| alcatel_aos || alcatel_aos |
| alcatel_sros || alcatel_sros |
| allied_telesis_awplus || allied_telesis_awplus |
| apresia_aeos || apresia_aeos |
| arista_eos || arista_eos |
| aruba_os || aruba_os |
| aruba_osswitch || aruba_osswitch |
| aruba_procurve || aruba_procurve |
| avaya_ers || avaya_ers |
| avaya_vsp || avaya_vsp |
| broadcom_icos || broadcom_icos |
| brocade_fastiron || brocade_fastiron |
| brocade_fos || brocade_fos |
| brocade_netiron || brocade_netiron |
| brocade_nos || brocade_nos |
| brocade_vdx || brocade_vdx |
| brocade_vyos || brocade_vyos |
| calix_b6 || calix_b6 |
| centec_os || centec_os |
| checkpoint_gaia || checkpoint_gaia |
| ciena_saos || ciena_saos |
| cisco_asa || cisco_asa |
| cisco_ftd || cisco_ftd |
| cisco_ios || cisco_ios |
| cisco_nxos || cisco_nxos |
| cisco_s300 || cisco_s300 |
| cisco_tp || cisco_tp |
| cisco_wlc || cisco_wlc |
| cisco_xe || cisco_xe |
| cisco_xr || cisco_xr |
| cloudgenix_ion || cloudgenix_ion |
| coriant || coriant |
| dell_dnos9 || dell_dnos9 |
| dell_force10 || dell_force10 |
| dell_isilon || dell_isilon |
| dell_os10 || dell_os10 |
| dell_os6 || dell_os6 |
| dell_os9 || dell_os9 |
| dell_powerconnect || dell_powerconnect |
| dlink_ds || dlink_ds |
| eltex || eltex |
| eltex_esr || eltex_esr |
| endace || endace |
| enterasys || enterasys |
| ericsson_ipos || ericsson_ipos |
| extreme || extreme |
| extreme_ers || extreme_ers |
| extreme_exos || extreme_exos |
| extreme_netiron || extreme_netiron |
| extreme_nos || extreme_nos |
| extreme_slx || extreme_slx |
| extreme_vdx || extreme_vdx |
| extreme_vsp || extreme_vsp |
| extreme_wing || extreme_wing |
| f5_linux || f5_linux |
| f5_ltm || f5_ltm |
| f5_tmsh || f5_tmsh |
| flexvnf || flexvnf |
| fortinet || fortinet |
| generic || generic |
| generic_termserver || generic_termserver |
| hp_comware || hp_comware |
| hp_procurve || hp_procurve |
| huawei || huawei |
| huawei_olt || huawei_olt |
| huawei_smartax || huawei_smartax |
| huawei_vrpv8 || huawei_vrpv8 |
| ipinfusion_ocnos || ipinfusion_ocnos |
| juniper || juniper |
| juniper_junos || juniper_junos |
| juniper_screenos || juniper_screenos |
| keymile || keymile |
| keymile_nos || keymile_nos |
| linux || linux |
| mellanox || mellanox |
| mellanox_mlnxos || mellanox_mlnxos |
| mikrotik_routeros || mikrotik_routeros |
| mikrotik_switchos || mikrotik_switchos |
| mrv_lx || mrv_lx |
| mrv_optiswitch || mrv_optiswitch |
| netapp_cdot || netapp_cdot |
| netgear_prosafe || netgear_prosafe |
| netscaler || netscaler |
| nokia_sros || nokia_sros |
| oneaccess_oneos || oneaccess_oneos |
| ovs_linux || ovs_linux |
| paloalto_panos || paloalto_panos |
| pluribus || pluribus |
| quanta_mesh || quanta_mesh |
| rad_etx || rad_etx |
| raisecom_roap || raisecom_roap |
| ruckus_fastiron || ruckus_fastiron |
| ruijie_os || ruijie_os |
| sixwind_os || sixwind_os |
| sophos_sfos || sophos_sfos |
| tplink_jetstream || tplink_jetstream |
| ubiquiti_edge || ubiquiti_edge |
| ubiquiti_edgerouter || ubiquiti_edgerouter |
| ubiquiti_edgeswitch || ubiquiti_edgeswitch |
| ubiquiti_unifiswitch || ubiquiti_unifiswitch |
| vyatta_vyos || vyatta_vyos |
| vyos || vyos |
| watchguard_fireware || watchguard_fireware |
| yamaha || yamaha |
| zte_zxros || zte_zxros |
110 changes: 110 additions & 0 deletions docs/user/lib_mapper/netmiko_reverse.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
| NORMALIZED | | NETMIKO |
| ---------- | -- | ------ |
| a10 || a10 |
| accedian || accedian |
| adtran_os || adtran_os |
| alcatel_aos || alcatel_aos |
| alcatel_sros || alcatel_sros |
| allied_telesis_awplus || allied_telesis_awplus |
| apresia_aeos || apresia_aeos |
| arista_eos || arista_eos |
| aruba_os || aruba_os |
| aruba_osswitch || aruba_osswitch |
| aruba_procurve || aruba_procurve |
| avaya_ers || avaya_ers |
| avaya_vsp || avaya_vsp |
| broadcom_icos || broadcom_icos |
| brocade_fastiron || brocade_fastiron |
| brocade_fos || brocade_fos |
| brocade_netiron || brocade_netiron |
| brocade_nos || brocade_nos |
| brocade_vdx || brocade_vdx |
| brocade_vyos || brocade_vyos |
| calix_b6 || calix_b6 |
| centec_os || centec_os |
| checkpoint_gaia || checkpoint_gaia |
| ciena_saos || ciena_saos |
| cisco_asa || cisco_asa |
| cisco_ftd || cisco_ftd |
| cisco_ios || cisco_ios |
| cisco_nxos || cisco_nxos |
| cisco_s300 || cisco_s300 |
| cisco_tp || cisco_tp |
| cisco_wlc || cisco_wlc |
| cisco_xe || cisco_xe |
| cisco_xr || cisco_xr |
| cloudgenix_ion || cloudgenix_ion |
| coriant || coriant |
| dell_dnos9 || dell_dnos9 |
| dell_force10 || dell_force10 |
| dell_isilon || dell_isilon |
| dell_os10 || dell_os10 |
| dell_os6 || dell_os6 |
| dell_os9 || dell_os9 |
| dell_powerconnect || dell_powerconnect |
| dlink_ds || dlink_ds |
| eltex || eltex |
| eltex_esr || eltex_esr |
| endace || endace |
| enterasys || enterasys |
| ericsson_ipos || ericsson_ipos |
| extreme || extreme |
| extreme_ers || extreme_ers |
| extreme_exos || extreme_exos |
| extreme_netiron || extreme_netiron |
| extreme_nos || extreme_nos |
| extreme_slx || extreme_slx |
| extreme_vdx || extreme_vdx |
| extreme_vsp || extreme_vsp |
| extreme_wing || extreme_wing |
| f5_linux || f5_linux |
| f5_ltm || f5_ltm |
| f5_tmsh || f5_tmsh |
| flexvnf || flexvnf |
| fortinet || fortinet |
| generic || generic |
| generic_termserver || generic_termserver |
| hp_comware || hp_comware |
| hp_procurve || hp_procurve |
| huawei || huawei |
| huawei_olt || huawei_olt |
| huawei_smartax || huawei_smartax |
| huawei_vrpv8 || huawei_vrpv8 |
| ipinfusion_ocnos || ipinfusion_ocnos |
| juniper || juniper |
| juniper_junos || juniper_junos |
| juniper_screenos || juniper_screenos |
| keymile || keymile |
| keymile_nos || keymile_nos |
| linux || linux |
| mellanox || mellanox |
| mellanox_mlnxos || mellanox_mlnxos |
| mikrotik_routeros || mikrotik_routeros |
| mikrotik_switchos || mikrotik_switchos |
| mrv_lx || mrv_lx |
| mrv_optiswitch || mrv_optiswitch |
| netapp_cdot || netapp_cdot |
| netgear_prosafe || netgear_prosafe |
| netscaler || netscaler |
| nokia_sros || nokia_sros |
| oneaccess_oneos || oneaccess_oneos |
| ovs_linux || ovs_linux |
| paloalto_panos || paloalto_panos |
| pluribus || pluribus |
| quanta_mesh || quanta_mesh |
| rad_etx || rad_etx |
| raisecom_roap || raisecom_roap |
| ruckus_fastiron || ruckus_fastiron |
| ruijie_os || ruijie_os |
| sixwind_os || sixwind_os |
| sophos_sfos || sophos_sfos |
| tplink_jetstream || tplink_jetstream |
| ubiquiti_edge || ubiquiti_edge |
| ubiquiti_edgerouter || ubiquiti_edgerouter |
| ubiquiti_edgeswitch || ubiquiti_edgeswitch |
| ubiquiti_unifiswitch || ubiquiti_unifiswitch |
| vyatta_vyos || vyatta_vyos |
| vyos || vyos |
| watchguard_fireware || watchguard_fireware |
| yamaha || yamaha |
| zte_zxros || zte_zxros |
21 changes: 21 additions & 0 deletions docs/user/lib_mapper/netutilsparser.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
| NETUTILSPARSER | | NORMALIZED |
| ---------- | -- | ------ |
| arista_eos || arista_eos |
| aruba_aoscx || aruba_aoscx |
| bigip_f5 || bigip_f5 |
| cisco_aireos || cisco_aireos |
| cisco_asa || cisco_asa |
| cisco_ios || cisco_ios |
| cisco_iosxr || cisco_iosxr |
| cisco_nxos || cisco_nxos |
| citrix_netscaler || citrix_netscaler |
| extreme_netiron || extreme_netiron |
| fortinet_fortios || fortinet_fortios |
| juniper_junos || juniper_junos |
| linux || linux |
| mikrotik_routeros || mikrotik_routeros |
| mrv_optiswitch || mrv_optiswitch |
| netscaler || netscaler |
| nokia_sros || nokia_sros |
| paloalto_panos || paloalto_panos |
| ruckus_fastiron || ruckus_fastiron |
21 changes: 21 additions & 0 deletions docs/user/lib_mapper/netutilsparser_reverse.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
| NORMALIZED | | NETUTILSPARSER |
| ---------- | -- | ------ |
| arista_eos || arista_eos |
| aruba_aoscx || aruba_aoscx |
| bigip_f5 || bigip_f5 |
| cisco_aireos || cisco_aireos |
| cisco_asa || cisco_asa |
| cisco_ios || cisco_ios |
| cisco_iosxr || cisco_iosxr |
| cisco_nxos || cisco_nxos |
| citrix_netscaler || citrix_netscaler |
| extreme_netiron || extreme_netiron |
| fortinet_fortios || fortinet_fortios |
| juniper_junos || juniper_junos |
| linux || linux |
| mikrotik_routeros || mikrotik_routeros |
| mrv_optiswitch || mrv_optiswitch |
| netscaler || netscaler |
| nokia_sros || nokia_sros |
| paloalto_panos || paloalto_panos |
| ruckus_fastiron || ruckus_fastiron |
Loading

0 comments on commit 2bbc28e

Please sign in to comment.