[occi-wg] HTTP Doc and Resource Updates
Ralf Nyren
ralf at nyren.net
Thu Mar 31 13:20:02 CDT 2011
Add/remove of Mixins is handled using PUT/DELETE at the location path of
the Mixin. See HTTP Rendering page 8 paragraph "Associate resource
instances with a Mixin" and "Unassociated resource instance(s) from a
Mixin".
The occi-py library implements this part of the specification. I basically
only use PUT on a resource to update attributes. Links (link-attributes,
removal, etc) I handle through the Link location itself.
I think the spec works fine as written. It is all up and running at
http://www.nyren.net/api/ so you are welcome to try it out =)
regards, Ralf
On Thu, 31 Mar 2011 17:28:44 +0200, Edmonds, AndrewX
<andrewx.edmonds at intel.com> wrote:
> I'd be interested to hear how people currently implement updates to their
> various OCCI resources. Currently in the spec, it says to perform a PUT
> and
> supply _only_ the attributes that need to be updated.
>
> This works and is clear in changing or adding items such as attributes or
> mixins. However what is not so clear to me is how to handle an update
> that
> removes a mixin from an existing resource (e.g. I want to remove IP
> networking capabilities).
>
> One solution I suggest would be that the section on updating a resource
> allow for updating using both POST and PUT. In this case POST can modify
> (i.e. replace) a _part_ of the resource e.g. a particular attribute. PUT
> can
> replace the whole resource _representation_ and in doing so support the
> removal of items like mixins.
>
> Comments?
>
> Andy
More information about the occi-wg
mailing list