pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Use fetch/github.mk. Remove extraneous PLIST_SUBST settings. Don' t mention python 2.6.



Module Name:	pkgsrc-wip
Committed By:	Havard Eidnes <he%NetBSD.org@localhost>
Pushed By:	he
Date:		Tue Mar 1 09:01:16 2016 +0100
Changeset:	381ca2f288147c7c175b444045639c848fa0c2de

Modified Files:
	py-napalm/Makefile
	py-napalm/distinfo
Added Files:
	py-napalm/patches/patch-napalm_exceptions.py
	py-napalm/patches/patch-napalm_ios.py

Log Message:
Use fetch/github.mk.
Remove extraneous PLIST_SUBST settings.
Don't mention python 2.6.

Optionally make it possible to do "enable" on Cisco IOS devices
to enter privileged mode; not everyone has their AAA set up to
do that on login.

Bump PKGREVISION.

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=381ca2f288147c7c175b444045639c848fa0c2de

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 py-napalm/Makefile                           |  8 +++---
 py-napalm/distinfo                           |  2 ++
 py-napalm/patches/patch-napalm_exceptions.py | 12 +++++++++
 py-napalm/patches/patch-napalm_ios.py        | 38 ++++++++++++++++++++++++++++
 4 files changed, 55 insertions(+), 5 deletions(-)

diffs:
diff --git a/py-napalm/Makefile b/py-napalm/Makefile
index e6eec3b..af83cd5 100644
--- a/py-napalm/Makefile
+++ b/py-napalm/Makefile
@@ -2,9 +2,9 @@
 
 DISTNAME=	napalm-0.51.0
 PKGNAME=	${PYPKGPREFIX}-${DISTNAME}
-PKGREVISION=	4
+PKGREVISION=	6
 CATEGORIES=	net
-MASTER_SITES=	-https://github.com/napalm-automation/napalm/archive/${PKGVERSION_NOREV}${EXTRACT_SUFX}
+MASTER_SITES=	${MASTER_SITE_GITHUB:=napalm-automation/}
 
 MAINTAINER=	pkgsrc-users%NetBSD.org@localhost
 HOMEPAGE=	https://github.com/napalm-automation/napalm/
@@ -23,9 +23,7 @@ DEPENDS+=	${PYPKGPREFIX}-eapi-[0-9]*:../../wip/py-eapi
 # bnclient	Blade Network Technologies Netconf Python Client
 
 USE_LANGUAGES=	# none
-PLIST_SUBST+=	PYVERSUFFIX=${PYVERSUFFIX}
-PLIST_SUBST+=	PYPKGPREFIX=${PYPKGPREFIX}
-PYTHON_VERSIONS_ACCEPTED=	35 34 33 27 26
+PYTHON_VERSIONS_ACCEPTED=	35 34 33 27
 
 # Target dir already exists...
 INSTALL_EXTRA_FILES=	napalm/utils/*.yml
diff --git a/py-napalm/distinfo b/py-napalm/distinfo
index 9662f2d..a03204c 100644
--- a/py-napalm/distinfo
+++ b/py-napalm/distinfo
@@ -5,3 +5,5 @@ RMD160 (napalm-0.51.0.tar.gz) = d77028e76ed653304fca19cfea444b971b320943
 SHA512 (napalm-0.51.0.tar.gz) = 99d749a50ee7d09c1a0de994055d86fd5f9603daa14fd73c847ffe9dc6ed8315d27758c16cb22a8d8dfcc031d80f24e41b0870b1b52d60530df167677661cd56
 Size (napalm-0.51.0.tar.gz) = 292674 bytes
 SHA1 (patch-napalm_____init____.py) = a63759bbf2262a12fa30c8698574f92255d82e61
+SHA1 (patch-napalm_exceptions.py) = 59f90a81d342e123c228332de5a338ce215b1c4f
+SHA1 (patch-napalm_ios.py) = 7e298cdd23eb2bbf3c4b20285f37a13e6a0ac9be
diff --git a/py-napalm/patches/patch-napalm_exceptions.py b/py-napalm/patches/patch-napalm_exceptions.py
new file mode 100644
index 0000000..b60295f
--- /dev/null
+++ b/py-napalm/patches/patch-napalm_exceptions.py
@@ -0,0 +1,12 @@
+$NetBSD$
+
+Add an EnableModeException.
+
+--- napalm/exceptions.py.orig	2016-02-08 08:22:24.000000000 +0000
++++ napalm/exceptions.py
+@@ -20,3 +20,5 @@ class MergeConfigException(Exception):
+ 
+ class SessionLockedException(Exception):
+     pass
++class EnableModeException(Exception):
++    pass
diff --git a/py-napalm/patches/patch-napalm_ios.py b/py-napalm/patches/patch-napalm_ios.py
new file mode 100644
index 0000000..8059d50
--- /dev/null
+++ b/py-napalm/patches/patch-napalm_ios.py
@@ -0,0 +1,38 @@
+$NetBSD$
+
+Optionally use "enable" to enter privileged mode, not everyone have
+their AAA set up to log directly in as privileged.
+
+--- napalm/ios.py.orig	2016-02-08 08:22:24.000000000 +0000
++++ napalm/ios.py
+@@ -21,7 +21,7 @@ from datetime import datetime
+ 
+ from netmiko import ConnectHandler, FileTransfer
+ from napalm.base import NetworkDriver
+-from napalm.exceptions import ReplaceConfigException, MergeConfigException
++from napalm.exceptions import ReplaceConfigException, MergeConfigException, EnableModeException
+ 
+ # Easier to store these as constants
+ HOUR_SECONDS = 3600
+@@ -47,6 +47,7 @@ class IOSDriver(NetworkDriver):
+         self.global_delay_factor = optional_args.get('global_delay_factor', .5)
+         self.port = optional_args.get('port', 22)
+         self.auto_rollback_on_error = optional_args.get('auto_rollback_on_error', True)
++        self.secret = optional_args.get('secret', '')
+         self.device = None
+         self.config_replace = False
+ 
+@@ -58,7 +59,13 @@ class IOSDriver(NetworkDriver):
+                                      username=self.username,
+                                      password=self.password,
+                                      global_delay_factor=self.global_delay_factor,
++                                     secret=self.secret,
+                                      verbose=False)
++        if self.secret:
++          self.device.enable()
++          if not self.device.check_enable_mode():
++            raise EnableModeException('not in enable, Wrong password?')
++
+ 
+     def close(self):
+         """Closes the connection to the device."""


Home | Main Index | Thread Index | Old Index