Support yaml file with suffix of yml 59/39059/1
authorshangxdy <shang.xiaodong@zte.com.cn>
Thu, 10 Aug 2017 12:09:45 +0000 (20:09 +0800)
committershangxdy <shang.xiaodong@zte.com.cn>
Thu, 10 Aug 2017 12:09:45 +0000 (20:09 +0800)
Currently toscaparser only support service template file with suffix:
yaml, zip and csar, need to support file with suffix of yml.
the patch will be submitted to OpenStack

JIRA: PARSER-137

Change-Id: I039bcfbfeb8e2aae47df133221162a68736ded55
Signed-off-by: shangxdy <shang.xiaodong@zte.com.cn>
tosca2heat/tosca-parser/toscaparser/tosca_template.py

index f48078f..9e84f3d 100644 (file)
@@ -272,7 +272,7 @@ class ToscaTemplate(object):
                 update_definitions(version)
 
     def _get_path(self, path):
-        if path.lower().endswith('.yaml'):
+        if path.lower().endswith('.yaml') or path.lower().endswith('.yml'):
             return path
         elif path.lower().endswith(('.zip', '.csar')):
             # a CSAR archive