X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=components%2Fscripts%2Fpython%2Fccsdk_netconf%2Fcommon.py;h=f7ac1ac357d00772b9900a4c9cde65ddaff9ce9c;hb=a0140dea9c608d745767574ac621ca0060a2bddc;hp=f161e29ff7d67d6bf30098433c5e6ae3cd446882;hpb=1a47dc3ce480c4735cbf019918372a0e1ff367bc;p=ccsdk%2Fcds.git diff --git a/components/scripts/python/ccsdk_netconf/common.py b/components/scripts/python/ccsdk_netconf/common.py index f161e29ff..f7ac1ac35 100644 --- a/components/scripts/python/ccsdk_netconf/common.py +++ b/components/scripts/python/ccsdk_netconf/common.py @@ -1,4 +1,5 @@ # Copyright (c) 2019 Bell Canada. +# Modifications Copyright (c) 2018 - 2019 IBM, Bell Canada. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -11,18 +12,17 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +from org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution import ResourceResolutionExtensionsKt -class ResolutionHelper: - def __init__(self, component_function): - self.component_function = component_function +class ResolutionHelper: - def resolve_and_generate_message_from_template_prefix(self, artifact_prefix): - return self.component_function.resolveAndGenerateMessage(artifact_prefix) + def __init__(self, component_function): + self.component_function = component_function - def resolve_and_generate_message(self, artifact_mapping, artifact_template): - return self.component_function.resolveAndGenerateMessage(artifact_mapping, - artifact_template) + def resolve_and_generate_message_from_template_prefix(self, artifact_prefix): + return ResourceResolutionExtensionsKt.contentFromResolvedArtifact(self.component_function, artifact_prefix) - def retrieve_resolved_template_from_database(self, key, artifact_template): - return self.component_function.resolveFromDatabase(key, artifact_template) + def retrieve_resolved_template_from_database(self, key, artifact_template): + return ResourceResolutionExtensionsKt.storedContentFromResolvedArtifact(self.component_function, key, + artifact_template)