Comment 0 for bug 1582188

Revision history for this message
Sam Betts (sambetts) wrote :

We are adding pluggable network interfaces to Ironic, these interfaces will be configurable per Ironic node, this means that different nodes might have different ways of handling their network interfaces.

Currently we use an Ironic port update to assign neutron ports to Ironic ports using their extra field, doing the mapping this way may not work for a third party network interface implementation.

To solve this problem I propose to add 2 two new API endpoints interface-attach and interface-detach:

POST v1/nodes/<node_id>/interface-attach
POST v1/nodes/<node_id>/interface-detach

These API end points will take via a POST body, a JSON representation of a generic VIF object. Making it generic allows for non-neutron based implementations to use this API. This VIF object will be passed to new functions in the pluggable network interfaces:

def interface-attach(self, vif):
    ...

def interface-detach(self, vif):
    ...

The network interface can use these functions to handle attaching the vif to the Ironic node in which ever way it needs to for its implementation, this may be adding a field to the Ironic port as with the existing implementation, or it might be different.