This is a static archive of the previous Open Grid Forum GridForge content management system saved from host forge.ogf.org file /sf/wiki/do/viewPage/projects.occi-wg/wiki/Category at Fri, 04 Nov 2022 20:05:26 GMT SourceForge : View Wiki Page: Category

Project Home

Tracker

Documents

Tasks

Source Code

Discussions

File Releases

Wiki

Project Admin

Web Site
Search Wiki Pages Project: occi-wg     Wiki > Category > View Wiki Page
wiki2448: Category

OCCI Category & Types

Note - The ideas presented in this document has been integrated into Core & Models (v46).

Overview

  • Supplied categories indicate the type and possible composite type (if 2 or more categories are within a resource) of the Resource created or to be created
  • The categories present in the request or response can have associated attributes that depending on their specification must, should or may be supplied in the header additionally
  • It is the responsibility of the service implementation to ensure that the client supply the correct attributes per supplied category

With this approach we have a type composition system, something like inheritance through composition. Also the type system is distributed and if an implementer of such a system wanted verifiability then the scheme and term of a category should point to a schema that is dereferencable for the client.

Examples

Abstract Examples

We have a two categories:

  • resource#fruit and resource#good
  • resource#fruit has two attributes, name (mandatory) and color (optional)
  • resource#good has two attributes, price (mandatory) and stock (optional)

So an example resource representation would look like:

200 OK

Content-type: occi/resource
Category: fruit; scheme="resource"; title="A Banana"
Category: good; scheme="resource"; title="For Sale!"

Link </goods/fruit/eb21ff06ac9>; type="application/occi-link"; rel="next"

occi.fruit.name="Banana"
occi.good.price="1.00,- US$"
occi.good.stock="100"

Compute Example

The request for the creation of a composite type - a location-aware compute provisioning.

POST /compute

Content-type: application/occi-resource

Category: compute; scheme="http://prov.com/occi#"; title="a computer!", ie; scheme="http://prov.com/occi/location#"; title="I'm in ireland!"

occi.compute.cores=2
occi.location.city=dublin

and the GET would return the rendering of that resources as:

GET /compute/123-123

Content-type: application/occi-resource

Category: compute; scheme="http://prov.com/occi#"; title="a computer!", ie; scheme="http://prov.com/occi/location#"; title="I'm in ireland!"

Link: </compute/123-123-123;start>; type="application/occi-action"; rel="category http://prov.com/occi#action"

occi.compute.speed=2.4
occi.compute.cores=2
occi.memory.size=0.5

occi.location.latlon=58.33,57.99
occi.location.city=dublin

Note: With the GET we have the non-mandatory attributes also rendered

 



Versions Associations Attachments Back Links  
Version Version Comment Created By
Version 6 Note that the Category "type system" is present in Core & Models now. Ralf Nyrén - 09/07/2010
Version 5 Andy Edmonds - 08/12/2010
Version 4 Andy Edmonds - 08/12/2010
Version 3 Andy Edmonds - 08/12/2010
Version 2 added examples Andy Edmonds - 08/12/2010
Version 1 Andy Edmonds - 08/12/2010



The Open Grid Forum Contact Webmaster | Report a problem | GridForge Help
This is a static archive of the previous Open Grid Forum GridForge content management system saved from host forge.ogf.org file /sf/wiki/do/viewPage/projects.occi-wg/wiki/Category at Fri, 04 Nov 2022 20:05:34 GMT