Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 22 Oct 2019 07:11:35 +0000 (UTC)
From:      Kai Knoblich <kai@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r515170 - in head/net-mgmt/py-napalm: . files
Message-ID:  <201910220711.x9M7BZon036202@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kai
Date: Tue Oct 22 07:11:35 2019
New Revision: 515170
URL: https://svnweb.freebsd.org/changeset/ports/515170

Log:
  net-mgmt/py-napalm: Update to 2.5.0
  
  * Add a patch that fixes the unittests with net-mgmt/py-junos-eznc >= 2.3.0
  
  * Switch to GitHub for a while to make use of the test-suite that isn't
    available in the sdist, yet.
  
  * Add "do-test" target to make future QA easier.
  
  Changelog:
  
  Note: This is the last release supporting Python 2. Going forward, only
        Python 3.6+ will be supported.
  
  https://github.com/napalm-automation/napalm/releases/tag/2.5.0
  
  MFH:		2019Q4

Added:
  head/net-mgmt/py-napalm/files/
  head/net-mgmt/py-napalm/files/patch-test_junos_conftest.py   (contents, props changed)
Modified:
  head/net-mgmt/py-napalm/Makefile
  head/net-mgmt/py-napalm/distinfo

Modified: head/net-mgmt/py-napalm/Makefile
==============================================================================
--- head/net-mgmt/py-napalm/Makefile	Tue Oct 22 07:07:42 2019	(r515169)
+++ head/net-mgmt/py-napalm/Makefile	Tue Oct 22 07:11:35 2019	(r515170)
@@ -1,10 +1,8 @@
 # $FreeBSD$
 
 PORTNAME=	napalm
-DISTVERSION=	2.4.0
-PORTREVISION=	1
+DISTVERSION=	2.5.0
 CATEGORIES=	net-mgmt python
-MASTER_SITES=	CHEESESHOP
 PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
 
 MAINTAINER=	kai@FreeBSD.org
@@ -16,23 +14,32 @@ LICENSE_FILE=	${WRKSRC}/LICENSE
 RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}future>0:devel/py-future@${PY_FLAVOR} \
 		${PYTHON_PKGNAMEPREFIX}Jinja2>0:devel/py-Jinja2@${PY_FLAVOR} \
 		${PYTHON_PKGNAMEPREFIX}textfsm>0:textproc/py-textfsm@${PY_FLAVOR} \
-		${PYTHON_PKGNAMEPREFIX}junos-eznc>=2.2.0:net-mgmt/py-junos-eznc@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}junos-eznc>=2.2.1:net-mgmt/py-junos-eznc@${PY_FLAVOR} \
 		${PYTHON_PKGNAMEPREFIX}netaddr>0:net/py-netaddr@${PY_FLAVOR} \
-		${PYTHON_PKGNAMEPREFIX}netmiko>=2.3.0:security/py-netmiko@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}netmiko>=2.4.2:security/py-netmiko@${PY_FLAVOR} \
 		${PYTHON_PKGNAMEPREFIX}paramiko>=2.4.2:security/py-paramiko@${PY_FLAVOR} \
 		${PYTHON_PKGNAMEPREFIX}nxapi-plumbing>=0.5.2:net-mgmt/py-nxapi-plumbing@${PY_FLAVOR} \
 		${PYTHON_PKGNAMEPREFIX}pyeapi>=0.8.2:net-mgmt/py-pyeapi@${PY_FLAVOR} \
 		${PYTHON_PKGNAMEPREFIX}pyIOSXR>=0.53:net-mgmt/py-pyIOSXR@${PY_FLAVOR} \
 		${PYTHON_PKGNAMEPREFIX}scp>0:security/py-scp@${PY_FLAVOR} \
 		${PYTHON_PKGNAMEPREFIX}yaml>0:devel/py-yaml@${PY_FLAVOR} \
-		${PYTHON_PKGNAMEPREFIX}cffi>=1.11.3:devel/py-cffi@${PY_FLAVOR}
+		${PYTHON_PKGNAMEPREFIX}cffi>=1.11.3:devel/py-cffi@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}ciscoconfparse>0:net-mgmt/py-ciscoconfparse@${PY_FLAVOR}
+TEST_DEPENDS=	${PYTHON_PKGNAMEPREFIX}pytest>=3.6.4:devel/py-pytest@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}mock>=2.0.0:devel/py-mock@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}ddt>=1.2.0:devel/py-ddt@${PY_FLAVOR}
 
 USES=		python
 USE_PYTHON=	distutils concurrent autoplist
+USE_GITHUB=	yes
+GH_ACCOUNT=	napalm-automation
 
 NO_ARCH=	yes
 
 post-patch:
 	@${REINPLACE_CMD} -e 's|==|>=|' ${WRKSRC}/requirements.txt
+
+do-test:
+	@cd ${WRKSRC} && ${PYTHON_CMD} -m pytest -v -rs
 
 .include <bsd.port.mk>

Modified: head/net-mgmt/py-napalm/distinfo
==============================================================================
--- head/net-mgmt/py-napalm/distinfo	Tue Oct 22 07:07:42 2019	(r515169)
+++ head/net-mgmt/py-napalm/distinfo	Tue Oct 22 07:11:35 2019	(r515170)
@@ -1,3 +1,3 @@
-TIMESTAMP = 1550784668
-SHA256 (napalm-2.4.0.tar.gz) = 97e4021bec2200490d91d2829ffcef534ce3d841eef5b3251e2d1d50accd63ab
-SIZE (napalm-2.4.0.tar.gz) = 158163
+TIMESTAMP = 1571639020
+SHA256 (napalm-automation-napalm-2.5.0_GH0.tar.gz) = c30254303f0d908f64902d89ea73673a922d3a27f94c2af674264a1b5a230249
+SIZE (napalm-automation-napalm-2.5.0_GH0.tar.gz) = 1104384

Added: head/net-mgmt/py-napalm/files/patch-test_junos_conftest.py
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net-mgmt/py-napalm/files/patch-test_junos_conftest.py	Tue Oct 22 07:11:35 2019	(r515170)
@@ -0,0 +1,18 @@
+Fixes unittests with net-mgmt/py-junos-eznc >= 2.3.0
+
+See also:
+https://github.com/napalm-automation/napalm/issues/1060
+
+--- test/junos/conftest.py.orig	2019-10-10 10:31:18 UTC
++++ test/junos/conftest.py
+@@ -77,6 +77,10 @@ class FakeJunOSDevice(BaseTestDouble):
+         }
+         self._uptime = 4380
+ 
++        # Since junos-eznc 2.3.0 the new SAX parser is used as default. Thus
++        # disable it to use the DOM parser which was used prior.
++        self._use_filter = False
++
+     @property
+     def facts(self):
+         # we want to reinitialize it every time to avoid side effects



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201910220711.x9M7BZon036202>