Commit 3d63de0c authored by Antoine Millet's avatar Antoine Millet

Added execute client handler method.

parent a393864c
......@@ -143,6 +143,20 @@ class ClientHandler(OnlineCCHandler):
def resume(self, query):
self._vm_action(query, 'resume_vm')
def execute(self, query, command):
query += '&hv'
query = TqlQuery(query)
hypervisors = query.filter(list(self._server.iterrole('hypervisor')),
key=lambda o,n: o.get_tags([n]).get(n))
outputs = []
for hv in hypervisors:
outputs.append('execute_command', command))
return outputs
class AuthenticationError(Exception):
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 to comment