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

    https://github.com/apache/incubator-ariatosca/pull/189#discussion_r132125166
  
    --- Diff: aria/orchestrator/topology/common.py ---
    @@ -14,39 +14,53 @@
     # limitations under the License.
     
     
    -class _Handler(object):
    -    def __init__(self, topology, template):
    +class HandlerBase(object):
    +    def __init__(self, topology, model):
             self._topology = topology
    -        self._model = template
    +        self._model = model
     
    -    def _coerce(self, *templates, **kwargs):
    -        for template in templates:
    -            self._topology.coerce(template)
    +    def coerce(self, **kwargs):
    +        raise NotImplementedError
     
    -    def coerce(self):
    -        pass
    +    def _coerce(self, *models, **kwargs):
    +        for template in models:
    +            self._topology.coerce(template, **kwargs)
     
         def validate(self, **kwargs):
    -        pass
    +        raise NotImplementedError
     
    -    def _validate(self, *templates, **kwargs):
    -        for template in templates:
    -            self._topology.validate(template)
    +    def _validate(self, *models, **kwargs):
    +        for template in models:
    +            self._topology.validate(template, **kwargs)
     
         def dump(self, out_stream):
    -        pass
    +        raise NotImplementedError
     
     
    -class _TemplateHandlerMixin(_Handler):
    +class TemplateHandlerBase(HandlerBase):
    +    """
    +    Base handler for template based models
    +    """
     
    -    def instantiate(self, instance_cls):
    +    def instantiate(self, instance_cls, **kwargs):
             raise NotImplementedError
     
     
    -class _InstanceHandlerMixin(_Handler):
    -    pass
    +class InstanceHandlerBase(HandlerBase):
    +    """
    +    Base handler for instance based models
    +
    +    """
    +    def validate(self, **kwargs):
    +        raise NotImplementedError
    +
    +    def coerce(self, **kwargs):
    +        raise NotImplementedError
    +
    +    def dump(self, out_stream):
    +        raise NotImplementedError
     
     
    -class _OperatorHolderHandlerMixin(_Handler):
    +class ActorHandlerBase(HandlerBase):
    --- End diff --
    
    Explain what Actor mean in this context. Like in the base classes.


---
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