Revision 0007f3ab

b/lib/objects.py
26 26

  
27 27
"""
28 28

  
29
# pylint: disable=E0203,W0201
29
# pylint: disable=E0203,W0201,R0902
30 30

  
31 31
# E0203: Access to member %r before its definition, since we use
32 32
# objects.py which doesn't explicitely initialise its members
33 33

  
34 34
# W0201: Attribute '%s' defined outside __init__
35 35

  
36
# R0902: Allow instances of these objects to have more than 20 attributes
37

  
36 38
import ConfigParser
37 39
import re
38 40
import copy
......
41 43

  
42 44
from ganeti import errors
43 45
from ganeti import constants
46
from ganeti import netutils
44 47

  
45 48
from socket import AF_INET
46 49

  
......
1189 1192
    if self.primary_ip_family is None:
1190 1193
      self.primary_ip_family = AF_INET
1191 1194

  
1195
    if self.master_netmask is None:
1196
      ipcls = netutils.IPAddress.GetClassFromIpFamily(self.primary_ip_family)
1197
      self.master_netmask = ipcls.iplen
1198

  
1192 1199
    if self.prealloc_wipe_disks is None:
1193 1200
      self.prealloc_wipe_disks = False
1194 1201

  

Also available in: Unified diff