svn commit: r470424 - in head/net-mgmt: . py-napalm-logs py-napalm-logs/files
Martin Wilke
miwi at FreeBSD.org
Sat May 19 18:41:10 UTC 2018
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 at 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 at 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 <bsd.port.mk>
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
More information about the svn-ports-head
mailing list