docker and build config updates
Change-Id: I8420760c2ee8245bfb4394532db47e303bb621e7
Issue-ID: DCAEGEN2-271
Signed-off-by: Ladue, David (dl3158) <dl3158@att.com>
diff --git a/Dockerfile b/Dockerfile
index e4806c3..4ac915e 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -12,14 +12,18 @@
EXPOSE 162
# Copy the current directory contents into the container at ${APPDIR}
-COPY ./src/ ./bin/
+COPY ./bin/ ./bin/
COPY ./etc/ ./etc/
-RUN mkdir -p ${APPDIR}/logs \
+RUN mkdir -p ${APPDIR}/data \
+ && mkdir -p ${APPDIR}/logs \
+ && mkdir -p ${APPDIR}/tmp \
&& chown -R ${APPUSER}:${APPUSER} ${APPDIR} \
+ && chmod a+w ${APPDIR}/data \
&& chmod a+w ${APPDIR}/logs \
+ && chmod a+w ${APPDIR}/tmp \
&& chmod 500 ${APPDIR}/etc \
- && chmod 500 ${APPDIR}/bin/dcae_snmptrapd.sh
+ && chmod 500 ${APPDIR}/bin/snmptrapd.sh
USER ${APPUSER}
@@ -27,4 +31,4 @@
VOLUME ${APPDIR}/logs
# Run run_policy.sh when the container launches
-CMD ["./bin/dcae_snmptrapd.sh"]
+CMD ["./bin/snmptrapd.sh start"]
diff --git a/setup.py b/setup.py
index 5351ca0..5a12f10 100644
--- a/setup.py
+++ b/setup.py
@@ -1,6 +1,6 @@
# org.onap.dcae
# ================================================================================
-# Copyright (c) 2017 AT&T Intellectual Property. All rights reserved.
+# Copyright (c) 2017-2018 AT&T Intellectual Property. 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.
@@ -23,10 +23,7 @@
import collections
import datetime
import errno
-from pysnmp.carrier.asyncio.dgram import udp, udp6
-from pysnmp.entity import engine, config
-from pysnmp.entity.rfc3413 import ntfrcv
-from pysnmp.proto.api import v2c
+import inspect
import json
import logging
import logging.handlers
@@ -40,24 +37,32 @@
import sys
import time
import traceback
-from trapd_dmaap_config import read_dmaap_config
-from trapd_exit import cleanup_and_exit
-from trapd_http_session import init_session_obj
-from trapd_perm_status import log_to_perm_status
-from trapd_runtime_pid import save_pid, rm_pid
-from trapd_trap_config import read_trap_config
-from trapd_yaml_config import read_yaml_config
+import trapd_settings
+import trapd_settings as tds
import unicodedata
import uuid as uuid_mod
-import yaml
+from collections import Counter
+from onap_dcae_cbs_docker_client.client import get_config
+from pysnmp.carrier.asyncio.dgram import udp, udp6
+# from pysnmp.carrier.asyncore.dgram import udp
+from pysnmp.entity import engine, config
+from pysnmp.entity.rfc3413 import ntfrcv
+from pysnmp.proto.api import v2c
+from trapd_exit import cleanup_and_exit
+from trapd_file_utils import roll_all_logs, open_eelf_logs, roll_file, open_file, close_file
+from trapd_get_cbs_config import get_cbs_config
+from trapd_http_session import init_session_obj
+from trapd_logging import ecomp_logger, stdout_logger
+from trapd_logging import stdout_logger
+from trapd_runtime_pid import save_pid, rm_pid
install_reqs = parse_requirements("requirements.txt", session=PipSession())
reqs = [str(ir.req) for ir in install_reqs]
setup(
- name = "onap_dcae_cbs_docker_client",
- description = "snmp trap receiver for a DCAE docker image",
- version = "1.0",
+ name = "dcaegen2-collectors-snmptrap",
+ description = "snmp trap receiver for ONAP docker image",
+ version = "1.3.0",
packages=find_packages(),
author = "Dave L",
author_email = "dl3158@att.com",
diff --git a/spec/snmptrap-collector-component-spec.json b/spec/snmptrap-collector-component-spec.json
index 85cadde..a256c51 100644
--- a/spec/snmptrap-collector-component-spec.json
+++ b/spec/snmptrap-collector-component-spec.json
@@ -245,7 +245,7 @@
"artifacts": [
{
"type": "docker image",
- "uri": "dockercentral.it.att.com:5100/com.att.dcae.controller/dcae-controller-snmptrap-collector:18.x.x"
+ "uri": "nexus.onap.org:10001/snapshots/onap/org.onap.dcaegen2.collectors.snmptrap:1.3.0"
}
]
}
diff --git a/tests/setup.py b/tests/setup.py
index 7ff184c..5a12f10 100644
--- a/tests/setup.py
+++ b/tests/setup.py
@@ -1,6 +1,6 @@
# org.onap.dcae
# ================================================================================
-# Copyright (c) 2017 AT&T Intellectual Property. All rights reserved.
+# Copyright (c) 2017-2018 AT&T Intellectual Property. 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.
@@ -23,10 +23,7 @@
import collections
import datetime
import errno
-from pysnmp.carrier.asyncio.dgram import udp, udp6
-from pysnmp.entity import engine, config
-from pysnmp.entity.rfc3413 import ntfrcv
-from pysnmp.proto.api import v2c
+import inspect
import json
import logging
import logging.handlers
@@ -40,24 +37,32 @@
import sys
import time
import traceback
-from trapd_dmaap_config import read_dmaap_config
-from trapd_exit import cleanup_and_exit
-from trapd_http_session import init_session_obj
-from trapd_perm_status import log_to_perm_status
-from trapd_runtime_pid import save_pid, rm_pid
-from trapd_trap_config import read_trap_config
-from trapd_yaml_config import read_yaml_config
+import trapd_settings
+import trapd_settings as tds
import unicodedata
import uuid as uuid_mod
-import yaml
+from collections import Counter
+from onap_dcae_cbs_docker_client.client import get_config
+from pysnmp.carrier.asyncio.dgram import udp, udp6
+# from pysnmp.carrier.asyncore.dgram import udp
+from pysnmp.entity import engine, config
+from pysnmp.entity.rfc3413 import ntfrcv
+from pysnmp.proto.api import v2c
+from trapd_exit import cleanup_and_exit
+from trapd_file_utils import roll_all_logs, open_eelf_logs, roll_file, open_file, close_file
+from trapd_get_cbs_config import get_cbs_config
+from trapd_http_session import init_session_obj
+from trapd_logging import ecomp_logger, stdout_logger
+from trapd_logging import stdout_logger
+from trapd_runtime_pid import save_pid, rm_pid
install_reqs = parse_requirements("requirements.txt", session=PipSession())
reqs = [str(ir.req) for ir in install_reqs]
setup(
- name = "onap_dcae_cbs_docker_client",
- description = "snmp trap receiver for a DCAE docker image",
- version = "1.2",
+ name = "dcaegen2-collectors-snmptrap",
+ description = "snmp trap receiver for ONAP docker image",
+ version = "1.3.0",
packages=find_packages(),
author = "Dave L",
author_email = "dl3158@att.com",