diff options
Diffstat (limited to 'catalog-be/src/main/resources/scripts/sdcBePy/tosca/upgrade')
-rw-r--r-- | catalog-be/src/main/resources/scripts/sdcBePy/tosca/upgrade/run.py | 12 | ||||
-rw-r--r-- | catalog-be/src/main/resources/scripts/sdcBePy/tosca/upgrade/runUpgradeNormative.py | 13 |
2 files changed, 20 insertions, 5 deletions
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 47acd05f5f..8cdf22842f 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 @@ -9,12 +9,13 @@ from sdcBePy.tosca.main import parse_and_create_proxy from sdcBePy.tosca.models.normativeElementsList import get_normative_element_candidate_list, \ get_normative_element_with_metadata_list from sdcBePy.tosca.models.normativeToUpdateList import TypesToUpdate, get_heat_and_normative_to_update_list, \ - get_nfv_onap_sol_to_update_list + get_onap_sol_to_update_list, get_nfv_to_update_list def main(sdc_be_proxy): update_version = True - update_onap_version = False + update_onap_version = False + update_nfv_version = True # use to run script form this dir (not like the command) # base_file_location = os.getcwd() + "/../../../../import/tosca/" @@ -28,8 +29,11 @@ def main(sdc_be_proxy): heat_and_normative_list = get_heat_and_normative_to_update_list(all_types, base_file_location) process_type_list(heat_and_normative_list, sdc_be_proxy, update_version) - nfv_onap_sol_list = get_nfv_onap_sol_to_update_list(all_types, base_file_location) - process_type_list(nfv_onap_sol_list, sdc_be_proxy, update_onap_version) + onap_sol_list = get_onap_sol_to_update_list(all_types, base_file_location) + process_type_list(onap_sol_list, sdc_be_proxy, update_onap_version) + + nfv_list = get_nfv_to_update_list(all_types, base_file_location) + process_type_list(nfv_list, sdc_be_proxy, update_nfv_version) logger.log("Updating end ->", "All normatives updated successfully!") print_and_exit(0, None) diff --git a/catalog-be/src/main/resources/scripts/sdcBePy/tosca/upgrade/runUpgradeNormative.py b/catalog-be/src/main/resources/scripts/sdcBePy/tosca/upgrade/runUpgradeNormative.py index 4b0d0cc8a2..a4305ec352 100644 --- a/catalog-be/src/main/resources/scripts/sdcBePy/tosca/upgrade/runUpgradeNormative.py +++ b/catalog-be/src/main/resources/scripts/sdcBePy/tosca/upgrade/runUpgradeNormative.py @@ -1,7 +1,7 @@ #!/usr/bin/env python3 from sdcBePy.tosca.imports.runNormativeType import run -from sdcBePy.tosca.models.normativeToUpdateList import get_heat, get_normative, get_nfv, get_onap, get_sol +from sdcBePy.tosca.models.normativeToUpdateList import get_heat, get_normative, get_nfv, get_2_7_1, get_nfv_3_3_1, get_nfv_4_1_1, get_onap, get_sol from sdcBePy.tosca.models.normativeTypesList import get_heat1707, get_heat1702_3537, get_heat_version from sdcBePy.tosca.upgrade.run import get_all_types @@ -21,7 +21,18 @@ def run_upgrade_normative(): def run_upgrade_nfv(): normative_candidate = get_nfv(all_types) run(normative_candidate) + +def run_upgrade_nfv_2_7_1(): + normative_candidate = get_nfv_2_7_1(all_types) + run(normative_candidate) + +def run_upgrade_nfv_3_3_1(): + normative_candidate = get_nfv_3_3_1(all_types) + run(normative_candidate) +def run_upgrade_nfv_4_1_1(): + normative_candidate = get_nfv_4_1_1(all_types) + run(normative_candidate) def run_upgrade_onap(): normative_candidate = get_onap(all_types) |