Skip to content

Commit

Permalink
Merge pull request #30 from napalm-automation-community/develop
Browse files Browse the repository at this point in the history
Fix installation fails with the pip > 10  dev->master
  • Loading branch information
ppieprzycki authored Feb 15, 2019
2 parents 2278bdd + df1d827 commit 1d11f45
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 13 deletions.
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,3 +99,12 @@ Notes

* The NAPALM-vyos driver supports authentication with ssh key. Please specify path to a key in optional_args
`'optional_args': {'key_file': '/home/user/ssh_private_key'}`

Configuration Examples
----------------------
* Vyos as IPSec VPN endpoint and BGP router - https://github.com/DreamLab/ansible-vyos
* CI Demo for vyos+junos (Polish only) https://github.com/ppieprzycki/plnog2016

VyOS Community
------------------
Slack Channel https://slack.vyos.io
15 changes: 13 additions & 2 deletions napalm_vyos/vyos.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,12 @@ def compare_config(self):
diff = ''.join(output_compare.splitlines(True)[1:-1])
return diff

def commit_config(self):
def commit_config(self, message=""):
if message:
raise NotImplementedError(
"Commit message not implemented for this platform"
)

try:
self.device.commit()
except ValueError:
Expand Down Expand Up @@ -358,7 +363,7 @@ def _get_value(key, target_dict):
else:
return None

def get_arp_table(self):
def get_arp_table(self, vrf=""):
# 'age' is not implemented yet

"""
Expand All @@ -370,6 +375,12 @@ def get_arp_table(self):
10.129.2.97 ether 00:50:56:9f:64:09 C eth0
192.168.1.3 ether 00:50:56:86:7b:06 C eth1
"""

if vrf:
raise NotImplementedError(
"VRF support has not been added for this getter on this platform."
)

output = self.device.send_command("show arp")
output = output.split("\n")

Expand Down
26 changes: 15 additions & 11 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,30 +1,34 @@
"""setup.py file."""

import uuid

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

with open("requirements.txt", "r") as fs:
reqs = [r for r in fs.read().splitlines()
if (len(r) > 0 and not r.startswith("#"))]

__author__ = 'Piotr Pieprzycki <[email protected]>'

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

setup(
name="napalm-vyos",
version="0.1.5",
version="0.1.6",
packages=find_packages(),
author="Piotr Pieprzycki",
author_email="[email protected]",
description="Network Automation and Programmability Abstraction Layer with Multivendor support",
classifiers=[
'Topic :: Utilities',
'Programming Language :: Python',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Operating System :: POSIX :: Linux',
'Operating System :: MacOS',
'Programming Language :: Python',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Operating System :: POSIX :: Linux',
'Operating System :: MacOS',
],
url="https://github.com/napalm-automation-community/napalm-vyos",
include_package_data=True,
install_requires=reqs,
)

0 comments on commit 1d11f45

Please sign in to comment.