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

Commit

Permalink
Merge pull request #376 from deNBI/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
dweinholz authored Jun 30, 2020
2 parents 7d0ac2a + 42032f1 commit 276a664
Show file tree
Hide file tree
Showing 5 changed files with 2,683 additions and 6,316 deletions.
13 changes: 10 additions & 3 deletions VirtualMachineService/VirtualMachineHandler.py
Original file line number Diff line number Diff line change
Expand Up @@ -602,10 +602,17 @@ def get_servers_by_ids(self, ids):
server_list.append(self.openstack_server_to_thrift_server(server))
return server_list

def check_server_task_state(self, openstackid):
def check_server_task_state(self, openstack_id):
self.logger.info("Checking Task State: {}".format(openstack_id))
try:
server = self.conn.get_server_by_id(openstackid)
return server["task_state"]
server = self.conn.get_server_by_id(openstack_id)
self.logger.info(server)
task_state = server["task_state"]
self.logger.info("Task State: {}".format(task_state))
if task_state:
return task_state
else:
return "No active task"
except:
return "No server or task_state found"

Expand Down
Loading

0 comments on commit 276a664

Please sign in to comment.