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/APIDesign at Fri, 04 Nov 2022 20:07:31 GMT SourceForge : View Wiki Page: APIDesign

Project Home

Tracker

Documents

Tasks

Source Code

Discussions

File Releases

Wiki

Project Admin

Web Site
Search Wiki Pages Project: occi-wg     Wiki > APIDesign > View Wiki Page
wiki2112: APIDesign

Core

Overview

The Open Cloud Computing Interface ("OCCI") is an extensible API for managing Cloud Infrastructure Services (Infrastructure as a Service).

The following reflects the general requirements collected through the specifications of use cases. RFC 2119 requirements levels are used throughout.

Technical specification

Entry Point

The API has a single entry point in the form of a URI e.g. http://api.example.com, http://api.example.com/occi, http://example.com, etc.

Doing a HTTP GET on this end point will return a collection of all resources to which the user has access, in the default rendering format (unless overridden using HTTP Content Negotiation by setting the Accept: header).

This collection should include:

  • Descriptions in a suitable format (e.g. OVF)
  • Links to operations (e.g. start, stop, restart)
  • Links to other resources
  • Tags/categories for logical grouping of resources

Central entity

The central entity is a "resource" which can represent a server, network device, storage device, etc. These resources should be bound by SLA so that the concern of whether or not they are physical or virtual is allayed by the SLAs guarantees.

A request to an individual resource will return a representation of the resource in a supported format requested in the HTTP Accept: header, or the default format if none are specified.

Identifiers

Every resource must have an immutable identifier that is globally unique. Implementations that do not allocate IDs from a sequence/register should allocate an immutable Type 4 UUID (e.g. 90a3492b-c17a-44f1-8c5f-8dfcc5603c9b) on creation. This allows any actor to safely generate an identifier without revealing any information about the system (such as the number of resources managed or their location). It should be possible to migrate resources between implementations without having to rewrite identifiers and without risk of clashes. Resources can be associated with an arbitrary number of other resources (including resources of the same type - for example a logical storage volume backing onto a physical storage device) using links. These links may have attributes, such as local identifiers for storage and network devices (e.g. sda or eth0).

CRUD Operations

Create, Retrieve, Update and Delete (CRUD) operations map to HTTP verbs POST, GET, PUT and DELETE respectively:
Create
Construct a document representing the resource in a supported format and submit it via HTTP POST to the appropriate collection (e.g. /compute, /network or /storage).
Retrieve
Make a HTTP GET request to a specific resource (e.g. /compute/id) or a collection (e.g. /compute). The search extension allows results to be limited to one or more matching resources.
Update
Retrieve the resource(s) to be updated, make the required changes and submit them with a HTTP PUT.
Delete
Make a HTTP DELETE request to the URL of the resource.

Meta Model

Nouns Verbs and Attributes

Atom is only used where multiple resources need to be represented in a single HTTP message

OCCI relies on HTTP and Atom as meta-models for individual resources and collections of resources respectively.

  • Associations between OCCI resources and to other generic resources (e.g. screenshots, descriptors, etc.) are represented in Link: headers for HTTP and LINK elements for Atom.
  • Unique identifiers are represented in the URL for HTTP and ID element for Atom.
  • Resource age is represented by Last-Modified: headers for HTTP and UPDATED elements for Atom.
  • Resource versioning uses ETags in both instances.

Descriptor format

An earlier, more complex wire protocol discussion has been moved to the WireProtocol page.

Compliant implementations must render resources in the following formats depending on the content type requested by the client.

text/plain (.txt)

type compute
cores 8
cpu 3 Ghz
memory 16 Gb

application/json (.json)

{
  "type": "compute"
  "cores": 8,
  "cpu": "3 Ghz",
  "memory": "16 Gb"
}

application/xml (.xml)

<occi>
  <type>compute</type>
  <cores>8</cores>
  <cpu>3 Ghz</cpu>
  <memory>16 Gb</memory>
</occi>

Collection format

Collections of resources must be rendered as Atom with the requested content type embedded in the CONTENT element:

<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:occi="http://purl.org/occi">
 
<title>Acme Cloud</title>
<link href="http://example.org/" rel="self"/>
<updated>2009-12-31T23:59:59Z</updated>
<author><name>Acme, Inc.</name></author>
<id>urn:uuid:1fddbd00-ce7a-4b64-a71c-3dd14936d1d0</id>
 
<entry>
  <title>Example Virtual Machine</title>
  <id>urn:uuid:d8935668-0862-41c9-a53d-400d781c50e3</id>
  <updated>2009-12-31T23:59:59Z</updated>
  <content type="application/occi+xml">
    <occi:resource>
      <occi:type>compute</occi:type>
      <occi:cores>8</occi:cores>
      <occi:cpu>3 Ghz</occi:cpu>
      <occi:memory>16 Gb</occi:memory>
    </occi:resource>
  </content>
</entry>
 
</feed>

Security

Authentication

For maximum compatibility OCCI relies on HTTP for security, maintaining a registry of supported authentication mechanisms.

Resources should be transparently authenticated such that they can use OCCI for introspection (e.g. a virtual machine could connect to OCCI to discover application configuration parameters, SSH authorized_keys, etc.). Authentication must be transparent and could be based on MAC address, IP address, interface, etc.

Authorisation

Fine-grained security prevents users from viewing and/or modifying resources they are not specifically granted access to, thus providing for multi-tenant deployments at a single entry point. Individual verbs can be restricted based on functional role - for example a disaster recovery operator may only have permission to start a virtual machine at a remote site.

Confidentiality & Integrity

Confidentiality and integrity are delivered by the SSL/TLS tunnel and/or XML digital signatures and encryption. All implementations should implement SSL/TLS security and may also implement XML digital signatures and/or encryption for out-of-band requests (e.g. smtp interfaces), billing reports, etc.

Extensions

Internet media type

The Internet media (MIME) types for the OCCI descriptor format are application/occi+xml, application/occi+json and application/occi+text.

Future versions of the specification which are not backwards compatible should embed the version so as to avoid having separate entry points for each version (e.g. application/occi2+xml)

Registries

States

An updatable registry shall be maintained of states (e.g. stopped, active) and transitions (e.g. start, stop, restart).

XML Namespace

The http://purl.org/occi domain has been allocated for any OCCI related namespace requirements (Contact: Sam Johnston for write access to the domain)

Glossary

OCCI
The Open Cloud Computing Interface

Acknowledgements

 



Versions Associations Attachments Back Links  
Version Version Comment Created By
Version 121 linking to nouns verbs and attributes page Andy Edmonds - 06/08/2009
Version 120 Andy Edmonds - 06/05/2009
Version 119 Moving Extensions to its own page Andy Edmonds - 06/05/2009
Version 118 clarified CRUD operations Sam Johnston - 06/03/2009
Version 117 clarified individual requests vs collections Sam Johnston - 06/03/2009
Version 116 expanded on links Sam Johnston - 06/03/2009
Version 115 Sam Johnston - 06/03/2009
Version 114 added application/occi+text Sam Johnston - 06/03/2009
Version 113 expanded on identifiers - don't have to be uuids (e.g. Amazon AMIs). Sam Johnston - 06/03/2009
Version 112 added occi namespaces per discussion with andy Sam Johnston - 05/26/2009
Version 111 separation of descriptors and collections Sam Johnston - 05/26/2009
Version 110 Richard Davies - 05/11/2009
Version 109 Richard Davies - 05/06/2009
Version 108 minor edit Andy Edmonds - 04/23/2009
Version 107 move WireProtocol to separate page Sam Johnston - 04/20/2009
Version 106 Thijs Metsch - 04/20/2009
Version 105 +json mime type Sam Johnston - 04/19/2009
Version 104 added link to GData XML->JSON info Sam Johnston - 04/19/2009
Version 103 fix link Sam Johnston - 04/19/2009
Version 102 added JSON example Sam Johnston - 04/19/2009
Version 101 tweaks Sam Johnston - 04/18/2009
Version 100 fixed links in examples Sam Johnston - 04/18/2009
Version 99 tweak Sam Johnston - 04/18/2009
Version 98 split text/plain into single/multiple objects Sam Johnston - 04/18/2009
Version 97 added json placeholder Sam Johnston - 04/18/2009
Version 96 word wrap examples Sam Johnston - 04/18/2009
Version 95 added link attributes Sam Johnston - 04/18/2009
Version 94 joined lines Sam Johnston - 04/18/2009
Version 93 moved from 2 character extensions Sam Johnston - 04/18/2009
Version 92 updated example Sam Johnston - 04/18/2009
Version 91 Sam Johnston - 04/18/2009
Version 90 s/content/link/ Sam Johnston - 04/18/2009
Version 89 Sam Johnston - 04/18/2009
Version 88 support introspection. Sam Johnston - 04/18/2009
Version 87 state updates Sam Johnston - 04/18/2009
Version 86 Chris Webb - 04/18/2009
Version 85 Chris Webb - 04/18/2009
Version 84 rm xml based Sam Johnston - 04/18/2009
Version 83 +registry Sam Johnston - 04/18/2009
Version 82 "links" terminology Sam Johnston - 04/18/2009
Version 81 +storage management Sam Johnston - 04/18/2009
Version 80 +network management (basic network management functionality). Sam Johnston - 04/17/2009
Version 79 Added workspace section. Thijs Metsch - 04/17/2009
Version 78 +elastichosts Sam Johnston - 04/17/2009
Version 77 added some acknowledgements Sam Johnston - 04/17/2009
Version 76 added {noun{verb{attribute}}} vector notion Andy Edmonds - 04/17/2009
Version 75 minor formatting Andy Edmonds - 04/17/2009
Version 74 added some design principles from mail discussions Andy Edmonds - 04/17/2009
Version 73 removal of physical/virtual in favour of SLA guarantees Andy Edmonds - 04/17/2009
Version 72 updated plain/text to tinydns-data format as discussed Sam Johnston - 04/17/2009
Version 71 updated text file format per thread Sam Johnston - 04/17/2009
Version 70 added attribute search, needs work Sam Johnston - 04/16/2009
Version 69 added mc extension to text/plain example Sam Johnston - 04/16/2009
Version 68 INI file format Sam Johnston - 04/16/2009
Version 67 tuned text/plain Sam Johnston - 04/16/2009
Version 66 headings Sam Johnston - 04/16/2009
Version 65 added text/plain example Sam Johnston - 04/16/2009
Version 64 added authorisation, confidentiality & integrity Sam Johnston - 04/16/2009
Version 63 defined category searches Sam Johnston - 04/15/2009
Version 62 s/bulk transfer/file management/ (generalise) Sam Johnston - 04/15/2009
Version 61 Andy Edmonds - 04/14/2009
Version 60 moved features to API requirements page Andy Edmonds - 04/14/2009
Version 59 moved content to requirements page Andy Edmonds - 04/14/2009
Version 58 elaborated on performance monitoring (PM) section Andy Edmonds - 04/14/2009
Version 57 refinement of central entity Andy Edmonds - 04/14/2009
Version 56 defining central entity Sam Johnston - 04/14/2009
Version 55 minor edit Andy Edmonds - 04/14/2009
Version 54 Added in sections for general api and model requirements Andy Edmonds - 04/14/2009
Version 53 added associations Sam Johnston - 04/13/2009
Version 52 added associations Sam Johnston - 04/13/2009
Version 51 +memory counter Sam Johnston - 04/13/2009
Version 50 Sam Johnston - 04/13/2009
Version 49 extension shortcuts Sam Johnston - 04/13/2009
Version 48 Sam Johnston - 04/13/2009
Version 47 +perfmon Sam Johnston - 04/13/2009
Version 46 added MC namespace and state Sam Johnston - 04/13/2009
Version 45 Sam Johnston - 04/13/2009
Version 44 added useful links Sam Johnston - 04/13/2009
Version 43 +titles, suspend Sam Johnston - 04/13/2009
Version 42 versioned open namespace uris Sam Johnston - 04/13/2009
Version 41 added link actuator examples Sam Johnston - 04/13/2009
Version 40 HTTP is monimum common standard Sam Johnston - 04/13/2009
Version 39 +HTTP Sam Johnston - 04/13/2009
Version 38 RFC2119 requirement levels Sam Johnston - 04/13/2009
Version 37 legacy (browser) support Sam Johnston - 04/13/2009
Version 36 +newsreader support Sam Johnston - 04/13/2009
Version 35 +state machine example Sam Johnston - 04/13/2009
Version 34 +actuator url formats Sam Johnston - 04/13/2009
Version 33 +state machine Sam Johnston - 04/13/2009
Version 32 entry point Sam Johnston - 04/13/2009
Version 31 added state machine information Sam Johnston - 04/13/2009
Version 30 +WebDAV Sam Johnston - 04/13/2009
Version 29 Sam Johnston - 04/13/2009
Version 28 fleshed out features Sam Johnston - 04/13/2009
Version 27 versioning fixed Sam Johnston - 04/13/2009
Version 26 explained rsync Sam Johnston - 04/13/2009
Version 25 added example Sam Johnston - 04/13/2009
Version 24 +technical specification Sam Johnston - 04/13/2009
Version 23 removed unused headers Sam Johnston - 04/13/2009
Version 22 Sam Johnston - 04/13/2009
Version 21 +glossary Sam Johnston - 04/13/2009
Version 20 explained machine control extension Sam Johnston - 04/13/2009
Version 19 UUIDs Sam Johnston - 04/13/2009
Version 18 clarify for delete Sam Johnston - 04/13/2009
Version 17 CRUD operations Sam Johnston - 04/13/2009
Version 16 Sam Johnston - 04/13/2009
Version 15 +full text search Sam Johnston - 04/13/2009
Version 14 added search, machine control extensions Sam Johnston - 04/13/2009
Version 13 Sam Johnston - 04/13/2009
Version 12 core vs extensions Sam Johnston - 04/13/2009
Version 11 content negotiation Sam Johnston - 04/13/2009
Version 10 atom Sam Johnston - 04/13/2009
Version 9 added proposed mime type Sam Johnston - 04/13/2009
Version 8 occi purl domain allocated Sam Johnston - 04/13/2009
Version 7 +naming Sam Johnston - 04/13/2009
Version 6 +security Sam Johnston - 04/13/2009
Version 5 started feature list Sam Johnston - 04/13/2009
Version 4 one-liner Sam Johnston - 04/13/2009
Version 3 entry point Sam Johnston - 04/13/2009
Version 2 Ignacio M. Llorente - 04/10/2009
Version 1 Ignacio M. Llorente - 04/10/2009



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/APIDesign at Fri, 04 Nov 2022 20:07:44 GMT