@@ -140,7 +140,7 @@ def start(self) -> Engine:
140140 if self .current_status == EngineStatus .RUNNING :
141141 logger .info (f"Engine { self .name } is already running." )
142142 return self
143- if self .current_status in (EngineStatus .DROPPING , EngineStatus . REPAIRING ):
143+ if self .current_status in (EngineStatus .DRAINING , ):
144144 raise ValueError (
145145 f"Unable to start engine { self .name } because it's "
146146 f"in { self .current_status .value .lower ()} state"
@@ -163,7 +163,7 @@ def stop(self) -> Engine:
163163 if self .current_status == EngineStatus .STOPPED :
164164 logger .info (f"Engine { self .name } is already stopped." )
165165 return self
166- if self .current_status in (EngineStatus .DROPPING , EngineStatus . REPAIRING ):
166+ if self .current_status in (EngineStatus .DRAINING , ):
167167 raise ValueError (
168168 f"Unable to stop engine { self .name } because it's "
169169 f"in { self .current_status .value .lower ()} state"
@@ -206,7 +206,7 @@ def update(
206206
207207 self .refresh ()
208208 self ._wait_for_start_stop ()
209- if self .current_status in (EngineStatus .DROPPING , EngineStatus . REPAIRING ):
209+ if self .current_status in (EngineStatus .DRAINING , ):
210210 raise ValueError (
211211 f"Unable to update engine { self .name } because it's "
212212 f"in { self .current_status .value .lower ()} state"
@@ -243,7 +243,7 @@ def update(
243243 def delete (self ) -> None :
244244 """Delete an engine."""
245245 self .refresh ()
246- if self .current_status in [EngineStatus .DROPPING , EngineStatus .DELETING ]:
246+ if self .current_status in [EngineStatus .DRAINING , EngineStatus .DELETING ]:
247247 return
248248 with self ._service ._connection .cursor () as c :
249249 c .execute (self .DROP_SQL .format (self .name ))
0 commit comments