diff options
author | Jessica Wagantall <jwagantall@linuxfoundation.org> | 2019-03-22 10:35:38 -0700 |
---|---|---|
committer | Jessica Wagantall <jwagantall@linuxfoundation.org> | 2019-03-22 10:36:17 -0700 |
commit | 995a36660fc855447d69a41a9a25b6b27fa57bf0 (patch) | |
tree | d5f5cb3dfaac6e31f9f2d885a04c9e180a2a02c3 /components/scripts/python/ccsdk_netconf/common.py | |
parent | 9cee11e750a6ea570bf3580f5f20399bf898e694 (diff) | |
parent | 86233d8ea68bebb4e49cc8d1378917f2e1d3cee4 (diff) |
Migrate "components" from ccsdk/apps
Migrate code from ccsdk/apps components
subfolder into ccsdk/cds
Issue-ID: CIMAN-245
Signed-off-by: Jessica Wagantall <jwagantall@linuxfoundation.org>
Diffstat (limited to 'components/scripts/python/ccsdk_netconf/common.py')
-rw-r--r-- | components/scripts/python/ccsdk_netconf/common.py | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/components/scripts/python/ccsdk_netconf/common.py b/components/scripts/python/ccsdk_netconf/common.py new file mode 100644 index 000000000..f161e29ff --- /dev/null +++ b/components/scripts/python/ccsdk_netconf/common.py @@ -0,0 +1,28 @@ +# Copyright (c) 2019 Bell Canada. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# 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. + +class ResolutionHelper: + + def __init__(self, component_function): + self.component_function = component_function + + def resolve_and_generate_message_from_template_prefix(self, artifact_prefix): + return self.component_function.resolveAndGenerateMessage(artifact_prefix) + + def resolve_and_generate_message(self, artifact_mapping, artifact_template): + return self.component_function.resolveAndGenerateMessage(artifact_mapping, + artifact_template) + + def retrieve_resolved_template_from_database(self, key, artifact_template): + return self.component_function.resolveFromDatabase(key, artifact_template) |