aboutsummaryrefslogtreecommitdiffstats
path: root/policyhandler/service_activator.py
diff options
context:
space:
mode:
authorSchmalzried, Terry (ts862m) <ts862m@att.com>2019-11-13 16:47:45 -0500
committerSchmalzried, Terry (ts862m) <ts862m@att.com>2019-11-14 15:40:57 -0500
commit05f475fb6ec2c4a1acd2698d29a4c12b116a1d36 (patch)
tree0d834d29a6d78fe678904be5655d76fe9913b2b8 /policyhandler/service_activator.py
parent8dc742e747e0f418665ab9422f5c6c2cda94869b (diff)
DCAEGEN2-1919 add HTTPS and change log rotation
Change-Id: I7859dde9460620e18edca887f5dfc611639b268c Issue-ID: DCAEGEN2-1919 Signed-off-by: Schmalzried, Terry (ts862m) <ts862m@att.com>
Diffstat (limited to 'policyhandler/service_activator.py')
-rw-r--r--policyhandler/service_activator.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/policyhandler/service_activator.py b/policyhandler/service_activator.py
index 9c8a1b2..c1e5b8c 100644
--- a/policyhandler/service_activator.py
+++ b/policyhandler/service_activator.py
@@ -35,6 +35,7 @@ from urllib.parse import urljoin
import requests
from .config import Config, Settings
+from .discovery import DiscoveryClient
from .onap.audit import (REQUEST_X_ECOMP_REQUESTID, Audit, AuditHttpCode,
Metrics)
from .policy_consts import TARGET_ENTITY
@@ -93,6 +94,9 @@ class ServiceActivator(object):
ServiceActivator._target_entity = config_sa.get(
TARGET_ENTITY, ServiceActivator.DEFAULT_TARGET_ENTITY)
ServiceActivator._url = config_sa.get("url", "")
+ if not ServiceActivator._url:
+ ServiceActivator._url = DiscoveryClient.get_service_url(audit,
+ ServiceActivator._target_entity)
if ServiceActivator._url:
ServiceActivator._url_register = urljoin(ServiceActivator._url,
config_sa.get("path_register", ""))