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

    https://github.com/apache/incubator-ariatosca/pull/20#discussion_r88024702
  
    --- Diff: aria/context/toolbelt.py ---
    @@ -13,79 +13,67 @@
     # See the License for the specific language governing permissions and
     # limitations under the License.
     """
    -provides with different tools when working with the operation.
    +Provides with different tools for operations.
     """
     
    -from contextlib import contextmanager
    -
    -from .. import exceptions
     from . import operation
     
     
    -class _BaseToolbelt(object):
    +class NodeToolBelt(object):
         """
    -    Base tool belt
    +    Node operation related tool belt
         """
    -    def __init__(self):
    -        self._op_context = None
    -        self._workflow_context = None
    -
    -    @contextmanager
    -    def use(self, operation_context):
    -        """
    -        Context manager which switches the current toolbelt with the 
supplied ctx
    -        :param operation_context:
    -        :return:
    -        """
    -        assert isinstance(operation_context, 
operation.BaseOperationContext)
    -        _op_context = self._op_context
    -        _workflow_context = self._workflow_context
    -
    +    def __init__(self, operation_context):
             self._op_context = operation_context
    -        self._workflow_context = operation_context._workflow_context
    -        try:
    -            yield self
    -        finally:
    -            self._op_context = _op_context
    -            self._workflow_context = _workflow_context
    -
     
    -class _NodeToolBelt(_BaseToolbelt):
    -    """
    -    Node operation related tool belt
    -    """
         @property
         def relationships_to_me(self):
             """
             Any relationship which the current node is the target of
             :return:
             """
             assert isinstance(self._op_context, operation.NodeOperationContext)
    -        for node_instance in self._workflow_context.node_instances:
    +        node_instances = self._op_context.model.node_instance.iter(
    --- End diff --
    
    remove


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