def test_create_healthmonitor_with_all_params(self): # lb-healthmonitor-create with all params set. resource = 'health_monitor' cmd = healthmonitor.CreateHealthMonitor(test_cli20.MyApp(sys.stdout), None) admin_state_up = False delay = '60' expected_codes = '200-202,204' http_method = 'HEAD' max_retries = '2' timeout = '10' type = 'TCP' tenant_id = 'my-tenant' url_path = '/health' my_id = 'my-id' args = [ '--admin-state-down', '--delay', delay, '--expected-codes', expected_codes, '--http-method', http_method, '--max-retries', max_retries, '--timeout', timeout, '--type', type, '--tenant-id', tenant_id, '--url-path', url_path ] position_names = [ 'admin_state_up', 'delay', 'expected_codes', 'http_method', 'max_retries', 'timeout', 'type', 'tenant_id', 'url_path' ] position_values = [ admin_state_up, delay, expected_codes, http_method, max_retries, timeout, type, tenant_id, url_path ] self._test_create_resource(resource, cmd, '', my_id, args, position_names, position_values)
def test_create_healthmonitor_with_mandatory_params(self): # lb-healthmonitor-create with mandatory params only. resource = 'health_monitor' cmd = healthmonitor.CreateHealthMonitor(test_cli20.MyApp(sys.stdout), None) admin_state_up = False delay = '60' max_retries = '2' timeout = '10' type = 'TCP' tenant_id = 'my-tenant' my_id = 'my-id' args = [ '--admin-state-down', '--delay', delay, '--max-retries', max_retries, '--timeout', timeout, '--type', type, '--tenant-id', tenant_id ] position_names = [ 'admin_state_up', 'delay', 'max_retries', 'timeout', 'type', 'tenant_id' ] position_values = [ admin_state_up, delay, max_retries, timeout, type, tenant_id ] self._test_create_resource(resource, cmd, '', my_id, args, position_names, position_values)