コード例 #1
0
ファイル: pulpagent.py プロジェクト: ryanschneider/pulp
 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]
コード例 #2
0
ファイル: pulpagent.py プロジェクト: bartwo/pulp
 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
コード例 #3
0
ファイル: pulpagent.py プロジェクト: tomlanyon/pulp
 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