This info is not used by Ganeti and therefore is removed.
Signed-off-by: Dimitris Aragiorgis <[email protected]>
---
doc/hooks.rst | 2 +-
lib/cmdlib.py | 3 +--
lib/network.py | 2 --
lib/objects.py | 7 +++----
4 files changed, 5 insertions(+), 9 deletions(-)
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 bb1e01d..1dad3c7 100644
--- a/lib/cmdlib.py
+++ b/lib/cmdlib.py
@@ -16236,8 +16236,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 6c6c794..9b058df 100644
--- a/lib/objects.py
+++ b/lib/objects.py
@@ -2028,12 +2028,10 @@ class Network(TaggableObject):
"name",
"serial_no",
"mac_prefix",
- "family",
"network",
"network6",
"gateway",
"gateway6",
- "size",
"reservations",
"ext_reservations",
] + _TIMESTAMPS + _UUID
@@ -2048,7 +2046,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:
@@ -2068,11 +2065,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
--
1.7.10.4