def test_create_pool_with_all_params(self): """lb-pool-create with all params set.""" resource = 'pool' cmd = pool.CreatePool(test_cli20.MyApp(sys.stdout), None) name = 'my-name' description = 'my-desc' lb_method = 'ROUND_ROBIN' protocol = 'HTTP' subnet_id = 'subnet-id' tenant_id = 'my-tenant' my_id = 'my-id' provider = 'lbaas' args = [ '--admin-state-down', '--description', description, '--lb-method', lb_method, '--name', name, '--protocol', protocol, '--subnet-id', subnet_id, '--tenant-id', tenant_id, '--provider', provider ] position_names = [ 'admin_state_up', 'description', 'lb_method', 'name', 'protocol', 'subnet_id', 'tenant_id', 'provider' ] position_values = [ False, description, lb_method, name, protocol, subnet_id, tenant_id, provider ] self._test_create_resource(resource, cmd, name, my_id, args, position_names, position_values)
def test_create_pool_with_mandatory_params(self): """lb-pool-create with mandatory params only.""" resource = 'pool' cmd = pool.CreatePool(test_cli20.MyApp(sys.stdout), None) name = 'my-name' lb_method = 'ROUND_ROBIN' protocol = 'HTTP' subnet_id = 'subnet-id' tenant_id = 'my-tenant' my_id = 'my-id' args = [ '--lb-method', lb_method, '--name', name, '--protocol', protocol, '--subnet-id', subnet_id, '--tenant-id', tenant_id ] position_names = [ 'admin_state_up', 'lb_method', 'name', 'protocol', 'subnet_id', 'tenant_id' ] position_values = [ True, lb_method, name, protocol, subnet_id, tenant_id ] self._test_create_resource(resource, cmd, name, my_id, args, position_names, position_values)