Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 847DA200CD9 for ; Thu, 3 Aug 2017 14:55:11 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 830F016B805; Thu, 3 Aug 2017 12:55:11 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id C949C16B800 for ; Thu, 3 Aug 2017 14:55:10 +0200 (CEST) Received: (qmail 84965 invoked by uid 500); 3 Aug 2017 12:55:10 -0000 Mailing-List: contact commits-help@ariatosca.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ariatosca.incubator.apache.org Delivered-To: mailing list commits@ariatosca.incubator.apache.org Received: (qmail 84956 invoked by uid 99); 3 Aug 2017 12:55:10 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 03 Aug 2017 12:55:10 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id ADB641805A3 for ; Thu, 3 Aug 2017 12:55:09 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -3.721 X-Spam-Level: X-Spam-Status: No, score=-3.721 tagged_above=-999 required=6.31 tests=[HK_RANDOM_FROM=0.001, KAM_ASCII_DIVIDERS=0.8, KAM_NUMSUBJECT=0.5, RCVD_IN_DNSWL_HI=-5, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id GHfOPRI2Zwl6 for ; Thu, 3 Aug 2017 12:55:08 +0000 (UTC) Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with SMTP id B01B960D26 for ; Thu, 3 Aug 2017 12:55:07 +0000 (UTC) Received: (qmail 84944 invoked by uid 99); 3 Aug 2017 12:55:06 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 03 Aug 2017 12:55:06 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 779D2F1820; Thu, 3 Aug 2017 12:55:06 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: mxmrlv@apache.org To: commits@ariatosca.incubator.apache.org Date: Thu, 03 Aug 2017 12:55:06 -0000 Message-Id: X-Mailer: ASF-Git Admin Mailer Subject: [1/2] incubator-ariatosca git commit: review 1 - fixups 1 archived-at: Thu, 03 Aug 2017 12:55:11 -0000 Repository: incubator-ariatosca Updated Branches: refs/heads/ARIA-174-Refactor-instantiation-phase b729f6349 -> a33ba12e1 http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/a33ba12e/extensions/aria_extension_tosca/simple_v1_0/modeling/__init__.py ---------------------------------------------------------------------- diff --git a/extensions/aria_extension_tosca/simple_v1_0/modeling/__init__.py b/extensions/aria_extension_tosca/simple_v1_0/modeling/__init__.py index d84f1c0..1f90d29 100644 --- a/extensions/aria_extension_tosca/simple_v1_0/modeling/__init__.py +++ b/extensions/aria_extension_tosca/simple_v1_0/modeling/__init__.py @@ -498,6 +498,9 @@ def create_plugin_specification_model(context, policy): def create_workflow_operation_template_model(context, service_template, policy): model = OperationTemplate(name=policy._name) + # since we use backpopulates, these fields are populated upon commit, we get a weird(temporary) + # behavior where in previous code service_template.workflow_templates is a dict which has None + # as key for the value of model. service_template.workflow_templates[model.name] = model if policy.description: @@ -606,7 +609,7 @@ def create_parameter_model_from_value(template_parameter, template_parameter_nam def create_parameter_models_from_assignments(properties, source_properties, model_cls): if source_properties: for property_name, prop in source_properties.iteritems(): - properties[property_name] = model_cls(name=property_name, # pylint: disable=unexpected-keyword-arg + properties[property_name] = model_cls(name=property_name, # pylint: disable=unexpected-keyword-arg type_name=prop.value.type, value=prop.value.value, description=prop.value.description) http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/a33ba12e/tests/instantiation/test_configuration.py ---------------------------------------------------------------------- diff --git a/tests/instantiation/test_configuration.py b/tests/instantiation/test_configuration.py index a41f0a8..6ac0c9c 100644 --- a/tests/instantiation/test_configuration.py +++ b/tests/instantiation/test_configuration.py @@ -165,11 +165,8 @@ def test_remote(service): def test_reserved_arguments(broken_service_issues): - assert len(broken_service_issues) == 2 - - assert any( - all([issue.message.startswith('using reserved arguments in operation "operation": '), - 'ctx' in issue.message, - 'toolbelt' in issue.message]) - for issue in broken_service_issues - ) + assert len(broken_service_issues) == 1 + message = broken_service_issues[0].message + assert message.startswith('using reserved arguments in operation "operation":') + assert '"ctx"' in message + assert '"toolbelt"' in message http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/a33ba12e/tests/parser/test_reqs_caps.py ---------------------------------------------------------------------- diff --git a/tests/parser/test_reqs_caps.py b/tests/parser/test_reqs_caps.py index 0af2487..e92aec4 100644 --- a/tests/parser/test_reqs_caps.py +++ b/tests/parser/test_reqs_caps.py @@ -18,10 +18,10 @@ from ..helpers import get_service_template_uri def test_satisfy_capability_type(): - consume_reqs_caps_template('instance') + consume_reqs_caps_template1('instance') -def consume_reqs_caps_template(consumer_class_name, cache=True): +def consume_reqs_caps_template1(consumer_class_name, cache=True): consume_test_case( get_service_template_uri('tosca-simple-1.0', 'reqs_caps', 'reqs_caps1.yaml'), consumer_class_name=consumer_class_name,