Exemple #1
0
 def models(self, limit=None):
     """
     Iterates over the class level variables and produces an agent
     model.  This is done so that we test endpoints in the extreme ranges.
     """
     generator = self.modelArguments(limit=limit)
     for (hostname, ip, port, cpus, ram, state, ram_allocation,
          cpu_allocation) in generator:
         agent = Agent()
         agent.hostname = hostname
         agent.remote_ip = ip
         agent.port = port
         agent.cpus = cpus
         agent.free_ram = agent.ram = ram
         agent.state = state
         agent.ram_allocation = ram_allocation
         agent.cpu_allocation = cpu_allocation
         yield agent
 def models(self, limit=None):
     """
     Iterates over the class level variables and produces an agent
     model.  This is done so that we test endpoints in the extreme ranges.
     """
     generator = self.modelArguments(limit=limit)
     for (hostname, ip, port, cpus, ram, state,
          ram_allocation, cpu_allocation) in generator:
         agent = Agent()
         agent.hostname = hostname
         agent.remote_ip = ip
         agent.port = port
         agent.cpus = cpus
         agent.free_ram = agent.ram = ram
         agent.state = state
         agent.ram_allocation = ram_allocation
         agent.cpu_allocation = cpu_allocation
         yield agent