[
https://issues.apache.org/jira/browse/ARIA-105?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15932910#comment-15932910
]
ASF GitHub Bot commented on ARIA-105:
-------------------------------------
Github user tliron commented on a diff in the pull request:
https://github.com/apache/incubator-ariatosca/pull/72#discussion_r106940791
--- Diff: aria/orchestrator/workflows/builtin/utils.py ---
@@ -14,33 +14,38 @@
# limitations under the License.
from ..api.task import OperationTask
+from .. import exceptions
-def create_node_task(operation_name, node):
+def create_node_task(interface_name, operation_name, node):
"""
Returns a new operation task if the operation exists in the node,
otherwise returns None.
"""
- if _has_operation(node.interfaces, operation_name):
- return OperationTask.node(instance=node,
- name=operation_name)
- return None
+ try:
+ return OperationTask.for_node(node=node,
+ interface_name=interface_name,
+ operation_name=operation_name)
+ except exceptions.TaskException:
--- End diff --
OK. This means that I will need to create a new exception sub-class here,
specifically for task creation.
> Integrate new models into parser
> --------------------------------
>
> Key: ARIA-105
> URL: https://issues.apache.org/jira/browse/ARIA-105
> Project: AriaTosca
> Issue Type: Task
> Reporter: Ran Ziv
> Assignee: Tal Liron
>
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)