X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=juju%2Fmachine.py;h=181c60cba69afdd22ebead61750a05c35245351a;hb=370083ea917098f0913c52d13294311783e33164;hp=4bc8ff6de0f5ce6045cc24f93e72eb22f510a7a7;hpb=596ccbe375a3a45e1625b798bb42da3df284ed09;p=osm%2FN2VC.git diff --git a/juju/machine.py b/juju/machine.py index 4bc8ff6..181c60c 100644 --- a/juju/machine.py +++ b/juju/machine.py @@ -1,4 +1,25 @@ -class Machine(object): +import logging + +from . import model +from .client import client + +log = logging.getLogger(__name__) + + +class Machine(model.ModelEntity): + async def destroy(self, force=False): + """Remove this machine from the model. + + """ + facade = client.ClientFacade() + facade.connect(self.connection) + + log.debug( + 'Destroying machine %s', self.id) + + return await facade.DestroyMachines(force, [self.id]) + remove = destroy + def run(self, command, timeout=None): """Run command on this machine.