commit 48616625d572668b0ce762ff47af871d1a84f55b
Author: Dimitris Aragiorgis <dimara@grnet.gr>
Date:   Mon Feb 11 14:42:36 2013 +0200

    Remove family and size from network objects
    
    This info is not used by Ganeti and therefore is removed.
    
    Signed-off-by: Dimitris Aragiorgis <dimara@grnet.gr>
    Reviewed-by: Guido Trotter <ultrotter@google.com>

diff --git a/doc/hooks.rst b/doc/hooks.rst
index 3f27953..5ccf935 100644
--- a/doc/hooks.rst
+++ b/doc/hooks.rst
@@ -286,7 +286,7 @@ INSTANCE_NAME, INSTANCE_PRIMARY, INSTANCE_SECONDARY,
 INSTANCE_OS_TYPE, INSTANCE_DISK_TEMPLATE, INSTANCE_MEMORY,
 INSTANCE_DISK_SIZES, INSTANCE_VCPUS, INSTANCE_NIC_COUNT,
 INSTANCE_NICn_IP, INSTANCE_NICn_BRIDGE, INSTANCE_NICn_MAC,
-INSTANCE_NICn_NETWORK, INSTANCE_NICn_NETWORK_FAMILY,
+INSTANCE_NICn_NETWORK,
 INSTANCE_NICn_NETWORK_UUID, INSTANCE_NICn_NETWORK_SUBNET,
 INSTANCE_NICn_NETWORK_GATEWAY, INSTANCE_NICn_NETWORK_SUBNET6,
 INSTANCE_NICn_NETWORK_GATEWAY6, INSTANCE_NICn_NETWORK_MAC_PREFIX,
diff --git a/lib/cmdlib.py b/lib/cmdlib.py
index 870402c..3704ec7 100644
--- a/lib/cmdlib.py
+++ b/lib/cmdlib.py
@@ -16242,8 +16242,7 @@ class LUNetworkAdd(LogicalUnit):
                            network6=self.op.network6,
                            gateway6=self.op.gateway6,
                            mac_prefix=self.op.mac_prefix,
-                           uuid=self.network_uuid,
-                           family=constants.IP4_VERSION)
+                           uuid=self.network_uuid)
     # Initialize the associated address pool
     try:
       pool = network.AddressPool.InitializeNetwork(nobj)
diff --git a/lib/network.py b/lib/network.py
index cc3bfd6..a1c51c5 100644
--- a/lib/network.py
+++ b/lib/network.py
@@ -123,14 +123,12 @@ class AddressPool(object):
     return (self.reservations | self.ext_reservations)
 
   def Validate(self):
-    assert self.net.family == 4
     assert len(self.reservations) == self._GetSize()
     assert len(self.ext_reservations) == self._GetSize()
     all_res = self.reservations & self.ext_reservations
     assert not all_res.any()
 
     if self.gateway is not None:
-      assert self.net.family == self.gateway.version
       assert self.gateway in self.network
 
     if self.network6 and self.gateway6:
diff --git a/lib/objects.py b/lib/objects.py
index bd4326c..de466c4 100644
--- a/lib/objects.py
+++ b/lib/objects.py
@@ -2035,12 +2035,10 @@ class Network(TaggableObject):
     "name",
     "serial_no",
     "mac_prefix",
-    "family",
     "network",
     "network6",
     "gateway",
     "gateway6",
-    "size",
     "reservations",
     "ext_reservations",
     ] + _TIMESTAMPS + _UUID
@@ -2055,7 +2053,6 @@ class Network(TaggableObject):
     result = {
       "%sNETWORK" % prefix: self.name,
       "%sNETWORK_UUID" % prefix: self.uuid,
-      "%sNETWORK_FAMILY" % prefix: str(self.family),
       "%sNETWORK_TAGS" % prefix: " ".join(self.tags),
     }
     if self.network:
@@ -2075,11 +2072,13 @@ class Network(TaggableObject):
   def FromDict(cls, val):
     """Custom function for networks.
 
-    Remove deprecated network_type. Still this info can be passed via tags.
+    Remove deprecated network_type and family.
 
     """
     if "network_type" in val:
       del val["network_type"]
+    if "family" in val:
+      del val["family"]
     obj = super(Network, cls).FromDict(val)
     return obj
 
diff --git a/src/Ganeti/Objects.hs b/src/Ganeti/Objects.hs
index d3f13df..51d166a 100644
--- a/src/Ganeti/Objects.hs
+++ b/src/Ganeti/Objects.hs
@@ -174,8 +174,6 @@ $(buildObject "Network" "network" $
   [ simpleField "name"             [t| NonEmptyString |]
   , optionalField $
     simpleField "mac_prefix"       [t| String |]
-  , optionalField $
-    simpleField "family"           [t| Int |]
   , simpleField "network"          [t| NonEmptyString |]
   , optionalField $
     simpleField "network6"         [t| String |]
@@ -184,8 +182,6 @@ $(buildObject "Network" "network" $
   , optionalField $
     simpleField "gateway6"         [t| String |]
   , optionalField $
-    simpleField "size"             [t| J.JSValue |]
-  , optionalField $
     simpleField "reservations"     [t| String |]
   , optionalField $
     simpleField "ext_reservations" [t| String |]
