ariatosca-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ran-z <...@git.apache.org>
Subject [GitHub] incubator-ariatosca pull request #138: ARIA-149 Enhance operation configurat...
Date Tue, 23 May 2017 14:39:50 GMT
Github user ran-z commented on a diff in the pull request:

    https://github.com/apache/incubator-ariatosca/pull/138#discussion_r118007646
  
    --- Diff: extensions/aria_extension_tosca/simple_v1_0/modeling/__init__.py ---
    @@ -384,18 +387,37 @@ def create_operation_template_model(context, service_template, operation):
                     model.relationship_edge = True
     
             dependencies = implementation.dependencies
    +        configuration = OrderedDict()
             if dependencies:
                 for dependency in dependencies:
                     key, value = split_prefix(dependency)
                     if key is not None:
    -                    if model.configuration is None:
    -                        model.configuration = {}
    -                    set_nested(model.configuration, key.split('.'), value)
    +                    # Parse as YAML
    +                    try:
    +                        value = yaml.load(value)
    +                    except yaml.parser.MarkedYAMLError as e:
    +                        context.validation.report(
    +                            'YAML parser {0} in operation configuration: {1}'
    +                            .format(e.problem, value),
    +                            locator=implementation._locator,
    +                            level=Issue.FIELD)
    +                        continue
    --- End diff --
    
    shouldn't this be a re-raise? seems somewhat fatal...


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message