[occi-wg] OCCI Link question

Ralf Nyren ralf at nyren.net
Tue Nov 29 02:43:56 CST 2011


Hi Florian,

You can do this by specifying both the NetworkInterface Kind and the
IPNetworkInterface Mixin in the "category=" parameter.

E.g.:
Link: </network/722bb908-0c48-11e1-b25e-00163e211147>;
  rel="http://schemas.ogf.org/occi/core#link";
  category="http://schemas.ogf.org/occi/infrastructure#networkinterface
http://schemas.ogf.org/occi/infrastructure/networkinterface#ipnetworkinterface";
  occi.networkinterface.mac="00:11:22:33:44:55";
  occi.networkinterface.interface="eth0";
  occi.networkinterface.address="192.168.0.2";
  occi.networkinterface.gateway="192.168.0.1";
  occi.networkinterface.allocation="static";
  X-OCCI-Attribute: occi.compute.cores=2

This allows inline creation of Links with associated mixins.

The relevant ABNF from the HTTP spec would be:
...
[ ";" "category" "=" link-type
... ]
link-type = type-identifier *( 1*SP type-identifier )

regards, Ralf

On Tue, 29 Nov 2011 08:24:10 +0000, <florian.feldhaus at tu-dortmund.de>
wrote:
> Hi,
> 
> I have a question regarding inline creation of links. If I create an
OCCI
> compute object and want to link to a network, I use the OCCI
> Networkinterface Link to supply additional attributes like MAC or
> interface name. If I want to add an IP address as well, I need to use
the
> IPNetworkInterface Mixin. But the mixin has to be applied to the Link
and
> not the OCCI Compute object. Thus I have a problem adding it during
inline
> creation of the OCCI Compute object. Can anyone help me here? Adding the
> Mixin later on is not an option, as the Compute resource instantly gets
> deployed by the backend. It may be an option for the OCCI implementation
> to check for supplied attributes in the link and apply the corresponding
> Mixin automatically...
> 
> Here's an example:
> http://pastebin.com/Krw5KQEw
> 
> Cheers,
> Florian
> 
> _______________________________________________
> occi-wg mailing list
> occi-wg at ogf.org
> http://www.ogf.org/mailman/listinfo/occi-wg


More information about the occi-wg mailing list