IP pool related objects, opcodes and constants
authorDimitris Aragiorgis <dimara@grnet.gr>
Mon, 4 Jun 2012 13:50:42 +0000 (16:50 +0300)
committerIustin Pop <iustin@google.com>
Tue, 20 Nov 2012 17:50:53 +0000 (18:50 +0100)
commiteaa4c57c43148a196080d69953e652ad755505e2
tree003089658e8625637d28ef28f60bf28d0f7ac14b
parentedb5a1c84db63393ff8fc181673dbbca206a01ad
IP pool related objects, opcodes and constants

Config objects:
 * Introduce L{Network} with
  - IPv4 network field (mandatory)
  - IPv4 gateway, IPv6 (network/gateway), mac prefix, type (optional)
 * Modify existing config objects to support networks:
  - Add new slot 'network' to L{NIC} config object
  - Add new slot 'networks' to L{NodeGroup} config object

Opcodes:
 * Introduce new opcodes for networks
  - add/remove/modify/query/connect/disconnect.
 * In InstanceCreate/InstanceSetParams add conflicts_check option

Constants:
 * INIC_PARAM 'INIC_NETWORK'
 * NIC_IP_POOL for automaticaly obtain an IP from a pool
 * NETWORK_TYPE_PUBLIC/PRIVATE for network types

Checking of network_type handled by the opcode parameter validation.
Introduce _CheckCIDR*Notation() functions for network parameters
validation.

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/bootstrap.py
lib/cmdlib.py
lib/constants.py
lib/objects.py
lib/opcodes.py