Skip to content

Instantly share code, notes, and snippets.

@xgerman
Created April 24, 2015 21:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save xgerman/8daed3f344887fed4697 to your computer and use it in GitHub Desktop.
Save xgerman/8daed3f344887fed4697 to your computer and use it in GitHub Desktop.
def test_get_default_pool(self):
pool_dict = {'protocol': constants.PROTOCOL_HTTP, 'name': 'pool1',
'description': 'desc1',
'lb_algorithm': constants.LB_ALGORITHM_ROUND_ROBIN,
'enabled': True, 'operating_status': constants.ONLINE}
listener = self.listener_repo.create(
self.session, protocol=constants.PROTOCOL_HTTP, protocol_port=80,
enabled=True, provisioning_status=constants.ACTIVE,
operating_status=constants.ONLINE)
repos = repo.Repositories()
pool = repos.create_pool_on_listener(self.session, listener.id,
pool_dict)
new_pool = self.pool_repo.get(self.session, id=pool.id)
self.assertIsInstance(new_pool, models.Pool)
self.assertIsNotNone(new_pool.listener.default_pool)
self.assertIsInstance(new_pool.listener.default_pool, models.Pool)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment