From 288bb888195aea58b3cb3fc33d17abd70a93e5a0 Mon Sep 17 00:00:00 2001 From: taivop Date: Thu, 6 Oct 2016 12:19:06 +0200 Subject: [PATCH] #38 deletion works fix #43 --- scripts/py/deployer.py | 6 +++++- scripts/py/test_deployment.py | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/scripts/py/deployer.py b/scripts/py/deployer.py index 1a61233..c5bcfef 100644 --- a/scripts/py/deployer.py +++ b/scripts/py/deployer.py @@ -54,5 +54,9 @@ def deploy(self): def destroy(self): """Destroy the given resource group""" logging.info("Destroying resource group {}...".format(self.resource_group)) - self.client.resource_groups.delete(self.resource_group) + logging.info("Does it exist? {}".format( + self.client.resource_groups.check_existence(self.resource_group)) + ) + deletion_async_operation = self.client.resource_groups.delete(self.resource_group) + deletion_async_operation.wait() logging.info("Destroyed.") diff --git a/scripts/py/test_deployment.py b/scripts/py/test_deployment.py index 79c83f2..465fa18 100644 --- a/scripts/py/test_deployment.py +++ b/scripts/py/test_deployment.py @@ -9,7 +9,7 @@ # endregion # region ---- Parameters ---- -my_resource_group = 'azure-python-deployment-test' +my_resource_group = 'azure-python-deployment-test-4' my_pub_ssh_key_path = os.path.expanduser('~/.ssh/id_rsa.pub') template_path = "azure-templates/test_template.json" dns_label_prefix = Haikunator().haikunate()