Inline Link creation with JSON

Hi, The question was raised during today's confcall how to create an OCCI Link bound to an OCCI Resource at creation time. Example: POST /compute/ HTTP/1.0 { "resources": [ { "kind": "http://schemas.ogf.org/occi/infrastructure#compute", "attributes": { "occi": { "compute": { "speed": 2.33 } } } } ], "links": [ { "kind": "http://schemas.ogf.org/occi/infrastructure#networkinterface", "attributes": { "occi": { "networkinterface": { "interface": "eth0", "mac": "00:80:41:af:12:fd" } } }, "target": "/network/bc8516d0-0cc3-11e2-b9e9-6f750173de61", } ] } This would create a new Compute instance with a (new) NetworkInterface Link to an existing Network instance. When a single resource instance is specified in "resources" it is assumed to be the "source" of every Link in "links". regards, Ralf PS. Florian, please feel free to correct this if I got something wrong. DS.
participants (1)
-
Ralf Nyren