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>
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,
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)
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:
"name",
"serial_no",
"mac_prefix",
- "family",
"network",
"network6",
"gateway",
"gateway6",
- "size",
"reservations",
"ext_reservations",
] + _TIMESTAMPS + _UUID
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:
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
[ simpleField "name" [t| NonEmptyString |]
, optionalField $
simpleField "mac_prefix" [t| String |]
- , optionalField $
- simpleField "family" [t| Int |]
, simpleField "network" [t| NonEmptyString |]
, optionalField $
simpleField "network6" [t| String |]
, optionalField $
simpleField "gateway6" [t| String |]
, optionalField $
- simpleField "size" [t| J.JSValue |]
- , optionalField $
simpleField "reservations" [t| String |]
, optionalField $
simpleField "ext_reservations" [t| String |]