openstack team mailing list archive
-
openstack team
-
Mailing list archive
-
Message #10100
Re: Just JSON, and extensibility
>
>
>> - Each (known) extension has its own strongly-typed model object.
>>
>>
> Does that mean that an extension cannot add properties to an existing
> object (such as adding a new attribute an Image), or just that all of those
> properties will be an a nested object (such as
> Image.my_extension.my_attribute)?
>
Good point - I should clarify... I'm not using the standard Java XML
binding code here, because they would require a wrapping object. It's
using custom code to do the binding whenever data from a different
namespace is encountered, although it uses the standard JAXB annotations to
guide it. From the user's point of view, "it just works"; the
implementation is not as nice :-)
Because we're not wrapping our extensions in their own elements, I didn't
know how to get the standard tooling to work with it anyway. Interesting
data-point for the "standard tools" argument...
> Now, how you would do something that awesome in Python, I don't know ;-)
>>
>
> Probably the same way. I would use setuptools entry points to map
> namespace prefixes to the class, so the client could load the handler
> automatically when it encounters data it does not recognize.
>
Yes - I should have said "dictionary" rather than "registry"! Are you
doing this in python-novaclient? Awesome!
Follow ups
References
-
Image API v2 Draft 4
From: Brian Waldon, 2012-04-09
-
Re: Image API v2 Draft 4
From: Justin Santa Barbara, 2012-04-09
-
Re: Image API v2 Draft 4
From: Jay Pipes, 2012-04-09
-
Re: Image API v2 Draft 4
From: Justin Santa Barbara, 2012-04-09
-
Re: Image API v2 Draft 4
From: Jay Pipes, 2012-04-09
-
Re: Image API v2 Draft 4
From: Justin Santa Barbara, 2012-04-09
-
Re: Image API v2 Draft 4
From: Jorge Williams, 2012-04-09
-
Re: Image API v2 Draft 4
From: Justin Santa Barbara, 2012-04-09
-
Re: Image API v2 Draft 4
From: Jorge Williams, 2012-04-09
-
Re: Image API v2 Draft 4
From: Jay Pipes, 2012-04-09
-
Re: Image API v2 Draft 4
From: Thierry Carrez, 2012-04-10
-
Re: Image API v2 Draft 4
From: Vishvananda Ishaya, 2012-04-10
-
Re: Image API v2 Draft 4
From: Mark Nottingham, 2012-04-12
-
Re: Image API v2 Draft 4
From: Jorge Williams, 2012-04-13
-
Just JSON, and extensibility
From: Mark Nottingham, 2012-04-13
-
Re: Just JSON, and extensibility
From: Jorge Williams, 2012-04-13
-
Re: Just JSON, and extensibility
From: Caitlin Bestler, 2012-04-13
-
Re: Just JSON, and extensibility
From: Justin Santa Barbara, 2012-04-13
-
Re: Just JSON, and extensibility
From: Doug Hellmann, 2012-04-14