Commit 0007f3ab authored by Andrea Spadaccini's avatar Andrea Spadaccini
Browse files

Add master_netmask to Cluster.UpgradeConfig

And also suppress pylint R0902 error about an object instance having
more than 20 attributes.
Signed-off-by: default avatarAndrea Spadaccini <>
Reviewed-by: default avatarGuido Trotter <>
parent 186c03b3
......@@ -26,13 +26,15 @@ pass to and from external parties.
# pylint: disable=E0203,W0201
# pylint: disable=E0203,W0201,R0902
# E0203: Access to member %r before its definition, since we use
# which doesn't explicitely initialise its members
# W0201: Attribute '%s' defined outside __init__
# R0902: Allow instances of these objects to have more than 20 attributes
import ConfigParser
import re
import copy
......@@ -41,6 +43,7 @@ from cStringIO import StringIO
from ganeti import errors
from ganeti import constants
from ganeti import netutils
from socket import AF_INET
......@@ -1189,6 +1192,10 @@ class Cluster(TaggableObject):
if self.primary_ip_family is None:
self.primary_ip_family = AF_INET
if self.master_netmask is None:
ipcls = netutils.IPAddress.GetClassFromIpFamily(self.primary_ip_family)
self.master_netmask = ipcls.iplen
if self.prealloc_wipe_disks is None:
self.prealloc_wipe_disks = False
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment