Commit 2703f25a by Őry Máté

vm: refactor get_remote_queue_name

parent 78c88721
...@@ -127,6 +127,9 @@ class Node(TimeStampedModel): ...@@ -127,6 +127,9 @@ class Node(TimeStampedModel):
def online(self): def online(self):
return True return True
def get_remote_queue_name(self, queue_id):
return self.host.hostname + "." + queue_id
def __unicode__(self): def __unicode__(self):
return self.name return self.name
...@@ -549,7 +552,7 @@ class Instance(AclBase, VirtualMachineDescModel, TimeStampedModel): ...@@ -549,7 +552,7 @@ class Instance(AclBase, VirtualMachineDescModel, TimeStampedModel):
"""Get the remote worker queue name of this instance with the specified """Get the remote worker queue name of this instance with the specified
queue ID. queue ID.
""" """
return self.node.host.hostname + "." + queue_id return self.node.get_remote_queue_name(queue_id)
def renew(self, which='both'): def renew(self, which='both'):
"""Renew virtual machine instance leases. """Renew virtual machine instance leases.
......
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