Github user mxmrlv commented on a diff in the pull request:
https://github.com/apache/incubator-ariatosca/pull/12#discussion_r86688960
--- Diff: aria/workflows/api/task.py ---
@@ -0,0 +1,98 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+"""
+Provides the tasks to be enterd into the task graph
+"""
+from uuid import uuid4
+
+from aria import context
+
+
+class BaseTask(object):
+ """
+ Abstract task_graph task
+ """
+ pass
+
+
+class OperationTask(BaseTask):
+ """
+ Represents an operation task in the task_graph
+ """
+
+ def __init__(self,
+ name,
+ operation_details,
+ node_instance,
+ inputs=None):
+ """
+ Creates an operation task using the name, details, node instance
and any additional kwargs.
+ :param name: the operation of the name.
+ :param operation_details: the details for the operation.
+ :param node_instance: the node instance on which this operation is
registered.
+ :param inputs: operation inputs.
+ """
+ self.id = uuid4()
+ self.workflow_context = context.workflow.current.get()
+ self.name = name
+ self.operation_details = operation_details
+ self.node_instance = node_instance
+ self.inputs = inputs or {}
+
+ def __getattr__(self, item):
+ try:
+ return self.__getattribute__(item)
+ except AttributeError:
--- 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 [email protected] or file a JIRA ticket
with INFRA.
---