Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,19 @@ jobs:
run: "poetry run invoke bandit"
needs:
- "black"
mypy:
runs-on: "ubuntu-20.04"
env:
INVOKE_LOCAL: "True"
steps:
- name: "Check out repository code"
uses: "actions/checkout@v2"
- name: "Setup environment"
uses: "networktocode/gh-action-setup-poetry-environment@v2"
- name: "Type-Hints: mypy"
run: "poetry run invoke mypy"
needs:
- "black"
pydocstyle:
runs-on: "ubuntu-20.04"
env:
Expand Down Expand Up @@ -103,6 +116,7 @@ jobs:
PYTHON_VER=${{ env.PYTHON_VER }}
needs:
- "bandit"
- "mypy"
- "pydocstyle"
- "flake8"
- "yamllint"
Expand Down
78 changes: 1 addition & 77 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -192,48 +192,11 @@ $RECYCLE.BIN/
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839

# User-specific stuff
.idea/**/workspace.xml
.idea/**/tasks.xml
.idea/**/usage.statistics.xml
.idea/**/dictionaries
.idea/**/shelf

# Generated files
.idea/**/contentModel.xml

# Sensitive or high-churn files
.idea/**/dataSources/
.idea/**/dataSources.ids
.idea/**/dataSources.local.xml
.idea/**/sqlDataSources.xml
.idea/**/dynamic.xml
.idea/**/uiDesigner.xml
.idea/**/dbnavigator.xml

# Gradle
.idea/**/gradle.xml
.idea/**/libraries

# Gradle and Maven with auto-import
# When using Gradle or Maven with auto-import, you should exclude module files,
# since they will be recreated, and may cause churn. Uncomment if using
# auto-import.
# .idea/artifacts
# .idea/compiler.xml
# .idea/jarRepositories.xml
# .idea/modules.xml
# .idea/*.iml
# .idea/modules
# *.iml
# *.ipr
.idea/

# CMake
cmake-build-*/

# Mongo Explorer plugin
.idea/**/mongoSettings.xml

# File-based project format
*.iws

Expand All @@ -246,51 +209,12 @@ out/
# JIRA plugin
atlassian-ide-plugin.xml

# Cursive Clojure plugin
.idea/replstate.xml

# Crashlytics plugin (for Android Studio and IntelliJ)
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties
fabric.properties

# Editor-based Rest Client
.idea/httpRequests

# Android studio 3.1+ serialized cache file
.idea/caches/build_file_checksums.ser

### PyCharm Patch ###
# Comment Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-215987721

# *.iml
# modules.xml
# .idea/misc.xml
# *.ipr

# Sonarlint plugin
# https://plugins.jetbrains.com/plugin/7973-sonarlint
.idea/**/sonarlint/

# SonarQube Plugin
# https://plugins.jetbrains.com/plugin/7238-sonarqube-community-plugin
.idea/**/sonarIssues.xml

# Markdown Navigator plugin
# https://plugins.jetbrains.com/plugin/7896-markdown-navigator-enhanced
.idea/**/markdown-navigator.xml
.idea/**/markdown-navigator-enh.xml
.idea/**/markdown-navigator/

# Cache file creation bug
# See https://youtrack.jetbrains.com/issue/JBR-2257
.idea/$CACHE_FILE$

# CodeStream plugin
# https://plugins.jetbrains.com/plugin/12206-codestream
.idea/codestream.xml

### vscode ###
.vscode/*
*.code-workspace
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ Except for unit tests, testing is only supported on Python 3.7.
The project is packaged with a light development environment based on `docker-compose` to help with the local development of the project and to run tests within TravisCI.

The project is following Network to Code software development guidelines and are leveraging the following:
- Black, Pylint, Bandit, flake8, and pydocstyle for Python linting and formatting.
- Black, Pylint, Bandit, Mypy, flake8, and pydocstyle for Python linting and formatting.
- pytest, coverage, and unittest for unit tests.

There are a number of things that are required in order to have a successful PR.
Expand Down Expand Up @@ -219,6 +219,7 @@ Each command can be executed with `invoke <command>`. Each command also has its
black Run black to check that Python files adhere to its style standards.
coverage Run the coverage report against pytest.
flake8 Run flake8 to check that Python files adhere to its style standards.
mypy Run mypy to validate typing-hints.
pylint Run pylint code analysis.
pydocstyle Run pydocstyle to validate docstring formatting adheres to NTC defined standards.
pytest Run pytest for the specified name and Python version.
Expand Down
2 changes: 1 addition & 1 deletion docs/source/contributing/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ Contributing

.. mdinclude:: ../../../README.md
:start-line: 148
:end-line: 233
:end-line: 234

78 changes: 78 additions & 0 deletions docs/source/netutils/lib_mapping/ANSIBLE_reverse_table.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
.. raw:: html

<table border="1" class="docutils">
<th>NORMALIZED</th><th>ANSIBLE</th>

<tr>
<td>arista_eos</td><td>arista.eos.eos</td>
</tr>
<tr>
<td>ciena_saos</td><td>ciena.saos6.saos6</td>
</tr>
<tr>
<td>cisco_asa</td><td>cisco.asa.asa</td>
</tr>
<tr>
<td>cisco_ios</td><td>cisco.ios.ios</td>
</tr>
<tr>
<td>cisco_xr</td><td>cisco.iosxr.iosxr</td>
</tr>
<tr>
<td>cisco_nxos</td><td>cisco.nxos.nxos</td>
</tr>
<tr>
<td>huawei</td><td>community.network.ce</td>
</tr>
<tr>
<td>dell_os6</td><td>dellemc.os6.os6</td>
</tr>
<tr>
<td>dell_os9</td><td>dellemc.os9.os9</td>
</tr>
<tr>
<td>dell_os10</td><td>dellemc.os10.0s10</td>
</tr>
<tr>
<td>ericsson_ipos</td><td>community.network.eric_eccli</td>
</tr>
<tr>
<td>extreme_exos</td><td>community.network.exos</td>
</tr>
<tr>
<td>extreme_netiron</td><td>community.network.ironware</td>
</tr>
<tr>
<td>extreme_nos</td><td>community.network.nos</td>
</tr>
<tr>
<td>extreme_slx</td><td>community.network.slxos</td>
</tr>
<tr>
<td>extreme_vsp</td><td>community.network.voss</td>
</tr>
<tr>
<td>juniper_junos</td><td>junipernetworks.junos.junos</td>
</tr>
<tr>
<td>lenovo_cnos</td><td>community.network.cnos</td>
</tr>
<tr>
<td>lenovo_enos</td><td>community.network.enos</td>
</tr>
<tr>
<td>mikrotik_routeros</td><td>community.network.routeros</td>
</tr>
<tr>
<td>nokia_sros</td><td>community.network.sros</td>
</tr>
<tr>
<td>pluribus</td><td>community.network.netvisor</td>
</tr>
<tr>
<td>ruckus_icx</td><td>community.network.icx</td>
</tr>
<tr>
<td>vyos</td><td>vyos.vyos.vyos</td>
</tr>
</table>
78 changes: 78 additions & 0 deletions docs/source/netutils/lib_mapping/ANSIBLE_table.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
.. raw:: html

<table border="1" class="docutils">
<th>ANSIBLE</th><th>NORMALIZED</th>

<tr>
<td>arista.eos.eos</td><td>arista_eos</td>
</tr>
<tr>
<td>ciena.saos6.saos6</td><td>ciena_saos</td>
</tr>
<tr>
<td>cisco.asa.asa</td><td>cisco_asa</td>
</tr>
<tr>
<td>cisco.ios.ios</td><td>cisco_ios</td>
</tr>
<tr>
<td>cisco.iosxr.iosxr</td><td>cisco_xr</td>
</tr>
<tr>
<td>cisco.nxos.nxos</td><td>cisco_nxos</td>
</tr>
<tr>
<td>community.network.ce</td><td>huawei</td>
</tr>
<tr>
<td>dellemc.os6.os6</td><td>dell_os6</td>
</tr>
<tr>
<td>dellemc.os9.os9</td><td>dell_os9</td>
</tr>
<tr>
<td>dellemc.os10.0s10</td><td>dell_os10</td>
</tr>
<tr>
<td>community.network.eric_eccli</td><td>ericsson_ipos</td>
</tr>
<tr>
<td>community.network.exos</td><td>extreme_exos</td>
</tr>
<tr>
<td>community.network.ironware</td><td>extreme_netiron</td>
</tr>
<tr>
<td>community.network.nos</td><td>extreme_nos</td>
</tr>
<tr>
<td>community.network.slxos</td><td>extreme_slx</td>
</tr>
<tr>
<td>community.network.voss</td><td>extreme_vsp</td>
</tr>
<tr>
<td>junipernetworks.junos.junos</td><td>juniper_junos</td>
</tr>
<tr>
<td>community.network.cnos</td><td>lenovo_cnos</td>
</tr>
<tr>
<td>community.network.enos</td><td>lenovo_enos</td>
</tr>
<tr>
<td>community.network.routeros</td><td>mikrotik_routeros</td>
</tr>
<tr>
<td>community.network.netvisor</td><td>pluribus</td>
</tr>
<tr>
<td>community.network.icx</td><td>ruckus_icx</td>
</tr>
<tr>
<td>community.network.sros</td><td>nokia_sros</td>
</tr>
<tr>
<td>vyos.vyos.vyos</td><td>vyos</td>
</tr>
</table>
42 changes: 42 additions & 0 deletions docs/source/netutils/lib_mapping/NAPALM_reverse_table.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
.. raw:: html

<table border="1" class="docutils">
<th>NORMALIZED</th><th>NAPALM</th>

<tr>
<td>arista_eos</td><td>eos</td>
</tr>
<tr>
<td>brocade_vyos</td><td>vyos</td>
</tr>
<tr>
<td>cisco_asa</td><td>asa</td>
</tr>
<tr>
<td>cisco_ios</td><td>ios</td>
</tr>
<tr>
<td>cisco_nxos</td><td>nxos</td>
</tr>
<tr>
<td>cisco_xr</td><td>iosxr</td>
</tr>
<tr>
<td>cisco_wlc</td><td>cisco_wlc_ssh</td>
</tr>
<tr>
<td>fortinet</td><td>fortios</td>
</tr>
<tr>
<td>huawei_vrp</td><td>huawei</td>
</tr>
<tr>
<td>juniper_junos</td><td>junos</td>
</tr>
<tr>
<td>paloalto_panos</td><td>panos</td>
</tr>
<tr>
<td>nokia_sros</td><td>sros</td>
</tr>
</table>
Loading