X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=juju%2Fmachine.py;h=44560bfd8305838907da15a2261bd78d95bb6ea8;hb=e2a3f01e7bb983ac3cd8eb24117e0d4208b40cc9;hp=04abc3b9d8ac64d525d936353995ae1099850498;hpb=c82b09f55dddef7a72885713bcfd272af479fb5a;p=osm%2FN2VC.git diff --git a/juju/machine.py b/juju/machine.py index 04abc3b..44560bf 100644 --- a/juju/machine.py +++ b/juju/machine.py @@ -10,6 +10,8 @@ class Machine(model.ModelEntity): 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) @@ -17,7 +19,9 @@ class Machine(model.ModelEntity): 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):