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/03/31 19:39:08 UTC
[GitHub] incubator-ariatosca pull request #91: ARIA-134 Parser populates service work...
GitHub user tliron opened a pull request:
https://github.com/apache/incubator-ariatosca/pull/91
ARIA-134 Parser populates service workflows
Also involved some small fixes to service models.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/apache/incubator-ariatosca ARIA-134-populate-workflows
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/incubator-ariatosca/pull/91.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 #91
----
commit 5edbf938ddbcd8b3398411bbe7d3b486032bd275
Author: Tal Liron <ta...@gmail.com>
Date: 2017-03-31T19:34:41Z
ARIA-134 Parser populates service workflows
----
---
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 #91: ARIA-134 Parser populates service work...
Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:
https://github.com/apache/incubator-ariatosca/pull/91
---
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 #91: ARIA-134 Parser populates service work...
Posted by tliron <gi...@git.apache.org>.
Github user tliron commented on a diff in the pull request:
https://github.com/apache/incubator-ariatosca/pull/91#discussion_r109956081
--- Diff: extensions/aria_extension_tosca/simple_v1_0/modeling/__init__.py ---
@@ -446,6 +451,29 @@ def get(name):
return model
+def create_workflow_operation_template_model(context, service_template, policy):
+ model = OperationTemplate(name=policy._name,
--- End diff --
You are not wrong ... but I also wanted to minimize the number of models we have. I think if we do decide to change this, we can do it in a separate JIRA.
---
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 #91: ARIA-134 Parser populates service work...
Posted by tliron <gi...@git.apache.org>.
Github user tliron commented on a diff in the pull request:
https://github.com/apache/incubator-ariatosca/pull/91#discussion_r109956337
--- Diff: extensions/aria_extension_tosca/simple_v1_0/modeling/__init__.py ---
@@ -85,9 +85,14 @@ def create_service_template_model(context): # pylint: disable=too-many-locals,to
policies = context.presentation.get('service_template', 'topology_template', 'policies')
if policies:
for policy in policies.itervalues():
- if model.policy_types.get_descendant(policy.type).role == 'plugin':
+ role = model.policy_types.get_descendant(policy.type).role
--- End diff --
*All* the policies are added in line 115, below. Well, I think we *have* to add all of them because they are there in the TOSCA service template. The fact that ARIA recognizes some special roles doesn't mean they aren't policies, still.
---
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 #91: ARIA-134 Parser populates service work...
Posted by ran-z <gi...@git.apache.org>.
Github user ran-z commented on a diff in the pull request:
https://github.com/apache/incubator-ariatosca/pull/91#discussion_r109303723
--- Diff: extensions/aria_extension_tosca/simple_v1_0/modeling/__init__.py ---
@@ -446,6 +451,29 @@ def get(name):
return model
+def create_workflow_operation_template_model(context, service_template, policy):
+ model = OperationTemplate(name=policy._name,
--- End diff --
Do we want workflows to be modeled as OperationTemplates?
There are indeed many similarities though some fields don't really apply, e.g. `retry_interval`; What do you think?
---
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 #91: ARIA-134 Parser populates service work...
Posted by ran-z <gi...@git.apache.org>.
Github user ran-z commented on a diff in the pull request:
https://github.com/apache/incubator-ariatosca/pull/91#discussion_r109303772
--- Diff: extensions/aria_extension_tosca/simple_v1_0/modeling/__init__.py ---
@@ -85,9 +85,14 @@ def create_service_template_model(context): # pylint: disable=too-many-locals,to
policies = context.presentation.get('service_template', 'topology_template', 'policies')
if policies:
for policy in policies.itervalues():
- if model.policy_types.get_descendant(policy.type).role == 'plugin':
+ role = model.policy_types.get_descendant(policy.type).role
--- End diff --
what about policies which are neither plugin or workflows?
I think the expected behavior should be that any such policy will be available under `service.policies`, while the plugin and workflow ones won't be available under `service.policies`, no?
---
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.
---