Ejemplo n.º 1
0
 def wait_for_created_bay(self, bay_id, delete_on_error=True):
     try:
         utils.wait_for_condition(lambda: self.does_bay_exist(bay_id), 10,
                                  1800)
     except Exception:
         # In error state.  Clean up the bay id if desired
         self.LOG.error('Bay %s entered an exception state.', bay_id)
         if delete_on_error:
             self.LOG.error('We will attempt to delete bays now.')
             self.delete_bay(bay_id)
             self.wait_for_bay_to_delete(bay_id)
         raise
Ejemplo n.º 2
0
 def wait_for_created_cluster(self, cluster_id, delete_on_error=True):
     try:
         utils.wait_for_condition(
             lambda: self.does_cluster_exist(cluster_id), 10, 3600)
     except Exception:
         # In error state.  Clean up the cluster id if desired
         self.LOG.error('Cluster %s entered an exception state.',
                        cluster_id)
         if delete_on_error:
             self.LOG.error('We will attempt to delete clusters now.')
             self.delete_cluster(cluster_id)
             self.wait_for_cluster_to_delete(cluster_id)
         raise
Ejemplo n.º 3
0
 def wait_for_final_state(self, cluster_id):
     utils.wait_for_condition(
         lambda: self.is_cluster_in_final_state(cluster_id), 10, 3600)
Ejemplo n.º 4
0
 def wait_for_cluster_to_delete(self, cluster_id):
     utils.wait_for_condition(
         lambda: self.does_cluster_not_exist(cluster_id), 10, 600)
Ejemplo n.º 5
0
 def wait_for_final_state(self, bay_id):
     utils.wait_for_condition(lambda: self.is_bay_in_final_state(bay_id),
                              10, 1800)
Ejemplo n.º 6
0
 def wait_for_bay_to_delete(self, bay_id):
     utils.wait_for_condition(lambda: self.does_bay_not_exist(bay_id), 10,
                              600)