Example #1
0
 def test_basic(self):
     sot = health_monitor.HealthMonitor()
     self.assertEqual('healthmonitor', sot.resource_key)
     self.assertEqual('healthmonitors', sot.resources_key)
     self.assertEqual('/lbaas/healthmonitors', sot.base_path)
     self.assertTrue(sot.allow_create)
     self.assertTrue(sot.allow_fetch)
     self.assertTrue(sot.allow_commit)
     self.assertTrue(sot.allow_delete)
     self.assertTrue(sot.allow_list)
Example #2
0
 def test_basic(self):
     sot = health_monitor.HealthMonitor()
     self.assertEqual('healthmonitor', sot.resource_key)
     self.assertEqual('healthmonitors', sot.resources_key)
     self.assertEqual('/lbaas/healthmonitors', sot.base_path)
     self.assertEqual('network', sot.service.service_type)
     self.assertTrue(sot.allow_create)
     self.assertTrue(sot.allow_get)
     self.assertTrue(sot.allow_update)
     self.assertTrue(sot.allow_delete)
     self.assertTrue(sot.allow_list)
 def test_make_it(self):
     sot = health_monitor.HealthMonitor(EXAMPLE)
     self.assertEqual(EXAMPLE['admin_state_up'], sot.admin_state_up)
     self.assertEqual(EXAMPLE['delay'], sot.delay)
     self.assertEqual(EXAMPLE['expected_codes'], sot.expected_codes)
     self.assertEqual(EXAMPLE['http_method'], sot.http_method)
     self.assertEqual(EXAMPLE['id'], sot.id)
     self.assertEqual(EXAMPLE['max_retries'], sot.max_retries)
     self.assertEqual(EXAMPLE['tenant_id'], sot.project_id)
     self.assertEqual(EXAMPLE['status'], sot.status)
     self.assertEqual(EXAMPLE['timeout'], sot.timeout)
     self.assertEqual(EXAMPLE['type'], sot.type)
     self.assertEqual(EXAMPLE['url_path'], sot.url_path)
Example #4
0
    def create_health_monitor(self, **data):
        return health_monitor.HealthMonitor(data).create(self.session)

        health_monitor.HealthMonitor(data).delete(self.session)
Example #5
0
 def get_health_monitor(self, **data):
     return health_monitor.HealthMonitor(data).get(self.session)
Example #6
0
 def update_health_monitor(self, **data):
     return health_monitor.HealthMonitor(data).update(self.session)
Example #7
0
 def delete_health_monitor(self, **data):
     health_monitor.HealthMonitor(data).delete(self.session)