summaryrefslogtreecommitdiffstats
path: root/catalog-be
diff options
context:
space:
mode:
authork.kedron <k.kedron@partner.samsung.com>2020-03-23 12:01:38 +0100
committerk.kedron <k.kedron@partner.samsung.com>2020-03-23 12:01:38 +0100
commit98c69958a5f463ebaa5b75ef3188d599ead93692 (patch)
tree47bc930fdd5abdc59f050c085c9ede4f393b69ea /catalog-be
parent5944b441468500fffa7111b5dea9181461ae1303 (diff)
Fixed import in sdc-BE-init python scripts
Issue-ID: SDC-2784 Signed-off-by: Krystian Kedron <k.kedron@partner.samsung.com> Change-Id: I72eb129c5c4cb63fdf0ab13a6128d555b49b6d0c
Diffstat (limited to 'catalog-be')
-rw-r--r--catalog-be/src/main/resources/scripts/import/tosca/upgradeHeatAndNormativeTypes.py4
-rw-r--r--catalog-be/src/main/resources/scripts/import/tosca/upgradeNfvTypes.py4
-rw-r--r--catalog-be/src/main/resources/scripts/import/tosca/upgradeONAPTypes.py4
-rw-r--r--catalog-be/src/main/resources/scripts/import/tosca/upgradeSolTypes.py4
4 files changed, 4 insertions, 12 deletions
diff --git a/catalog-be/src/main/resources/scripts/import/tosca/upgradeHeatAndNormativeTypes.py b/catalog-be/src/main/resources/scripts/import/tosca/upgradeHeatAndNormativeTypes.py
index 4bf1de37f1..7ba925038f 100644
--- a/catalog-be/src/main/resources/scripts/import/tosca/upgradeHeatAndNormativeTypes.py
+++ b/catalog-be/src/main/resources/scripts/import/tosca/upgradeHeatAndNormativeTypes.py
@@ -1,5 +1,3 @@
-import yaml
-
from importNormativeTypes import *
@@ -45,7 +43,7 @@ def upgradeTypesPerConfigFile(scheme, be_host, be_port, admin_user, base_dir, up
if result[1] is None or result[1] not in response_codes:
print "Failed creating normative type " + normativeType + ". " + str(result[1])
return results
- except yaml.YAMLError as exc:
+ except Exception as exc:
print(exc)
diff --git a/catalog-be/src/main/resources/scripts/import/tosca/upgradeNfvTypes.py b/catalog-be/src/main/resources/scripts/import/tosca/upgradeNfvTypes.py
index 81ee843893..ce939878ae 100644
--- a/catalog-be/src/main/resources/scripts/import/tosca/upgradeNfvTypes.py
+++ b/catalog-be/src/main/resources/scripts/import/tosca/upgradeNfvTypes.py
@@ -1,5 +1,3 @@
-import yaml
-
from importNormativeTypes import *
@@ -35,7 +33,7 @@ def upgradeNfvTypesPerConfigFile(scheme, be_host, be_port, admin_user, base_dir,
results.append(result)
if result[1] is None or result[1] not in response_codes:
print "Failed creating nfv type " + nfvType + ". " + str(result[1])
- except yaml.YAMLError as exc:
+ except Exception as exc:
print(exc)
return results
diff --git a/catalog-be/src/main/resources/scripts/import/tosca/upgradeONAPTypes.py b/catalog-be/src/main/resources/scripts/import/tosca/upgradeONAPTypes.py
index 2074ba9c27..bb26659621 100644
--- a/catalog-be/src/main/resources/scripts/import/tosca/upgradeONAPTypes.py
+++ b/catalog-be/src/main/resources/scripts/import/tosca/upgradeONAPTypes.py
@@ -1,5 +1,3 @@
-import yaml
-
from importNormativeTypes import *
@@ -35,7 +33,7 @@ def upgradeOnapTypesPerConfigFile(scheme, be_host, be_port, admin_user, base_dir
results.append(result)
if result[1] is None or result[1] not in response_codes:
print "Failed creating onap type " + onap_type + ". " + str(result[1])
- except yaml.YAMLError as exc:
+ except Exception as exc:
print(exc)
return results
diff --git a/catalog-be/src/main/resources/scripts/import/tosca/upgradeSolTypes.py b/catalog-be/src/main/resources/scripts/import/tosca/upgradeSolTypes.py
index e9cebfe9a8..aa60e4d49d 100644
--- a/catalog-be/src/main/resources/scripts/import/tosca/upgradeSolTypes.py
+++ b/catalog-be/src/main/resources/scripts/import/tosca/upgradeSolTypes.py
@@ -1,5 +1,3 @@
-import yaml
-
from importNormativeTypes import *
@@ -34,7 +32,7 @@ def upgradeSolTypesPerConfigFile(scheme, be_host, be_port, admin_user, base_dir,
results.append(result)
if result[1] is None or result[1] not in response_codes:
print "Failed creating sol type " + solType + ". " + str(result[1])
- except yaml.YAMLError as exc:
+ except Exception as exc:
print(exc)
return results