diff options
Diffstat (limited to 'catalog-be/src/main/resources/scripts/sdcBePy')
5 files changed, 22 insertions, 9 deletions
diff --git a/catalog-be/src/main/resources/scripts/sdcBePy/tosca/data/onapTypesToUpgrade.json b/catalog-be/src/main/resources/scripts/sdcBePy/tosca/data/onapTypesToUpgrade.json index 7076705619..8167b09100 100644 --- a/catalog-be/src/main/resources/scripts/sdcBePy/tosca/data/onapTypesToUpgrade.json +++ b/catalog-be/src/main/resources/scripts/sdcBePy/tosca/data/onapTypesToUpgrade.json @@ -2,9 +2,14 @@ "nfv": [ "allottedResource", "NS", - "NsVirtualLink" + "NsVirtualLink", + "Sap" ], "nfv_2_7_1": [ + "NfpPositionElement", + "NfpPosition", + "NFP", + "Forwarding", "vduCompute", "vduVirtualFileStorage", "vnfExtCp", @@ -13,7 +18,8 @@ ], "nfv_3_3_1": [ "VNF", - "vduVirtualBlockStorage" + "vduVirtualBlockStorage", + "NS" ], "nfv_4_1_1": [ "VNF", diff --git a/catalog-be/src/main/resources/scripts/sdcBePy/tosca/imports/runNormativeType.py b/catalog-be/src/main/resources/scripts/sdcBePy/tosca/imports/runNormativeType.py index 4e9a14932f..c2493b522d 100644 --- a/catalog-be/src/main/resources/scripts/sdcBePy/tosca/imports/runNormativeType.py +++ b/catalog-be/src/main/resources/scripts/sdcBePy/tosca/imports/runNormativeType.py @@ -38,7 +38,7 @@ def run_import_nfv(): run(nfv_candidate) def run_import_nfv_2_7_1(): - nfv_candidate = get_nfv_3_3_1() + nfv_candidate = get_nfv_2_7_1() run(nfv_candidate) def run_import_nfv_3_3_1(): @@ -46,7 +46,7 @@ def run_import_nfv_3_3_1(): run(nfv_candidate) def run_import_nfv_4_1_1(): - nfv_candidate = get_nfv_3_3_1() + nfv_candidate = get_nfv_4_1_1() run(nfv_candidate) def run_import_onap(): diff --git a/catalog-be/src/main/resources/scripts/sdcBePy/tosca/models/normativeToUpdateList.py b/catalog-be/src/main/resources/scripts/sdcBePy/tosca/models/normativeToUpdateList.py index 2d243d80ab..6537b1cdd0 100644 --- a/catalog-be/src/main/resources/scripts/sdcBePy/tosca/models/normativeToUpdateList.py +++ b/catalog-be/src/main/resources/scripts/sdcBePy/tosca/models/normativeToUpdateList.py @@ -58,7 +58,7 @@ def get_nfv(types, base_location="/"): def get_nfv_2_7_1(types, base_location="/"): return NormativeTypeCandidate(base_location + "nfv-types/2.7.1/", - types.get_type("nfv_2_7_1")) + types.get_type("nfv_2_7_1")) def get_nfv_3_3_1(types, base_location="/"): return NormativeTypeCandidate(base_location + "nfv-types/3.3.1/", diff --git a/catalog-be/src/main/resources/scripts/sdcBePy/tosca/models/normativeTypesList.py b/catalog-be/src/main/resources/scripts/sdcBePy/tosca/models/normativeTypesList.py index 12a4491b96..b6cfb9e264 100644 --- a/catalog-be/src/main/resources/scripts/sdcBePy/tosca/models/normativeTypesList.py +++ b/catalog-be/src/main/resources/scripts/sdcBePy/tosca/models/normativeTypesList.py @@ -112,11 +112,16 @@ def get_nfv(base_file_location="/"): "OntPnf", "PonUni", "OltNni", - "OntNni"]) + "OntNni", + "Sap"]) def get_nfv_2_7_1(base_file_location="/"): return NormativeTypeCandidate(base_file_location + "nfv-types/2.7.1/", - ["vduCompute", + ["NfpPositionElement", + "NfpPosition", + "NFP", + "Forwarding", + "vduCompute", "vduVirtualFileStorage", "vnfExtCp", "vduCp", @@ -125,7 +130,8 @@ def get_nfv_2_7_1(base_file_location="/"): def get_nfv_3_3_1(base_file_location="/"): return NormativeTypeCandidate(base_file_location + "nfv-types/3.3.1/", ["vduVirtualBlockStorage", - "VNF"]) + "VNF", + "NS"]) def get_nfv_4_1_1(base_file_location="/"): return NormativeTypeCandidate(base_file_location + "nfv-types/4.1.1/", diff --git a/catalog-be/src/main/resources/scripts/sdcBePy/tosca/upgrade/run.py b/catalog-be/src/main/resources/scripts/sdcBePy/tosca/upgrade/run.py index 8cdf22842f..cef7dd74db 100644 --- a/catalog-be/src/main/resources/scripts/sdcBePy/tosca/upgrade/run.py +++ b/catalog-be/src/main/resources/scripts/sdcBePy/tosca/upgrade/run.py @@ -22,7 +22,6 @@ def main(sdc_be_proxy): base_file_location = os.getcwd() + "/" logger.debug("working directory =" + base_file_location) process_element_list(get_normative_element_candidate_list(base_file_location), sdc_be_proxy) - process_element_list(get_normative_element_with_metadata_list(base_file_location), sdc_be_proxy) all_types = get_all_types() @@ -34,6 +33,8 @@ def main(sdc_be_proxy): nfv_list = get_nfv_to_update_list(all_types, base_file_location) process_type_list(nfv_list, sdc_be_proxy, update_nfv_version) + + process_element_list(get_normative_element_with_metadata_list(base_file_location), sdc_be_proxy) logger.log("Updating end ->", "All normatives updated successfully!") print_and_exit(0, None) |