From 7a697663603a0d3a955076b1a36ce674e62d3ab7 Mon Sep 17 00:00:00 2001 From: Jozsef Csongvai Date: Wed, 6 Oct 2021 11:47:23 -0400 Subject: 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 --- ms/command-executor/src/main/python/utils.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'ms/command-executor/src/main/python/utils.py') 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 -- cgit 1.2.3-korg