Advertisement
Guest User

OCCI Category JSON rendering suggestion (FF) v6

a guest
Apr 3rd, 2012
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. GET /-/
  2. Content-Type: application/occi-category+json
  3. {
  4.     "kinds": [
  5.         {
  6.             "term": "compute",
  7.             "scheme": "http://schemas.ogf.org/occi/infrastructure#",
  8.             "title": "Compute Resource",
  9.             "related": [
  10.                 "http://schemas.ogf.org/occi/core#resource"
  11.             ],
  12.             "attributes": {
  13.                 "occi": {
  14.                     "infrastructure": {
  15.                         "compute": {
  16.                             "architecture": {
  17.                                 "mutable": true,
  18.                                 "required": false,
  19.                                 "type": {
  20.                                     "string": {
  21.                                         "pattern": "x86|x64"
  22.                                     }
  23.                                 },
  24.                                 "default": "x86"
  25.                             },
  26.                             "cores": {
  27.                                 "mutable": true,
  28.                                 "required": false,
  29.                                 "type": {
  30.                                     "number": {
  31.                                         "minimum": 1,
  32.                                         "maximum": 4
  33.                                     }
  34.                                 },
  35.                                 "default": 1
  36.                             },
  37.                             "hostname": {
  38.                                 "mutable": true,
  39.                                 "required": false,
  40.                                 "type": {
  41.                                     "string": {
  42.                                         "minimum": 16,
  43.                                         "maximum": 256
  44.                                     }
  45.                                 }
  46.                             },
  47.                             "speed": {
  48.                                 "mutable": true,
  49.                                 "required": false,
  50.                                 "type": "number",
  51.                                 "default": "2.2"
  52.                             },
  53.                             "memory": {
  54.                                 "mutable": true,
  55.                                 "required": false,
  56.                                 "type": "number",
  57.                                 "default": "4"
  58.                             },
  59.                             "state": {
  60.                                 "mutable": false,
  61.                                 "required": false,
  62.                                 "type": "string",
  63.                                 "default": "inactive"
  64.                             }
  65.                         }
  66.                     }
  67.                 }
  68.             },
  69.             "actions": [
  70.                 "http://schemas.ogf.org/occi/infrastructure/compute/action#start",
  71.                 "http://schemas.ogf.org/occi/infrastructure/compute/action#stop",
  72.                 "http://schemas.ogf.org/occi/infrastructure/compute/action#restart",
  73.                 "http://schemas.ogf.org/occi/infrastructure/compute/action#suspend"
  74.             ],
  75.             "location": "/api/compute/"
  76.         }
  77.     ]
  78. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement