aboutsummaryrefslogtreecommitdiffstats
path: root/ice_validator/preload/environment.py
diff options
context:
space:
mode:
authorstark, steven <steven.stark@att.com>2020-07-15 12:35:52 -0700
committerstark, steven <steven.stark@att.com>2020-07-16 11:21:58 -0700
commit7f3b8aae571dcc83a55779cb14c9ee9d5b18e2d0 (patch)
tree15baa94472faa060f93c8299435072946035839e /ice_validator/preload/environment.py
parent090dbf300bf4e20cf1571afdc21792789a768abd (diff)
[VVP] preload generation enhancements
Add "0" digit to end of VNF type If "module" has file extension, remove extension before parsing CSAR for module information. Issue-ID: VVP-440 Signed-off-by: stark, steven <steven.stark@att.com> Change-Id: I9dae8643e4c602867cbbbfec1416ca67a0a1ad4f
Diffstat (limited to 'ice_validator/preload/environment.py')
-rw-r--r--ice_validator/preload/environment.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/ice_validator/preload/environment.py b/ice_validator/preload/environment.py
index 0477e66..6d8d7c3 100644
--- a/ice_validator/preload/environment.py
+++ b/ice_validator/preload/environment.py
@@ -1,3 +1,4 @@
+import os
import re
import tempfile
from pathlib import Path
@@ -50,6 +51,12 @@ class CloudServiceArchive:
:param vf_module: name of Heat module (no path or file extension)
:return: The definition of the module as a dict or None if not found
"""
+ if(
+ vf_module.endswith(".env")
+ or vf_module.endswith(".yaml")
+ or vf_module.endswith(".yml")
+ ):
+ vf_module = os.path.splitext(vf_module)[0]
groups = self._service.get("topology_template", {}).get("groups", {})
for props in groups.values():
module_label = props.get("properties", {}).get("vf_module_label", "")
@@ -102,7 +109,7 @@ class CloudServiceArchive:
service_name = self.service_name
instance_name = self.get_vf_module_resource_name(module)
if service_name and instance_name:
- return "{}/{}".format(service_name, instance_name)
+ return "{}/{} 0".format(service_name, instance_name)
@property
def vf_module_resource_names(self):