Implement network/nodegroup mappings
authorDimitris Aragiorgis <dimara@grnet.gr>
Mon, 4 Jun 2012 18:08:36 +0000 (21:08 +0300)
committerIustin Pop <iustin@google.com>
Tue, 20 Nov 2012 17:50:59 +0000 (18:50 +0100)
commit0fbd466b7fec6efb505868e5ca65f1e3f9b53497
tree136f69fd56361c9e228c0de9bab6566d5c9c6041
parent1e0d3321f31ef0666a51b84f4b14252a50f69ae3
Implement network/nodegroup mappings

LUNetworkConnect() connects a network to a nodegroup and defines
its netparams (mode and link). Specifically:
 * Check if network already exists
 * Check if netparams are valid
 * Check if already connected to the same nodegroup
 * Produce errors if any conflicting IPs found
 * Update the 'networks' slot in NodeGroup config object
   with the network UUID and netparams requested. E.g.
   nodegroup_uuid {
     networks {
       network_uuid: {mode: 'bridged', link: 'br100'}
     }
   }

LUNetworkDisconnect() unmaps a network from a nodegroup:
 * Produce errors if an instance has a NIC with IP inside the network
 * Remove corresponding entry in 'networks' slot of NodeGroup object

Check for conflicting ips can be avoided with corresponding option.

Signed-off-by: Dimitris Aragiorgis <dimara@grnet.gr>
Reviewed-by: Iustin Pop <iustin@google.com>
lib/cmdlib.py