Skip to content

Commit

Permalink
Merge pull request #339 from mshriver/fix-scvmm-refresh
Browse files Browse the repository at this point in the history
Update scvmm refresh to handle UNKNOWN state
  • Loading branch information
mshriver authored Oct 24, 2018
2 parents 10044da + 03e30a1 commit 0816cf4
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion wrapanapi/systems/scvmm.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,9 @@ def refresh(self, read_from_hyperv=True):
if "Error ID: 801" in str(error):
# Error ID 801 is a "not found" error
data = None
elif 'Error ID: 1730' in str(error):
self.logger.warning('Refresh called on a VM in a state not valid for refresh')
return None
else:
raise
if not data:
Expand Down Expand Up @@ -170,7 +173,7 @@ def suspend(self):
def delete(self):
self.logger.info("Deleting SCVMM VM %s", self._log_str)
self.ensure_state(VmState.STOPPED)
self._do_vm("Remove")
self._do_vm("Remove", params='-Force')
wait_for(
lambda: not self.exists, delay=5, timeout="3m",
message="vm {} to not exist".format(self._log_str)
Expand Down

0 comments on commit 0816cf4

Please sign in to comment.