You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ariatosca.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2017/06/04 16:20:04 UTC
[jira] [Commented] (ARIA-262) Inconsistent node attributes behavior
[ https://issues.apache.org/jira/browse/ARIA-262?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16036313#comment-16036313 ]
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_r120013538
--- Diff: aria/storage/sql_mapi.py ---
@@ -93,7 +94,7 @@ def list(self,
return ListResult(
dict(total=total, size=size, offset=offset),
- results
+ [self._instrument(result) for result in results]
)
def iter(self,
--- End diff --
consider adding instrumentation
> 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)