def test_pool_health_monitor_create(self): form_data = {'type': 'PING', 'delay': '10', 'timeout': '10', 'max_retries': '10', 'admin_state_up': True } form_data_with_pool_id = { 'pool_id': 'abcdef-c3eb-4fee-9763-12de3338041e', 'type': 'PING', 'delay': '10', 'timeout': '10', 'max_retries': '10', 'admin_state_up': True} monitor = {'health_monitor': { 'id': 'abcdef-c3eb-4fee-9763-12de3338041e', 'type': 'PING', 'delay': '10', 'timeout': '10', 'max_retries': '10', 'admin_state_up': True}} monitor_id = {'health_monitor': { 'id': 'abcdef-c3eb-4fee-9763-12de3338041e'}} quantumclient.create_health_monitor({ 'health_monitor': form_data}).AndReturn(monitor) quantumclient.associate_health_monitor( form_data_with_pool_id['pool_id'], monitor_id) self.mox.ReplayAll() ret_val = api.lbaas.pool_health_monitor_create( self.request, **form_data_with_pool_id) self.assertIsInstance(ret_val, api.lbaas.PoolMonitor)
def test_pool_health_monitor_create(self): form_data = { 'type': 'PING', 'delay': '10', 'timeout': '10', 'max_retries': '10', 'http_method': 'GET', 'url_path': '/monitor', 'expected_codes': '200', 'admin_state_up': True } form_data_with_pool_id = { 'pool_id': 'abcdef-c3eb-4fee-9763-12de3338041e', 'type': 'PING', 'delay': '10', 'timeout': '10', 'max_retries': '10', 'http_method': 'GET', 'url_path': '/monitor', 'expected_codes': '200', 'admin_state_up': True } monitor = { 'health_monitor': { 'id': 'abcdef-c3eb-4fee-9763-12de3338041e', 'type': 'PING', 'delay': '10', 'timeout': '10', 'max_retries': '10', 'http_method': 'GET', 'url_path': '/monitor', 'expected_codes': '200', 'admin_state_up': True } } monitor_id = { 'health_monitor': { 'id': 'abcdef-c3eb-4fee-9763-12de3338041e' } } quantumclient.create_health_monitor({ 'health_monitor': form_data }).AndReturn(monitor) quantumclient.associate_health_monitor( form_data_with_pool_id['pool_id'], monitor_id) self.mox.ReplayAll() ret_val = api.lbaas.pool_health_monitor_create( self.request, **form_data_with_pool_id) self.assertIsInstance(ret_val, api.lbaas.PoolMonitor)
def test_pool_health_monitor_create(self): form_data = {"type": "PING", "delay": "10", "timeout": "10", "max_retries": "10", "admin_state_up": True} monitor = { "health_monitor": { "id": "abcdef-c3eb-4fee-9763-12de3338041e", "type": "PING", "delay": "10", "timeout": "10", "max_retries": "10", "admin_state_up": True, } } quantumclient.create_health_monitor({"health_monitor": form_data}).AndReturn(monitor) self.mox.ReplayAll() ret_val = api.lbaas.pool_health_monitor_create(self.request, **form_data) self.assertIsInstance(ret_val, api.lbaas.PoolMonitor)