Commit 348c390e by Szabolcs Gelencser

Fix logging of sync instance operation call, rr eadable_state

parent a1d135bf
...@@ -111,10 +111,10 @@ class Operation(object): ...@@ -111,10 +111,10 @@ class Operation(object):
* user: The User invoking the operation. If this argument is not * user: The User invoking the operation. If this argument is not
present, it'll be provided with a default value of None. present, it'll be provided with a default value of None.
""" """
allargs, auxargs = self.__prelude(request, kwargs)
logger.info("%s called (synchronously) on %s with the following " logger.info("%s called (synchronously) on %s with the following "
"parameters: %r", self.__class__.__name__, self.subject, "parameters: %r", self.__class__.__name__, self.subject,
kwargs) kwargs)
allargs, auxargs = self.__prelude(request, kwargs)
return self._exec_op(request, allargs, auxargs) return self._exec_op(request, allargs, auxargs)
def check_precond(self): def check_precond(self):
......
...@@ -1256,7 +1256,7 @@ def vm_activity(request, pk): ...@@ -1256,7 +1256,7 @@ def vm_activity(request, pk):
# activities = activities[:10] # activities = activities[:10]
response['connect_uri'] = instance.get_connect_uri() response['connect_uri'] = instance.get_connect_uri()
response['human_readable_status'] = '#TODO' #instance.get_status_display() response['human_readable_status'] = instance.get_status_display()
response['status'] = instance.status response['status'] = instance.status
response['icon'] = instance.get_status_icon() response['icon'] = instance.get_status_icon()
latest = instance.get_latest_activity_in_progress() latest = instance.get_latest_activity_in_progress()
......
...@@ -819,7 +819,7 @@ class Instance(OperatedMixin, TimeStampedModel): ...@@ -819,7 +819,7 @@ class Instance(OperatedMixin, TimeStampedModel):
def get_status_display(self): def get_status_display(self):
if self.status in self.STATUS: if self.status in self.STATUS:
return self.STATUS[self.status] return unicode(self.STATUS[self.status])
return self.status return self.status
def get_activities(self, user=None): def get_activities(self, user=None):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment