From e947d728df6f67e19ed4c8254347e116d1548e18 Mon Sep 17 00:00:00 2001
From: shangxdy <shang.xiaodong@zte.com.cn>
Date: Thu, 10 Aug 2017 20:09:45 +0800
Subject: Support yaml file with suffix of yml

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 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'tosca2heat')

diff --git a/tosca2heat/tosca-parser/toscaparser/tosca_template.py b/tosca2heat/tosca-parser/toscaparser/tosca_template.py
index f48078f..9e84f3d 100644
--- a/tosca2heat/tosca-parser/toscaparser/tosca_template.py
+++ b/tosca2heat/tosca-parser/toscaparser/tosca_template.py
@@ -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
-- 
cgit