[GitHub] incubator-ariatosca pull request #191: ARIA-321 Provide Clearwater IMS examp...
Github user ran-z commented on a diff in the pull request: https://github.com/apache/incubator-ariatosca/pull/191#discussion_r138003712 --- Diff: .travis.yml --- @@ -10,36 +10,55 @@ # See the License for the specific language governing permissions and # limitations under the License. -sudo: false +# We need to set "sudo: true" in order to use a virtual machine instead of a container, because +# SSH tests fail in the container. See: +# https://docs.travis-ci.com/user/reference/overview/#Virtualization-environments + +dist: trusty +sudo: true language: python -dist: precise +addons: + apt: +sources: + - sourceline: 'ppa:fkrull/deadsnakes' +packages: + # Ubuntu 14.04 (trusty) does not come with Python 2.6, so we will install it from Felix + # Krull's PPA + - python2.6 + - python2.6-dev + python: + # We handle Python 2.6 testing from within tox (see tox.ini); note that this means that we run + # tox itself always from Python 2.7 - '2.7' env: - - TOX_ENV=pylint_code - - TOX_ENV=pylint_tests - - TOX_ENV=py27 - - TOX_ENV=py26 - - TOX_ENV=py27e2e - - TOX_ENV=py26e2e - - TOX_ENV=py27ssh - - TOX_ENV=py26ssh - - TOX_ENV=docs - -install: + # The PYTEST_PROCESSES environment var is used in tox.ini to override the --numprocesses argument + # for PyTest's xdist plugin. The reason this is necessary is that conventional Travis environments + # may report a large amount of available CPUs, but they they are greatly restricted. Through trial + # and error we found that more than 1 process may result in failures. + - PYTEST_PROCESSES=1 TOX_ENV=pylint_code + - PYTEST_PROCESSES=1 TOX_ENV=pylint_tests + - PYTEST_PROCESSES=1 TOX_ENV=py27 + - PYTEST_PROCESSES=1 TOX_ENV=py26 + - PYTEST_PROCESSES=1 TOX_ENV=py27e2e + - PYTEST_PROCESSES=1 TOX_ENV=py26e2e + - PYTEST_PROCESSES=1 TOX_ENV=py27ssh + - PYTEST_PROCESSES=1 TOX_ENV=py26ssh + - PYTEST_PROCESSES=1 TOX_ENV=docs + +before_install: + # Create SSH keys for SSH tests + - ssh-keygen -f $HOME/.ssh/id_rsa -t rsa -N '' --- End diff -- I don't really see the benefit of replacing password with keypair usage, and so IMO it's better to avoid this extra work + hardcoding file systme path in the actual SSH test - though obviously the test is aimed specifically at Travis env and so it doesn't matter that much I guess. ---
[GitHub] incubator-ariatosca pull request #191: ARIA-321 Provide Clearwater IMS examp...
Github user ran-z commented on a diff in the pull request: https://github.com/apache/incubator-ariatosca/pull/191#discussion_r138002768 --- Diff: .travis.yml --- @@ -10,36 +10,55 @@ # See the License for the specific language governing permissions and # limitations under the License. -sudo: false +# We need to set "sudo: true" in order to use a virtual machine instead of a container, because +# SSH tests fail in the container. See: +# https://docs.travis-ci.com/user/reference/overview/#Virtualization-environments + +dist: trusty +sudo: true language: python -dist: precise +addons: + apt: +sources: + - sourceline: 'ppa:fkrull/deadsnakes' +packages: + # Ubuntu 14.04 (trusty) does not come with Python 2.6, so we will install it from Felix + # Krull's PPA + - python2.6 + - python2.6-dev + python: + # We handle Python 2.6 testing from within tox (see tox.ini); note that this means that we run + # tox itself always from Python 2.7 - '2.7' env: - - TOX_ENV=pylint_code - - TOX_ENV=pylint_tests - - TOX_ENV=py27 - - TOX_ENV=py26 - - TOX_ENV=py27e2e - - TOX_ENV=py26e2e - - TOX_ENV=py27ssh - - TOX_ENV=py26ssh - - TOX_ENV=docs - -install: + # The PYTEST_PROCESSES environment var is used in tox.ini to override the --numprocesses argument + # for PyTest's xdist plugin. The reason this is necessary is that conventional Travis environments + # may report a large amount of available CPUs, but they they are greatly restricted. Through trial + # and error we found that more than 1 process may result in failures. + - PYTEST_PROCESSES=1 TOX_ENV=pylint_code + - PYTEST_PROCESSES=1 TOX_ENV=pylint_tests + - PYTEST_PROCESSES=1 TOX_ENV=py27 + - PYTEST_PROCESSES=1 TOX_ENV=py26 + - PYTEST_PROCESSES=1 TOX_ENV=py27e2e + - PYTEST_PROCESSES=1 TOX_ENV=py26e2e + - PYTEST_PROCESSES=1 TOX_ENV=py27ssh + - PYTEST_PROCESSES=1 TOX_ENV=py26ssh + - PYTEST_PROCESSES=1 TOX_ENV=docs + +before_install: + # Create SSH keys for SSH tests + - ssh-keygen -f $HOME/.ssh/id_rsa -t rsa -N '' + - cat $HOME/.ssh/id_rsa.pub >> $HOME/.ssh/authorized_keys + + # Python dependencies - pip install --upgrade pip - pip install --upgrade setuptools - pip install tox - -script: - - pip --version --- End diff -- why remove this? it can be useful for debugging ---
[GitHub] incubator-ariatosca pull request #191: ARIA-321 Provide Clearwater IMS examp...
Github user ran-z commented on a diff in the pull request: https://github.com/apache/incubator-ariatosca/pull/191#discussion_r137211470 --- Diff: aria/modeling/service_instance.py --- @@ -228,6 +228,80 @@ def service_template_fk(cls): :type: :class:`~datetime.datetime` """) +def get_node_by_type(self, type_name): +""" +Finds the first node of a type (or descendent type). +""" +service_template = self.service_template + +if service_template is not None: +node_types = service_template.node_types +if node_types is not None: +for node in self.nodes.itervalues(): +if node_types.is_descendant(type_name, node.type.name): +return node + +return None + +def get_policy_by_type(self, type_name): +""" +Finds the first policy of a type (or descendent type). +""" +service_template = self.service_template + +if service_template is not None: +policy_types = service_template.policy_types +if policy_types is not None: +for policy in self.policies.itervalues(): +if policy_types.is_descendant(type_name, policy.type.name): +return policy + +return None + +def satisfy_requirements(self): --- End diff -- I agree, those indeed seem useful - But I was actually referring to the `satisfy_requirements` and other methods, which I now see are the result of a merge issue - Note that they have been moved to `topology.py`, and should no longer be in `service_instance.py`. ---
[GitHub] incubator-ariatosca pull request #191: ARIA-321 Provide Clearwater IMS examp...
Github user ran-z commented on a diff in the pull request: https://github.com/apache/incubator-ariatosca/pull/191#discussion_r137209471 --- Diff: examples/clearwater/scripts/bono/delete.sh --- @@ -0,0 +1,15 @@ +#!/bin/bash +# 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. --- End diff -- Ok - it wasn't clear that this was a TODO ---
[GitHub] incubator-ariatosca pull request #191: ARIA-321 Provide Clearwater IMS examp...
Github user ran-z commented on a diff in the pull request: https://github.com/apache/incubator-ariatosca/pull/191#discussion_r137208385 --- Diff: examples/clearwater/clearwater-live-test-existing.yaml --- @@ -0,0 +1,54 @@ +# 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. + +tosca_definitions_version: tosca_simple_yaml_1_0 + +description: >- + Project Clearwater is an open-source IMS core, developed by Metaswitch Networks and released under + the GNU GPLv3. + +metadata: + template_name: clearwater-live-test-existing + template_author: ARIA + template_version: '1.0' + aria_version: '0.1.2' + +imports: + - types/clearwater.yaml + - aria-1.0 + +topology_template: + + inputs: +hosts.ssh.user: + type: string +hosts.ssh.password: --- End diff -- :+1: ---
[GitHub] incubator-ariatosca pull request #191: ARIA-321 Provide Clearwater IMS examp...
Github user ran-z commented on a diff in the pull request: https://github.com/apache/incubator-ariatosca/pull/191#discussion_r136713311 --- Diff: examples/clearwater/scripts/bono/delete.sh --- @@ -0,0 +1,15 @@ +#!/bin/bash +# 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. --- End diff -- Why have these empty files? Why not simply omit such operation implementations? --- 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. ---
[GitHub] incubator-ariatosca pull request #191: ARIA-321 Provide Clearwater IMS examp...
Github user ran-z commented on a diff in the pull request: https://github.com/apache/incubator-ariatosca/pull/191#discussion_r136715926 --- Diff: aria/modeling/service_instance.py --- @@ -228,6 +228,80 @@ def service_template_fk(cls): :type: :class:`~datetime.datetime` """) +def get_node_by_type(self, type_name): +""" +Finds the first node of a type (or descendent type). +""" +service_template = self.service_template + +if service_template is not None: +node_types = service_template.node_types +if node_types is not None: +for node in self.nodes.itervalues(): +if node_types.is_descendant(type_name, node.type.name): +return node + +return None + +def get_policy_by_type(self, type_name): +""" +Finds the first policy of a type (or descendent type). +""" +service_template = self.service_template + +if service_template is not None: +policy_types = service_template.policy_types +if policy_types is not None: +for policy in self.policies.itervalues(): +if policy_types.is_descendant(type_name, policy.type.name): +return policy + +return None + +def satisfy_requirements(self): --- End diff -- im not sure i understand this addition. who's calling this, and why is this a part of this PR? --- 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. ---
[GitHub] incubator-ariatosca pull request #191: ARIA-321 Provide Clearwater IMS examp...
Github user ran-z commented on a diff in the pull request: https://github.com/apache/incubator-ariatosca/pull/191#discussion_r136713948 --- Diff: examples/clearwater/scripts/ralf/create.sh --- @@ -0,0 +1,15 @@ +#!/bin/bash --- End diff -- why does dime's create operation install ralf? I'm not sure i understand the modeling. Is Ralf "contained in" Dime conceptually? (even if this is the case, why have this file at all?) --- 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. ---
[GitHub] incubator-ariatosca pull request #191: ARIA-321 Provide Clearwater IMS examp...
Github user ran-z commented on a diff in the pull request: https://github.com/apache/incubator-ariatosca/pull/191#discussion_r136714399 --- Diff: extensions/aria_extension_tosca/simple_v1_0/modeling/data_types.py --- @@ -159,10 +159,6 @@ def get_data_type(context, presentation, field_name, allow_none=False): else: return str -# Make sure not derived from self -if type_name == presentation._name: --- End diff -- what is this about? --- 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. ---
[GitHub] incubator-ariatosca pull request #191: ARIA-321 Provide Clearwater IMS examp...
Github user ran-z commented on a diff in the pull request: https://github.com/apache/incubator-ariatosca/pull/191#discussion_r136713007 --- Diff: examples/clearwater/clearwater-live-test-existing.yaml --- @@ -0,0 +1,54 @@ +# 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. + +tosca_definitions_version: tosca_simple_yaml_1_0 + +description: >- + Project Clearwater is an open-source IMS core, developed by Metaswitch Networks and released under + the GNU GPLv3. + +metadata: + template_name: clearwater-live-test-existing + template_author: ARIA + template_version: '1.0' + aria_version: '0.1.2' --- End diff -- the version should probably be 0.2.0 --- 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. ---
[GitHub] incubator-ariatosca pull request #191: ARIA-321 Provide Clearwater IMS examp...
Github user ran-z commented on a diff in the pull request: https://github.com/apache/incubator-ariatosca/pull/191#discussion_r136713056 --- Diff: examples/clearwater/clearwater-single-existing.yaml --- @@ -0,0 +1,147 @@ +# 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. + +tosca_definitions_version: tosca_simple_yaml_1_0 + +description: >- + Project Clearwater is an open-source IMS core, developed by Metaswitch Networks and released under + the GNU GPLv3. + +metadata: + template_name: clearwater-single-existing + template_author: ARIA + template_version: '1.0' + aria_version: '0.1.2' --- End diff -- 0.2.0 --- 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. ---
[GitHub] incubator-ariatosca pull request #191: ARIA-321 Provide Clearwater IMS examp...
Github user ran-z commented on a diff in the pull request: https://github.com/apache/incubator-ariatosca/pull/191#discussion_r136716094 --- Diff: aria/modeling/service_instance.py --- @@ -228,6 +228,80 @@ def service_template_fk(cls): :type: :class:`~datetime.datetime` """) +def get_node_by_type(self, type_name): +""" +Finds the first node of a type (or descendent type). +""" +service_template = self.service_template + +if service_template is not None: +node_types = service_template.node_types +if node_types is not None: +for node in self.nodes.itervalues(): +if node_types.is_descendant(type_name, node.type.name): +return node + +return None + +def get_policy_by_type(self, type_name): +""" +Finds the first policy of a type (or descendent type). +""" +service_template = self.service_template + +if service_template is not None: +policy_types = service_template.policy_types +if policy_types is not None: +for policy in self.policies.itervalues(): +if policy_types.is_descendant(type_name, policy.type.name): +return policy + +return None + +def satisfy_requirements(self): +satisfied = True +for node in self.nodes.itervalues(): +if not node.satisfy_requirements(): +satisfied = False +return satisfied + +def validate_capabilities(self): +satisfied = True +for node in self.nodes.itervalues(): +if not node.validate_capabilities(): +satisfied = False +return satisfied + +def find_hosts(self): +for node in self.nodes.itervalues(): +node.find_host() + +def configure_operations(self): +for node in self.nodes.itervalues(): +node.configure_operations() +for group in self.groups.itervalues(): +group.configure_operations() +for operation in self.workflows.itervalues(): +operation.configure() + +def is_node_a_target(self, target_node): +for node in self.nodes.itervalues(): +if self._is_node_a_target(node, target_node): +return True +return False + +def _is_node_a_target(self, source_node, target_node): --- End diff -- Pretty confused by this. 1) Who's using this? 2) Why not check the node's `incoming_relationships`? 3) Why is the private helper function recursive? The main public function already goes over all nodes and checks each one for a source node. --- 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. ---
[GitHub] incubator-ariatosca pull request #191: ARIA-321 Provide Clearwater IMS examp...
Github user ran-z commented on a diff in the pull request: https://github.com/apache/incubator-ariatosca/pull/191#discussion_r136713061 --- Diff: examples/clearwater/clearwater-single-existing.yaml --- @@ -0,0 +1,147 @@ +# 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. + +tosca_definitions_version: tosca_simple_yaml_1_0 + +description: >- + Project Clearwater is an open-source IMS core, developed by Metaswitch Networks and released under + the GNU GPLv3. + +metadata: + template_name: clearwater-single-existing + template_author: ARIA + template_version: '1.0' + aria_version: '0.1.2' + +imports: + - types/clearwater.yaml + - aria-1.0 + +topology_template: + + inputs: +hosts.ssh.user: + description: >- +Existing SSH user. + type: string +hosts.ssh.password: + description: >- +Existing SSH password. + type: string +existing_host.public_address: --- End diff -- same comment about `hosts` vs `existing_host`..? --- 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. ---
[GitHub] incubator-ariatosca pull request #191: ARIA-321 Provide Clearwater IMS examp...
Github user ran-z commented on a diff in the pull request: https://github.com/apache/incubator-ariatosca/pull/191#discussion_r136713034 --- Diff: examples/clearwater/clearwater-live-test-existing.yaml --- @@ -0,0 +1,54 @@ +# 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. + +tosca_definitions_version: tosca_simple_yaml_1_0 + +description: >- + Project Clearwater is an open-source IMS core, developed by Metaswitch Networks and released under + the GNU GPLv3. + +metadata: + template_name: clearwater-live-test-existing + template_author: ARIA + template_version: '1.0' + aria_version: '0.1.2' + +imports: + - types/clearwater.yaml + - aria-1.0 + +topology_template: + + inputs: +hosts.ssh.user: + type: string +hosts.ssh.password: --- End diff -- why is one "hosts.X.Y" and the other "existing_host.Z.W"? It makes it seem like the user/password and the public-address are for two different hosts, doesn't it? --- 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. ---
[GitHub] incubator-ariatosca pull request #193: ARIA-348 Validate substitution_mappin...
Github user ran-z commented on a diff in the pull request: https://github.com/apache/incubator-ariatosca/pull/193#discussion_r134229278 --- Diff: extensions/aria_extension_tosca/simple_v1_0/modeling/substitution_mappings.py --- @@ -17,114 +17,149 @@ from aria.parser.validation import Issue -def validate_subtitution_mappings_requirement(context, presentation): -if not validate_format(context, presentation, 'requirement'): +def validate_substitution_mappings_requirement(context, presentation): +if not validate_format(presentation): +report_invalid_format(context, presentation, field='requirement') return -node_template = get_node_template(context, presentation, 'requirement') -if node_template is None: -return - -node_type = presentation._container._get_type(context) -if node_type is None: +# validate that the requirement in substitution_mapping is defined in the substitution node type +substitution_node_type = presentation._container._get_type(context) +if substitution_node_type is None: return - -requirements = node_type._get_requirements(context) -type_requirement = None -for name, the_requirement in requirements: -if name == presentation._name: -type_requirement = the_requirement +for req_name, req in substitution_node_type._get_requirements(context): +if req_name == presentation._name: +substitution_type_requirement = req break -if type_requirement is None: +else: context.validation.report( -'substitution mappings requirement "%s" is not declared in node type "%s"' -% (presentation._name, node_type._name), +'substitution mapping requirement "{0}" is not declared in node type "{1}"'.format( +presentation._name, substitution_node_type._name), locator=presentation._locator, level=Issue.BETWEEN_TYPES) return -requirement_name = presentation._raw[1] -requirements = node_template._get_requirements(context) -requirement = None -for name, the_requirement in requirements: -if name == requirement_name: -requirement = the_requirement +# validate that the mapped requirement is defined in the corresponding node template +node_template = get_node_template(context, presentation) +if node_template is None: +report_missing_node_template(context, presentation, field='requirement') +return +mapped_requirement_name = presentation._raw[1] +for req_name, req in node_template._get_requirements(context): +if req_name == mapped_requirement_name: +node_template_requirement = req break - -if requirement is None: +else: context.validation.report( -'substitution mappings requirement "%s" refers to an unknown requirement of node ' -'template "%s": %s' -% (presentation._name, node_template._name, safe_repr(requirement_name)), +'substitution mapping requirement "{0}" refers to an unknown requirement of node ' +'template "{1}": {mapped_requirement_name}'.format( +presentation._name, node_template._name, + mapped_requirement_name=safe_repr(mapped_requirement_name)), locator=presentation._locator, level=Issue.BETWEEN_TYPES) return +# validate that the requirement's capability type in substitution_mapping is derived from the +# requirement's capability type in the corresponding node template +substitution_type_requirement_capability_type = \ +substitution_type_requirement._get_capability_type(context) +node_template_requirement_capability_type = \ +node_template_requirement._get_capability(context)[0] +if not node_template_requirement_capability_type._is_descendant( +context, substitution_type_requirement_capability_type): +context.validation.report( +'substitution mapping requirement "{0}" of capability type "{1}" is not a descendant ' +'of the mapped node template capability type "{2}"'.format( +presentation._name, +substitution_type_requirement_capability_type._name, +node_template_requirement_capability_type._name), +locator=presentation._locator, level=Issue.BETWEEN_TYPES) -def validate_subtitution_mappings_capability(con
[GitHub] incubator-ariatosca pull request #193: ARIA-348 Validate substitution_mappin...
Github user ran-z commented on a diff in the pull request: https://github.com/apache/incubator-ariatosca/pull/193#discussion_r134229923 --- Diff: extensions/aria_extension_tosca/simple_v1_0/modeling/substitution_mappings.py --- @@ -17,114 +17,149 @@ from aria.parser.validation import Issue -def validate_subtitution_mappings_requirement(context, presentation): -if not validate_format(context, presentation, 'requirement'): +def validate_substitution_mappings_requirement(context, presentation): +if not validate_format(presentation): +report_invalid_format(context, presentation, field='requirement') return -node_template = get_node_template(context, presentation, 'requirement') -if node_template is None: -return - -node_type = presentation._container._get_type(context) -if node_type is None: +# validate that the requirement in substitution_mapping is defined in the substitution node type +substitution_node_type = presentation._container._get_type(context) +if substitution_node_type is None: return - -requirements = node_type._get_requirements(context) -type_requirement = None -for name, the_requirement in requirements: -if name == presentation._name: -type_requirement = the_requirement +for req_name, req in substitution_node_type._get_requirements(context): +if req_name == presentation._name: +substitution_type_requirement = req break -if type_requirement is None: +else: context.validation.report( -'substitution mappings requirement "%s" is not declared in node type "%s"' -% (presentation._name, node_type._name), +'substitution mapping requirement "{0}" is not declared in node type "{1}"'.format( +presentation._name, substitution_node_type._name), locator=presentation._locator, level=Issue.BETWEEN_TYPES) return -requirement_name = presentation._raw[1] -requirements = node_template._get_requirements(context) -requirement = None -for name, the_requirement in requirements: -if name == requirement_name: -requirement = the_requirement +# validate that the mapped requirement is defined in the corresponding node template +node_template = get_node_template(context, presentation) +if node_template is None: +report_missing_node_template(context, presentation, field='requirement') +return +mapped_requirement_name = presentation._raw[1] +for req_name, req in node_template._get_requirements(context): +if req_name == mapped_requirement_name: +node_template_requirement = req break - -if requirement is None: +else: context.validation.report( -'substitution mappings requirement "%s" refers to an unknown requirement of node ' -'template "%s": %s' -% (presentation._name, node_template._name, safe_repr(requirement_name)), +'substitution mapping requirement "{0}" refers to an unknown requirement of node ' +'template "{1}": {mapped_requirement_name}'.format( +presentation._name, node_template._name, + mapped_requirement_name=safe_repr(mapped_requirement_name)), locator=presentation._locator, level=Issue.BETWEEN_TYPES) return +# validate that the requirement's capability type in substitution_mapping is derived from the +# requirement's capability type in the corresponding node template +substitution_type_requirement_capability_type = \ +substitution_type_requirement._get_capability_type(context) +node_template_requirement_capability_type = \ +node_template_requirement._get_capability(context)[0] +if not node_template_requirement_capability_type._is_descendant( +context, substitution_type_requirement_capability_type): +context.validation.report( +'substitution mapping requirement "{0}" of capability type "{1}" is not a descendant ' +'of the mapped node template capability type "{2}"'.format( +presentation._name, +substitution_type_requirement_capability_type._name, +node_template_requirement_capability_type._name), +locator=presentation._locator, level=Issue.BETWEEN_TYPES) -def validate_subtitution_mappings_capability(con
[GitHub] incubator-ariatosca pull request #192: ARIA-352 Package name "aria[ssh]" inc...
Github user ran-z commented on a diff in the pull request: https://github.com/apache/incubator-ariatosca/pull/192#discussion_r134244356 --- Diff: README.rst --- @@ -53,7 +53,7 @@ To install ARIA from source, download the source tarball from **Ubuntu/Debian** (tested on Ubuntu14.04, Ubuntu16.04):: apt-get install -y python-dev gcc libffi-dev libssl-dev -pip install aria[ssh] +pip install apache-ariatosca[ssh] --- End diff -- Yeah, it seems like Github has been malfunctioning today.. I don't have permissions for the AppVeyor account, only Apache Infra does; Supposedly it's easiest to simply re-push (after "modifying" the commit, e.g. by empty rebase). Since this is only a README change, though, we could simply merge despite the tests having failed. It's simply less pretty to see the red X :) Up to you, let me know whether you'd like to push again or I should merge right now Thanks :) --- 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. ---
[GitHub] incubator-ariatosca pull request #192: ARIA-352 Package name "aria[ssh]" inc...
Github user ran-z commented on a diff in the pull request: https://github.com/apache/incubator-ariatosca/pull/192#discussion_r134108006 --- Diff: README.rst --- @@ -53,7 +53,7 @@ To install ARIA from source, download the source tarball from **Ubuntu/Debian** (tested on Ubuntu14.04, Ubuntu16.04):: apt-get install -y python-dev gcc libffi-dev libssl-dev -pip install aria[ssh] +pip install apache-ariatosca[ssh] --- End diff -- This change should also be applied to the other platforms - i.e. it should be "apache-ariatosca" on centos/windows/.. as well. --- 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. ---
[GitHub] incubator-ariatosca issue #184: ARIA-307 Automate release process
Github user ran-z commented on the issue: https://github.com/apache/incubator-ariatosca/pull/184 renamed `release/release.sh` to `release/asf-release.sh` --- 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. ---
[GitHub] incubator-ariatosca pull request #176: ARIA-237 Support for resuming failed ...
Github user ran-z commented on a diff in the pull request: https://github.com/apache/incubator-ariatosca/pull/176#discussion_r126684578 --- Diff: tests/orchestrator/test_workflow_runner.py --- @@ -474,10 +483,62 @@ def test_resume_failed_task(self, workflow_context, thread_executor): new_thread_executor.close() # Wait for it to finish and assert changes. +node = workflow_context.model.node.refresh(node) assert node.attributes['invocations'].value == task.max_attempts - 1 assert task.status == task.SUCCESS assert wf_runner.execution.status == wf_runner.execution.SUCCEEDED +def test_resume_failed_task_and_successful_task(self, workflow_context, thread_executor): --- End diff -- Add one more test which runs a workflow (`retry_failed` = `False`) where the first task fails, the second one depends on the first one, and on resume validate that the first task doesn't run again but the second one does and succeeds. --- 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. ---
[GitHub] incubator-ariatosca pull request #184: ARIA-307 Automate release process
GitHub user ran-z opened a pull request: https://github.com/apache/incubator-ariatosca/pull/184 ARIA-307 Automate release process Created a bash script to help with the releaes process You can merge this pull request into a Git repository by running: $ git pull https://github.com/apache/incubator-ariatosca ARIA-307-automate-release-process Alternatively you can review and apply these changes as the patch at: https://github.com/apache/incubator-ariatosca/pull/184.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 #184 commit dfc81ccf8a8ab4f0e03f8df6d8e4dc8daa6dc387 Author: Ran Ziv <r...@gigaspaces.com> Date: 2017-07-10T13:29:22Z ARIA-307 Automate release process Created a bash script to help with the releaes process --- 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. ---
[GitHub] incubator-ariatosca pull request #180: ARIA-305 Advance ARIA version
GitHub user ran-z opened a pull request: https://github.com/apache/incubator-ariatosca/pull/180 ARIA-305 Advance ARIA version Set package version to 0.2.0 You can merge this pull request into a Git repository by running: $ git pull https://github.com/apache/incubator-ariatosca ARIA-305-advance-aria-version Alternatively you can review and apply these changes as the patch at: https://github.com/apache/incubator-ariatosca/pull/180.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 #180 commit c46c94bd722541492f9cff5e37741d864a74cb41 Author: Ran Ziv <r...@gigaspaces.com> Date: 2017-07-10T09:36:08Z ARIA-305 Advance ARIA version Set package version to 0.2.0 --- 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. ---
[GitHub] incubator-ariatosca pull request #178: ARIA-301 Fix issue when installing fr...
GitHub user ran-z opened a pull request: https://github.com/apache/incubator-ariatosca/pull/178 ARIA-301 Fix issue when installing from wheel Fixed an issue when installing ARIA from wheel where environment-marked dependencies would install regardless of the environment ARIA is installed on. You can merge this pull request into a Git repository by running: $ git pull https://github.com/apache/incubator-ariatosca ARIA-301-environment-marked-dependencies-installation-from-wheel Alternatively you can review and apply these changes as the patch at: https://github.com/apache/incubator-ariatosca/pull/178.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 #178 commit 12b42e1b0e8e2f19094128de003970c54ef0fc59 Author: Ran Ziv <r...@gigaspaces.com> Date: 2017-07-06T15:59:42Z ARIA-301 Fix issue when installing from wheel Fixed an issue when installing ARIA from wheel where environment-marked dependencies would install regardless of the environment ARIA is installed on. --- 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. ---
[GitHub] incubator-ariatosca pull request #145: ARIA-260 Send interface inputs as arg...
Github user ran-z commented on a diff in the pull request: https://github.com/apache/incubator-ariatosca/pull/145#discussion_r125582583 --- Diff: tests/instantiation/test_configuration.py --- @@ -0,0 +1,175 @@ +# 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. + +import pytest + +from tests.parser.service_templates import consume_literal + + +TEMPLATE = """ +tosca_definitions_version: tosca_simple_yaml_1_0 + +interface_types: + MyInterface: +derived_from: tosca.interfaces.Root +inputs: + interface_string: +type: string +default: value1 + interface_integer: +type: integer +default: 1 +operation: + implementation: operation.sh + inputs: +operation_string: + type: string + default: value2 +operation_integer: + type: integer + default: 2 +interface_integer: # will override interface input + type: integer + default: 3 + +node_types: + LocalNode: +derived_from: tosca.nodes.Root +interfaces: + MyInterface: +type: MyInterface + + RemoteNode: +derived_from: tosca.nodes.Compute +interfaces: + MyInterface: +type: MyInterface + +topology_template: + node_templates: +local_node: + type: LocalNode + +remote_node: + type: RemoteNode +""" + + +BROKEN_TEMPLATE = """ +tosca_definitions_version: tosca_simple_yaml_1_0 + +interface_types: + MyInterface: +derived_from: tosca.interfaces.Root +inputs: + ctx: # reserved name +type: string +default: value1 + interface_integer: +type: integer +default: 1 +operation: + implementation: operation.sh + inputs: +operation_string: + type: string + default: value2 +toolbelt: # reserved name + type: integer + default: 2 + +node_types: + LocalNode: +derived_from: tosca.nodes.Root +interfaces: + MyInterface: +type: MyInterface + +topology_template: + node_templates: +local_node: + type: LocalNode +""" + + +@pytest.fixture +def service(): +context, _ = consume_literal(TEMPLATE) +yield context.modeling.instance + + +@pytest.fixture +def broken_service_issues(): +context, _ = consume_literal(BROKEN_TEMPLATE, no_issues=False) +yield context.validation.issues + + +def _values(the_dict): --- End diff -- we have this line in so many places nowadays, maybe you can find some common place to extract it to? --- 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. ---
[GitHub] incubator-ariatosca pull request #168: ARIA-286 Sphinx documentation for cod...
Github user ran-z commented on a diff in the pull request: https://github.com/apache/incubator-ariatosca/pull/168#discussion_r124778556 --- Diff: aria/modeling/relationship.py --- @@ -150,18 +156,23 @@ def one_to_many(model_class, *This utility method should only be used during class creation.* -:param model_class: The class in which this relationship will be declared +:param model_class: class in which this relationship will be declared :type model_class: type -:param child_table: Child table name +:param other_table: other table name :type other_table: basestring -:param other_fk: Foreign key name at the child table (no need specify if there's no ambiguity) +:param other_fk: foreign key name at the other table (no need specify if there's no ambiguity) :type other_fk: basestring -:param dict_key: If set the value will be a dict with this key as the dict key; otherwise will - be a list +:param dict_key: if set the value will be a dict with this key as the dict key; otherwise will + be a list :type dict_key: basestring -:param back_populates: Override name of matching many-to-one property at child table; set to - false to disable -:type back_populates: basestring|bool +:param back_populates: override name of matching many-to-one property at other table; set to + ``false`` to disable --- End diff -- :+1: --- 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. ---
[GitHub] incubator-ariatosca pull request #165: Aria 291 aria cli ascii art
GitHub user ran-z opened a pull request: https://github.com/apache/incubator-ariatosca/pull/165 Aria 291 aria cli ascii art You can merge this pull request into a Git repository by running: $ git pull https://github.com/apache/incubator-ariatosca ARIA-291-aria-cli-ascii-art Alternatively you can review and apply these changes as the patch at: https://github.com/apache/incubator-ariatosca/pull/165.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 #165 commit 668ddcb75a164ef8c119dff102a560e3f59daa7f Author: Ran Ziv <r...@gigaspaces.com> Date: 2017-06-22T12:39:28Z ARIA-280 Change package name Changed package name from 'aria' to 'apache-ariatosca', in accordance with Apache's standards. The CLI '--version' command will now also show the correct package name. Additionally, fixed the download_url field in setup.py - it now includes an '-incubating' suffix. commit 41910be5fcaec4fb5d1af28be56bc4ee82f512ab Author: Ran Ziv <r...@gigaspaces.com> Date: 2017-06-25T14:04:43Z ARIA-291 Add ASCII art in ARIA CLI version command --- 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. ---
[GitHub] incubator-ariatosca pull request #164: ARIA-290 Update Makefile for binary d...
GitHub user ran-z opened a pull request: https://github.com/apache/incubator-ariatosca/pull/164 ARIA-290 Update Makefile for binary dist creation Updated the Makefile to push required files for release (LICENSE, NOTICE, DISCLAIMER) into the binary distribution archive (wheel) automatically. You can merge this pull request into a Git repository by running: $ git pull https://github.com/apache/incubator-ariatosca ARIA-290-update-makefile Alternatively you can review and apply these changes as the patch at: https://github.com/apache/incubator-ariatosca/pull/164.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 #164 commit 6cb0f72046733a56f872cc00f3a2759b72b6e32c Author: Ran Ziv <r...@gigaspaces.com> Date: 2017-06-25T13:49:42Z ARIA-290 Update Makefile for binary dist creation Updated the Makefile to push required files for release (LICENSE, NOTICE, DISCLAIMER) into the binary distribution archive (wheel) automatically. --- 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. ---
[GitHub] incubator-ariatosca pull request #162: ARIA-280 Change package name
GitHub user ran-z opened a pull request: https://github.com/apache/incubator-ariatosca/pull/162 ARIA-280 Change package name Changed package name from 'aria' to 'apache-ariatosca', in accordance with Apache's standards. You can merge this pull request into a Git repository by running: $ git pull https://github.com/apache/incubator-ariatosca ARIA-280-change-package-name Alternatively you can review and apply these changes as the patch at: https://github.com/apache/incubator-ariatosca/pull/162.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 #162 commit 8fe96406eefa125f30b7cb3e549954ea5fe79928 Author: Ran Ziv <r...@gigaspaces.com> Date: 2017-06-22T12:39:28Z ARIA-280 Change package name Changed package name from 'aria' to 'apache-ariatosca', in accordance with Apache's standards. --- 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. ---
[GitHub] incubator-ariatosca pull request #161: ARIA-283 Update readme installation i...
GitHub user ran-z opened a pull request: https://github.com/apache/incubator-ariatosca/pull/161 ARIA-283 Update readme installation instructions You can merge this pull request into a Git repository by running: $ git pull https://github.com/apache/incubator-ariatosca ARIA-283-update-readme-installation-instructions Alternatively you can review and apply these changes as the patch at: https://github.com/apache/incubator-ariatosca/pull/161.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 #161 commit f786a73dd4b2ac2fc56b71e5a9649a4f9ab840f7 Author: Ran Ziv <r...@gigaspaces.com> Date: 2017-06-21T15:05:05Z ARIA-283 Update readme installation instructions --- 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. ---
[GitHub] incubator-ariatosca pull request #160: ARIA-282 Make SSH capability opt-in
GitHub user ran-z opened a pull request: https://github.com/apache/incubator-ariatosca/pull/160 ARIA-282 Make SSH capability opt-in Since the Fabric library uses Paramiko, which is a library using a license which is incompatible with Apache's, ARIA's SSH capabilities are now opt-in and no longer part of the default installation. Instead, users who would like to use SSH operations should install ARIA's extra "[ssh]", which would install Fabric and allow to take advantage of the execution-plugin's SSH capabilities. Users who won't install this extra will still be able to use ARIA as well as the execution plugin, only without SSH. Additional changes: - A new tox environment has been created for running SSH tests. The remaining envs only install plain ARIA. - requirements.in commented lines were removed - the bug that used to exist regarding environment markers has been fixed, and there's no longer the need to copy these manually to requirements.txt. - Environment-marked dependencies are now installed via "install_requires" rather than "extra_requires". - Added requirements.in to the manifest file, as well as fixed a bug in setup.py, which caused source distribution to make aria get installed without any dependencies before this fix. You can merge this pull request into a Git repository by running: $ git pull https://github.com/apache/incubator-ariatosca ARIA-282-make-ssh-capability-opt-in Alternatively you can review and apply these changes as the patch at: https://github.com/apache/incubator-ariatosca/pull/160.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 #160 commit f783b5323e38e9e2df63fe5bfa8af31b856f7c28 Author: Ran Ziv <r...@gigaspaces.com> Date: 2017-06-21T12:39:34Z ARIA-282 Make SSH capability opt-in Since the Fabric library uses Paramiko, which is a library using a license which is incompatible with Apache's, ARIA's SSH capabilities are now opt-in and no longer part of the default installation. Instead, users who would like to use SSH operations should install ARIA's extra "[ssh]", which would install Fabric and allow to take advantage of the execution-plugin's SSH capabilities. Users who won't install this extra will still be able to use ARIA as well as the execution plugin, only without SSH. Additional changes: - A new tox environment has been created for running SSH tests. The remaining envs only install plain ARIA. - requirements.in commented lines were removed - the bug that used to exist regarding environment markers has been fixed, and there's no longer the need to copy these manually to requirements.txt. - Environment-marked dependencies are now installed via "install_requires" rather than "extra_requires". - Added requirements.in to the manifest file, as well as fixed a bug in setup.py, which caused source distribution to make aria get installed without any dependencies before this fix. --- 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. ---
[GitHub] incubator-ariatosca pull request #157: ARIA-281 Update click library version
GitHub user ran-z opened a pull request: https://github.com/apache/incubator-ariatosca/pull/157 ARIA-281 Update click library version Updated click library version to a newer version. This will also make it compatible in the same environment with the pip-tools library which uses click too and requires the newer version. Additional changes: - Removed PyYAML dependency from requirements.txt (leftover) - Disabled default goal of Makefile You can merge this pull request into a Git repository by running: $ git pull https://github.com/apache/incubator-ariatosca ARIA-281-update-click-library-version Alternatively you can review and apply these changes as the patch at: https://github.com/apache/incubator-ariatosca/pull/157.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 #157 commit 990752026d3316286aff53b388eaaa47b804 Author: Ran Ziv <r...@gigaspaces.com> Date: 2017-06-20T12:47:09Z ARIA-281 Update click library version Updated click library version to a newer version. This will also make it compatible in the same environment with the pip-tools library which uses click too and requires the newer version. Additional changes: - Removed PyYAML dependency from requirements.txt (leftover) - Disabled default goal of Makefile --- 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. ---
[GitHub] incubator-ariatosca pull request #155: Aria 54 prepare aria packaging
GitHub user ran-z opened a pull request: https://github.com/apache/incubator-ariatosca/pull/155 Aria 54 prepare aria packaging You can merge this pull request into a Git repository by running: $ git pull https://github.com/apache/incubator-ariatosca ARIA-54-prepare-aria-packaging Alternatively you can review and apply these changes as the patch at: https://github.com/apache/incubator-ariatosca/pull/155.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 #155 commit af530de47caae30a19da65512444979cd2b05e7f Author: Ran Ziv <r...@gigaspaces.com> Date: 2017-06-05T10:24:49Z ARIA-54 Prepare for ARIA packaging Preparations for ARIA packaging: - Added CHANGELOG file - Added CONTRIBUTING file - Added DISCLAIMER file - Converted README from md to rst for PyPI compatiability - Removed outdated TODO file - Added long_description, download_url to setup.py metadata - Modified setup.py url metadata to point at ASF domain - Added more badges to README commit 428a5f76c2a66cfdb0ae12782321b53c8a165f0f Author: Tal Liron <tal.li...@gmail.com> Date: 2017-06-13T21:05:19Z Fix Makefile and docs --- 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. ---
[GitHub] incubator-ariatosca pull request #152: ARIA-166 Update README file
Github user ran-z commented on a diff in the pull request: https://github.com/apache/incubator-ariatosca/pull/152#discussion_r121453269 --- Diff: README.md --- @@ -47,25 +38,39 @@ To install ARIA from source, download the source tarball from [PyPI](https://pyp extract it, and then when inside the extracted directory, use: pip install . - + The source package comes along with relevant examples, documentation, `requirements.txt` (for installing specifically the frozen dependencies' versions with which ARIA was tested) and more. - Note that for the `pip install` commands mentioned above, you must use a privileged user, or use virtualenv. + + +ARIA itself is in a `wheel` format compatible with all platforms. +Some dependencies, however, might require compilation (based on a given platform), and therefore possibly some system dependencies are required as well. + +On Ubuntu or other Debian-based systems: + + sudo apt install python-setuptools python-dev build-essential libssl-dev libffi-dev + +On Archlinux: + + sudo pacman -S python-setuptools + + +ARIA requires Python 2.6/2.7. Python 3+ is currently not supported. Getting Started --- This section will describe how to run a simple "Hello World" example. -First, provide ARIA with your service-template, naming it `my-service-template`: +First, provide ARIA with the ARIA "hello world" service-template, and name it - e.g. `my-service-template`: --- End diff -- :+1: --- 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. ---
[GitHub] incubator-ariatosca pull request #152: ARIA-166 Update README file
Github user ran-z commented on a diff in the pull request: https://github.com/apache/incubator-ariatosca/pull/152#discussion_r121453029 --- Diff: README.md --- @@ -12,32 +12,23 @@ ARIA [![Closed Pull Requests](https://img.shields.io/github/issues-pr-closed-raw/apache/incubator-ariatosca.svg?style=plastic)](https://github.com/apache/incubator-ariatosca/pulls?q=is%3Apr+is%3Aclosed) -[ARIA](http://ariatosca.incubator.apache.org/) is a an open-source, lightweight, library and CLI for orchestration that open-source projects can consume to build TOSCA-based orchestration solutions for resources and services orchestration. It supports NFV and hybrid Cloud scenarios. +What is ARIA? + + +[ARIA](http://ariatosca.incubator.apache.org/) is a an open-source, [TOSCA](https://www.oasis-open.org/committees/tosca/)-based, lightweight library and CLI for orchestration and for consumption by projects building TOSCA-based solutions for resources and services orchestration. ARIA can be utilized by any organization that wants to implement TOSCA-based orchestration in its solutions, whether a multi-cloud enterprise application, or an NFV or SDN solution for multiple virtual infrastructure managers. -With ARIA, you can utilize TOSCA's cloud portability out-of-the-box, to test and run your applications, from template to deployment. +With ARIA, you can utilize TOSCA's cloud portability out-of-the-box, to develop, test and run your applications. --- End diff -- :+1: --- 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. ---
[GitHub] incubator-ariatosca pull request #152: ARIA-166 Update README file
Github user ran-z commented on a diff in the pull request: https://github.com/apache/incubator-ariatosca/pull/152#discussion_r121452763 --- Diff: README.md --- @@ -12,32 +12,23 @@ ARIA [![Closed Pull Requests](https://img.shields.io/github/issues-pr-closed-raw/apache/incubator-ariatosca.svg?style=plastic)](https://github.com/apache/incubator-ariatosca/pulls?q=is%3Apr+is%3Aclosed) -[ARIA](http://ariatosca.incubator.apache.org/) is a an open-source, lightweight, library and CLI for orchestration that open-source projects can consume to build TOSCA-based orchestration solutions for resources and services orchestration. It supports NFV and hybrid Cloud scenarios. +What is ARIA? + + +[ARIA](http://ariatosca.incubator.apache.org/) is a an open-source, [TOSCA](https://www.oasis-open.org/committees/tosca/)-based, lightweight library and CLI for orchestration and for consumption by projects building TOSCA-based solutions for resources and services orchestration. --- End diff -- nope --- 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. ---
[GitHub] incubator-ariatosca pull request #152: ARIA-166 Update README file
Github user ran-z commented on a diff in the pull request: https://github.com/apache/incubator-ariatosca/pull/152#discussion_r121406845 --- Diff: README.md --- @@ -4,198 +4,111 @@ ARIA [![Build Status](https://travis-ci.org/apache/incubator-ariatosca.svg?branch=master)](https://travis-ci.org/apache/incubator-ariatosca) [![Appveyor Build Status](https://ci.appveyor.com/api/projects/status/ltv89jk63ahiu306?svg=true)](https://ci.appveyor.com/project/ApacheSoftwareFoundation/incubator-ariatosca/history) [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0) +[![PyPI release](https://img.shields.io/pypi/v/ariatosca.svg?style=plastic)](https://pypi.python.org/pypi/ariatosca) +![Python Versions](https://img.shields.io/pypi/pyversions/ariatosca.svg?style=plastic) +![Wheel](https://img.shields.io/pypi/wheel/ariatosca.svg?style=plastic) +![Contributors](https://img.shields.io/github/contributors/apache/incubator-ariatosca.svg?style=plastic) +[![Open Pull Requests](https://img.shields.io/github/issues-pr/apache/incubator-ariatosca.svg?style=plastic)](https://github.com/apache/incubator-ariatosca/pulls) +[![Closed Pull Requests](https://img.shields.io/github/issues-pr-closed-raw/apache/incubator-ariatosca.svg?style=plastic)](https://github.com/apache/incubator-ariatosca/pulls?q=is%3Apr+is%3Aclosed) -[ARIA](http://ariatosca.org/) is a minimal TOSCA orchestrator, as well as a platform for building -TOSCA-based products. Its features can be accessed via a well-documented Python API. +[ARIA](http://ariatosca.incubator.apache.org/) is a an open-source, lightweight, library and CLI for orchestration that open-source projects can consume to build TOSCA-based orchestration solutions for resources and services orchestration. It supports NFV and hybrid Cloud scenarios. --- End diff -- meh dunno ~_~ --- 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. ---
[GitHub] incubator-ariatosca pull request #152: ARIA-166 Update README file
Github user ran-z commented on a diff in the pull request: https://github.com/apache/incubator-ariatosca/pull/152#discussion_r121404920 --- Diff: README.md --- @@ -4,198 +4,111 @@ ARIA [![Build Status](https://travis-ci.org/apache/incubator-ariatosca.svg?branch=master)](https://travis-ci.org/apache/incubator-ariatosca) [![Appveyor Build Status](https://ci.appveyor.com/api/projects/status/ltv89jk63ahiu306?svg=true)](https://ci.appveyor.com/project/ApacheSoftwareFoundation/incubator-ariatosca/history) [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0) +[![PyPI release](https://img.shields.io/pypi/v/ariatosca.svg?style=plastic)](https://pypi.python.org/pypi/ariatosca) +![Python Versions](https://img.shields.io/pypi/pyversions/ariatosca.svg?style=plastic) +![Wheel](https://img.shields.io/pypi/wheel/ariatosca.svg?style=plastic) +![Contributors](https://img.shields.io/github/contributors/apache/incubator-ariatosca.svg?style=plastic) +[![Open Pull Requests](https://img.shields.io/github/issues-pr/apache/incubator-ariatosca.svg?style=plastic)](https://github.com/apache/incubator-ariatosca/pulls) +[![Closed Pull Requests](https://img.shields.io/github/issues-pr-closed-raw/apache/incubator-ariatosca.svg?style=plastic)](https://github.com/apache/incubator-ariatosca/pulls?q=is%3Apr+is%3Aclosed) -[ARIA](http://ariatosca.org/) is a minimal TOSCA orchestrator, as well as a platform for building -TOSCA-based products. Its features can be accessed via a well-documented Python API. +[ARIA](http://ariatosca.incubator.apache.org/) is a an open-source, lightweight, library and CLI for orchestration that open-source projects can consume to build TOSCA-based orchestration solutions for resources and services orchestration. It supports NFV and hybrid Cloud scenarios. -On its own, ARIA provides built-in tools for blueprint validation and for creating ready-to-run -service instances. +ARIA can be utilized by any organization that wants to implement TOSCA-based orchestration in its solutions, whether a multi-cloud enterprise application, or an NFV or SDN solution for multiple virtual infrastructure managers. -ARIA adheres strictly and meticulously to the -[TOSCA Simple Profile v1.0 cos01 specification](http://docs.oasis-open.org/tosca/TOSCA-Simple-Profile-YAML/v1.0/cos01/TOSCA-Simple-Profile-YAML-v1.0-cos01.html), -providing state-of-the-art validation at seven different levels: +With ARIA, you can utilize TOSCA's cloud portability out-of-the-box, to test and run your applications, from template to deployment. - -Platform errors. E.g. network, hardware, or even an internal bug in ARIA (let us know, - please!). -Syntax and format errors. E.g. non-compliant YAML, XML, JSON. -Field validation. E.g. assigning a string where an integer is expected, using a list instead of - a dict. -Relationships between fields within a type. This is "grammar" as it applies to rules for -setting the values of fields in relation to each other. -Relationships between types. E.g. referring to an unknown type, causing a type inheritance -loop. -Topology. These errors happen if requirements and capabilities cannot be matched in order to - assemble a valid topology. -External dependencies. These errors happen if requirement/capability matching fails due to -external resources missing, e.g. the lack of a valid virtual machine, API credentials, etc. - - -Validation errors include a plain English message and when relevant the exact location (file, row, -column) of the data the caused the error. +Installation + -The ARIA API documentation always links to the relevant section of the specification, and likewise -we provide an annotated version of the specification that links back to the API documentation. +ARIA is [available on PyPI](https://pypi.python.org/pypi/ariatosca). +ARIA requires Python 2.6/2.7. Python 3+ is not currently supported. -Quick Start +ARIA itself is in a `wheel` format compatible with all platforms. +Some dependencies, however, might require compilation (based on a given platform), and therefore possibly some system dependencies are required as well. -You need Python 2.6 or 2.7. Python 3+ is not currently supported. +On Ubuntu or other Debian-based systems: -To install, we recommend using [pip](https://pip.pypa.io/) and a -[virtualenv](https://virtualenv.pypa.io/en/stable/). + sudo apt install python-setuptools python-dev build-essential libssl-dev libffi-dev -In Debian-based systems: +On Archlinux: - sudo apt install python-setuptools - sudo -H easy_i
[GitHub] incubator-ariatosca pull request #152: ARIA-166 Update README file
Github user ran-z commented on a diff in the pull request: https://github.com/apache/incubator-ariatosca/pull/152#discussion_r121404876 --- Diff: README.md --- @@ -4,198 +4,111 @@ ARIA [![Build Status](https://travis-ci.org/apache/incubator-ariatosca.svg?branch=master)](https://travis-ci.org/apache/incubator-ariatosca) [![Appveyor Build Status](https://ci.appveyor.com/api/projects/status/ltv89jk63ahiu306?svg=true)](https://ci.appveyor.com/project/ApacheSoftwareFoundation/incubator-ariatosca/history) [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0) +[![PyPI release](https://img.shields.io/pypi/v/ariatosca.svg?style=plastic)](https://pypi.python.org/pypi/ariatosca) +![Python Versions](https://img.shields.io/pypi/pyversions/ariatosca.svg?style=plastic) +![Wheel](https://img.shields.io/pypi/wheel/ariatosca.svg?style=plastic) +![Contributors](https://img.shields.io/github/contributors/apache/incubator-ariatosca.svg?style=plastic) +[![Open Pull Requests](https://img.shields.io/github/issues-pr/apache/incubator-ariatosca.svg?style=plastic)](https://github.com/apache/incubator-ariatosca/pulls) +[![Closed Pull Requests](https://img.shields.io/github/issues-pr-closed-raw/apache/incubator-ariatosca.svg?style=plastic)](https://github.com/apache/incubator-ariatosca/pulls?q=is%3Apr+is%3Aclosed) -[ARIA](http://ariatosca.org/) is a minimal TOSCA orchestrator, as well as a platform for building -TOSCA-based products. Its features can be accessed via a well-documented Python API. +[ARIA](http://ariatosca.incubator.apache.org/) is a an open-source, lightweight, library and CLI for orchestration that open-source projects can consume to build TOSCA-based orchestration solutions for resources and services orchestration. It supports NFV and hybrid Cloud scenarios. -On its own, ARIA provides built-in tools for blueprint validation and for creating ready-to-run -service instances. +ARIA can be utilized by any organization that wants to implement TOSCA-based orchestration in its solutions, whether a multi-cloud enterprise application, or an NFV or SDN solution for multiple virtual infrastructure managers. -ARIA adheres strictly and meticulously to the -[TOSCA Simple Profile v1.0 cos01 specification](http://docs.oasis-open.org/tosca/TOSCA-Simple-Profile-YAML/v1.0/cos01/TOSCA-Simple-Profile-YAML-v1.0-cos01.html), -providing state-of-the-art validation at seven different levels: +With ARIA, you can utilize TOSCA's cloud portability out-of-the-box, to test and run your applications, from template to deployment. - -Platform errors. E.g. network, hardware, or even an internal bug in ARIA (let us know, - please!). -Syntax and format errors. E.g. non-compliant YAML, XML, JSON. -Field validation. E.g. assigning a string where an integer is expected, using a list instead of - a dict. -Relationships between fields within a type. This is "grammar" as it applies to rules for -setting the values of fields in relation to each other. -Relationships between types. E.g. referring to an unknown type, causing a type inheritance -loop. -Topology. These errors happen if requirements and capabilities cannot be matched in order to - assemble a valid topology. -External dependencies. These errors happen if requirement/capability matching fails due to -external resources missing, e.g. the lack of a valid virtual machine, API credentials, etc. - - -Validation errors include a plain English message and when relevant the exact location (file, row, -column) of the data the caused the error. +Installation + -The ARIA API documentation always links to the relevant section of the specification, and likewise -we provide an annotated version of the specification that links back to the API documentation. +ARIA is [available on PyPI](https://pypi.python.org/pypi/ariatosca). +ARIA requires Python 2.6/2.7. Python 3+ is not currently supported. -Quick Start +ARIA itself is in a `wheel` format compatible with all platforms. +Some dependencies, however, might require compilation (based on a given platform), and therefore possibly some system dependencies are required as well. -You need Python 2.6 or 2.7. Python 3+ is not currently supported. +On Ubuntu or other Debian-based systems: -To install, we recommend using [pip](https://pip.pypa.io/) and a -[virtualenv](https://virtualenv.pypa.io/en/stable/). + sudo apt install python-setuptools python-dev build-essential libssl-dev libffi-dev -In Debian-based systems: +On Archlinux: - sudo apt install python-setuptools - sudo -H easy_i
[GitHub] incubator-ariatosca pull request #152: ARIA-166 Update README file
Github user ran-z commented on a diff in the pull request: https://github.com/apache/incubator-ariatosca/pull/152#discussion_r121396720 --- Diff: README.md --- @@ -4,198 +4,111 @@ ARIA [![Build Status](https://travis-ci.org/apache/incubator-ariatosca.svg?branch=master)](https://travis-ci.org/apache/incubator-ariatosca) [![Appveyor Build Status](https://ci.appveyor.com/api/projects/status/ltv89jk63ahiu306?svg=true)](https://ci.appveyor.com/project/ApacheSoftwareFoundation/incubator-ariatosca/history) [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0) +[![PyPI release](https://img.shields.io/pypi/v/ariatosca.svg?style=plastic)](https://pypi.python.org/pypi/ariatosca) +![Python Versions](https://img.shields.io/pypi/pyversions/ariatosca.svg?style=plastic) +![Wheel](https://img.shields.io/pypi/wheel/ariatosca.svg?style=plastic) +![Contributors](https://img.shields.io/github/contributors/apache/incubator-ariatosca.svg?style=plastic) +[![Open Pull Requests](https://img.shields.io/github/issues-pr/apache/incubator-ariatosca.svg?style=plastic)](https://github.com/apache/incubator-ariatosca/pulls) +[![Closed Pull Requests](https://img.shields.io/github/issues-pr-closed-raw/apache/incubator-ariatosca.svg?style=plastic)](https://github.com/apache/incubator-ariatosca/pulls?q=is%3Apr+is%3Aclosed) -[ARIA](http://ariatosca.org/) is a minimal TOSCA orchestrator, as well as a platform for building -TOSCA-based products. Its features can be accessed via a well-documented Python API. +[ARIA](http://ariatosca.incubator.apache.org/) is a an open-source, lightweight, library and CLI for orchestration that open-source projects can consume to build TOSCA-based orchestration solutions for resources and services orchestration. It supports NFV and hybrid Cloud scenarios. -On its own, ARIA provides built-in tools for blueprint validation and for creating ready-to-run -service instances. +ARIA can be utilized by any organization that wants to implement TOSCA-based orchestration in its solutions, whether a multi-cloud enterprise application, or an NFV or SDN solution for multiple virtual infrastructure managers. -ARIA adheres strictly and meticulously to the -[TOSCA Simple Profile v1.0 cos01 specification](http://docs.oasis-open.org/tosca/TOSCA-Simple-Profile-YAML/v1.0/cos01/TOSCA-Simple-Profile-YAML-v1.0-cos01.html), -providing state-of-the-art validation at seven different levels: +With ARIA, you can utilize TOSCA's cloud portability out-of-the-box, to test and run your applications, from template to deployment. - -Platform errors. E.g. network, hardware, or even an internal bug in ARIA (let us know, - please!). -Syntax and format errors. E.g. non-compliant YAML, XML, JSON. -Field validation. E.g. assigning a string where an integer is expected, using a list instead of - a dict. -Relationships between fields within a type. This is "grammar" as it applies to rules for -setting the values of fields in relation to each other. -Relationships between types. E.g. referring to an unknown type, causing a type inheritance -loop. -Topology. These errors happen if requirements and capabilities cannot be matched in order to - assemble a valid topology. -External dependencies. These errors happen if requirement/capability matching fails due to -external resources missing, e.g. the lack of a valid virtual machine, API credentials, etc. - - -Validation errors include a plain English message and when relevant the exact location (file, row, -column) of the data the caused the error. +Installation + -The ARIA API documentation always links to the relevant section of the specification, and likewise -we provide an annotated version of the specification that links back to the API documentation. +ARIA is [available on PyPI](https://pypi.python.org/pypi/ariatosca). +ARIA requires Python 2.6/2.7. Python 3+ is not currently supported. -Quick Start +ARIA itself is in a `wheel` format compatible with all platforms. +Some dependencies, however, might require compilation (based on a given platform), and therefore possibly some system dependencies are required as well. -You need Python 2.6 or 2.7. Python 3+ is not currently supported. +On Ubuntu or other Debian-based systems: -To install, we recommend using [pip](https://pip.pypa.io/) and a -[virtualenv](https://virtualenv.pypa.io/en/stable/). + sudo apt install python-setuptools python-dev build-essential libssl-dev libffi-dev -In Debian-based systems: +On Archlinux: - sudo apt install python-setuptools - sudo -H easy_i
[GitHub] incubator-ariatosca pull request #145: ARIA-260 Send interface inputs as arg...
Github user ran-z commented on a diff in the pull request: https://github.com/apache/incubator-ariatosca/pull/145#discussion_r120006635 --- Diff: tests/end2end/test_nodecellar.py --- @@ -40,3 +40,21 @@ def _verify_deployed_service_in_storage(service_name, model_storage): assert service.name == service_name assert len(service.executions) == 0 # dry executions leave no traces assert len(service.nodes) == 10 +assert set(service.nodes['loadbalancer_host_1'].interfaces['Standard'].operations['create'] \ --- End diff -- While these additions are fine, I think this JIRA really calls for unit tests which will check the various options for passing in arguments and verify everything overrides what it should and only that. There are many such scenarios, and you don't want to test them all in e2e tests. --- 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. ---
[GitHub] incubator-ariatosca pull request #146: ARIA-199 Add "services outputs" CLI c...
Github user ran-z commented on a diff in the pull request: https://github.com/apache/incubator-ariatosca/pull/146#discussion_r120004762 --- Diff: tests/resources/service-templates/tosca-simple-1.0/node-cellar/node-cellar.yaml --- @@ -302,6 +306,14 @@ topology_template: capabilities: app_endpoint: [ loadbalancer, client ] + outputs: --- End diff -- It'd be better (or rather, also good) to have an `outputs` section appended to the `hello-world` example, and then use it in the end2end test to grab the URL of the web server. --- 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. ---
[GitHub] incubator-ariatosca pull request #138: ARIA-149 Enhance operation configurat...
Github user ran-z commented on a diff in the pull request: https://github.com/apache/incubator-ariatosca/pull/138#discussion_r119449742 --- Diff: aria/modeling/utils.py --- @@ -52,84 +53,95 @@ def service_template(self): return self.container.service_template -def create_parameters(parameters, declared_parameters): +def merge_parameter_values(parameter_values, declared_parameters, forbidden_names=None): --- End diff -- :+1: --- 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. ---
[GitHub] incubator-ariatosca pull request #138: ARIA-149 Enhance operation configurat...
Github user ran-z commented on a diff in the pull request: https://github.com/apache/incubator-ariatosca/pull/138#discussion_r119449679 --- Diff: extensions/aria_extension_tosca/simple_v1_0/modeling/functions.py --- @@ -69,7 +69,7 @@ def __evaluate__(self, container_holder): e, final = evaluate(e, final, container_holder) if e is not None: value.write(unicode(e)) -value = value.getvalue() +value = value.getvalue() or u'' --- End diff -- :+1: --- 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. ---
[GitHub] incubator-ariatosca pull request #138: ARIA-149 Enhance operation configurat...
Github user ran-z commented on a diff in the pull request: https://github.com/apache/incubator-ariatosca/pull/138#discussion_r119449695 --- Diff: aria/orchestrator/workflows/events_logging.py --- @@ -35,20 +35,20 @@ def _get_task_name(task): @events.start_task_signal.connect def _start_task_handler(task, **kwargs): -# If the task has not implementation this is an empty task. -if task.implementation: +# If the task has no function this is an empty task. +if task.function: suffix = 'started...' logger = task.context.logger.info else: -suffix = 'has no implementation' +suffix = 'has no function' --- End diff -- :+1: --- 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. ---
[GitHub] incubator-ariatosca pull request #138: ARIA-149 Enhance operation configurat...
Github user ran-z commented on a diff in the pull request: https://github.com/apache/incubator-ariatosca/pull/138#discussion_r119449568 --- Diff: aria/modeling/exceptions.py --- @@ -57,3 +57,9 @@ class UndeclaredParametersException(ParameterException): """ ARIA modeling exception: Undeclared parameters have been provided. """ + + +class ForbiddenParameterNamesException(ParameterException): --- End diff -- :+1: --- 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. ---
[GitHub] incubator-ariatosca pull request #138: ARIA-149 Enhance operation configurat...
Github user ran-z commented on a diff in the pull request: https://github.com/apache/incubator-ariatosca/pull/138#discussion_r119444625 --- Diff: tests/resources/service-templates/tosca-simple-1.0/node-cellar/node-cellar.yaml --- @@ -309,7 +311,7 @@ policy_types: client connections cleanly and shut down services. derived_from: aria.Workflow properties: - implementation: + function: --- End diff -- :+1: --- 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. ---
[GitHub] incubator-ariatosca pull request #138: ARIA-149 Enhance operation configurat...
Github user ran-z commented on a diff in the pull request: https://github.com/apache/incubator-ariatosca/pull/138#discussion_r119443130 --- Diff: aria/modeling/exceptions.py --- @@ -57,3 +57,9 @@ class UndeclaredParametersException(ParameterException): """ ARIA modeling exception: Undeclared parameters have been provided. """ + + +class ForbiddenParameterNamesException(ParameterException): --- End diff -- perhaps "Reserved" is more appropriate than "Forbidden"? --- 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. ---
[GitHub] incubator-ariatosca pull request #138: ARIA-149 Enhance operation configurat...
Github user ran-z commented on a diff in the pull request: https://github.com/apache/incubator-ariatosca/pull/138#discussion_r119427199 --- Diff: aria/orchestrator/workflow_runner.py --- @@ -136,10 +137,11 @@ def _validate_no_active_executions(self, execution): active_executions = [e for e in self.service.executions if e.is_active()] if active_executions: raise exceptions.ActiveExecutionsError( -"Can't start execution; Service {0} has an active execution with id {1}" +"Can't start execution; Service {0} has an active execution with ID {1}" .format(self.service.name, active_executions[0].id)) -def _get_workflow_fn(self): +@property +def _workflow_fn(self): --- End diff -- what's a `property` about this? it's a function with possible side effects, its private, and it isn't really meant to be used repeatedly, so i think it actually stands better as a function. --- 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. ---
[GitHub] incubator-ariatosca pull request #138: ARIA-149 Enhance operation configurat...
Github user ran-z commented on a diff in the pull request: https://github.com/apache/incubator-ariatosca/pull/138#discussion_r119428842 --- Diff: extensions/aria_extension_tosca/simple_v1_0/modeling/functions.py --- @@ -69,7 +69,7 @@ def __evaluate__(self, container_holder): e, final = evaluate(e, final, container_holder) if e is not None: value.write(unicode(e)) -value = value.getvalue() +value = value.getvalue() or u'' --- End diff -- why do the value we return here need to be unicode again? i understand the need to support unicode values which are set by the user, but why does it matter whether the value returned in case there never was a value is unicode or not? --- 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. ---
[GitHub] incubator-ariatosca pull request #138: ARIA-149 Enhance operation configurat...
Github user ran-z commented on a diff in the pull request: https://github.com/apache/incubator-ariatosca/pull/138#discussion_r119428083 --- Diff: aria/orchestrator/workflows/events_logging.py --- @@ -35,20 +35,20 @@ def _get_task_name(task): @events.start_task_signal.connect def _start_task_handler(task, **kwargs): -# If the task has not implementation this is an empty task. -if task.implementation: +# If the task has no function this is an empty task. +if task.function: suffix = 'started...' logger = task.context.logger.info else: -suffix = 'has no implementation' +suffix = 'has no function' --- End diff -- actually, in this specific instance, it should probably remain `implementation` - function is an implementation (sorry for the confusing term in this context :D) detail, but in practice what the message means is that the user didn't input (there i go with the terms again.. :D) any implementation for the operation (AKA empty operation) --- 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. ---
[GitHub] incubator-ariatosca pull request #138: ARIA-149 Enhance operation configurat...
Github user ran-z commented on a diff in the pull request: https://github.com/apache/incubator-ariatosca/pull/138#discussion_r119443917 --- Diff: aria/orchestrator/execution_plugin/instantiation.py --- @@ -16,107 +16,132 @@ # TODO: this module will eventually be moved to a new "aria.instantiation" package from ...utils.type import full_type_name -from ...utils.collections import OrderedDict +from ...utils.formatting import safe_repr from ...parser import validation from ...parser.consumption import ConsumptionContext +from ...modeling.functions import Function def configure_operation(operation): -configuration = OrderedDict(operation.configuration) if operation.configuration else {} - -arguments = OrderedDict() -arguments['script_path'] = operation.implementation -arguments['process'] = _get_process(configuration.pop('process')) \ -if 'process' in configuration else dict() - host = None interface = operation.interface if interface.node is not None: host = interface.node.host elif interface.relationship is not None: if operation.relationship_edge is True: host = interface.relationship.target_node.host -else: # either False or None +else: # either False or None (None meaning that edge was not specified) host = interface.relationship.source_node.host +_configure_common(operation) if host is None: _configure_local(operation) else: -_configure_remote(operation, configuration, arguments) +_configure_remote(operation) + +# Any remaining un-handled configuration parameters will become extra arguments, available as +# kwargs in either "run_script_locally" or "run_script_with_ssh" +for key, value in operation.configuration.iteritems(): +if key not in ('process', 'ssh'): +operation.arguments[key] = value.instantiate() -# Any remaining unhandled configuration values will become extra arguments, available as kwargs -# in either "run_script_locally" or "run_script_with_ssh" -arguments.update(configuration) -return arguments +def _configure_common(operation): +""" +Local and remote operations. +""" + +from ...modeling.models import Parameter +operation.arguments['script_path'] = Parameter.wrap('script_path', operation.implementation, +'Relative path to the executable file.') +operation.arguments['process'] = Parameter.wrap('process', _get_process(operation), +'Sub-process configuration.') + def _configure_local(operation): """ Local operation. """ + from . import operations -operation.implementation = '{0}.{1}'.format(operations.__name__, - operations.run_script_locally.__name__) +operation.function = '{0}.{1}'.format(operations.__name__, + operations.run_script_locally.__name__) -def _configure_remote(operation, configuration, arguments): +def _configure_remote(operation): """ Remote SSH operation via Fabric. """ + +from ...modeling.models import Parameter +from . import operations + +ssh = _get_ssh(operation) + +# Defaults # TODO: find a way to configure these generally in the service template default_user = '' default_password = '' - -ssh = _get_ssh(configuration.pop('ssh')) if 'ssh' in configuration else {} if 'user' not in ssh: ssh['user'] = default_user if ('password' not in ssh) and ('key' not in ssh) and ('key_filename' not in ssh): ssh['password'] = default_password -arguments['use_sudo'] = ssh.get('use_sudo', False) -arguments['hide_output'] = ssh.get('hide_output', []) -arguments['fabric_env'] = {} +operation.arguments['use_sudo'] = Parameter.wrap('use_sudo', ssh.get('use_sudo', False), --- End diff -- It's true that configuration parameters are wrapped in another place when it's not intended for the execution plugin, but my question is why bother wrapping them at this stage at all - as opposed to working with dicts at this stage and then have the instantiation code which calls this module do the wrapping. it just makes more sense IMO. --- If your project is set up for it, you can reply to
[GitHub] incubator-ariatosca pull request #140: ARIA-268 Add NOTICE file
GitHub user ran-z opened a pull request: https://github.com/apache/incubator-ariatosca/pull/140 ARIA-268 Add NOTICE file You can merge this pull request into a Git repository by running: $ git pull https://github.com/apache/incubator-ariatosca ARIA-268-add-notice-file Alternatively you can review and apply these changes as the patch at: https://github.com/apache/incubator-ariatosca/pull/140.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 #140 commit 07d79513a4ac41ba66d84f2922a17fd0ab7ec39c Author: Ran Ziv <r...@gigaspaces.com> Date: 2017-05-29T14:11:04Z ARIA-268 Add NOTICE file --- 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. ---
[GitHub] incubator-ariatosca pull request #138: ARIA-149 Enhance operation configurat...
Github user ran-z commented on a diff in the pull request: https://github.com/apache/incubator-ariatosca/pull/138#discussion_r118293230 --- Diff: aria/modeling/service_instance.py --- @@ -1728,34 +1732,41 @@ def operation_template(cls): def inputs(cls): return relationship.many_to_many(cls, 'parameter', prefix='inputs', dict_key='name') +@declared_attr +def configuration(cls): +return relationship.many_to_many(cls, 'parameter', prefix='configuration', dict_key='name') + +@declared_attr +def arguments(cls): +return relationship.many_to_many(cls, 'parameter', prefix='arguments', dict_key='name') + # endregion description = Column(Text) relationship_edge = Column(Boolean) implementation = Column(Text) -configuration = Column(modeling_types.StrictDict(key_cls=basestring)) dependencies = Column(modeling_types.StrictList(item_cls=basestring)) +function = Column(Text) executor = Column(Text) max_attempts = Column(Integer) retry_interval = Column(Integer) def configure(self): -from . import models -# Note: for workflows (operations attached directly to the service) "interface" will be None -if (self.implementation is None) or (self.interface is None): +if (self.implementation is None) and (self.function is None): return -if self.plugin is None: -arguments = execution_plugin.instantiation.configure_operation(self) +if (self.plugin is None) and (self.interface is not None): +# Default to execution plugin ("interface" is None for workflow operations) +execution_plugin.instantiation.configure_operation(self) else: # In the future plugins may be able to add their own "configure_operation" hook that -# can validate the configuration and otherwise return specially derived arguments -arguments = self.configuration +# can validate the configuration and otherwise create specially derived arguments. For +# now, we just send all configuration parameters as arguments +utils.instantiate_dict(self, self.arguments, self.configuration) -# Note: the arguments will *override* operation inputs of the same name -if arguments: -for k, v in arguments.iteritems(): -self.inputs[k] = models.Parameter.wrap(k, v) --- End diff -- :+1: --- 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. ---
[GitHub] incubator-ariatosca pull request #136: ARIA-162 Upgrade Colorama library ver...
GitHub user ran-z opened a pull request: https://github.com/apache/incubator-ariatosca/pull/136 ARIA-162 Upgrade Colorama library version Upgraded the Colorama library version - This should take care of the closed-stream error that appeared sporadically after test runs. You can merge this pull request into a Git repository by running: $ git pull https://github.com/apache/incubator-ariatosca ARIA-162-colorama-open-file-error Alternatively you can review and apply these changes as the patch at: https://github.com/apache/incubator-ariatosca/pull/136.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 #136 commit 3d22d36fc5c9fb780facfb8880143dda46d16f6f Author: Ran Ziv <r...@gigaspaces.com> Date: 2017-05-22T13:44:00Z ARIA-162 Upgrade Colorama library version Upgraded the Colorama library version - This should take care of the closed-stream error that appeared sporadically after test runs. --- 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. ---
[GitHub] incubator-ariatosca pull request #135: ARIA-208 Fix models relationships
GitHub user ran-z opened a pull request: https://github.com/apache/incubator-ariatosca/pull/135 ARIA-208 Fix models relationships You can merge this pull request into a Git repository by running: $ git pull https://github.com/apache/incubator-ariatosca ARIA-208-Missing-back-refrences-for-models Alternatively you can review and apply these changes as the patch at: https://github.com/apache/incubator-ariatosca/pull/135.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 #135 commit 5798bbfc7d1a95965a4c44d2ebad5dad245c824a Author: Ran Ziv <r...@gigaspaces.com> Date: 2017-05-07T11:58:46Z ARIA-208 Fix models relationships --- 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. ---