{"action":"created","comment":{"url":"https://api.github.com/repos/codenvy/codenvy/pulls/comments/90222231","pull_request_review_id":10743349,"id":90222231,"diff_hunk":"@@ -0,0 +1,80 @@\n+/*\n+ *  [2012] - [2016] Codenvy, S.A.\n+ *  All Rights Reserved.\n+ *\n+ * NOTICE:  All information contained herein is, and remains\n+ * the property of Codenvy S.A. and its suppliers,\n+ * if any.  The intellectual and technical concepts contained\n+ * herein are proprietary to Codenvy S.A.\n+ * and its suppliers and may be covered by U.S. and Foreign Patents,\n+ * patents in process, and are protected by trade secret or copyright law.\n+ * Dissemination of this information or reproduction of this material\n+ * is strictly forbidden unless prior written permission is obtained\n+ * from Codenvy S.A..\n+ */\n+package com.codenvy.organization.spi;\n+\n+import com.codenvy.organization.spi.impl.OrganizationDistributedResourcesImpl;\n+\n+import org.eclipse.che.api.core.NotFoundException;\n+import org.eclipse.che.api.core.Page;\n+import org.eclipse.che.api.core.ServerException;\n+\n+/**\n+ * Defines data access object contract for {@link OrganizationDistributedResourcesImpl}.\n+ *\n+ * @author Sergii Leschenko\n+ */\n+public interface OrganizationDistributedResourcesDao {\n+    /**\n+     * Stores distributed resources for suborganization.","path":"wsmaster/codenvy-hosted-api-organization/src/main/java/com/codenvy/organization/spi/OrganizationDistributedResourcesDao.java","position":30,"original_position":30,"commit_id":"9089182f317cb31a695bf11b485af5608697709c","original_commit_id":"9089182f317cb31a695bf11b485af5608697709c","user":{"login":"akorneta","id":12269156,"avatar_url":"https://avatars.githubusercontent.com/u/12269156?v=3","gravatar_id":"","url":"https://api.github.com/users/akorneta","html_url":"https://github.com/akorneta","followers_url":"https://api.github.com/users/akorneta/followers","following_url":"https://api.github.com/users/akorneta/following{/other_user}","gists_url":"https://api.github.com/users/akorneta/gists{/gist_id}","starred_url":"https://api.github.com/users/akorneta/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akorneta/subscriptions","organizations_url":"https://api.github.com/users/akorneta/orgs","repos_url":"https://api.github.com/users/akorneta/repos","events_url":"https://api.github.com/users/akorneta/events{/privacy}","received_events_url":"https://api.github.com/users/akorneta/received_events","type":"User","site_admin":false},"body":"I guess it will be helpful to describe here how to store resources when there are already exist resources for the organization.","created_at":"2016-11-30T12:24:03Z","updated_at":"2016-11-30T12:24:03Z","html_url":"https://github.com/codenvy/codenvy/pull/1141#discussion_r90222231","pull_request_url":"https://api.github.com/repos/codenvy/codenvy/pulls/1141","_links":{"self":{"href":"https://api.github.com/repos/codenvy/codenvy/pulls/comments/90222231"},"html":{"href":"https://github.com/codenvy/codenvy/pull/1141#discussion_r90222231"},"pull_request":{"href":"https://api.github.com/repos/codenvy/codenvy/pulls/1141"}}},"pull_request":{"url":"https://api.github.com/repos/codenvy/codenvy/pulls/1141","id":93546461,"html_url":"https://github.com/codenvy/codenvy/pull/1141","diff_url":"https://github.com/codenvy/codenvy/pull/1141.diff","patch_url":"https://github.com/codenvy/codenvy/pull/1141.patch","issue_url":"https://api.github.com/repos/codenvy/codenvy/issues/1141","number":1141,"state":"open","locked":false,"title":"[WIP] CODENVY-957 Implement resources redistribution between suborganizations","user":{"login":"sleshchenko","id":5887312,"avatar_url":"https://avatars.githubusercontent.com/u/5887312?v=3","gravatar_id":"","url":"https://api.github.com/users/sleshchenko","html_url":"https://github.com/sleshchenko","followers_url":"https://api.github.com/users/sleshchenko/followers","following_url":"https://api.github.com/users/sleshchenko/following{/other_user}","gists_url":"https://api.github.com/users/sleshchenko/gists{/gist_id}","starred_url":"https://api.github.com/users/sleshchenko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sleshchenko/subscriptions","organizations_url":"https://api.github.com/users/sleshchenko/orgs","repos_url":"https://api.github.com/users/sleshchenko/repos","events_url":"https://api.github.com/users/sleshchenko/events{/privacy}","received_events_url":"https://api.github.com/users/sleshchenko/received_events","type":"User","site_admin":false},"body":"### What does this PR do?\r\nAdded ability to redistribute resources between suborganizations.\r\n\r\nIntroduced new state for account's resources, it's called `reserved resources`. It means that account's license has resources but it can't use it for consumtion by workpace starting, creation etc.\r\n\r\nImplemented new organization resources API that allows to define resources that should be provided for usage by suborganization from its parent organization. Only users who have `manageResources` permissions can grant suborganization to use parent organization's resources. Resources become unavailable for his parent organization when user allows suborganization to use them, so they become reserved resources. By default all suborganizations don't have any resources limit and it means that they are not able to use resources of their parent organizations.\r\n\r\n### What issues does this PR fix or reference?\r\nhttps://github.com/codenvy/codenvy/issues/957\r\n\r\n### New Behavior\r\nOrganization can provide own resources to usage by their suborganizations.\r\n\r\n### Tests written?\r\nYes\r\n\r\n### Docs requirements?\r\nInclude the content for all the docs changes required. \r\n1.  API changes  \r\n2.  User docs changes  \r\n","created_at":"2016-11-14T11:03:04Z","updated_at":"2016-11-30T12:24:03Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ff4c3ffef42a2a6d3b31daa883b800698ef7488f","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/codenvy/codenvy/pulls/1141/commits","review_comments_url":"https://api.github.com/repos/codenvy/codenvy/pulls/1141/comments","review_comment_url":"https://api.github.com/repos/codenvy/codenvy/pulls/comments{/number}","comments_url":"https://api.github.com/repos/codenvy/codenvy/issues/1141/comments","statuses_url":"https://api.github.com/repos/codenvy/codenvy/statuses/9089182f317cb31a695bf11b485af5608697709c","head":{"label":"sleshchenko:CODENVY-957","ref":"CODENVY-957","sha":"9089182f317cb31a695bf11b485af5608697709c","user":{"login":"sleshchenko","id":5887312,"avatar_url":"https://avatars.githubusercontent.com/u/5887312?v=3","gravatar_id":"","url":"https://api.github.com/users/sleshchenko","html_url":"https://github.com/sleshchenko","followers_url":"https://api.github.com/users/sleshchenko/followers","following_url":"https://api.github.com/users/sleshchenko/following{/other_user}","gists_url":"https://api.github.com/users/sleshchenko/gists{/gist_id}","starred_url":"https://api.github.com/users/sleshchenko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sleshchenko/subscriptions","organizations_url":"https://api.github.com/users/sleshchenko/orgs","repos_url":"https://api.github.com/users/sleshchenko/repos","events_url":"https://api.github.com/users/sleshchenko/events{/privacy}","received_events_url":"https://api.github.com/users/sleshchenko/received_events","type":"User","site_admin":false},"repo":{"id":55216227,"name":"codenvy","full_name":"sleshchenko/codenvy","owner":{"login":"sleshchenko","id":5887312,"avatar_url":"https://avatars.githubusercontent.com/u/5887312?v=3","gravatar_id":"","url":"https://api.github.com/users/sleshchenko","html_url":"https://github.com/sleshchenko","followers_url":"https://api.github.com/users/sleshchenko/followers","following_url":"https://api.github.com/users/sleshchenko/following{/other_user}","gists_url":"https://api.github.com/users/sleshchenko/gists{/gist_id}","starred_url":"https://api.github.com/users/sleshchenko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sleshchenko/subscriptions","organizations_url":"https://api.github.com/users/sleshchenko/orgs","repos_url":"https://api.github.com/users/sleshchenko/repos","events_url":"https://api.github.com/users/sleshchenko/events{/privacy}","received_events_url":"https://api.github.com/users/sleshchenko/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/sleshchenko/codenvy","description":"Codenvy","fork":true,"url":"https://api.github.com/repos/sleshchenko/codenvy","forks_url":"https://api.github.com/repos/sleshchenko/codenvy/forks","keys_url":"https://api.github.com/repos/sleshchenko/codenvy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sleshchenko/codenvy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sleshchenko/codenvy/teams","hooks_url":"https://api.github.com/repos/sleshchenko/codenvy/hooks","issue_events_url":"https://api.github.com/repos/sleshchenko/codenvy/issues/events{/number}","events_url":"https://api.github.com/repos/sleshchenko/codenvy/events","assignees_url":"https://api.github.com/repos/sleshchenko/codenvy/assignees{/user}","branches_url":"https://api.github.com/repos/sleshchenko/codenvy/branches{/branch}","tags_url":"https://api.github.com/repos/sleshchenko/codenvy/tags","blobs_url":"https://api.github.com/repos/sleshchenko/codenvy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sleshchenko/codenvy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sleshchenko/codenvy/git/refs{/sha}","trees_url":"https://api.github.com/repos/sleshchenko/codenvy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sleshchenko/codenvy/statuses/{sha}","languages_url":"https://api.github.com/repos/sleshchenko/codenvy/languages","stargazers_url":"https://api.github.com/repos/sleshchenko/codenvy/stargazers","contributors_url":"https://api.github.com/repos/sleshchenko/codenvy/contributors","subscribers_url":"https://api.github.com/repos/sleshchenko/codenvy/subscribers","subscription_url":"https://api.github.com/repos/sleshchenko/codenvy/subscription","commits_url":"https://api.github.com/repos/sleshchenko/codenvy/commits{/sha}","git_commits_url":"https://api.github.com/repos/sleshchenko/codenvy/git/commits{/sha}","comments_url":"https://api.github.com/repos/sleshchenko/codenvy/comments{/number}","issue_comment_url":"https://api.github.com/repos/sleshchenko/codenvy/issues/comments{/number}","contents_url":"https://api.github.com/repos/sleshchenko/codenvy/contents/{+path}","compare_url":"https://api.github.com/repos/sleshchenko/codenvy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sleshchenko/codenvy/merges","archive_url":"https://api.github.com/repos/sleshchenko/codenvy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sleshchenko/codenvy/downloads","issues_url":"https://api.github.com/repos/sleshchenko/codenvy/issues{/number}","pulls_url":"https://api.github.com/repos/sleshchenko/codenvy/pulls{/number}","milestones_url":"https://api.github.com/repos/sleshchenko/codenvy/milestones{/number}","notifications_url":"https://api.github.com/repos/sleshchenko/codenvy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sleshchenko/codenvy/labels{/name}","releases_url":"https://api.github.com/repos/sleshchenko/codenvy/releases{/id}","deployments_url":"https://api.github.com/repos/sleshchenko/codenvy/deployments","created_at":"2016-04-01T08:29:46Z","updated_at":"2016-04-01T08:29:53Z","pushed_at":"2016-11-30T09:33:59Z","git_url":"git://github.com/sleshchenko/codenvy.git","ssh_url":"git@github.com:sleshchenko/codenvy.git","clone_url":"https://github.com/sleshchenko/codenvy.git","svn_url":"https://github.com/sleshchenko/codenvy","homepage":null,"size":72683,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"codenvy:master","ref":"master","sha":"90ddc21b869be6317126b00ac34dd231f38497b1","user":{"login":"codenvy","id":2736247,"avatar_url":"https://avatars.githubusercontent.com/u/2736247?v=3","gravatar_id":"","url":"https://api.github.com/users/codenvy","html_url":"https://github.com/codenvy","followers_url":"https://api.github.com/users/codenvy/followers","following_url":"https://api.github.com/users/codenvy/following{/other_user}","gists_url":"https://api.github.com/users/codenvy/gists{/gist_id}","starred_url":"https://api.github.com/users/codenvy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codenvy/subscriptions","organizations_url":"https://api.github.com/users/codenvy/orgs","repos_url":"https://api.github.com/users/codenvy/repos","events_url":"https://api.github.com/users/codenvy/events{/privacy}","received_events_url":"https://api.github.com/users/codenvy/received_events","type":"Organization","site_admin":false},"repo":{"id":54102761,"name":"codenvy","full_name":"codenvy/codenvy","owner":{"login":"codenvy","id":2736247,"avatar_url":"https://avatars.githubusercontent.com/u/2736247?v=3","gravatar_id":"","url":"https://api.github.com/users/codenvy","html_url":"https://github.com/codenvy","followers_url":"https://api.github.com/users/codenvy/followers","following_url":"https://api.github.com/users/codenvy/following{/other_user}","gists_url":"https://api.github.com/users/codenvy/gists{/gist_id}","starred_url":"https://api.github.com/users/codenvy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codenvy/subscriptions","organizations_url":"https://api.github.com/users/codenvy/orgs","repos_url":"https://api.github.com/users/codenvy/repos","events_url":"https://api.github.com/users/codenvy/events{/privacy}","received_events_url":"https://api.github.com/users/codenvy/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/codenvy/codenvy","description":"Codenvy","fork":false,"url":"https://api.github.com/repos/codenvy/codenvy","forks_url":"https://api.github.com/repos/codenvy/codenvy/forks","keys_url":"https://api.github.com/repos/codenvy/codenvy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/codenvy/codenvy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/codenvy/codenvy/teams","hooks_url":"https://api.github.com/repos/codenvy/codenvy/hooks","issue_events_url":"https://api.github.com/repos/codenvy/codenvy/issues/events{/number}","events_url":"https://api.github.com/repos/codenvy/codenvy/events","assignees_url":"https://api.github.com/repos/codenvy/codenvy/assignees{/user}","branches_url":"https://api.github.com/repos/codenvy/codenvy/branches{/branch}","tags_url":"https://api.github.com/repos/codenvy/codenvy/tags","blobs_url":"https://api.github.com/repos/codenvy/codenvy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/codenvy/codenvy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/codenvy/codenvy/git/refs{/sha}","trees_url":"https://api.github.com/repos/codenvy/codenvy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/codenvy/codenvy/statuses/{sha}","languages_url":"https://api.github.com/repos/codenvy/codenvy/languages","stargazers_url":"https://api.github.com/repos/codenvy/codenvy/stargazers","contributors_url":"https://api.github.com/repos/codenvy/codenvy/contributors","subscribers_url":"https://api.github.com/repos/codenvy/codenvy/subscribers","subscription_url":"https://api.github.com/repos/codenvy/codenvy/subscription","commits_url":"https://api.github.com/repos/codenvy/codenvy/commits{/sha}","git_commits_url":"https://api.github.com/repos/codenvy/codenvy/git/commits{/sha}","comments_url":"https://api.github.com/repos/codenvy/codenvy/comments{/number}","issue_comment_url":"https://api.github.com/repos/codenvy/codenvy/issues/comments{/number}","contents_url":"https://api.github.com/repos/codenvy/codenvy/contents/{+path}","compare_url":"https://api.github.com/repos/codenvy/codenvy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/codenvy/codenvy/merges","archive_url":"https://api.github.com/repos/codenvy/codenvy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/codenvy/codenvy/downloads","issues_url":"https://api.github.com/repos/codenvy/codenvy/issues{/number}","pulls_url":"https://api.github.com/repos/codenvy/codenvy/pulls{/number}","milestones_url":"https://api.github.com/repos/codenvy/codenvy/milestones{/number}","notifications_url":"https://api.github.com/repos/codenvy/codenvy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/codenvy/codenvy/labels{/name}","releases_url":"https://api.github.com/repos/codenvy/codenvy/releases{/id}","deployments_url":"https://api.github.com/repos/codenvy/codenvy/deployments","created_at":"2016-03-17T08:51:27Z","updated_at":"2016-11-27T07:04:53Z","pushed_at":"2016-11-30T09:27:25Z","git_url":"git://github.com/codenvy/codenvy.git","ssh_url":"git@github.com:codenvy/codenvy.git","clone_url":"https://github.com/codenvy/codenvy.git","svn_url":"https://github.com/codenvy/codenvy","homepage":null,"size":79756,"stargazers_count":39,"watchers_count":39,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":34,"mirror_url":null,"open_issues_count":143,"forks":34,"open_issues":143,"watchers":39,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/codenvy/codenvy/pulls/1141"},"html":{"href":"https://github.com/codenvy/codenvy/pull/1141"},"issue":{"href":"https://api.github.com/repos/codenvy/codenvy/issues/1141"},"comments":{"href":"https://api.github.com/repos/codenvy/codenvy/issues/1141/comments"},"review_comments":{"href":"https://api.github.com/repos/codenvy/codenvy/pulls/1141/comments"},"review_comment":{"href":"https://api.github.com/repos/codenvy/codenvy/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/codenvy/codenvy/pulls/1141/commits"},"statuses":{"href":"https://api.github.com/repos/codenvy/codenvy/statuses/9089182f317cb31a695bf11b485af5608697709c"}}}}
{"actor":{"display_login":"akorneta"}}