Modify LUInstanceCreate to support networks
authorDimitris Aragiorgis <dimara@grnet.gr>
Mon, 4 Jun 2012 19:31:30 +0000 (22:31 +0300)
committerIustin Pop <iustin@google.com>
Tue, 20 Nov 2012 17:51:02 +0000 (18:51 +0100)
commite8e079f391a1e7c92ec0e6ddf721ecfa4340db24
treeecadf509c7e40535c18566720b6008c1d358d860
parentad4a9ae704a012aa2440a851c159e3b09ae8a5c2
Modify LUInstanceCreate to support networks

Implement backend support, to export the IP pool management
functionality to the clients. When the new NIC parameter 'network' is
given, the ippool management system is triggered.  If a NIC belongs to
a network, it inherits the netparams (mode, link) as its nicparams. If
a network is requested, then no 'mode' or 'link' should be
specified. Backwards compatibility is preserved, if 'network'
parameter is omitted.

Examples for IP pool management system:

--net 0:network=net1
  for an IPless NIC in a network

--net 0:ip=pool,network=net1
  for automatically generated IP inside the network

--net 0:ip=1.2.3.4,network=net1
  for specific IP inside the network

--net 0:network=none
  for IPless NIC with default nicparams

Examples for traditional assignment:

--net 0:ip=1.2.3.4,link=br100,mode=bridged
--net 0:ip=none,link=rt2,mode=routed
--net 0

Check for conflicting IPs to ensure IP uniqueness inside nodegroups.

IAllocator should be extended to become network aware. If an instance
has a NIC inside a network, then IAllocator must pick a node that its
nodegroup is already connected with that network.

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