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 030F1200C8A for ; Sun, 4 Jun 2017 18:20:11 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 018DC160BE3; Sun, 4 Jun 2017 16:20: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 450A1160BB7 for ; Sun, 4 Jun 2017 18:20:10 +0200 (CEST) Received: (qmail 42564 invoked by uid 500); 4 Jun 2017 16:20:09 -0000 Mailing-List: contact issues-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 issues@ariatosca.incubator.apache.org Received: (qmail 42555 invoked by uid 99); 4 Jun 2017 16:20:09 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 04 Jun 2017 16:20:09 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 04A281A02B6 for ; Sun, 4 Jun 2017 16:20:09 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -100.002 X-Spam-Level: X-Spam-Status: No, score=-100.002 tagged_above=-999 required=6.31 tests=[RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id XsxY_siRVXoa for ; Sun, 4 Jun 2017 16:20:07 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id 117185FBE2 for ; Sun, 4 Jun 2017 16:20:07 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 71840E0942 for ; Sun, 4 Jun 2017 16:20:06 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 3B5682193C for ; Sun, 4 Jun 2017 16:20:05 +0000 (UTC) Date: Sun, 4 Jun 2017 16:20:05 +0000 (UTC) From: "ASF GitHub Bot (JIRA)" To: issues@ariatosca.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (ARIA-262) Inconsistent node attributes behavior MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Sun, 04 Jun 2017 16:20:11 -0000 [ https://issues.apache.org/jira/browse/ARIA-262?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16036314#comment-16036314 ] ASF GitHub Bot commented on ARIA-262: ------------------------------------- Github user mxmrlv commented on a diff in the pull request: https://github.com/apache/incubator-ariatosca/pull/141#discussion_r120013636 --- Diff: aria/storage/api.py --- @@ -45,6 +45,7 @@ def __init__(self, model_cls, name=None, **kwargs): super(ModelAPI, self).__init__(**kwargs) self._model_cls = model_cls self._name = name or model_cls.__modelname__ + self._instrumentation = [] --- End diff -- threadlocal > Inconsistent node attributes behavior > ------------------------------------- > > Key: ARIA-262 > URL: https://issues.apache.org/jira/browse/ARIA-262 > Project: AriaTosca > Issue Type: Story > Reporter: Maxim Orlov > Assignee: Maxim Orlov > > ARIA provides sugaring for node attributes. However this sugaring is somewhat limited, as it sugars ctx accessed attributes. e.g. Under NodeOperationContext {{ctx.node.attributes}} has a dict-like behavior, where the value is another object with a dict-like behavior. This is provided by the sugaring. > However {{ctx.node.relationships[0].target_node.attributes}} provides a dict where the value is of type Parameter, accessing the value of this Parameter requires {{param.value}} This creates inconsistency with regards to access to attributes. > There are several possible solutions: > 1. Enable sugaring on the model level. this will effectively make the creation of Parameter implicit, but this will be possible throughout the entire code (not only under context). > 2. Enable sugaring by tapping to sqla events and altering the return values. -- This message was sent by Atlassian JIRA (v6.3.15#6346)