aboutsummaryrefslogtreecommitdiffstats
path: root/policyhandler/onap
diff options
context:
space:
mode:
authorAlex Shatov <alexs@att.com>2018-03-20 10:55:03 -0400
committerAlex Shatov <alexs@att.com>2018-03-20 10:55:03 -0400
commit14411ac0ec0df8a32ab5d360c5a7fdb87ca51e26 (patch)
treeb47d47616743f889678f4675c9cef8c7d867f360 /policyhandler/onap
parent7e220c8dd68a969885287689c15d8dc711a06f8a (diff)
2.4.0 dns based discovery of deployment-handler
- policy-handler uses dns based discovery of deployment-handler - driven by config - new data structure for deploy_handler section of config -- changed from string "deployment_handler" in 2.3.1 to structure in 2.4.0 deploy_handler : # name of deployment-handler service # used by policy-handler for logging target_entity : "deployment_handler" # url of the deployment-handler service # for policy-handler to direct the policy-updates to # - expecting dns to resolve the name # deployment_handler to ip address url : "http://deployment_handler:8188" - logic is backwards compatible with 2.3.1 format - removed import pip from audit -- import pip broken in pip 9.0.2 (2018-03-19) -- import pip conflicts with requests -- pip API is not officially supported -- see links for more https://github.com/pypa/pip/issues/5079 https://github.com/pypa/pip/issues/5081 Change-Id: Ifcaba6cfd714f3099ab7a25fe979a3696a6460fc Signed-off-by: Alex Shatov <alexs@att.com> Issue-ID: DCAEGEN2-404
Diffstat (limited to 'policyhandler/onap')
-rw-r--r--policyhandler/onap/audit.py14
1 files changed, 5 insertions, 9 deletions
diff --git a/policyhandler/onap/audit.py b/policyhandler/onap/audit.py
index 4e8378c..109e3ff 100644
--- a/policyhandler/onap/audit.py
+++ b/policyhandler/onap/audit.py
@@ -25,16 +25,15 @@
audit = Audit(request_id=None, headers=None, msg=None)
"""
+import copy
+import json
import os
import sys
-import json
-import uuid
import time
-import copy
+import uuid
from datetime import datetime
-from threading import Lock
from enum import Enum
-from pip import utils as pip_utils
+from threading import Lock
from .CommonLogger import CommonLogger
from .health import Health
@@ -125,8 +124,6 @@ class Audit(object):
_logger_audit = None
_health = Health()
_py_ver = sys.version.replace("\n", "")
- _packages = sorted([pckg.project_name + "==" + pckg.version
- for pckg in pip_utils.get_installed_distributions()])
@staticmethod
def init(service_name, service_version, config_file_path):
@@ -154,8 +151,7 @@ class Audit(object):
"started" : str(Audit._started),
"now" : str(now),
"uptime" : str(now - Audit._started),
- "stats" : Audit._health.dump(),
- "packages" : Audit._packages
+ "stats" : Audit._health.dump()
}
def __init__(self, request_id=None, req_message=None, aud_parent=None, **kwargs):