Skip to content
Snippets Groups Projects
Commit b16cf25e authored by kayal2001's avatar kayal2001
Browse files

Feature 11047: Vim Flavor Name as Ns Config Template


Change-Id: Iea89c560fdcf736cf14e104736feab48c81b2114
Signed-off-by: default avatarkayal2001 <kayalvizhi.v@tataelxsi.co.in>
parent ac285875
No related branches found
No related tags found
No related merge requests found
......@@ -2320,6 +2320,15 @@ class NsConfigTemplateTopic(DescriptorTopic):
for key, value in edit_content_param.items():
param = key
param_content = value
if param == "vnf":
for content in param_content:
for vdu in content.get("vdu"):
if vdu.get("vim-flavor-name") and vdu.get(
"vim-flavor-id"
):
raise EngineException(
"Instantiation parameters vim-flavor-name and vim-flavor-id are mutually exclusive"
)
validate_input(param_content, self.instantiation_params[param])
return final_content
except Exception as e:
......
......@@ -374,6 +374,15 @@ class NsrTopic(BaseTopic):
ns_config_template_db, "ns_config_template", self.db
)
elif ns_request.get("vnf"):
vnf_data = ns_request.get("vnf")
for vnf in vnf_data:
for vdu in vnf.get("vdu"):
if vdu.get("vim-flavor-name") and vdu.get("vim-flavor-id"):
raise EngineException(
"Instantiation parameters vim-flavor-name and vim-flavor-id are mutually exclusive"
)
step = "checking nsdOperationalState"
self._check_nsd_operational_state(nsd, ns_request)
......
......@@ -159,6 +159,7 @@ ns_instantiate_vdu = {
"id": name_schema,
"vim-flavor-id": name_schema,
"instance_name": name_schema,
"vim-flavor-name": name_schema,
"volume": {
"type": "array",
"minItems": 1,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment