From bca2314b1351eccaf25d573fa973351a35b43e24 Mon Sep 17 00:00:00 2001 From: Jack Lucas Date: Wed, 15 Nov 2023 12:10:36 -0500 Subject: [SNMPTRAP] Use latest cbs library Update to use latest cbs library (2.2.1) in requirements.txt. Pin pyasn1 library to 0.4.8. Later versions are incompatible with the (no longer maintained) pysnmp library. Pin python version to 3.8.x in Dockerfile. Fix EXPOSE syntax in Dockerfile. Issue-ID: DCAEGEN2-3409 Change-Id: I34248376d7c4c2fefa97cee51fc4ff341000375b Signed-off-by: Jack Lucas --- Changelog.md | 5 +++++ Dockerfile | 6 ++++-- pom.xml | 5 +++-- requirements.txt | 3 ++- setup.py | 5 +++-- version.properties | 2 +- 6 files changed, 18 insertions(+), 8 deletions(-) diff --git a/Changelog.md b/Changelog.md index c102c46..4f23dcb 100644 --- a/Changelog.md +++ b/Changelog.md @@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/). +## [2.0.8] - 2023/11/15 +- [DCAEGEN2-3409] Correctly use version 2.2.1 of onap_dcae_cbs_docker_client by specifying it in requirements.txt +- [DCAEGEN2-3409] Explicitly set version for pyasn1 to 0.4.8 to avoid using later versions that are incompatible with pysnmp. +- [DCAEGEN2-3409] Set base image to pypy:3.8 to avoid pulling a later version of python with incompatibilities. + ## [2.0.7] - 2022/08/17 - [DCAEGEN2-3158] CodeCoverage improvement for dcaegen2-collectors-snmptrap (60% to 90%) diff --git a/Dockerfile b/Dockerfile index 6a79013..49a749d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,7 @@ +# Copyright (c) 2023 J. F. Lucas. All rights reserved. +# (Previous versions by other authors did not have copyright notice.) # Use an official pypy runtime as a base image -FROM pypy:3 +FROM pypy:3.8 ENV INSROOT /opt/app ENV APPUSER snmptrap @@ -14,7 +16,7 @@ RUN useradd -d ${APPDIR} ${APPUSER} WORKDIR ${APPDIR} -EXPOSE 162:6162/udp +EXPOSE 6162/udp # Copy the current directory contents into the container at ${APPDIR} COPY ./snmptrap/ ./bin/ diff --git a/pom.xml b/pom.xml index d180e03..2d10e19 100644 --- a/pom.xml +++ b/pom.xml @@ -2,6 +2,7 @@ org.apache.maven.plugins diff --git a/requirements.txt b/requirements.txt index a55cd16..793d2a2 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,5 @@ pysnmp==4.4.12 +pyasn1==0.4.8 requests==2.18.3 -onap_dcae_cbs_docker_client==2.1.0 +onap_dcae_cbs_docker_client==2.2.1 pyyaml diff --git a/setup.py b/setup.py index 0fb95b0..abac4f3 100644 --- a/setup.py +++ b/setup.py @@ -1,6 +1,7 @@ # ============LICENSE_START======================================================= # Copyright (c) 2017-2022 AT&T Intellectual Property. All rights reserved. # Copyright (c) 2021 Deutsche Telekom. All rights reserved. +# Copyright (c) 2023 J. F. Lucas. All rights reserved. # ================================================================================ # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -25,9 +26,9 @@ from setuptools import setup, find_packages setup( name="snmptrap", description="snmp trap receiver for ONAP docker image", - version="2.0.7", + version="2.0.8", packages=find_packages(), - install_requires=["pysnmp==4.4.12", "requests==2.18.3", "onap_dcae_cbs_docker_client==2.2.1", "pyyaml"], + install_requires=["pysnmp==4.4.12", "pyasn1==0.4.8", "requests==2.18.3", "onap_dcae_cbs_docker_client==2.2.1", "pyyaml"], author="Dave L", author_email="dl3158@att.com", license="Apache 2", diff --git a/version.properties b/version.properties index a640c99..02713b8 100644 --- a/version.properties +++ b/version.properties @@ -1,6 +1,6 @@ major=2 minor=0 -patch=7 +patch=8 base_version=${major}.${minor}.${patch} release_version=${base_version} snapshot_version=${base_version}-SNAPSHOT -- cgit 1.2.3-korg