From d363a22e39eb88e787e75e80325e515ef15cee28 Mon Sep 17 00:00:00 2001 From: bmc-msft <41130664+bmc-msft@users.noreply.github.com> Date: Tue, 29 Sep 2020 09:57:52 -0400 Subject: [PATCH] fix deleting repro VMs (#36) --- src/api-service/__app__/onefuzzlib/azure/vm.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/api-service/__app__/onefuzzlib/azure/vm.py b/src/api-service/__app__/onefuzzlib/azure/vm.py index 5cd800991..d01034a6b 100644 --- a/src/api-service/__app__/onefuzzlib/azure/vm.py +++ b/src/api-service/__app__/onefuzzlib/azure/vm.py @@ -211,7 +211,9 @@ class VM(BaseModel): auth: Authentication def is_deleted(self) -> bool: - return has_components(str(self.name)) + # A VM is considered deleted once all of it's resources including disks, + # NICs, IPs, as well as the VM are deleted + return not has_components(str(self.name)) def exists(self) -> bool: return self.get() is not None