summaryrefslogtreecommitdiffstats
path: root/ms/command-executor/src/main/python/utils.py
diff options
context:
space:
mode:
authorJozsef Csongvai <jozsef.csongvai@bell.ca>2021-10-06 11:47:23 -0400
committerKAPIL SINGAL <ks220y@att.com>2021-10-20 00:47:19 +0000
commit7a697663603a0d3a955076b1a36ce674e62d3ab7 (patch)
tree35e1584bce976a077ab08b2f6427a8c0493db444 /ms/command-executor/src/main/python/utils.py
parent39f3fe457ab9a2e1f745bf82a7866fc404de4b04 (diff)
Add missing code for Metrics and PV/PVC elimination
Earlier patch introducing MeterRegistry to AbstractComponentFunction was not initializing the lateinit property and causing NPE. Also add additional code to handle compatibility issues after the introduction of PV/PVC elminiation for CommandExecutor. This allows blueprintsprocessor to communicate with earlier versions of command- executor which still use the shared pvc. Issue-ID: CCSDK-3471 Change-Id: I84a04601c4fe09c5f3a06664ce877800a30531f1 Signed-off-by: Jozsef Csongvai <jozsef.csongvai@bell.ca>
Diffstat (limited to 'ms/command-executor/src/main/python/utils.py')
-rw-r--r--ms/command-executor/src/main/python/utils.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/ms/command-executor/src/main/python/utils.py b/ms/command-executor/src/main/python/utils.py
index e7924a936..d59f8cc47 100644
--- a/ms/command-executor/src/main/python/utils.py
+++ b/ms/command-executor/src/main/python/utils.py
@@ -26,12 +26,13 @@ RESULTS_LOG_KEY = "results_log"
REUPLOAD_CBA_KEY = "reupload_cba"
RESPONSE_MAX_SIZE = 4 * 1024 * 1024 # 4Mb
-
+# part of cba_name/version/uuid path
def blueprint_name_version_uuid(request):
- blueprint_name = request.identifiers.blueprintName
- blueprint_version = request.identifiers.blueprintVersion
- blueprint_uuid = request.identifiers.blueprintUUID
- return blueprint_name + '/' + blueprint_version + '/' + blueprint_uuid
+ return get_blueprint_name(request) + '/' + get_blueprint_version(request) + '/' + get_blueprint_uuid(request)
+
+# return blueprint_name and version part of the path (needed for legacy cmd-exec support
+def blueprint_name_version(request):
+ return get_blueprint_name(request) + '/' + get_blueprint_version(request)
def get_blueprint_name(request):
return request.identifiers.blueprintName