Skip to content
This repository has been archived by the owner on May 27, 2024. It is now read-only.

Commit

Permalink
Merge branch 'staging'
Browse files Browse the repository at this point in the history
  • Loading branch information
dweinholz committed Jul 31, 2023
2 parents 422e500 + 88dc665 commit 39161da
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
11 changes: 9 additions & 2 deletions VirtualMachineService/VirtualMachineHandler.py
Original file line number Diff line number Diff line change
Expand Up @@ -736,7 +736,9 @@ def get_server(self, openstack_id: str) -> VM:
return VM(status=self.NOT_FOUND)
return self.openstack_server_to_thrift_server(server=server)


except ResourceNotFound:
self.LOG.exception(f"Could not find server {id}")
return VM(status=self.NOT_FOUND)
except Exception:
self.LOG.exception(f"Could get server {openstack_id}")
return VM(status=self.CHECKING_STATUS)
Expand Down Expand Up @@ -1810,6 +1812,9 @@ def get_volume(self, volume_id):
self.LOG.exception(f"Could not find volume {id}")
return Volume(status=self.NOT_FOUND)

except ResourceNotFound:
self.LOG.exception(f"Could not find volume {id}")
return Volume(status=self.NOT_FOUND)
except Exception:
self.LOG.exception(f"Could not find volume {id}")
return Volume(status=self.CHECKING_STATUS)
Expand Down Expand Up @@ -1865,11 +1870,13 @@ def check_server_status(self, openstack_id: str) -> VM:
if not server:
self.LOG.exception(f"No Server with id {openstack_id} ")
return VM(status=self.NOT_FOUND)
except ResourceNotFound:
self.LOG.exception(f"Could not find server {id}")
return VM(status=self.NOT_FOUND)
except Exception:
self.LOG.exception(f"Could not get server {openstack_id} ")
return VM(status=self.CHECKING_STATUS)


serv = server.to_dict()

try:
Expand Down
4 changes: 2 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ openstacksdk ==1.3.1
deprecated ==1.2.14
Click==8.1.6
ansible==8.2.0
flake8==6.0.0
paramiko==3.2.0
flake8==6.1.0
paramiko==3.3.1
ruamel.yaml==0.17.32
pyvim==3.0.3
redis==4.6.0
Expand Down

0 comments on commit 39161da

Please sign in to comment.