incubator-ariatosca git commit: All tests pass :)
Repository: incubator-ariatosca Updated Branches: refs/heads/ARIA-105-integrate-modeling dd99f0fbc -> aa01cd4e9 All tests pass :) Project: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/commit/aa01cd4e Tree: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/tree/aa01cd4e Diff: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/diff/aa01cd4e Branch: refs/heads/ARIA-105-integrate-modeling Commit: aa01cd4e9a60507bafb98707c7793c3a89424db8 Parents: dd99f0f Author: Tal LironAuthored: Tue Mar 7 12:13:28 2017 -0600 Committer: Tal Liron Committed: Tue Mar 7 21:22:45 2017 -0600 -- aria/modeling/bases.py | 2 +- aria/modeling/misc.py | 6 +- aria/modeling/orchestration.py | 2 +- aria/modeling/service.py| 12 +- aria/modeling/service_template.py | 8 +- aria/orchestrator/workflows/api/task.py | 2 +- aria/orchestrator/workflows/api/task_graph.py | 2 +- .../workflows/builtin/execute_operation.py | 18 +- aria/orchestrator/workflows/builtin/heal.py | 188 +-- aria/parser/modeling/context.py | 5 +- aria/utils/uuid.py | 6 +- docs/requirements.txt | 2 +- tests/mock/models.py| 6 +- tests/mock/topology.py | 6 +- tests/orchestrator/context/test_operation.py| 9 +- .../orchestrator/execution_plugin/test_local.py | 26 +-- tests/orchestrator/execution_plugin/test_ssh.py | 29 +-- .../orchestrator/workflows/builtin/test_heal.py | 20 +- tests/storage/test_models.py| 8 +- tests/storage/test_structures.py| 12 +- 20 files changed, 187 insertions(+), 182 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/aa01cd4e/aria/modeling/bases.py -- diff --git a/aria/modeling/bases.py b/aria/modeling/bases.py index a4db320..efcb968 100644 --- a/aria/modeling/bases.py +++ b/aria/modeling/bases.py @@ -119,7 +119,7 @@ class ModelMixin(object): return cls._create_relationship(other_table, backref_kwargs, relationship_kwargs, backreference, key=key, foreign_key=foreign_key) - + @classmethod def one_to_many_relationship(cls, child_table, http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/aa01cd4e/aria/modeling/misc.py -- diff --git a/aria/modeling/misc.py b/aria/modeling/misc.py index 0bb5cda..105876a 100644 --- a/aria/modeling/misc.py +++ b/aria/modeling/misc.py @@ -13,6 +13,8 @@ # See the License for the specific language governing permissions and # limitations under the License. +# pylint: disable=no-self-argument, no-member, abstract-method + import cPickle as pickle import logging @@ -113,7 +115,7 @@ class TypeBase(InstanceModelMixin): __tablename__ = 'type' -variant = Column(Text, nullable=False) +variant = Column(Text, nullable=False) description = Column(Text) _role = Column(Text, name='role') @@ -135,7 +137,7 @@ class TypeBase(InstanceModelMixin): return cls.foreign_key('type', nullable=True) # endregion - + @property def role(self): def get_role(the_type): http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/aa01cd4e/aria/modeling/orchestration.py -- diff --git a/aria/modeling/orchestration.py b/aria/modeling/orchestration.py index d9d9908..c842c07 100644 --- a/aria/modeling/orchestration.py +++ b/aria/modeling/orchestration.py @@ -152,7 +152,7 @@ class ServiceUpdateBase(ModelMixin): steps = None -__tablename__ = 'service_update' +__tablename__ = 'service_update' _private_fields = ['execution_fk', 'service_fk'] http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/aa01cd4e/aria/modeling/service.py -- diff --git a/aria/modeling/service.py b/aria/modeling/service.py index eb8acb5..bf189f7 100644 --- a/aria/modeling/service.py +++ b/aria/modeling/service.py @@ -13,7 +13,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -# pylint: disable=no-self-argument, no-member, abstract-method +# pylint: disable=too-many-lines, no-self-argument, no-member, abstract-method from sqlalchemy import (
[GitHub] incubator-ariatosca pull request #76: Unified_coerce
GitHub user mxmrlv opened a pull request: https://github.com/apache/incubator-ariatosca/pull/76 Unified_coerce You can merge this pull request into a Git repository by running: $ git pull https://github.com/apache/incubator-ariatosca Unified_coerce Alternatively you can review and apply these changes as the patch at: https://github.com/apache/incubator-ariatosca/pull/76.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 #76 commit 2c2fe86889cb9beae375b2aba08ab21092e84397 Author: max-orlovDate: 2017-03-08T15:02:34Z Unified_coerce --- 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 infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
incubator-ariatosca git commit: Change parameter name in wagon.install to venv
Repository: incubator-ariatosca Updated Branches: refs/heads/ARIA-96-less-strict-dependencies f01f082a9 -> bbf40625c Change parameter name in wagon.install to venv The previous requirements file specified wagon==0.5.0. In the new requirements file we don't specify a version for wagon, so we get the latest - 0.6.0. In this version, wagon.install's virtualenv argument was changed to venv. Project: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/commit/bbf40625 Tree: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/tree/bbf40625 Diff: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/diff/bbf40625 Branch: refs/heads/ARIA-96-less-strict-dependencies Commit: bbf40625c6736ac71fc084665df14d6fca22c433 Parents: f01f082 Author: Avia EfratAuthored: Thu Mar 9 17:03:05 2017 +0200 Committer: Avia Efrat Committed: Thu Mar 9 17:03:05 2017 +0200 -- aria/orchestrator/plugin.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/bbf40625/aria/orchestrator/plugin.py -- diff --git a/aria/orchestrator/plugin.py b/aria/orchestrator/plugin.py index 381504e..d815754 100644 --- a/aria/orchestrator/plugin.py +++ b/aria/orchestrator/plugin.py @@ -92,7 +92,7 @@ class PluginManager(object): install_args='--prefix="{prefix}" --constraint="{constraint}"'.format( prefix=prefix, constraint=constraint.name), -virtualenv=os.environ.get('VIRTUAL_ENV')) +venv=os.environ.get('VIRTUAL_ENV')) finally: os.remove(constraint_path)
incubator-ariatosca git commit: initial commit [Forced Update!]
Repository: incubator-ariatosca Updated Branches: refs/heads/ARIA-105-integrate-modeling aa01cd4e9 -> dd99f0fbc (forced update) refs/heads/ARIA-122-Create-central-instantiation-module c7e28595d -> 8cd3113fa (forced update) initial commit Project: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/commit/8cd3113f Tree: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/tree/8cd3113f Diff: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/diff/8cd3113f Branch: refs/heads/ARIA-122-Create-central-instantiation-module Commit: 8cd3113fa8b8b873ff83921298c78a18eec5e5d7 Parents: c0d76ad Author: max-orlovAuthored: Thu Mar 9 15:22:23 2017 +0200 Committer: max-orlov Committed: Thu Mar 9 15:41:59 2017 +0200 -- aria/orchestrator/instantiation.py | 173 ++ aria/storage/modeling/structure.py | 4 +- aria/storage/modeling/template_elements.py | 183 +--- tests/conftest.py | 3 +- tests/orchestrator/test_instantiation.py | 79 ++ 5 files changed, 290 insertions(+), 152 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/8cd3113f/aria/orchestrator/instantiation.py -- diff --git a/aria/orchestrator/instantiation.py b/aria/orchestrator/instantiation.py new file mode 100644 index 000..8b36257 --- /dev/null +++ b/aria/orchestrator/instantiation.py @@ -0,0 +1,173 @@ +# 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 aria.parser import validation +from aria.storage.modeling import utils +from aria.utils.collections import deepcopy_with_locators +from aria.storage.modeling import model + + +@model.ServiceTemplate.instantiates(instance_cls=model.ServiceInstance) +def instantiate_service(self, instance_cls, context, container): +service_instance = instance_cls() +context.modeling.instance = service_instance + +service_instance.description = deepcopy_with_locators(self.description) + +if self.metadata is not None: +service_instance.metadata = self.metadata.instantiate(context, container) + +for node_template in self.node_templates.itervalues(): +for _ in range(node_template.default_instances): +node = node_template.instantiate(context, container) +service_instance.nodes[node.id] = node + +utils.instantiate_dict(context, self, service_instance.groups, self.group_templates) +utils.instantiate_dict(context, self, service_instance.policies, self.policy_templates) +utils.instantiate_dict(context, self, service_instance.operations, self.operation_templates) + +if self.substitution_template is not None: +service_instance.substitution = self.substitution_template.instantiate(context, + container) + +utils.instantiate_dict(context, self, service_instance.inputs, self.inputs) +utils.instantiate_dict(context, self, service_instance.outputs, self.outputs) + +for name, the_input in context.modeling.inputs.iteritems(): +if name not in service_instance.inputs: +context.validation.report('input "%s" is not supported' % name) +else: +service_instance.inputs[name].value = the_input + +return service_instance + + +@model.ArtifactTemplate.instantiates(instance_cls=model.Artifact) +def instantiate_artifact(self, instance_cls, context, container): +artifact = instance_cls(self.name, self.type_name, self.source_path) +artifact.description = deepcopy_with_locators(self.description) +artifact.target_path = self.target_path +artifact.repository_url = self.repository_url +artifact.repository_credential = self.repository_credential +utils.instantiate_dict(context, container, artifact.properties, self.properties) +return artifact + +
incubator-ariatosca git commit: initial commit
Repository: incubator-ariatosca Updated Branches: refs/heads/ARIA-122-Create-central-instantiation-module [created] c7e28595d initial commit Project: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/commit/c7e28595 Tree: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/tree/c7e28595 Diff: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/diff/c7e28595 Branch: refs/heads/ARIA-122-Create-central-instantiation-module Commit: c7e28595d1e6dcb10aaac1169f0a53a0218b71ee Parents: c0d76ad Author: max-orlovAuthored: Thu Mar 9 15:22:23 2017 +0200 Committer: max-orlov Committed: Thu Mar 9 15:22:23 2017 +0200 -- aria/orchestrator/instantiation.py | 52 aria/storage/modeling/structure.py | 4 +- aria/storage/modeling/template_elements.py | 48 ++- tests/conftest.py | 3 +- tests/orchestrator/test_instantiation.py | 79 + 5 files changed, 169 insertions(+), 17 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/c7e28595/aria/orchestrator/instantiation.py -- diff --git a/aria/orchestrator/instantiation.py b/aria/orchestrator/instantiation.py new file mode 100644 index 000..a3b36bb --- /dev/null +++ b/aria/orchestrator/instantiation.py @@ -0,0 +1,52 @@ +# 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 aria.storage.modeling import utils +from aria.utils.collections import deepcopy_with_locators +from aria.storage.modeling import model + + +@model.ServiceTemplate.instantiates(instance_cls=model.ServiceInstance) +def instantiate_service_instance(self, instance_cls, context, container): +service_instance = instance_cls +context.modeling.instance = service_instance + +service_instance.description = deepcopy_with_locators(self.description) + +if self.metadata is not None: +service_instance.metadata = self.metadata.instantiate(context, container) + +for node_template in self.node_templates.itervalues(): +for _ in range(node_template.default_instances): +node = node_template.instantiate(context, container) +service_instance.nodes[node.id] = node + +utils.instantiate_dict(context, self, service_instance.groups, self.group_templates) +utils.instantiate_dict(context, self, service_instance.policies, self.policy_templates) +utils.instantiate_dict(context, self, service_instance.operations, self.operation_templates) + +if self.substitution_template is not None: +service_instance.substitution = self.substitution_template.instantiate(context, + container) + +utils.instantiate_dict(context, self, service_instance.inputs, self.inputs) +utils.instantiate_dict(context, self, service_instance.outputs, self.outputs) + +for name, the_input in context.modeling.inputs.iteritems(): +if name not in service_instance.inputs: +context.validation.report('input "%s" is not supported' % name) +else: +service_instance.inputs[name].value = the_input + +return service_instance \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/c7e28595/aria/storage/modeling/structure.py -- diff --git a/aria/storage/modeling/structure.py b/aria/storage/modeling/structure.py index eacdb44..4ee6951 100644 --- a/aria/storage/modeling/structure.py +++ b/aria/storage/modeling/structure.py @@ -88,8 +88,8 @@ class ModelElementBase(ElementBase): All model elements can be instantiated into :class:`ServiceInstance` elements. """ - -def instantiate(self, context, container): +@classmethod +def instantiate(cls, *args, **kwargs): raise NotImplementedError
[jira] [Updated] (ARIA-122) Create central instantiation module
[ https://issues.apache.org/jira/browse/ARIA-122?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Maxim Orlov updated ARIA-122: - Summary: Create central instantiation module (was: Createe central instantiation module) > Create central instantiation module > --- > > Key: ARIA-122 > URL: https://issues.apache.org/jira/browse/ARIA-122 > Project: AriaTosca > Issue Type: Bug >Reporter: Maxim Orlov >Assignee: Maxim Orlov > > Currently each template model provides a simple API for creating an instance > of the class. we should provide a simple API for editing the instantiation > processes between the template and the instance, This should be dove via a > central module/package (rather than on per class basis) -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Created] (ARIA-122) Createe central instantiation module
Maxim Orlov created ARIA-122: Summary: Createe central instantiation module Key: ARIA-122 URL: https://issues.apache.org/jira/browse/ARIA-122 Project: AriaTosca Issue Type: Bug Reporter: Maxim Orlov Assignee: Maxim Orlov Currently each template model provides a simple API for creating an instance of the class. we should provide a simple API for editing the instantiation processes between the template and the instance, This should be dove via a central module/package (rather than on per class basis) -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Created] (ARIA-121) Workflow reserved properties should be disallowed of use
Ran Ziv created ARIA-121: Summary: Workflow reserved properties should be disallowed of use Key: ARIA-121 URL: https://issues.apache.org/jira/browse/ARIA-121 Project: AriaTosca Issue Type: Bug Reporter: Ran Ziv Priority: Minor Users should not be able to specify the properties "ctx" and "graph" in a workflow policy, as they're both reserved by the workflow engine. A validation for this should run in the DSL parser. -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Commented] (ARIA-64) Remove PyYaml dependency
[ https://issues.apache.org/jira/browse/ARIA-64?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15902855#comment-15902855 ] ASF subversion and git services commented on ARIA-64: - Commit f01f082a97e416e6f0fb9731720acfdaf668a330 in incubator-ariatosca's branch refs/heads/ARIA-96-less-strict-dependencies from [~avia] [ https://git-wip-us.apache.org/repos/asf?p=incubator-ariatosca.git;h=f01f082 ] Change all requirements to version-agnostic Except pyyaml, that is supposed to go according to ARIA-64, and networkx, which requires further investigation. > Remove PyYaml dependency > > > Key: ARIA-64 > URL: https://issues.apache.org/jira/browse/ARIA-64 > Project: AriaTosca > Issue Type: Task >Reporter: Tal Liron > > We're using ruamel.yaml: there is no reason to use two separate yaml parsers, > and it indeed can lead to confusion. -- This message was sent by Atlassian JIRA (v6.3.15#6346)
incubator-ariatosca git commit: Change all requirements to version-agnostic
Repository: incubator-ariatosca Updated Branches: refs/heads/ARIA-96-less-strict-dependencies [created] f01f082a9 Change all requirements to version-agnostic Except pyyaml, that is supposed to go according to ARIA-64, and networkx, which requires further investigation. Project: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/commit/f01f082a Tree: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/tree/f01f082a Diff: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/diff/f01f082a Branch: refs/heads/ARIA-96-less-strict-dependencies Commit: f01f082a97e416e6f0fb9731720acfdaf668a330 Parents: c0d76ad Author: Avia EfratAuthored: Thu Mar 9 12:02:06 2017 +0200 Committer: Avia Efrat Committed: Thu Mar 9 12:02:06 2017 +0200 -- requirements.txt | 26 +- 1 file changed, 13 insertions(+), 13 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/f01f082a/requirements.txt -- diff --git a/requirements.txt b/requirements.txt index d6331a5..5844359 100644 --- a/requirements.txt +++ b/requirements.txt @@ -11,23 +11,23 @@ # limitations under the License. PyYAML>=3.10,<=3.12 -requests>=2.7.0,<=2.10.0 +requests networkx==1.9 -retrying==1.3.3 -blinker==1.4 +retrying +blinker importlib==1.0.4 ; python_version < '2.7' ordereddict==1.1 ; python_version < '2.7' total-ordering==0.1.0 ; python_version < '2.7' jsonpickle -ruamel.yaml==0.11.15 -Jinja2==2.8 -shortuuid==0.4.3 -CacheControl[filecache]==0.11.6 -clint==0.5.1 -SQLAlchemy==1.1.4 -wagon==0.5.0 -bottle==0.12.11 -six==1.10.0 -Fabric==1.13.1 +ruamel.yaml +Jinja2 +shortuuid +CacheControl[filecache] +clint +SQLAlchemy +wagon +bottle +six +Fabric # Fabric makes use of this library, but doesn't bring it :( pypiwin32==219 ; sys_platform == 'win32'
[jira] [Created] (ARIA-119) Syntax for executing a relationship operation on a specific edge (source/target)
Ran Ziv created ARIA-119: Summary: Syntax for executing a relationship operation on a specific edge (source/target) Key: ARIA-119 URL: https://issues.apache.org/jira/browse/ARIA-119 Project: AriaTosca Issue Type: Story Reporter: Ran Ziv Priority: Minor TOSCA doesn't define a syntax for specifying which edge (source/target) of the relationship a relationship operation should run on. At the moment, this will be determined by the workflow author. We could provided a syntax where the `implementation` field value would also hold the information for the edge, e.g.: implementation: script.sh @ SOURCE SOURCE and TARGET are already familiar "TOSCA constants", and the implementation field already has special syntax using the "@" sign so this seems to make the most sense. -- This message was sent by Atlassian JIRA (v6.3.15#6346)