Skip to content

Commit

Permalink
Merge pull request #536 from napalm-automation/develop
Browse files Browse the repository at this point in the history
Release 2.1.0
  • Loading branch information
dbarrosop authored Nov 18, 2017
2 parents 30cbfb4 + 136c335 commit 01e83de
Show file tree
Hide file tree
Showing 49 changed files with 1,446 additions and 183 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
[![PyPI](https://img.shields.io/pypi/v/napalm.svg)](https://pypi.python.org/pypi/napalm)
[![Build Status](https://travis-ci.org/napalm-automation/napalm.svg?branch=master)](https://travis-ci.org/napalm-automation/napalm)
[![Coverage Status](https://coveralls.io/repos/github/napalm-automation/napalm/badge.svg)](https://coveralls.io/github/napalm-automation/napalm)


NAPALM
Expand Down
1 change: 1 addition & 0 deletions docs/development/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ Some useful information for development purposes.
:maxdepth: 1

testing_framework
triage
231 changes: 231 additions & 0 deletions docs/development/triage.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,231 @@
.. _triaging:

Triaging Issues and Pull Requests
=================================

.. note::

This document serves mainly as a reference for the NAPALM maintainers,
but the users are equally welcome to read this document and understand our
process, and eventually suggest improvements.

We triage Issues and Pull Requests (PR) using GitHub features only:

- :ref:`triage-labels`
- :ref:`triage-milestone`
- :ref:`triage-projects`

.. _triage-labels:

Labels
++++++

.. _triage-driver-labels:

Driver labels
-------------

Each platform supported by NAPALM has associated a label, e.g., ``junos``, ``eos``,
``ios``, ``iosxr``, ``vyos``, etc. It is mandatory that the maintainer to apply
one or more of these labels.

.. _triage-api-change-label:

``api change``
--------------

If the Issue would imply a change in the API, or the PR introduces changes in
the API. By API change we refer to changes in the getters output structure,
methods signature, or any core changes that must be uniformly introduced across
all the drivers.

.. _triage-awesome-label:

``awesome``
-----------

When someone adds or proposes something really awesome.

.. _triage-base-label:

``base``
--------

When base components are affected, e.g., `get_network_driver`, the validate
functionality, or the testing framework.

.. _triage-blocked-label:

``blocked``
-----------

Added in case we block the PR temporarly, or an Issue is currently blocked by
other internal or external factors (PRs pending to be merged, other bugs to be
solved a priori, etc.)

.. _triage-bug-label:

``bug``
-------

Whenever the behaviour reported in the Issue is different than it should, or the
PR kills a bug.

.. _triage-cannot-reproduce:

``cannot reproduce``
--------------------

This refers to Issues only, and it is added when the maintainer(s) cannot
reproduce the behaviour reported.

.. _triage-core-label:

``core``
--------

When any core components (drivers) are affected.

.. _triage-deprecation-label:

``deprecation``
---------------

Added only to PRs, when a API deprecation is introduced.

.. _triage-documentation-label:

``documentation``
-----------------

Can be added to both Issues and PRs, anything related to the documentation.

.. _triage-duplicate-label:

``duplicate``
-------------

Applicable to Issues only, to be added before closing a duplicate.

.. _triage-feature-label:

``feature``
-----------

When a new feature is introduced, or the user requests a new feature.

.. _triage-good-first-issue:

``good first issue``
--------------------

While we want to encourage the community to contribute more and more frequent,
many engineers are still afraid of complex tasks. This label marks simple fixes
that new contributors can address. It is recommended that this label to be
accompanied by an explanation and a pointer for the new contributors.

.. _triage-help-wanted:

``help wanted``
---------------

This marks an Issue were we ask the community for help, or we need more details
on a particular topic (e.g., outputs from different platforms, explanation, etc.)
from any volunteer from the community.

Once we have all the details required, the maintainer has to remove this label
even though it does not start working on it immediately.

.. _triage-high-severity-label:

``high severity``
-----------------

Whenever a :ref:`triage-bug-label` affects severely one or more features, making
it basically unusable.

.. _triage-info-needed-label:

``info needed``
---------------

We add this label when we need more details and further explanation from the user
that reports an Issue. Once we received everything needed, we can remove that
label.

.. _triage-investigation-label:

``investigation``
-----------------

We need to investigate the problem further.

.. _triage-new-driver:

``new driver``
--------------

When we discuss the possibility to add a new core driver.

.. _triage-new-method:

``new method``
--------------

When we discuss the possibility or implement a new method to one or more drivers.
The method does not necessarily need to be a completely new one to NAPALM.

.. _triage-vendor-bug-label:

``vendor bug``
--------------

When the bug is casued by a vendor stupidity.

.. _triage-milestone:

Milestone
+++++++++

The milestones are used to group the Issues and the Pull Requests from a
different angle:

.. _triage-version-milestone:

Version
-------

The Issue will be solved, or the PR will be included in this release.

.. _triage-approved-milestone:

``APPROVED``
------------

It means that we accept the Issue or the PR, but we don't have a schedule yet
for when the Issue will be solved, or the PR will be included in a release.

.. _triage-blocked-milestone:

``BLOCKED``
-----------

This groups the Issues or the PRs we could not accept for the reasons marked
using the labels.

.. _triage-discussion-milestone:

``DISCUSSION``
--------------

The Issue or the PR needs further discussion.


.. _triage-projects:

Projects
++++++++

Any major change that may consist on several Pull Requests should be groupped
into a GitHub Project.

1 change: 1 addition & 0 deletions napalm/_SUPPORTED_DRIVERS.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
SUPPORTED_DRIVERS = [
"base",
"eos",
"ios",
"iosxr",
Expand Down
5 changes: 4 additions & 1 deletion napalm/base/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,10 @@ def get_network_driver(module_name, prepend=True):
# Can also request using napalm_[SOMETHING]
if 'napalm' not in module_install_name and prepend is True:
module_install_name = 'napalm.{name}'.format(name=module_install_name)
module = importlib.import_module(module_install_name)
try:
module = importlib.import_module("custom_" + module_install_name)
except ImportError:
module = importlib.import_module(module_install_name)
except ImportError:
raise ModuleImportError(
'Cannot import "{install_name}". Is the library installed?'.format(
Expand Down
7 changes: 7 additions & 0 deletions napalm/base/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -1583,3 +1583,10 @@ def compliance_report(self, validation_file=None, validation_source=None):
"""
return validate.compliance_report(self, validation_file=validation_file,
validation_source=validation_source)

def _canonical_int(self, interface):
"""Expose the helper function within this class."""
if self.use_canonical_interface is True:
return napalm.base.helpers.canonical_interface_name(interface, update_os_mapping=None)
else:
return interface
101 changes: 101 additions & 0 deletions napalm/base/canonical_map.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
from __future__ import print_function
from __future__ import unicode_literals


base_interfaces = {
"ATM": "ATM",
"AT": "ATM",
"EOBC": "EOBC",
"EO": "EOBC",
"Ethernet": "Ethernet",
"Eth": "Ethernet",
"Et": "Ethernet",
"FastEthernet": "FastEthernet",
"FastEth": "FastEthernet",
"FastE": "FastEthernet",
"Fast": "FastEthernet",
"Fas": "FastEthernet",
"FE": "FastEthernet",
"Fa": "FastEthernet",
"Fddi": "Fddi",
"FD": "Fddi",
"FortyGigabitEthernet": "FortyGigabitEthernet",
"FortyGigEthernet": "FortyGigabitEthernet",
"FortyGigEth": "FortyGigabitEthernet",
"FortyGigE": "FortyGigabitEthernet",
"FortyGig": "FortyGigabitEthernet",
"FGE": "FortyGigabitEthernet",
"FO": "FortyGigabitEthernet",
"Fo": "FortyGigabitEthernet",
"GigabitEthernet": "GigabitEthernet",
"GigEthernet": "GigabitEthernet",
"GigEth": "GigabitEthernet",
"GigE": "GigabitEthernet",
"Gig": "GigabitEthernet",
"GE": "GigabitEthernet",
"Gi": "GigabitEthernet",
"HundredGigabitEthernet": "HundredGigabitEthernet",
"HundredGigEthernet": "HundredGigabitEthernet",
"HundredGigEth": "HundredGigabitEthernet",
"HundredGigE": "HundredGigabitEthernet",
"HundredGig": "HundredGigabitEthernet",
"Hu": "HundredGigabitEthernet",
"Loopback": "Loopback",
"Lo": "Loopback",
"Management": "Management",
"Mgmt": "Management",
"Ma": "Management",
"Management_short": "Ma",
"MFR": "MFR",
"Multilink": "Multilink",
"Mu": "Multilink",
"PortChannel": "PortChannel",
"Port-Channel": "PortChannel",
"Po": "PortChannel",
"POS": "POS",
"PO": "POS",
"Serial": "Serial",
"Se": "Serial",
"S": "Serial",
"TenGigabitEthernet": "TenGigabitEthernet",
"TenGigEthernet": "TenGigabitEthernet",
"TenGigEth": "TenGigabitEthernet",
"TenGig": "TenGigabitEthernet",
"TeGig": "TenGigabitEthernet",
"Ten": "TenGigabitEthernet",
"T": "TenGigabitEthernet",
"Te": "TenGigabitEthernet",
"Tunnel": "Tunnel",
"Tun": "Tunnel",
"Tu": "Tunnel",
"Virtual-Access": "Virtual-Access",
"Vi": "Virtual-Access",
"Virtual-Template": "Virtual-Template",
"Vt": "Virtual-Template",
"VLAN": "VLAN",
"V": "VLAN",
"Vl": "VLAN"
}

reverse_mapping = {
"ATM": "At",
"EOBC": "EO",
"Ethernet": "Et",
"FastEthernet": "Fa",
"Fddi": "FD",
"FortyGigabitEthernet": "Fo",
"GigabitEthernet": "Gi",
"HundredGigabitEthernet": "Hu",
"Loopback": "Lo",
"Management": "Ma",
"MFR": "MFR",
"Multilink": "Mu",
"PortChannel": "Po",
"POS": "PO",
"Serial": "Se",
"TenGigabitEthernet": "Te",
"Tunnel": "Tu",
"Virtual-Access": "Vi",
"Virtual-Template": "Vt",
"VLAN": "Vl"
}
Loading

0 comments on commit 01e83de

Please sign in to comment.