X-Git-Url: https://osm.etsi.org/gitweb/?p=osm%2FN2VC.git;a=blobdiff_plain;f=n2vc%2Flibjuju.py;h=a6c1c42fd43cdbe06f4e4d517992c140facdda7e;hp=a79d00d8c8a46b56da6b1242a02a27612512f8c5;hb=c344117335d4ffbd06ef90ae8dce9cb3910165fb;hpb=f6e9b00b6f7cd35e45ace4c84b53fe8d12b2438c diff --git a/n2vc/libjuju.py b/n2vc/libjuju.py index a79d00d..a6c1c42 100644 --- a/n2vc/libjuju.py +++ b/n2vc/libjuju.py @@ -455,6 +455,7 @@ class Libjuju: nonce=params.nonce, machine_id=machine_id, proxy=self.api_proxy, + series=params.series, ) ) @@ -926,33 +927,6 @@ class Libjuju: machine = model.machines[machine_id] await machine.destroy(force=True) - # async def destroy_machine( - # self, model: Model, machine_id: str, total_timeout: float = 3600 - # ): - # """ - # Destroy machine - - # :param: model: Model object - # :param: machine_id: Machine id - # :param: total_timeout: Timeout in seconds - # """ - # machines = await model.get_machines() - # if machine_id in machines: - # machine = machines[machine_id] - # await machine.destroy(force=True) - # # max timeout - # end = time.time() + total_timeout - - # # wait for machine removal - # machines = await model.get_machines() - # while machine_id in machines and time.time() < end: - # self.log.debug("Waiting for machine {} is destroyed".format(machine_id)) - # await asyncio.sleep(0.5) - # machines = await model.get_machines() - # self.log.debug("Machine destroyed: {}".format(machine_id)) - # else: - # self.log.debug("Machine not found: {}".format(machine_id)) - async def configure_application( self, model_name: str, application_name: str, config: dict = None ):