You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ariatosca.apache.org by tliron <gi...@git.apache.org> on 2017/01/24 07:54:46 UTC

[GitHub] incubator-ariatosca pull request #53: ARIA-72 Rework built-in workflows to m...

GitHub user tliron opened a pull request:

    https://github.com/apache/incubator-ariatosca/pull/53

    ARIA-72 Rework built-in workflows to match TOSCA normative lifecycle

    

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/tliron/incubator-ariatosca ARIA-72-builtin-workflows

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/incubator-ariatosca/pull/53.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #53
    
----
commit 6b9a9a0c530dc8bfe743a270312c96d48e32df2b
Author: Tal Liron <ta...@gmail.com>
Date:   2017-01-24T07:52:36Z

    ARIA-72 Rework built-in workflows to match TOSCA normative lifecycle

----


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-ariatosca pull request #53: ARIA-72 Rework built-in workflows to m...

Posted by mxmrlv <gi...@git.apache.org>.
Github user mxmrlv commented on a diff in the pull request:

    https://github.com/apache/incubator-ariatosca/pull/53#discussion_r97520223
  
    --- Diff: aria/orchestrator/workflows/builtin/utils.py ---
    @@ -0,0 +1,76 @@
    +# 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.
    +
    +from ..api.task import OperationTask
    +
    +
    +def create_node_instance_task(operation_name, node_instance, sequence):
    --- End diff --
    
    why not return the operation, and add it to the sequence, instead of altering the actual sequence inside the function? I feel it would make the entire thing more readable



---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-ariatosca pull request #53: ARIA-72 Rework built-in workflows to m...

Posted by mxmrlv <gi...@git.apache.org>.
Github user mxmrlv commented on a diff in the pull request:

    https://github.com/apache/incubator-ariatosca/pull/53#discussion_r97520771
  
    --- Diff: aria/orchestrator/workflows/builtin/utils.py ---
    @@ -0,0 +1,76 @@
    +# 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.
    +
    +from ..api.task import OperationTask
    +
    +
    +def create_node_instance_task(operation_name, node_instance, sequence):
    +    if operation_name in node_instance.node.operations:
    +        sequence.append(
    +            OperationTask.node_instance(instance=node_instance,
    +                                        name=operation_name))
    +
    +
    +def create_relationship_instance_task(operation_name, operations_attr, node_instance, sequence):
    +    for relationship_instance in node_instance.outbound_relationship_instances:
    +        if operation_name in getattr(relationship_instance.relationship, operations_attr):
    +            sequence.append(
    +                OperationTask.relationship_instance(instance=relationship_instance,
    +                                                    name=operation_name,
    +                                                    operation_end=operations_attr))
    +
    +
    +def create_node_instance_task_dependencies(graph, node_instances, tasks, reverse=False):
    +    def get_task(node_instance_id):
    --- End diff --
    
    couldn't see anything which ensures that the two indices are related (tasks index and node_instances index)


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-ariatosca pull request #53: ARIA-72 Rework built-in workflows to m...

Posted by mxmrlv <gi...@git.apache.org>.
Github user mxmrlv commented on a diff in the pull request:

    https://github.com/apache/incubator-ariatosca/pull/53#discussion_r97520189
  
    --- Diff: aria/orchestrator/workflows/builtin/utils.py ---
    @@ -0,0 +1,76 @@
    +# 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.
    +
    +from ..api.task import OperationTask
    +
    +
    +def create_node_instance_task(operation_name, node_instance, sequence):
    +    if operation_name in node_instance.node.operations:
    +        sequence.append(
    +            OperationTask.node_instance(instance=node_instance,
    +                                        name=operation_name))
    +
    +
    +def create_relationship_instance_task(operation_name, operations_attr, node_instance, sequence):
    --- End diff --
    
    ditto


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-ariatosca pull request #53: ARIA-72 Rework built-in workflows to m...

Posted by mxmrlv <gi...@git.apache.org>.
Github user mxmrlv commented on a diff in the pull request:

    https://github.com/apache/incubator-ariatosca/pull/53#discussion_r97520059
  
    --- Diff: tests/orchestrator/workflows/builtin/test_execute_operation.py ---
    @@ -29,7 +29,7 @@ def ctx(tmpdir):
         storage.release_sqlite_storage(context.model)
     
     
    -def test_execute_operation(ctx):
    +def _test_execute_operation(ctx):
    --- End diff --
    
    Skip?


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-ariatosca pull request #53: ARIA-72 Rework built-in workflows to m...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/incubator-ariatosca/pull/53


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---