Esempio n. 1
0
 def solve_constraints(self):
     params = solve_constraints(self.config.constraints)
     if self.config.image is not None:
         params['image_id'] = self.config.image
     else:
         params['os_code'] = IMAGE_MAP[self.config.series]
     params['domain'] = self.config.domain
     params['hourly'] = True
     params['nic_speed'] = 100  # Highest speed on the free side.
     return params
Esempio n. 2
0
 def solve_constraints(self):
     params = solve_constraints(self.config.constraints)
     if self.config.image is not None:
         params['image_id'] = self.config.image
     else:
         params['os_code'] = IMAGE_MAP[self.config.series]
     params['domain'] = self.config.domain
     params['hourly'] = True
     params['nic_speed'] = 100  # Highest speed on the free side.
     return params
 def test_constraint_solving(self):
     for constraints, solution in self.cases:
         self.assertEqual(solve_constraints(constraints), solution)
Esempio n. 4
0
 def test_constraint_solving(self):
     for constraints, solution in self.cases:
         self.assertEqual(solve_constraints(constraints), solution)