aboutsummaryrefslogtreecommitdiff
path: root/net-mgmt/py-napalm-logs
diff options
context:
space:
mode:
authorMartin Wilke <miwi@FreeBSD.org>2018-05-19 18:41:07 +0000
committerMartin Wilke <miwi@FreeBSD.org>2018-05-19 18:41:07 +0000
commit0b08577c4bbc7a075d95779e83d645e2ff813533 (patch)
tree80cc4cfaf9ed9c255fed0f6da3a0d24e422bbd48 /net-mgmt/py-napalm-logs
parent77d9a301ef1182420a587074bd25ac1795fa7410 (diff)
downloadports-0b08577c4bbc7a075d95779e83d645e2ff813533.tar.gz
ports-0b08577c4bbc7a075d95779e83d645e2ff813533.zip
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.
Notes
Notes: svn path=/head/; revision=470424
Diffstat (limited to 'net-mgmt/py-napalm-logs')
-rw-r--r--net-mgmt/py-napalm-logs/Makefile31
-rw-r--r--net-mgmt/py-napalm-logs/distinfo3
-rw-r--r--net-mgmt/py-napalm-logs/files/patch-napalm__logs_config_____init____.py12
-rw-r--r--net-mgmt/py-napalm-logs/files/pkg-message.in57
-rw-r--r--net-mgmt/py-napalm-logs/pkg-descr5
5 files changed, 108 insertions, 0 deletions
diff --git a/net-mgmt/py-napalm-logs/Makefile b/net-mgmt/py-napalm-logs/Makefile
new file mode 100644
index 000000000000..155ab496904e
--- /dev/null
+++ b/net-mgmt/py-napalm-logs/Makefile
@@ -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 <bsd.port.mk>
diff --git a/net-mgmt/py-napalm-logs/distinfo b/net-mgmt/py-napalm-logs/distinfo
new file mode 100644
index 000000000000..1827fdd97466
--- /dev/null
+++ b/net-mgmt/py-napalm-logs/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1526723764
+SHA256 (napalm-logs-0.5.0.tar.gz) = a4d9e06795844e7f375f2152163556d83a3685dc2f6efde379daca02a89acd43
+SIZE (napalm-logs-0.5.0.tar.gz) = 42289
diff --git a/net-mgmt/py-napalm-logs/files/patch-napalm__logs_config_____init____.py b/net-mgmt/py-napalm-logs/files/patch-napalm__logs_config_____init____.py
new file mode 100644
index 000000000000..1fe1cb4b621b
--- /dev/null
+++ b/net-mgmt/py-napalm-logs/files/patch-napalm__logs_config_____init____.py
@@ -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'
diff --git a/net-mgmt/py-napalm-logs/files/pkg-message.in b/net-mgmt/py-napalm-logs/files/pkg-message.in
new file mode 100644
index 000000000000..0e6079f24691
--- /dev/null
+++ b/net-mgmt/py-napalm-logs/files/pkg-message.in
@@ -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.
+
+==============================================================================
diff --git a/net-mgmt/py-napalm-logs/pkg-descr b/net-mgmt/py-napalm-logs/pkg-descr
new file mode 100644
index 000000000000..60712b759b53
--- /dev/null
+++ b/net-mgmt/py-napalm-logs/pkg-descr
@@ -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