@JunitTestCase()
def prepare_for_installation(self, **kwargs):
    super(Cluster, self).prepare_for_installation(**kwargs)
    self.nodes.wait_for_networking()
    self._set_hostnames_and_roles()
    if (self._high_availability_mode != consts.HighAvailabilityMode.NONE):
        self.set_host_roles(len(self.nodes.get_masters()), len(self.nodes.get_workers()))
    self.set_network_params(controller=self.nodes.controller)
    if (self._config.platform == consts.Platforms.NONE):
        self._configure_load_balancer()
        self.nodes.controller.set_dns_for_user_managed_network()
    elif (self._high_availability_mode == consts.HighAvailabilityMode.NONE):
        main_cidr = self.get_primary_machine_cidr()
        ip = Cluster.get_ip_for_single_node(self.api_client, self.id, main_cidr)
        self.nodes.controller.set_single_node_ip(ip)
        self.nodes.controller.set_dns(api_vip=ip, ingress_vip=ip)
    self.wait_for_ready_to_install()
    if self._ha_not_none():
        vips_info = self.__class__.get_vips_from_cluster(self.api_client, self.id)
        self.nodes.controller.set_dns(api_vip=vips_info['api_vip'], ingress_vip=vips_info['ingress_vip'])
@JunitTestCase()
def prepare_for_installation(self, **kwargs):
    super(Cluster, self).prepare_for_installation(**kwargs)
    self.nodes.wait_for_networking()
    self._set_hostnames_and_roles()
    if (self._high_availability_mode != consts.HighAvailabilityMode.NONE):
        self.set_host_roles(len(self.nodes.get_masters()), len(self.nodes.get_workers()))
    self.set_network_params(controller=self.nodes.controller)
    if (self._config.platform == consts.Platforms.NONE):
        self._configure_load_balancer()
        self.nodes.controller.set_dns_for_user_managed_network()
    elif (self._high_availability_mode == consts.HighAvailabilityMode.NONE):
        main_cidr = self.get_primary_machine_cidr()
        ip = Cluster.get_ip_for_single_node(self.api_client, self.id, main_cidr)
        self.nodes.controller.set_single_node_ip(ip)
        self.nodes.controller.set_dns(api_vip=ip, ingress_vip=ip)
    self.wait_for_ready_to_install()
    if self._ha_not_none():
        vips_info = self.__class__.get_vips_from_cluster(self.api_client, self.id)
        self.nodes.controller.set_dns(api_vip=vips_info['api_vip'], ingress_vip=vips_info['ingress_vip'])