[openstack-dev] [wsme] Undefined attributes in WSME

Julien Danjou julien at danjou.info
Thu Jan 9 10:16:19 UTC 2014


On Thu, Jan 09 2014, Jamie Lennox wrote:

> Is there any way to have WSME pass through arbitrary attributes to the
> created object? There is nothing that i can see in the documentation or code
> that would seem to support this.
>
> In keystone we have the situation where arbitrary data was able to be
> attached to our resources. For example there are a certain number of
> predefined attributes for a user including name, email but if you want to
> include an address you just add an 'address': 'value' to the resource
> creation and it will be saved and returned to you when you request the
> resource.
>
> Ignoring whether this is a good idea or not (it's done), is the option there
> that i missed - or is there any plans/way to support something like this?

You can use something like:

  class Resource(object):
      metadata = {wtypes.text: wtypes.text}

Would that solve your problem?

-- 
Julien Danjou
;; Free Software hacker ; independent consultant
;; http://julien.danjou.info
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 832 bytes
Desc: not available
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20140109/1f97c518/attachment.pgp>


More information about the OpenStack-dev mailing list