aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--catalog/pub/config/config.py2
-rw-r--r--catalog/pub/utils/toscaparser/vnfdmodel.py3
-rw-r--r--catalog/pub/utils/toscaparser/vnfdparser/__init__.py2
3 files changed, 5 insertions, 2 deletions
diff --git a/catalog/pub/config/config.py b/catalog/pub/config/config.py
index 10c8c9dd..f88891e4 100644
--- a/catalog/pub/config/config.py
+++ b/catalog/pub/config/config.py
@@ -79,3 +79,5 @@ CATALOG_URL_PATH = None
SDC_BASE_URL = "http://msb-iag/api"
SDC_USER = "aai"
SDC_PASSWD = "Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U"
+
+VNFD_SCHEMA_VERSION_DEFAULT = "base"
diff --git a/catalog/pub/utils/toscaparser/vnfdmodel.py b/catalog/pub/utils/toscaparser/vnfdmodel.py
index c4de6dcb..eb6732f4 100644
--- a/catalog/pub/utils/toscaparser/vnfdmodel.py
+++ b/catalog/pub/utils/toscaparser/vnfdmodel.py
@@ -14,6 +14,7 @@
import functools
import logging
+from catalog.pub.config.config import VNFD_SCHEMA_VERSION_DEFAULT
from catalog.pub.utils.toscaparser.basemodel import BaseInfoModel
from catalog.pub.utils.toscaparser.vnfdparser import CreateVnfdSOLParser
@@ -36,7 +37,7 @@ class EtsiVnfdInfoModel(BaseInfoModel):
nodeTemplates = map(functools.partial(self.buildNode, tosca=tosca), tosca.nodetemplates)
self.basepath = self.get_base_path(tosca)
node_types = tosca.topology_template.custom_defs
- sol_version = self.metadata.get("SOL_VERSION", "base") if isinstance(self.metadata, dict) else "base"
+ sol_version = self.metadata.get("VNFD_SCHEMA_VERSION", VNFD_SCHEMA_VERSION_DEFAULT) if isinstance(self.metadata, dict) else VNFD_SCHEMA_VERSION_DEFAULT
vnfd_sol_parser = CreateVnfdSOLParser(sol_version, self)
self.vnf = vnfd_sol_parser.build_vnf(tosca)
self.volume_storages = vnfd_sol_parser.get_all_volume_storage(nodeTemplates, node_types)
diff --git a/catalog/pub/utils/toscaparser/vnfdparser/__init__.py b/catalog/pub/utils/toscaparser/vnfdparser/__init__.py
index 90bef831..911de2c1 100644
--- a/catalog/pub/utils/toscaparser/vnfdparser/__init__.py
+++ b/catalog/pub/utils/toscaparser/vnfdparser/__init__.py
@@ -18,6 +18,6 @@ from catalog.pub.utils.toscaparser.vnfdparser.vnfd_sol_251 import VnfdSOL251
def CreateVnfdSOLParser(sol_version, etsi_vnfd_model):
switcher = {
"base": VnfdSOLBase(etsi_vnfd_model),
- "2.5.1": VnfdSOL251(etsi_vnfd_model)
+ "2.5.1+1": VnfdSOL251(etsi_vnfd_model)
}
return switcher.get(sol_version, lambda: "Invalid Version")