diff options
Diffstat (limited to 'dmaap/dmaapplugin')
-rw-r--r-- | dmaap/dmaapplugin/__init__.py | 21 | ||||
-rw-r--r-- | dmaap/dmaapplugin/dmaaputils.py | 2 | ||||
-rw-r--r-- | dmaap/dmaapplugin/dr_bridge.py | 2 | ||||
-rw-r--r-- | dmaap/dmaapplugin/dr_lifecycle.py | 2 | ||||
-rw-r--r-- | dmaap/dmaapplugin/dr_relationships.py | 2 | ||||
-rw-r--r-- | dmaap/dmaapplugin/mr_lifecycle.py | 2 | ||||
-rw-r--r-- | dmaap/dmaapplugin/mr_relationships.py | 2 |
7 files changed, 17 insertions, 16 deletions
diff --git a/dmaap/dmaapplugin/__init__.py b/dmaap/dmaapplugin/__init__.py index ac988a4..43da00e 100644 --- a/dmaap/dmaapplugin/__init__.py +++ b/dmaap/dmaapplugin/__init__.py @@ -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)) diff --git a/dmaap/dmaapplugin/dmaaputils.py b/dmaap/dmaapplugin/dmaaputils.py index 9e80416..fd05a96 100644 --- a/dmaap/dmaapplugin/dmaaputils.py +++ b/dmaap/dmaapplugin/dmaaputils.py @@ -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. diff --git a/dmaap/dmaapplugin/dr_bridge.py b/dmaap/dmaapplugin/dr_bridge.py index bf8f431..25022bb 100644 --- a/dmaap/dmaapplugin/dr_bridge.py +++ b/dmaap/dmaapplugin/dr_bridge.py @@ -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. diff --git a/dmaap/dmaapplugin/dr_lifecycle.py b/dmaap/dmaapplugin/dr_lifecycle.py index 7473838..29811fa 100644 --- a/dmaap/dmaapplugin/dr_lifecycle.py +++ b/dmaap/dmaapplugin/dr_lifecycle.py @@ -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. diff --git a/dmaap/dmaapplugin/dr_relationships.py b/dmaap/dmaapplugin/dr_relationships.py index 2443f26..dd67394 100644 --- a/dmaap/dmaapplugin/dr_relationships.py +++ b/dmaap/dmaapplugin/dr_relationships.py @@ -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. diff --git a/dmaap/dmaapplugin/mr_lifecycle.py b/dmaap/dmaapplugin/mr_lifecycle.py index 2328ec3..a4f04ec 100644 --- a/dmaap/dmaapplugin/mr_lifecycle.py +++ b/dmaap/dmaapplugin/mr_lifecycle.py @@ -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. diff --git a/dmaap/dmaapplugin/mr_relationships.py b/dmaap/dmaapplugin/mr_relationships.py index ff92d67..7036277 100644 --- a/dmaap/dmaapplugin/mr_relationships.py +++ b/dmaap/dmaapplugin/mr_relationships.py @@ -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. |