async def destroy(self, force=False):
"""Remove this machine from the model.
+ Blocks until the machine is actually removed.
+
"""
facade = client.ClientFacade()
facade.connect(self.connection)
log.debug(
'Destroying machine %s', self.id)
- return await facade.DestroyMachines(force, [self.id])
+ await facade.DestroyMachines(force, [self.id])
+ return await self.model._wait(
+ 'machine', self.id, 'remove')
remove = destroy
def run(self, command, timeout=None):
:param int timeout: Time to wait before command is considered failed
"""
- pass
+ raise NotImplementedError()
async def set_annotations(self, annotations):
"""Set annotations on this machine.
:param str scp_opts: Additional options to the `scp` command
"""
- pass
+ raise NotImplementedError()
def ssh(
self, command, user=None, proxy=False, ssh_opts=None):
:param str ssh_opts: Additional options to the `ssh` command
"""
- pass
+ raise NotImplementedError()
def status_history(self, num=20, utc=False):
"""Get status history for this machine.
:param bool utc: Display time as UTC in RFC3339 format
"""
- pass
+ raise NotImplementedError()