Beispiel #1
0
 def status(self, uuids):
     """
     Get the status of the agent.
     Relies on heartbeat.
     @param uuids: A list of uuids.
     @type uuids: list
     @return: {}
     """
     rest = Rest()
     path = '/agenthub/agent/%s/' % uuids[0]
     reply = rest.get(path)
     return reply[1]
Beispiel #2
0
 def status(self, uuids):
     """
     Get the status of the agent.
     Relies on heartbeat.
     @param uuids: A list of uuids.
     @type uuids: list
     @return: {}
     """
     rest = Rest()
     result = {}
     for uuid in uuids:
         path = '/agenthub/agent/%s/' % uuid
         status, body = rest.get(path)
         if status == 200:
             result[uuid] = body
         else:
             raise Exception('Status Failed')
     return result
Beispiel #3
0
 def status(cls, uuids):
     """
     Get the status of the agent.
     Relies on heartbeat.
     @param uuids: A list of uuids.
     @type uuids: list
     @return: {}
     """
     rest = Rest()
     result = {}
     for uuid in uuids:
         path = '/agenthub/agent/%s/' % uuid
         status, body = rest.get(path)
         if status == 200:
             result[uuid] = body
         else:
             raise Exception('Status Failed')
     return result