• Christos Stavrakakis's avatar
    cyclades: Use Ganeti NIC UUIDs · 1a4633ef
    Christos Stavrakakis authored
    Since Ganeti 2.8, it is supported to refer to devices (NICs and Disks)
    not only by their index but also by their name or UUID. This commit
    updates Synnefo to refer to devices by their name. Synnefo will set the
    name of the devices which will be a UUID. We do not use Ganeti's UUIDs
    because the UUID can not be known, until the NIC is created in the VM.
    
    Modify backend methods for connecting and removing a NIC from a VM, to
    not refer to NICs by index, but use the NICs backend_uuid. Also, set the
    name of the NIC to the backend_uuid, when creating a NIC.
    
    API relevant methods, will create a NIC object in BUILDING state,
    instead of creating the NIC when the message arrives from the backend.
    
    Modify NetworkInterface model:
    * remove 'dirty' attribute since it is no longer needed
    * make index null, since when the NIC is in building state, the index
      can not be known.
    * add property for getting the UUID of the NIC in the Ganeti backend.
    
    Fix relevant tests.
    1a4633ef
models.py 31.7 KB