[20190304] update copyright and __init__.py 81/79681/1
authorxufeiliu <xl085b@att.com>
Tue, 5 Mar 2019 04:40:50 +0000 (04:40 +0000)
committerxufeiliu <xl085b@att.com>
Tue, 5 Mar 2019 04:42:00 +0000 (04:42 +0000)
Update all copyrights. Update dmaapplugin/__init__.py to match the
ONAP environment. 1) Consul address is "consul". 2) certificate is
at /opt/onap/certs/cacert.pem. 3) Consul key name "dmaap-plugin"
4) Bus controller address is "dmaap-bc", port 8080 or 8443.

Issue-ID: CCSDK-794
Change-Id: I47c85be11430510e2035f7972f97e63fe11757dc
Signed-off-by: xufeiliu <xl085b@att.com>
15 files changed:
dmaap/LICENSE.txt
dmaap/consulif/consulif.py
dmaap/dmaap.yaml
dmaap/dmaapcontrollerif/dmaap_requests.py
dmaap/dmaapplugin/__init__.py
dmaap/dmaapplugin/dmaaputils.py
dmaap/dmaapplugin/dr_bridge.py
dmaap/dmaapplugin/dr_lifecycle.py
dmaap/dmaapplugin/dr_relationships.py
dmaap/dmaapplugin/mr_lifecycle.py
dmaap/dmaapplugin/mr_relationships.py
dmaap/pom.xml
dmaap/setup.py
dmaap/tests/test_plugin.py
dmaap/tox.ini

index f90f8f1..b888c34 100644 (file)
@@ -1,7 +1,7 @@
 ============LICENSE_START=======================================================
 org.onap.ccsdk
 ================================================================================
-Copyright (c) 2017 AT&T Intellectual Property. All rights reserved.
+Copyright (c) 2017-2019 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.
index e742895..8033603 100644 (file)
@@ -1,7 +1,7 @@
 # ============LICENSE_START====================================================
 # org.onap.ccsdk
 # =============================================================================
-# Copyright (c) 2017 AT&T Intellectual Property. All rights reserved.
+# Copyright (c) 2017-2019 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.
index ed8d5c3..8981568 100644 (file)
@@ -1,7 +1,7 @@
 # ============LICENSE_START====================================================
 # org.onap.ccsdk
 # =============================================================================
-# Copyright (c) 2017 AT&T Intellectual Property. All rights reserved.
+# Copyright (c) 2017-2019 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.
@@ -25,7 +25,7 @@ plugins:
   dmaapplugin:
     executor: 'central_deployment_agent'
     package_name: cloudifydmaapplugin
-    package_version: 1.3.1
+    package_version: 1.3.2
 
 
 node_types:
index 0c52a77..5506865 100644 (file)
@@ -1,7 +1,7 @@
 # ============LICENSE_START====================================================
 # org.onap.ccsdk
 # =============================================================================
-# Copyright (c) 2017 AT&T Intellectual Property. All rights reserved.
+# Copyright (c) 2017-2019 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.
index ac988a4..43da00e 100644 (file)
@@ -1,7 +1,7 @@
 # ============LICENSE_START====================================================
 # org.onap.ccsdk
 # =============================================================================
-# Copyright (c) 2017 AT&T Intellectual Property. All rights reserved.
+# Copyright (c) 2017-2019 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.
@@ -21,11 +21,14 @@ from consulif.consulif import ConsulHandle
 from cloudify.exceptions import NonRecoverableError
 import os
 
-os.environ["REQUESTS_CA_BUNDLE"]="/etc/pki/ca-trust/extracted/openssl/ca-bundle.trust.crt" # This is to handle https request thru plugin
+os.environ["REQUESTS_CA_BUNDLE"]="/opt/onap/certs/cacert.pem"  # This is to handle https request thru plugin
 
-CONSUL_HOST = "127.0.0.1"                   # Should always be a local consul agent on Cloudify Manager
-DBCL_KEY_NAME = "dmaap_dbcl_info"           # Consul key containing DMaaP data bus credentials
-DBC_SERVICE_NAME= "dmaap_bus_controller"    # Name under which the DMaaP bus controller is registered
+CONSUL_HOST = "consul"                      # Should always be a local consul agent on Cloudify Manager
+DBCL_KEY_NAME = "dmaap-plugin"              # Consul key containing DMaaP data bus credentials
+# In the ONAP Kubernetes environment, bus controller address is always "dmaap-bc", on port 8080 (http) and 8443 (https)
+ONAP_SERVICE_ADDRESS = "dmaap-bc"
+HTTP_PORT = "8080"
+HTTPS_PORT = "8443"
 
 try:
     _ch = ConsulHandle("http://{0}:8500".format(CONSUL_HOST), None, None, None)
@@ -55,8 +58,10 @@ except Exception as e:
 try:
     if 'protocol' in config['dmaap']:
         DMAAP_PROTOCOL = config['dmaap']['protocol']
+        service_port = HTTP_PORT
     else:
         DMAAP_PROTOCOL = 'https'    # Default to https (service discovery should give us this but doesn't
+        service_port = HTTPS_PORT
 except Exception as e:
     raise NonRecoverableError("Error setting DMAAP_PROTOCOL while configuring dmaap plugin: {0}".format(e))
 
@@ -69,11 +74,7 @@ except Exception as e:
     raise NonRecoverableError("Error setting DMAAP_PATH while configuring dmaap plugin: {0}".format(e))
 
 try:
-    service_address, service_port = _ch.get_service(DBC_SERVICE_NAME)
-except Exception as e:
-    raise NonRecoverableError("Error getting service_address and service_port for '{0}' from ConsulHandle when configuring dmaap plugin: {1}".format(DBC_SERVICE_NAME, e))
-
-try:
+    service_address = ONAP_SERVICE_ADDRESS
     DMAAP_API_URL = '{0}://{1}:{2}/{3}'.format(DMAAP_PROTOCOL, service_address, service_port, DMAAP_PATH)
 except Exception as e:
     raise NonRecoverableError("Error setting DMAAP_API_URL while configuring dmaap plugin: {0}".format(e))
index 9e80416..fd05a96 100644 (file)
@@ -1,7 +1,7 @@
 # ============LICENSE_START====================================================
 # org.onap.ccsdk
 # =============================================================================
-# Copyright (c) 2017 AT&T Intellectual Property. All rights reserved.
+# Copyright (c) 2017-2019 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.
index bf8f431..25022bb 100644 (file)
@@ -1,7 +1,7 @@
 # ============LICENSE_START====================================================
 # org.onap.ccsdk
 # =============================================================================
-# Copyright (c) 2017 AT&T Intellectual Property. All rights reserved.
+# Copyright (c) 2017-2019 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.
index 7473838..29811fa 100644 (file)
@@ -1,7 +1,7 @@
 # ============LICENSE_START====================================================
 # org.onap.ccsdk
 # =============================================================================
-# Copyright (c) 2017 AT&T Intellectual Property. All rights reserved.
+# Copyright (c) 2017-2019 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.
index 2443f26..dd67394 100644 (file)
@@ -1,7 +1,7 @@
 # ============LICENSE_START====================================================
 # org.onap.ccsdk
 # =============================================================================
-# Copyright (c) 2017 AT&T Intellectual Property. All rights reserved.
+# Copyright (c) 2017-2019 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.
index 2328ec3..a4f04ec 100644 (file)
@@ -1,7 +1,7 @@
 # ============LICENSE_START====================================================
 # org.onap.ccsdk
 # =============================================================================
-# Copyright (c) 2017 AT&T Intellectual Property. All rights reserved.
+# Copyright (c) 2017-2019 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.
index ff92d67..7036277 100644 (file)
@@ -1,7 +1,7 @@
 # ============LICENSE_START====================================================
 # org.onap.ccsdk
 # =============================================================================
-# Copyright (c) 2017 AT&T Intellectual Property. All rights reserved.
+# Copyright (c) 2017-2019 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.
index f3d0f7c..8c6ff0e 100755 (executable)
@@ -3,7 +3,7 @@
 ============LICENSE_START=======================================================
 org.onap.ccsdk
 ================================================================================
-Copyright (c) 2017 AT&T Intellectual Property. All rights reserved.
+Copyright (c) 2019 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.
index e4749c1..987a824 100644 (file)
@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
 
 setup(
     name = "cloudifydmaapplugin",
-    version = "1.3.1",
+    version = "1.3.2",
     packages=find_packages(),
     author = "AT&T",
     description = ("Cloudify plugin for creating DMaaP feeds and topics, and setting up publishers and subscribers."),
index b9ebedc..8995315 100644 (file)
@@ -1,7 +1,7 @@
 # ============LICENSE_START====================================================
 # org.onap.ccsdk
 # =============================================================================
-# Copyright (c) 2017 AT&T Intellectual Property. All rights reserved.
+# Copyright (c) 2017-2019 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.
index 9a23f83..15a07f2 100644 (file)
@@ -1,7 +1,7 @@
 # ============LICENSE_START====================================================
 # org.onap.ccsdk
 # =============================================================================
-# Copyright (c) 2017 AT&T Intellectual Property. All rights reserved.
+# Copyright (c) 2017-2019 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.