Revision 4342e89b lib/bootstrap.py

b/lib/bootstrap.py
105 105
                             (result.cmd, result.exit_code, result.output))
106 106

  
107 107

  
108
def InitCluster(cluster_name, hypervisor_type, mac_prefix, def_bridge,
108
def InitCluster(cluster_name, mac_prefix, def_bridge,
109 109
                master_netdev, file_storage_dir,
110 110
                secondary_ip=None,
111 111
                vg_name=None, beparams=None, hvparams=None,
......
116 116
  if config.ConfigWriter.IsCluster():
117 117
    raise errors.OpPrereqError("Cluster is already initialised")
118 118

  
119
  if hypervisor_type == constants.HT_XEN_HVM:
120
    if not os.path.exists(constants.VNC_PASSWORD_FILE):
121
      raise errors.OpPrereqError("Please prepare the cluster VNC"
122
                                 "password file %s" %
123
                                 constants.VNC_PASSWORD_FILE)
124

  
125 119
  hostname = utils.HostInfo()
126 120

  
127 121
  if hostname.ip.startswith("127."):
......
181 175
  if not re.match("^[0-9a-z]{2}:[0-9a-z]{2}:[0-9a-z]{2}$", mac_prefix):
182 176
    raise errors.OpPrereqError("Invalid mac prefix given '%s'" % mac_prefix)
183 177

  
184
  if hypervisor_type not in constants.HYPER_TYPES:
185
    raise errors.OpPrereqError("Invalid hypervisor type given '%s'" %
186
                               hypervisor_type)
187

  
188 178
  result = utils.RunCmd(["ip", "link", "show", "dev", master_netdev])
189 179
  if result.failed:
190 180
    raise errors.OpPrereqError("Invalid master netdev given (%s): '%s'" %
......
219 209
    volume_group_name=vg_name,
220 210
    default_bridge=def_bridge,
221 211
    tcpudp_port_pool=set(),
222
    hypervisor=hypervisor_type,
223 212
    master_node=hostname.name,
224 213
    master_ip=clustername.ip,
225 214
    master_netdev=master_netdev,

Also available in: Unified diff