diff options
author | k.kedron <k.kedron@partner.samsung.com> | 2020-03-05 13:12:27 +0100 |
---|---|---|
committer | Ofir Sonsino <ofir.sonsino@intl.att.com> | 2020-06-24 06:01:11 +0000 |
commit | cb30f3a566b73c78c3ea666acfcd3f288098684a (patch) | |
tree | 38cd1acb83ddde2b927485611d130bbeec3c1a4b /catalog-be/src/main/resources/scripts/sdcBePy/tosca/upgrade/runUpgradeNormative.py | |
parent | bdbfc2e460ccb561c3e174260b2908b974996d4f (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/tosca/upgrade/runUpgradeNormative.py')
-rw-r--r-- | catalog-be/src/main/resources/scripts/sdcBePy/tosca/upgrade/runUpgradeNormative.py | 59 |
1 files changed, 59 insertions, 0 deletions
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 new file mode 100644 index 0000000000..4b0d0cc8a2 --- /dev/null +++ b/catalog-be/src/main/resources/scripts/sdcBePy/tosca/upgrade/runUpgradeNormative.py @@ -0,0 +1,59 @@ +#!/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.normativeTypesList import get_heat1707, get_heat1702_3537, get_heat_version +from sdcBePy.tosca.upgrade.run import get_all_types + +all_types = get_all_types() + + +def run_upgrade_heat(): + normative_candidate = get_heat(all_types) + run(normative_candidate) + + +def run_upgrade_normative(): + normative_candidate = get_normative(all_types) + run(normative_candidate) + + +def run_upgrade_nfv(): + normative_candidate = get_nfv(all_types) + run(normative_candidate) + + +def run_upgrade_onap(): + normative_candidate = get_onap(all_types) + run(normative_candidate) + + +def run_upgrade_sol(): + normative_candidate = get_sol(all_types) + run(normative_candidate) + + +def run_upgrade_heat1707(): + normative_candidate = get_heat1707() + run(normative_candidate) + + +def run_upgrade_heat1707_3537(): + normative_candidate = get_heat1702_3537() + run(normative_candidate) + + +def run_upgrade_heat_version(): + normative_candidate = get_heat_version() + run(normative_candidate) + + +if __name__ == '__main__': + run_upgrade_heat() + # run_upgrade_normative() + # run_upgrade_nfv() + # run_upgrade_onap() + # run_upgrade_sol() + # run_upgrade_heat1707() + # run_upgrade_heat1707_3537() + # run_upgrade_heat_version() |