[ 
https://issues.apache.org/jira/browse/ARIA-120?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15943334#comment-15943334
 ] 

ASF GitHub Bot commented on ARIA-120:
-------------------------------------

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

    https://github.com/apache/incubator-ariatosca/pull/77#discussion_r108178303
  
    --- Diff: tests/orchestrator/workflows/builtin/__init__.py ---
    @@ -13,18 +13,65 @@
     # See the License for the specific language governing permissions and
     # limitations under the License.
     
    -from tests import mock
    +from aria.orchestrator.workflows.builtin import workflows
     
     
    -def assert_node_install_operations(operations, with_relationships=False):
    -    all_operations = mock.operations.OPERATIONS_INSTALL if 
with_relationships else \
    -                     mock.operations.NODE_OPERATIONS_INSTALL
    -    for i, operation in enumerate(operations):
    -        assert operation.name.startswith(all_operations[i] + '.')
    +def _assert_relationships(operations, expected_op_full_name, 
relationships=0):
    +    """
     
    +    :param operations: and iterable of operations
    +    :param expected_op_full_name: Note that source/target doesn't really 
matter since they are
    +    dropped
    +    :param relationships: the number of relationships
    +    :return:
    +    """
    +    expected_op_name = expected_op_full_name.rsplit('_', 1)[0]
    +    for _ in xrange(relationships):
    +        # Since the target and source operations start of the same way, we 
only need to retrieve the
    +        # suffix once
    +        operation = next(operations)
    +        relationship_id_1 = operation.actor.id
    +        edge1 = operation.runs_on
    +        _assert_cfg_interface_op(operation, expected_op_name)
     
    -def assert_node_uninstall_operations(operations, with_relationships=False):
    -    all_operations = mock.operations.OPERATIONS_UNINSTALL if 
with_relationships else \
    -                     mock.operations.NODE_OPERATIONS_UNINSTALL
    -    for i, operation in enumerate(operations):
    -        assert operation.name.startswith(all_operations[i] + '.')
    +        operation = next(operations)
    +        relationship_id_2 = operation.actor.id
    +        edge2 = operation.runs_on
    +        _assert_cfg_interface_op(operation, expected_op_name)
    +
    +        assert relationship_id_1 == relationship_id_2
    +        print '++++' + edge1, edge2
    --- End diff --
    
    delete


> Builtin workflows have wrong execution order in relationship operations
> -----------------------------------------------------------------------
>
>                 Key: ARIA-120
>                 URL: https://issues.apache.org/jira/browse/ARIA-120
>             Project: AriaTosca
>          Issue Type: Bug
>            Reporter: Maxim Orlov
>
> The execution order of relationships based operations of a node is wrong. 
> In the current state, all of the pre_configure source operations are executed 
> before any pre_configure target operations are executed.
> In the desired state, each source-target operations of a single relationship 
> are executed side by side (concurrently), and only once both are done, the 
> execution of the next relationship's source-target operations commences.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to