Skip to content
This repository was archived by the owner on Feb 10, 2018. It is now read-only.

Commit

Permalink
First version of napalm-junos is almost ready
Browse files Browse the repository at this point in the history
  • Loading branch information
dbarrosop committed Mar 6, 2016
1 parent 4784514 commit e52437a
Show file tree
Hide file tree
Showing 14 changed files with 76 additions and 10 deletions.
35 changes: 35 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
language: python

python:
- 2.7

install:
- pip install -r requirements.txt
- pip install .

deploy:
provider: pypi
user: dbarroso
password:
secure: FWTA4L2e08mMpD8BbCNWTZN1XFCQKSlYUfPqT0aXDz/GgEK2KfZqbzj1V8Xwx4pXuBHSy8JunlpLGdc18dqtfMKpryz7elWbIsvyPNvcVFxYatG1RdDZB3qiN0MWTCVOCTUyOeglbOsaahKlV66RGBRbQpx107woZ/I+hg43jeNdi6fUer5Ip2DXLMFkR7yb5vbI+tc9KM1Z3/isSzmpkYWQm1MUGxnFonye46r6MoSOANTDpzNIAQKOKwUvGwdovZCAhdqn8JQp8EsKB9Tl0QK56k2//TWmOlglvwL3vVHOeP0V12fc8viKvYRGXKSCwzcz+bi5RSGo0Afurc7lVrmHgJbJIfXxilucE0OBOn58487wynn3k+30D39V9PnddYJ6iNU1ji7/qYpCbyE9ydSKFu4rFgwDbFTU1kJ+JlmNmoJYET/rZITQNUjtFC9grtjSdpouurzNS4eSg7CD8EfzVV6i3IS+1p9n4xosUxdCRl8/jhm9pNMW2OaM00r4GwW2Xt4kDP9J8OWDhlErDLE5lR4EjuGPCLmCYTWcl3DtvUlDCqBs5JZutHV+6raHBw7qFUcI2MxacjQys/3etjIUb9UilbBP1cnqec5Q/FfcTvD0QXCT56f1eM87eh4ysxmHFIDrW+ZwaDW/DicOExfeq264bYOge01poQEkdGM=
on:
tags: true
branch: master

script:
- cd test/unit
- nosetests -v TestJunOSDriver:TestGetterJunOSDriver.test_get_bgp_config
- nosetests -v TestJunOSDriver:TestGetterJunOSDriver.test_get_bgp_neighbors
- nosetests -v TestJunOSDriver:TestGetterJunOSDriver.test_bgp_neighbors_detail
- nosetests -v TestJunOSDriver:TestGetterJunOSDriver.test_get_environment
- nosetests -v TestJunOSDriver:TestGetterJunOSDriver.test_get_facts
- nosetests -v TestJunOSDriver:TestGetterJunOSDriver.test_get_interfaces
- nosetests -v TestJunOSDriver:TestGetterJunOSDriver.test_get_interfaces_counters
- nosetests -v TestJunOSDriver:TestGetterJunOSDriver.test_get_lldp_neighbors
- nosetests -v TestJunOSDriver:TestGetterJunOSDriver.test_get_lldp_neighbors_detail
- nosetests -v TestJunOSDriver:TestGetterJunOSDriver.test_get_arp_table
- nosetests -v TestJunOSDriver:TestGetterJunOSDriver.test_get_ntp_peers
- nosetests -v TestJunOSDriver:TestGetterJunOSDriver.test_get_interfaces_ip
- nosetests -v TestJunOSDriver:TestGetterJunOSDriver.test_get_mac_address_table
- nosetests -v TestJunOSDriver:TestGetterJunOSDriver.test_get_route_to
- nosetests -v TestJunOSDriver:TestGetterJunOSDriver.test_get_snmp_information
4 changes: 4 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
include requirements.txt
include napalm_junos/utils/*.yml
include napalm_junos/templates/*.j2
include napalm_junos/utils/textfsm_templates/*.tpl
Empty file added napalm_junos/__init__.py
Empty file.
13 changes: 5 additions & 8 deletions napalm/junos.py → napalm_junos/junos.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,16 @@
import re
import collections

from napalm.utils import junos_views
from base import NetworkDriver
from napalm_junos.utils import junos_views
from napalm_base.base import NetworkDriver

from jnpr.junos import Device
from jnpr.junos.utils.config import Config
from jnpr.junos.exception import ConfigLoadError, ConnectTimeoutError
from exceptions import ConnectionException, ReplaceConfigException, MergeConfigException, CommandErrorException
from napalm_base.exceptions import ConnectionException, ReplaceConfigException, MergeConfigException,\
CommandErrorException

from lxml import etree as ET

from exceptions import ReplaceConfigException, MergeConfigException

from utils import string_parsers
from napalm_base.utils import string_parsers


class JunOSDriver(NetworkDriver):
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
junos-eznc
29 changes: 29 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
"""setup.py file."""

import uuid

from setuptools import setup, find_packages
from pip.req import parse_requirements

__author__ = 'David Barroso <dbarrosop@dravetech.com>'

install_reqs = parse_requirements('requirements.txt', session=uuid.uuid1())
reqs = [str(ir.req) for ir in install_reqs]

setup(
name="napalm-junos",
version="0.1.0",
packages=find_packages(),
author="David Barroso",
author_email="dbarrosop@dravetech.com",
description="Network Automation and Programmability Abstraction Layer with Multivendor support",
classifiers=[
'Topic :: Utilities',
'Programming Language :: Python',
'Operating System :: POSIX :: Linux',
'Operating System :: MacOS',
],
url="https://github.com/napalm-automation/napalm-junos",
include_package_data=True,
install_requires=reqs,
)
4 changes: 2 additions & 2 deletions test/unit/TestJunOSDriver.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@

import unittest

from napalm.junos import JunOSDriver
from base import TestConfigNetworkDriver, TestGettersNetworkDriver
from napalm_junos.junos import JunOSDriver
from napalm_base.test.base import TestConfigNetworkDriver, TestGettersNetworkDriver

import lxml

Expand Down

0 comments on commit e52437a

Please sign in to comment.