def wait_for_write_image_to_disk(self, nodes_count: int = MINIMUM_NODES_TO_WAIT): utils.wait_till_at_least_one_host_is_in_stage( client=self.api_client, cluster_id=self.id, stages=[consts.HostsProgressStages.WRITE_IMAGE_TO_DISK, consts.HostsProgressStages.REBOOTING], nodes_count=nodes_count, )
def wait_for_at_least_one_host_to_boot_during_install(self, nodes_count: int = MINIMUM_NODES_TO_WAIT): utils.wait_till_at_least_one_host_is_in_stage( client=self.api_client, cluster_id=self.id, stages=[consts.HostsProgressStages.REBOOTING], nodes_count=nodes_count, )
def wait_for_non_bootstrap_masters_to_reach_joined_state_during_install( self): utils.wait_till_at_least_one_host_is_in_stage( client=self.api_client, cluster_id=self.id, stages=[consts.HostsProgressStages.JOINED], nodes_count=env_variables['num_masters'] - 1)
def wait_for_write_image_to_disk(self, nodes_count=1): utils.wait_till_at_least_one_host_is_in_stage( client=self.api_client, cluster_id=self.id, stages=[consts.HostsProgressStages.WRITE_IMAGE_TO_DISK], nodes_count=nodes_count, )
def wait_for_hosts_stage(self, stage: str, inclusive: bool = True): index = consts.all_host_stages.index(stage) utils.wait_till_at_least_one_host_is_in_stage( client=self.api_client, cluster_id=self.id, stages=consts.all_host_stages[index:] if inclusive else consts.all_host_stages[index + 1 :], nodes_count=self._config.nodes_count, )
def wait_for_non_bootstrap_masters_to_reach_joined_state_during_install(self, num_masters: int = None): num_masters = num_masters if num_masters is not None else self._config.masters_count utils.wait_till_at_least_one_host_is_in_stage( client=self.api_client, cluster_id=self.id, stages=[consts.HostsProgressStages.JOINED], nodes_count=num_masters - 1, )
def wait_for_hosts_configuring(self, nodes_count=env_variables['num_nodes']): stages = [ consts.HostsProgressStages.CONFIGURING, consts.HostsProgressStages.DONE ] utils.wait_till_at_least_one_host_is_in_stage(client=self.api_client, cluster_id=self.id, stages=stages, nodes_count=nodes_count)
def wait_for_hosts_passed_reboot(self, nodes_count=env_variables['num_nodes']): stages = [ consts.HostsProgressStages.REBOOTING, consts.HostsProgressStages.CONFIGURING, consts.HostsProgressStages.JOINED, consts.HostsProgressStages.WAIT_FOR_IGNITION, consts.HostsProgressStages.DONE ] utils.wait_till_at_least_one_host_is_in_stage(client=self.api_client, cluster_id=self.id, stages=stages, nodes_count=nodes_count)
def wait_for_one_host_to_boot_during_install(cluster_id, api_client): utils.wait_till_at_least_one_host_is_in_stage( client=api_client, cluster_id=cluster_id, stages=[consts.HostsProgressStages.REBOOTING])
def wait_for_hosts_done(self, nodes_count=env_variables['num_nodes']): utils.wait_till_at_least_one_host_is_in_stage( client=self.api_client, cluster_id=self.id, stages=[consts.HostsProgressStages.DONE], nodes_count=nodes_count)