Github user AviaE commented on a diff in the pull request:

    https://github.com/apache/incubator-ariatosca/pull/189#discussion_r132127314
  
    --- Diff: aria/orchestrator/topology/instance_handler.py ---
    @@ -527,78 +539,82 @@ def satisfy_requirements(self):
                        for node in self._model.nodes.values())
     
     
    -class Substitution(common._InstanceHandlerMixin):
    +class Substitution(common.InstanceHandlerBase):
         def coerce(self, **kwargs):
             self._topology.coerce(self._model.mappings, **kwargs)
     
         def validate(self, **kwargs):
    -        self._topology.validate(self._model.mappings)
    +        self._topology.validate(self._model.mappings, **kwargs)
     
         def dump(self, out_stream):
             out_stream.write('Substitution:')
             with out_stream.indent():
    -            out_stream.write('Node type: 
{0}'.format(out_stream.type(self._model.node_type.name)))
    -            self._topology.dump(self._model.mappings, out_stream, 
'Mappings')
    +            out_stream.write('Node type: {0}'.format(out_stream.type_style(
    +                self._model.node_type.name)))
    +            self._topology.dump(self._model.mappings, out_stream, 
title='Mappings')
     
     
    -class SubstitutionMapping(common._InstanceHandlerMixin):
    +class SubstitutionMapping(common.InstanceHandlerBase):
     
    -    def validate(self, **kwargs):
    +    def coerce(self, **kwargs):
    +        pass
    +
    +    def validate(self, **_):
             if (self._model.capability is None) and 
(self._model.requirement_template is None):
                 self._topology.report(
                     'mapping "{0}" refers to neither capability nor a 
requirement'
                     ' in node: {1}'.format(
    -                    self._model.name, 
formatting.safe_repr(self._model.node.name)),
    +                    self._model.name, 
formatting.safe_repr(self._model.node_style.name)),
                     level=self._topology.Issue.BETWEEN_TYPES)
     
         def dump(self, out_stream):
             if self._model.capability is not None:
                 out_stream.write('{0} -> {1}.{2}'.format(
    -                out_stream.node(self._model.name),
    -                out_stream.node(self._model.capability.node.name),
    -                out_stream.node(self._model.capability.name)))
    +                out_stream.node_style(self._model.name),
    +                
out_stream.node_style(self._model.capability.node_style.name),
    +                out_stream.node_style(self._model.capability.name)))
             else:
                 out_stream.write('{0} -> {1}.{2}'.format(
    -                out_stream.node(self._model.name),
    -                out_stream.node(self._model.node.name),
    -                out_stream.node(self._model.requirement_template.name)))
    +                out_stream.node_style(self._model.name),
    +                out_stream.node_style(self._model.node_style.name),
    --- End diff --
    
    Go over all the `node_style`s.


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to