コード例 #1
0
ファイル: provider.py プロジェクト: odyssey4me/nodepool
 def delete_server(self, *args, **kwargs):
     if self.times_to_fail_delete is None:
         raise exceptions.ServerDeleteException("Test fail server delete.")
     if self.times_failed_delete < self.times_to_fail_delete:
         self.times_failed_delete += 1
         raise exceptions.ServerDeleteException("Test fail server delete.")
     else:
         self.delete_success = True
         return super(FakeLaunchAndDeleteFailCloud,
                      self).delete_server(*args, **kwargs)
コード例 #2
0
ファイル: provider.py プロジェクト: odyssey4me/nodepool
 def wait_for_server(self, **kwargs):
     if self.times_to_fail_launch is None:
         raise Exception("Test fail server launch.")
     if self.times_failed_launch < self.times_to_fail_launch:
         self.times_failed_launch += 1
         raise exceptions.ServerDeleteException("Test fail server launch.")
     else:
         self.launch_success = True
         return super(FakeLaunchAndDeleteFailCloud,
                      self).wait_for_server(**kwargs)