summaryrefslogtreecommitdiffstats
path: root/tosca2heat
diff options
context:
space:
mode:
Diffstat (limited to 'tosca2heat')
-rw-r--r--tosca2heat/tosca-parser/toscaparser/shell.py3
-rw-r--r--tosca2heat/tosca-parser/toscaparser/tosca_template.py17
2 files changed, 11 insertions, 9 deletions
diff --git a/tosca2heat/tosca-parser/toscaparser/shell.py b/tosca2heat/tosca-parser/toscaparser/shell.py
index ba9c28f..88c7473 100644
--- a/tosca2heat/tosca-parser/toscaparser/shell.py
+++ b/tosca2heat/tosca-parser/toscaparser/shell.py
@@ -91,11 +91,8 @@ class ParserShell(object):
no_required_paras_check=nrpv,
debug_mode=debug_mode)
except ValidationError as e:
- msg = _(' ===== main service template ===== ')
- log.error(msg)
log.error(e.message)
if debug_mode:
- print(msg)
print(e.message)
else:
raise e
diff --git a/tosca2heat/tosca-parser/toscaparser/tosca_template.py b/tosca2heat/tosca-parser/toscaparser/tosca_template.py
index c9be9dd..30432af 100644
--- a/tosca2heat/tosca-parser/toscaparser/tosca_template.py
+++ b/tosca2heat/tosca-parser/toscaparser/tosca_template.py
@@ -251,13 +251,11 @@ class ToscaTemplate(object):
nested_template = ToscaTemplate(
path=fname, parsed_params=parsed_params,
sub_mapped_node_template=nodetemplate,
- no_required_paras_check=nrpv)
+ no_required_paras_check=nrpv,
+ debug_mode=self.debug_mode)
except ValidationError as e:
- msg = _(' ===== nested service template ===== ')
- log.error(msg)
log.error(e.message)
if self.debug_mode:
- print(msg)
print(e.message)
else:
raise e
@@ -272,7 +270,7 @@ class ToscaTemplate(object):
self.nested_tosca_templates_with_topology.\
append(nested_template)
# Set the substitution toscatemplate for mapped node
- nodetemplate.sub_mapping_tosca_template = \
+ nodetemplate.substitution_mapped = \
nested_template
def _validate_field(self):
@@ -337,8 +335,15 @@ class ToscaTemplate(object):
if not self.debug_mode:
raise exceptions
else:
+ if self.sub_mapped_node_template:
+ msg = _('======== nested service template ======== ')
+
+ else:
+ msg = _('======== main service template ======== ')
+ print(msg)
print(exceptions.message)
- log.error(exceptions.message)
+ log.error(msg)
+ log.error(exceptions.message)
else:
if self.input_path:
msg = (_('The input "%(path)s" successfully passed '
'>239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366