From owner-svn-ports-all@freebsd.org Sat May 19 18:41:10 2018 Return-Path: Delivered-To: svn-ports-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D61D6EDDE2F; Sat, 19 May 2018 18:41:09 +0000 (UTC) (envelope-from miwi@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8791B7A305; Sat, 19 May 2018 18:41:09 +0000 (UTC) (envelope-from miwi@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 697192DFA; Sat, 19 May 2018 18:41:09 +0000 (UTC) (envelope-from miwi@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4JIf9OI068995; Sat, 19 May 2018 18:41:09 GMT (envelope-from miwi@FreeBSD.org) Received: (from miwi@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4JIf81F068989; Sat, 19 May 2018 18:41:08 GMT (envelope-from miwi@FreeBSD.org) Message-Id: <201805191841.w4JIf81F068989@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: miwi set sender to miwi@FreeBSD.org using -f From: Martin Wilke Date: Sat, 19 May 2018 18:41:08 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r470424 - in head/net-mgmt: . py-napalm-logs py-napalm-logs/files X-SVN-Group: ports-head X-SVN-Commit-Author: miwi X-SVN-Commit-Paths: in head/net-mgmt: . py-napalm-logs py-napalm-logs/files X-SVN-Commit-Revision: 470424 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 19 May 2018 18:41:10 -0000 Author: miwi Date: Sat May 19 18:41:07 2018 New Revision: 470424 URL: https://svnweb.freebsd.org/changeset/ports/470424 Log: Parses syslog messages from network devices and produce JSON serializable Python objects, in a vendor agnostic shape. The output objects are structured following the OpenConfig or IETF YANG model specifications. WWW: https://github.com/napalm-automation/napalm-logs PR: 227719 Submitted by: freebsd_ports@k-worx.org Sponsored by: iXsystems Inc. Added: head/net-mgmt/py-napalm-logs/ head/net-mgmt/py-napalm-logs/Makefile (contents, props changed) head/net-mgmt/py-napalm-logs/distinfo (contents, props changed) head/net-mgmt/py-napalm-logs/files/ head/net-mgmt/py-napalm-logs/files/patch-napalm__logs_config_____init____.py (contents, props changed) head/net-mgmt/py-napalm-logs/files/pkg-message.in (contents, props changed) head/net-mgmt/py-napalm-logs/pkg-descr (contents, props changed) Modified: head/net-mgmt/Makefile Modified: head/net-mgmt/Makefile ============================================================================== --- head/net-mgmt/Makefile Sat May 19 18:39:02 2018 (r470423) +++ head/net-mgmt/Makefile Sat May 19 18:41:07 2018 (r470424) @@ -314,6 +314,7 @@ SUBDIR += py-msrest SUBDIR += py-msrestazure SUBDIR += py-napalm + SUBDIR += py-napalm-logs SUBDIR += py-ncclient SUBDIR += py-pdagent SUBDIR += py-pyIOSXR Added: head/net-mgmt/py-napalm-logs/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/net-mgmt/py-napalm-logs/Makefile Sat May 19 18:41:07 2018 (r470424) @@ -0,0 +1,31 @@ +# $FreeBSD$ + +PORTNAME= napalm-logs +DISTVERSION= 0.5.0 +CATEGORIES= net-mgmt python +MASTER_SITES= CHEESESHOP +PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} + +MAINTAINER= freebsd_ports@k-worx.org +COMMENT= Cross-vendor normalisation for network syslog messages + +LICENSE= APACHE20 + +BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pip>0:devel/py-pip@${PY_FLAVOR} +RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pynacl>0:security/py-pynacl@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}pyzmq>0:net/py-pyzmq@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}u-msgpack-python>0:devel/py-u-msgpack-python@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}yaml>0:devel/py-yaml@${PY_FLAVOR} + +USES= python +USE_PYTHON= distutils concurrent autoplist +NO_ARCH= yes + +SUB_FILES= pkg-message +SUB_LIST= PREFIX=${PREFIX} PYTHON_VER=${PYTHON_VER} + +post-patch: + @${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|' \ + ${WRKSRC}/napalm_logs/config/__init__.py + +.include Added: head/net-mgmt/py-napalm-logs/distinfo ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/net-mgmt/py-napalm-logs/distinfo Sat May 19 18:41:07 2018 (r470424) @@ -0,0 +1,3 @@ +TIMESTAMP = 1526723764 +SHA256 (napalm-logs-0.5.0.tar.gz) = a4d9e06795844e7f375f2152163556d83a3685dc2f6efde379daca02a89acd43 +SIZE (napalm-logs-0.5.0.tar.gz) = 42289 Added: head/net-mgmt/py-napalm-logs/files/patch-napalm__logs_config_____init____.py ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/net-mgmt/py-napalm-logs/files/patch-napalm__logs_config_____init____.py Sat May 19 18:41:07 2018 (r470424) @@ -0,0 +1,12 @@ +--- napalm_logs/config/__init__.py.orig 2018-05-19 10:13:50 UTC ++++ napalm_logs/config/__init__.py +@@ -11,7 +11,8 @@ import napalm_logs.ext.six as six + + # config + ROOT_DIR = '/' +-CONFIG_FILE = os.path.join(ROOT_DIR, 'etc', 'napalm', 'logs') ++#CONFIG_FILE = os.path.join(ROOT_DIR, 'etc', 'napalm', 'logs') ++CONFIG_FILE = os.path.join('%%PREFIX%%', 'etc', 'napalm', 'logs') + ADDRESS = '0.0.0.0' + PORT = 514 + LISTENER = 'udp' Added: head/net-mgmt/py-napalm-logs/files/pkg-message.in ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/net-mgmt/py-napalm-logs/files/pkg-message.in Sat May 19 18:41:07 2018 (r470424) @@ -0,0 +1,57 @@ +=============================================================================== + +===================== + Paths / CLI version +===================== + +napalm-logs has been installed into: + +%%PREFIX%%/bin/napalm-logs-%%PYTHON_VER%% + +The default path for the configuration file is: + +%%PREFIX%%/etc/napalm/logs + +The default path for logfiles (will be created automatically on first run) is: + +/var/log/napalm/logs + +================================== + Message encryption / CLI version +================================== + +If the messaging between server/client should be encrypted, one will require a +certificate and a key otherwise the program will throw an exception and exits. + +Generate a certificate with the following command: + +$ openssl req -nodes -x509 -newkey rsa:4096 -keyout napalm-logs.key -out napalm-logs.crt -days 365 + +If no encryption is required, please read further below how to start the server +without a certificate. + +=================================== + Starting the server / CLI version +=================================== + +a) with encrypted messaging: + +# napalm-logs-%%PYTHON_VER%% --certificate napalm-logs.cert --keyfile napalm-logs.key + +b) with unencrypted messaging: + +# napalm-logs-%%PYTHON_VER%% --disable-security + +In both cases the server will listen on + + 0.0.0.0:514 [UDP / incoming syslog messages] + 0.0.0.0:49017 [TCP / incoming client requests] + +In case a) when security is enabled, the server will listen also on: + + 0.0.0.0:49018 [TCP / incoming authentication requests] + +Please read https://napalm-logs.readthedocs.io/en/latest for further +information. + +============================================================================== Added: head/net-mgmt/py-napalm-logs/pkg-descr ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/net-mgmt/py-napalm-logs/pkg-descr Sat May 19 18:41:07 2018 (r470424) @@ -0,0 +1,5 @@ +Parses syslog messages from network devices and produce JSON serializable +Python objects, in a vendor agnostic shape. The output objects are structured +following the OpenConfig or IETF YANG model specifications. + +WWW: https://github.com/napalm-automation/napalm-logs