aboutsummaryrefslogtreecommitdiffstats
path: root/catalog-be/src/main/resources/scripts/sdcBePy/common/normative/main.py
diff options
context:
space:
mode:
authork.kedron <k.kedron@partner.samsung.com>2020-03-05 13:12:27 +0100
committerOfir Sonsino <ofir.sonsino@intl.att.com>2020-06-24 06:01:11 +0000
commitcb30f3a566b73c78c3ea666acfcd3f288098684a (patch)
tree38cd1acb83ddde2b927485611d130bbeec3c1a4b /catalog-be/src/main/resources/scripts/sdcBePy/common/normative/main.py
parentbdbfc2e460ccb561c3e174260b2908b974996d4f (diff)
Refactoring the sdc-BE-init python scripts
Deeper refactoring of python script: - create the python package with init script - support for python 3.x - reuse code - new design - support for .json conf file - update the docker chef script Issue-ID: SDC-2784 Signed-off-by: Krystian Kedron <k.kedron@partner.samsung.com> Change-Id: I02169eb7d0e3e90851ba1811536d1712c3b4145f
Diffstat (limited to 'catalog-be/src/main/resources/scripts/sdcBePy/common/normative/main.py')
-rw-r--r--catalog-be/src/main/resources/scripts/sdcBePy/common/normative/main.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/catalog-be/src/main/resources/scripts/sdcBePy/common/normative/main.py b/catalog-be/src/main/resources/scripts/sdcBePy/common/normative/main.py
new file mode 100644
index 0000000000..a30d46d4d5
--- /dev/null
+++ b/catalog-be/src/main/resources/scripts/sdcBePy/common/normative/main.py
@@ -0,0 +1,16 @@
+from sdcBePy.common.normative.toscaElements import process_and_create_normative_element
+from sdcBePy.common.normative.toscaTypes import process_and_create_normative_types
+
+
+def process_element_list(normative_elements_list, sdc_be_proxy):
+ for normative_element in normative_elements_list:
+ process_and_create_normative_element(normative_element,
+ sdc_be_proxy=sdc_be_proxy)
+
+
+def process_type_list(normative_type_list, sdc_be_proxy, update_version):
+ for normative_type in normative_type_list:
+ process_and_create_normative_types(normative_type,
+ sdc_be_proxy=sdc_be_proxy,
+ update_version=update_version)
+