summaryrefslogtreecommitdiffstats
path: root/tosca2heat/tosca-parser
diff options
context:
space:
mode:
authorjulien zhang <zhang.jun3g@zte.com.cn>2016-07-12 00:49:16 +0000
committerGerrit Code Review <gerrit@172.30.200.206>2016-07-12 00:49:16 +0000
commit54070b9d2e5da8855dc0a6be041d69081737d07e (patch)
treeb57bc431d2cfa43e38376a8d7ae7b379cd062fb6 /tosca2heat/tosca-parser
parentd9da67e738e90d2842421fe0d5e20311ff18fe70 (diff)
parent2323c9da55a018b1b1995abd5d05f4cdf2be31d5 (diff)
Merge "fix import and vRNC Ctrl_net definition error"
Diffstat (limited to 'tosca2heat/tosca-parser')
-rw-r--r--tosca2heat/tosca-parser/toscaparser/extensions/nfv/tests/data/vRNC/Definitions/vRNC.yaml4
-rw-r--r--tosca2heat/tosca-parser/toscaparser/imports.py12
2 files changed, 8 insertions, 8 deletions
diff --git a/tosca2heat/tosca-parser/toscaparser/extensions/nfv/tests/data/vRNC/Definitions/vRNC.yaml b/tosca2heat/tosca-parser/toscaparser/extensions/nfv/tests/data/vRNC/Definitions/vRNC.yaml
index 6517c4a..bdd03c8 100644
--- a/tosca2heat/tosca-parser/toscaparser/extensions/nfv/tests/data/vRNC/Definitions/vRNC.yaml
+++ b/tosca2heat/tosca-parser/toscaparser/extensions/nfv/tests/data/vRNC/Definitions/vRNC.yaml
@@ -441,8 +441,8 @@ topology_template:
order: 0
is_default: true
requirements:
- - virtualBinding: DM
- - virtualLink: CTRL_Net_Host
+ - virtualBinding: DM_Host
+ - virtualLink: CTRL_Net
DM_Port_INTERMEDIA:
type: rnc.nodes.CP.DM
diff --git a/tosca2heat/tosca-parser/toscaparser/imports.py b/tosca2heat/tosca-parser/toscaparser/imports.py
index 58c9300..86c10f0 100644
--- a/tosca2heat/tosca-parser/toscaparser/imports.py
+++ b/tosca2heat/tosca-parser/toscaparser/imports.py
@@ -184,7 +184,7 @@ class ImportsLoader(object):
% {'import_name': import_name})
log.error(msg)
ExceptionCollector.appendException(ValidationError(message=msg))
- return
+ return None, None
if toscaparser.utils.urlutils.UrlUtils.validate_url(file_name):
return file_name, YAML_LOADER(file_name, False)
@@ -199,7 +199,7 @@ class ImportsLoader(object):
% {'name': file_name, 'template': self.path})
log.error(msg)
ExceptionCollector.appendException(ImportError(msg))
- return
+ return None, None
import_template = toscaparser.utils.urlutils.UrlUtils.\
join_url(self.path, file_name)
a_file = False
@@ -242,7 +242,7 @@ class ImportsLoader(object):
% {'name': file_name})
log.error(msg)
ExceptionCollector.appendException(ImportError(msg))
- return
+ return None, None
if not import_template:
log.error(_('Import "%(name)s" is not valid.') %
@@ -250,14 +250,14 @@ class ImportsLoader(object):
ExceptionCollector.appendException(
ImportError(_('Import "%s" is not valid.') %
import_uri_def))
- return
+ return None, None
return import_template, YAML_LOADER(import_template, a_file)
if short_import_notation:
log.error(_('Import "%(name)s" is not valid.') % import_uri_def)
ExceptionCollector.appendException(
ImportError(_('Import "%s" is not valid.') % import_uri_def))
- return
+ return None, None
full_url = ""
if repository:
@@ -275,7 +275,7 @@ class ImportsLoader(object):
% {'n_uri': repository, 'tpl': import_name})
log.error(msg)
ExceptionCollector.appendException(ImportError(msg))
- return
+ return None, None
if toscaparser.utils.urlutils.UrlUtils.validate_url(full_url):
return full_url, YAML_LOADER(full_url, False)