{"action":"opened","issue":{"url":"https://api.github.com/repos/cloudfoundry/cloud_controller_ng/issues/656","repository_url":"https://api.github.com/repos/cloudfoundry/cloud_controller_ng","labels_url":"https://api.github.com/repos/cloudfoundry/cloud_controller_ng/issues/656/labels{/name}","comments_url":"https://api.github.com/repos/cloudfoundry/cloud_controller_ng/issues/656/comments","events_url":"https://api.github.com/repos/cloudfoundry/cloud_controller_ng/issues/656/events","html_url":"https://github.com/cloudfoundry/cloud_controller_ng/issues/656","id":168352812,"number":656,"title":"Create Organization Quota Definition fails with unlimited routes and zero (default) total_reserved_route_ports","user":{"login":"Zteve","id":703433,"avatar_url":"https://avatars.githubusercontent.com/u/703433?v=3","gravatar_id":"","url":"https://api.github.com/users/Zteve","html_url":"https://github.com/Zteve","followers_url":"https://api.github.com/users/Zteve/followers","following_url":"https://api.github.com/users/Zteve/following{/other_user}","gists_url":"https://api.github.com/users/Zteve/gists{/gist_id}","starred_url":"https://api.github.com/users/Zteve/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Zteve/subscriptions","organizations_url":"https://api.github.com/users/Zteve/orgs","repos_url":"https://api.github.com/users/Zteve/repos","events_url":"https://api.github.com/users/Zteve/events{/privacy}","received_events_url":"https://api.github.com/users/Zteve/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-07-29T15:38:26Z","updated_at":"2016-07-29T15:38:26Z","closed_at":null,"body":"## Issue\r\n\r\n[Create Organization Quota Definition][1] with body fields `total_routes : -1` and omitted `total_reserved_route_ports` (defaulting to 0) fails with:\r\n```\r\nCF-QuotaDefinitionInvalid(240003): Quota Definition is invalid: total_reserved_route_ports Total reserved ports must be less than or equal to total routes.\r\n```\r\n\r\n## Context\r\n\r\nI'm using API version: 2.54.0 on the latest PcfDev (0.18.0).\r\n\r\n## Steps to Reproduce\r\n\r\nIssue the following REST call:\r\n```\r\nPOST /v2/quota_definitions\r\n```\r\nwith payload\r\n```\r\n{   \"instance_memory_limit\":1024,\r\n    \"memory_limit\":1024,\r\n    \"name\":\"test-quota-definition-psl3d\",\r\n    \"non_basic_services_allowed\":false,\r\n    \"total_routes\":-1,\r\n    \"total_services\":-1\r\n}\r\n```\r\n\r\n## Expected result\r\n\r\n201 Created, and a payload of a (fully populated) Organization Quota Definition. ([See doc][1].) \r\n\r\n## Current result\r\n\r\n400 Bad Request, and the message payload:\r\n```\r\n{  \"code\": 240003,\r\n  \"description\": \"Quota Definition is invalid: total_reserved_route_ports Total reserved ports must be less than or equal to total routes.\",\r\n  \"error_code\": \"CF-QuotaDefinitionInvalid\"\r\n}     \r\n```\r\n\r\n## Possible Fix\r\n\r\nMake special comparisons between fields with special values.\r\n\r\n[1]:http://apidocs.cloudfoundry.org/235/organization_quota_definitions/creating_a_organization_quota_definition.html"}}
{"actor":{"display_login":"Zteve"}}