Can not get attribute from resources

Bug #1648004 reported by Rico Lin
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Heat
In Progress
Medium
Rico Lin

Bug Description

We didn't give any attributes_schema in identity resources like user, project, group, etc. I think there might be other resource as well.

Therefore, when we trying to get user name list from a resource group will be impossible.

Rico Lin (rico-lin)
Changed in heat:
milestone: ocata-3 → none
Revision history for this message
Thomas Herve (therve) wrote :

Those resources don't have attributes, so not attributes schema? I don't understand this bug.

Revision history for this message
Rico Lin (rico-lin) wrote :

They have attributes(in client), but since we didn't write the attribute schema and get attribute function for them (in heat). Those resources can't resolve the attribute from heat template.
For example, keystone user has attributes 'name', 'domain_id', etc., but we can't write something like get_attr[user_1, 'name']. It will give you a validation error with no such attribute exists (due to not found in attributes_schema table for OS::Keystone::User resource).

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to heat (master)

Fix proposed to branch: master
Review: https://review.openstack.org/408407

Changed in heat:
status: New → In Progress
Changed in heat:
assignee: Rico Lin (rico-lin) → Kanagaraj Manickam (kanagaraj-manickam)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to heat (master)

Reviewed: https://review.openstack.org/408407
Committed: https://git.openstack.org/cgit/openstack/heat/commit/?id=c2e944c6fca67f51c1e9ff7635f25c8173f1f0de
Submitter: Jenkins
Branch: master

commit c2e944c6fca67f51c1e9ff7635f25c8173f1f0de
Author: Kanagaraj Manickam <email address hidden>
Date: Wed Mar 1 23:32:47 2017 +0530

    Add attributes schema for OS::Keystone::User

    Add `attributes_schema` and `_resolve_attribute` for OS::Keystone::User.
    This patch allow get_attr works with OS::Keystone::User resource.
    Partial-Bug: #1648004
    Closes-bug: #1659923

    Co-Authored-By: Rico Lin <email address hidden>
    Change-Id: I4e8e984c42120e23887ad9997df2fa530709be52

Changed in heat:
importance: Undecided → Medium
milestone: none → pike-1
Rico Lin (rico-lin)
Changed in heat:
milestone: pike-1 → ongoing
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to heat (master)

Fix proposed to branch: master
Review: https://review.openstack.org/462673

Changed in heat:
assignee: Kanagaraj Manickam (kanagaraj-manickam) → Rico Lin (rico-lin)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to heat (master)

Reviewed: https://review.openstack.org/462673
Committed: https://git.openstack.org/cgit/openstack/heat/commit/?id=5213763018d9bd13862e276158ec08732cbbe586
Submitter: Zuul
Branch: master

commit 5213763018d9bd13862e276158ec08732cbbe586
Author: ricolin <email address hidden>
Date: Fri May 5 00:51:11 2017 +0800

    Add attributes schema for OS::Keystone::Project

    Add `attributes_schema` and `_resolve_attribute` for
    OS::Keystone::Project. This patch allow get_attr works
    with OS::Keystone::Project resource.
    Partial-Bug: #1648004

    Change-Id: Ia561aa44e6939a0488207d60af8d7efdbca05f36

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.