{"action":"created","comment":{"url":"https://api.github.com/repos/jenkinsci/external-workspace-manager-plugin/pulls/comments/74627112","id":74627112,"diff_hunk":"@@ -4,56 +4,36 @@\n import hudson.model.Node;\n import hudson.slaves.NodeProperty;\n import hudson.slaves.NodePropertyDescriptor;\n-import hudson.util.FormValidation;\n import org.jenkinsci.plugins.ewm.Messages;\n-import org.kohsuke.accmod.Restricted;\n-import org.kohsuke.accmod.restrictions.NoExternalUse;\n import org.kohsuke.stapler.DataBoundConstructor;\n-import org.kohsuke.stapler.QueryParameter;\n \n-import javax.annotation.CheckForNull;\n import javax.annotation.Nonnull;\n import java.util.List;\n \n-import static hudson.Util.fixEmptyAndTrim;\n import static hudson.Util.fixNull;\n-import static hudson.util.FormValidation.validateRequired;\n \n /**\n- * A {@link NodeProperty} where are defined the {@link DiskNode} definitions.\n+ * A {@link NodeProperty} where are defined the {@link DiskPoolNode} definitions.\n  *\n  * @author Alexandru Somai\n  */\n public class ExternalWorkspaceProperty extends NodeProperty<Node> {\n \n-    private final String diskPoolRefId;\n-    private final List<DiskNode> diskNodes;\n+    private final List<DiskPoolNode> diskPoolNodes;\n \n     @DataBoundConstructor\n-    public ExternalWorkspaceProperty(String diskPoolRefId, List<DiskNode> diskNodes) {\n-        this.diskPoolRefId = fixEmptyAndTrim(diskPoolRefId);\n-        this.diskNodes = fixNull(diskNodes);\n-    }\n-\n-    @CheckForNull\n-    public String getDiskPoolRefId() {\n-        return diskPoolRefId;\n+    public ExternalWorkspaceProperty(List<DiskPoolNode> diskPoolNodes) {\n+        this.diskPoolNodes = fixNull(diskPoolNodes);\n     }\n \n     @Nonnull\n-    public List<DiskNode> getDiskNodes() {\n-        return diskNodes;\n+    public List<DiskPoolNode> getDiskPoolNodes() {\n+        return diskPoolNodes;","path":"src/main/java/org/jenkinsci/plugins/ewm/nodes/ExternalWorkspaceProperty.java","position":48,"original_position":48,"commit_id":"f94632896da60211d620cac12e0718ca251ddf03","original_commit_id":"f94632896da60211d620cac12e0718ca251ddf03","user":{"login":"oleg-nenashev","id":3000480,"avatar_url":"https://avatars.githubusercontent.com/u/3000480?v=3","gravatar_id":"","url":"https://api.github.com/users/oleg-nenashev","html_url":"https://github.com/oleg-nenashev","followers_url":"https://api.github.com/users/oleg-nenashev/followers","following_url":"https://api.github.com/users/oleg-nenashev/following{/other_user}","gists_url":"https://api.github.com/users/oleg-nenashev/gists{/gist_id}","starred_url":"https://api.github.com/users/oleg-nenashev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oleg-nenashev/subscriptions","organizations_url":"https://api.github.com/users/oleg-nenashev/orgs","repos_url":"https://api.github.com/users/oleg-nenashev/repos","events_url":"https://api.github.com/users/oleg-nenashev/events{/privacy}","received_events_url":"https://api.github.com/users/oleg-nenashev/received_events","type":"User","site_admin":false},"body":"It exposes the internal implementation (I would expect FindBugs to grumble about it). Wrapping by Collectioms.unmodifyableList() may be a good approach","created_at":"2016-08-12T17:18:39Z","updated_at":"2016-08-12T17:18:39Z","html_url":"https://github.com/jenkinsci/external-workspace-manager-plugin/pull/35#discussion_r74627112","pull_request_url":"https://api.github.com/repos/jenkinsci/external-workspace-manager-plugin/pulls/35","_links":{"self":{"href":"https://api.github.com/repos/jenkinsci/external-workspace-manager-plugin/pulls/comments/74627112"},"html":{"href":"https://github.com/jenkinsci/external-workspace-manager-plugin/pull/35#discussion_r74627112"},"pull_request":{"href":"https://api.github.com/repos/jenkinsci/external-workspace-manager-plugin/pulls/35"}}},"pull_request":{"url":"https://api.github.com/repos/jenkinsci/external-workspace-manager-plugin/pulls/35","id":81136858,"html_url":"https://github.com/jenkinsci/external-workspace-manager-plugin/pull/35","diff_url":"https://github.com/jenkinsci/external-workspace-manager-plugin/pull/35.diff","patch_url":"https://github.com/jenkinsci/external-workspace-manager-plugin/pull/35.patch","issue_url":"https://api.github.com/repos/jenkinsci/external-workspace-manager-plugin/issues/35","number":35,"state":"open","locked":false,"title":"[JENKINS-37380] Add multiple Disk Pools to Node config","user":{"login":"alexsomai","id":5720977,"avatar_url":"https://avatars.githubusercontent.com/u/5720977?v=3","gravatar_id":"","url":"https://api.github.com/users/alexsomai","html_url":"https://github.com/alexsomai","followers_url":"https://api.github.com/users/alexsomai/followers","following_url":"https://api.github.com/users/alexsomai/following{/other_user}","gists_url":"https://api.github.com/users/alexsomai/gists{/gist_id}","starred_url":"https://api.github.com/users/alexsomai/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexsomai/subscriptions","organizations_url":"https://api.github.com/users/alexsomai/orgs","repos_url":"https://api.github.com/users/alexsomai/repos","events_url":"https://api.github.com/users/alexsomai/events{/privacy}","received_events_url":"https://api.github.com/users/alexsomai/received_events","type":"User","site_admin":false},"body":"Related to issue [[JENKINS-37380]](https://issues.jenkins-ci.org/browse/JENKINS-37380)\r\n\r\nCurrently, the user can define only one Disk Pool in the Node config.\r\n<img width=\"901\" alt=\"screen shot 2016-08-12 at 5 26 24 pm\" src=\"https://cloud.githubusercontent.com/assets/5720977/17627239/2b515432-60b9-11e6-9278-18afc58a8416.png\">\r\n\r\nI think that it makes sense to be able to define multiple Disk Pools in the Node Config (since in the Jenkins global config there can be defined many)\r\n\r\nAfter this PR:\r\n![screen shot 2016-08-12 at 5](https://cloud.githubusercontent.com/assets/5720977/17627333/9288d404-60b9-11e6-89d2-47c0c4a93a05.png)\r\n\r\nTODO list:\r\n- [X] Add multiple Disk Pools to Node config\r\n- [x] Add multiple Disk Pools to `External Workspace Templates` (from Jenkins global config)\r\n- [ ] Update documentation with new screenshots\r\n\r\nCC @oleg-nenashev @martinda","created_at":"2016-08-12T15:21:57Z","updated_at":"2016-08-12T17:18:39Z","closed_at":null,"merged_at":null,"merge_commit_sha":"45affb570a62d290dc6ec24f136433da39759615","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/jenkinsci/external-workspace-manager-plugin/pulls/35/commits","review_comments_url":"https://api.github.com/repos/jenkinsci/external-workspace-manager-plugin/pulls/35/comments","review_comment_url":"https://api.github.com/repos/jenkinsci/external-workspace-manager-plugin/pulls/comments{/number}","comments_url":"https://api.github.com/repos/jenkinsci/external-workspace-manager-plugin/issues/35/comments","statuses_url":"https://api.github.com/repos/jenkinsci/external-workspace-manager-plugin/statuses/f94632896da60211d620cac12e0718ca251ddf03","head":{"label":"alexsomai:disk-pools-for-node","ref":"disk-pools-for-node","sha":"f94632896da60211d620cac12e0718ca251ddf03","user":{"login":"alexsomai","id":5720977,"avatar_url":"https://avatars.githubusercontent.com/u/5720977?v=3","gravatar_id":"","url":"https://api.github.com/users/alexsomai","html_url":"https://github.com/alexsomai","followers_url":"https://api.github.com/users/alexsomai/followers","following_url":"https://api.github.com/users/alexsomai/following{/other_user}","gists_url":"https://api.github.com/users/alexsomai/gists{/gist_id}","starred_url":"https://api.github.com/users/alexsomai/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexsomai/subscriptions","organizations_url":"https://api.github.com/users/alexsomai/orgs","repos_url":"https://api.github.com/users/alexsomai/repos","events_url":"https://api.github.com/users/alexsomai/events{/privacy}","received_events_url":"https://api.github.com/users/alexsomai/received_events","type":"User","site_admin":false},"repo":{"id":59319962,"name":"external-workspace-manager-plugin","full_name":"alexsomai/external-workspace-manager-plugin","owner":{"login":"alexsomai","id":5720977,"avatar_url":"https://avatars.githubusercontent.com/u/5720977?v=3","gravatar_id":"","url":"https://api.github.com/users/alexsomai","html_url":"https://github.com/alexsomai","followers_url":"https://api.github.com/users/alexsomai/followers","following_url":"https://api.github.com/users/alexsomai/following{/other_user}","gists_url":"https://api.github.com/users/alexsomai/gists{/gist_id}","starred_url":"https://api.github.com/users/alexsomai/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexsomai/subscriptions","organizations_url":"https://api.github.com/users/alexsomai/orgs","repos_url":"https://api.github.com/users/alexsomai/repos","events_url":"https://api.github.com/users/alexsomai/events{/privacy}","received_events_url":"https://api.github.com/users/alexsomai/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/alexsomai/external-workspace-manager-plugin","description":"","fork":true,"url":"https://api.github.com/repos/alexsomai/external-workspace-manager-plugin","forks_url":"https://api.github.com/repos/alexsomai/external-workspace-manager-plugin/forks","keys_url":"https://api.github.com/repos/alexsomai/external-workspace-manager-plugin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/alexsomai/external-workspace-manager-plugin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/alexsomai/external-workspace-manager-plugin/teams","hooks_url":"https://api.github.com/repos/alexsomai/external-workspace-manager-plugin/hooks","issue_events_url":"https://api.github.com/repos/alexsomai/external-workspace-manager-plugin/issues/events{/number}","events_url":"https://api.github.com/repos/alexsomai/external-workspace-manager-plugin/events","assignees_url":"https://api.github.com/repos/alexsomai/external-workspace-manager-plugin/assignees{/user}","branches_url":"https://api.github.com/repos/alexsomai/external-workspace-manager-plugin/branches{/branch}","tags_url":"https://api.github.com/repos/alexsomai/external-workspace-manager-plugin/tags","blobs_url":"https://api.github.com/repos/alexsomai/external-workspace-manager-plugin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/alexsomai/external-workspace-manager-plugin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/alexsomai/external-workspace-manager-plugin/git/refs{/sha}","trees_url":"https://api.github.com/repos/alexsomai/external-workspace-manager-plugin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/alexsomai/external-workspace-manager-plugin/statuses/{sha}","languages_url":"https://api.github.com/repos/alexsomai/external-workspace-manager-plugin/languages","stargazers_url":"https://api.github.com/repos/alexsomai/external-workspace-manager-plugin/stargazers","contributors_url":"https://api.github.com/repos/alexsomai/external-workspace-manager-plugin/contributors","subscribers_url":"https://api.github.com/repos/alexsomai/external-workspace-manager-plugin/subscribers","subscription_url":"https://api.github.com/repos/alexsomai/external-workspace-manager-plugin/subscription","commits_url":"https://api.github.com/repos/alexsomai/external-workspace-manager-plugin/commits{/sha}","git_commits_url":"https://api.github.com/repos/alexsomai/external-workspace-manager-plugin/git/commits{/sha}","comments_url":"https://api.github.com/repos/alexsomai/external-workspace-manager-plugin/comments{/number}","issue_comment_url":"https://api.github.com/repos/alexsomai/external-workspace-manager-plugin/issues/comments{/number}","contents_url":"https://api.github.com/repos/alexsomai/external-workspace-manager-plugin/contents/{+path}","compare_url":"https://api.github.com/repos/alexsomai/external-workspace-manager-plugin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/alexsomai/external-workspace-manager-plugin/merges","archive_url":"https://api.github.com/repos/alexsomai/external-workspace-manager-plugin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/alexsomai/external-workspace-manager-plugin/downloads","issues_url":"https://api.github.com/repos/alexsomai/external-workspace-manager-plugin/issues{/number}","pulls_url":"https://api.github.com/repos/alexsomai/external-workspace-manager-plugin/pulls{/number}","milestones_url":"https://api.github.com/repos/alexsomai/external-workspace-manager-plugin/milestones{/number}","notifications_url":"https://api.github.com/repos/alexsomai/external-workspace-manager-plugin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/alexsomai/external-workspace-manager-plugin/labels{/name}","releases_url":"https://api.github.com/repos/alexsomai/external-workspace-manager-plugin/releases{/id}","deployments_url":"https://api.github.com/repos/alexsomai/external-workspace-manager-plugin/deployments","created_at":"2016-05-20T19:11:36Z","updated_at":"2016-06-07T17:30:42Z","pushed_at":"2016-08-12T17:12:21Z","git_url":"git://github.com/alexsomai/external-workspace-manager-plugin.git","ssh_url":"git@github.com:alexsomai/external-workspace-manager-plugin.git","clone_url":"https://github.com/alexsomai/external-workspace-manager-plugin.git","svn_url":"https://github.com/alexsomai/external-workspace-manager-plugin","homepage":"","size":1302,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"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":"jenkinsci:master","ref":"master","sha":"090d509d9759743d82bcd6e64961cb0923569784","user":{"login":"jenkinsci","id":107424,"avatar_url":"https://avatars.githubusercontent.com/u/107424?v=3","gravatar_id":"","url":"https://api.github.com/users/jenkinsci","html_url":"https://github.com/jenkinsci","followers_url":"https://api.github.com/users/jenkinsci/followers","following_url":"https://api.github.com/users/jenkinsci/following{/other_user}","gists_url":"https://api.github.com/users/jenkinsci/gists{/gist_id}","starred_url":"https://api.github.com/users/jenkinsci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jenkinsci/subscriptions","organizations_url":"https://api.github.com/users/jenkinsci/orgs","repos_url":"https://api.github.com/users/jenkinsci/repos","events_url":"https://api.github.com/users/jenkinsci/events{/privacy}","received_events_url":"https://api.github.com/users/jenkinsci/received_events","type":"Organization","site_admin":false},"repo":{"id":58932444,"name":"external-workspace-manager-plugin","full_name":"jenkinsci/external-workspace-manager-plugin","owner":{"login":"jenkinsci","id":107424,"avatar_url":"https://avatars.githubusercontent.com/u/107424?v=3","gravatar_id":"","url":"https://api.github.com/users/jenkinsci","html_url":"https://github.com/jenkinsci","followers_url":"https://api.github.com/users/jenkinsci/followers","following_url":"https://api.github.com/users/jenkinsci/following{/other_user}","gists_url":"https://api.github.com/users/jenkinsci/gists{/gist_id}","starred_url":"https://api.github.com/users/jenkinsci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jenkinsci/subscriptions","organizations_url":"https://api.github.com/users/jenkinsci/orgs","repos_url":"https://api.github.com/users/jenkinsci/repos","events_url":"https://api.github.com/users/jenkinsci/events{/privacy}","received_events_url":"https://api.github.com/users/jenkinsci/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/jenkinsci/external-workspace-manager-plugin","description":"Jenkins plugin that facilitates workspace share and reuse across multiple jobs","fork":false,"url":"https://api.github.com/repos/jenkinsci/external-workspace-manager-plugin","forks_url":"https://api.github.com/repos/jenkinsci/external-workspace-manager-plugin/forks","keys_url":"https://api.github.com/repos/jenkinsci/external-workspace-manager-plugin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jenkinsci/external-workspace-manager-plugin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jenkinsci/external-workspace-manager-plugin/teams","hooks_url":"https://api.github.com/repos/jenkinsci/external-workspace-manager-plugin/hooks","issue_events_url":"https://api.github.com/repos/jenkinsci/external-workspace-manager-plugin/issues/events{/number}","events_url":"https://api.github.com/repos/jenkinsci/external-workspace-manager-plugin/events","assignees_url":"https://api.github.com/repos/jenkinsci/external-workspace-manager-plugin/assignees{/user}","branches_url":"https://api.github.com/repos/jenkinsci/external-workspace-manager-plugin/branches{/branch}","tags_url":"https://api.github.com/repos/jenkinsci/external-workspace-manager-plugin/tags","blobs_url":"https://api.github.com/repos/jenkinsci/external-workspace-manager-plugin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jenkinsci/external-workspace-manager-plugin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jenkinsci/external-workspace-manager-plugin/git/refs{/sha}","trees_url":"https://api.github.com/repos/jenkinsci/external-workspace-manager-plugin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jenkinsci/external-workspace-manager-plugin/statuses/{sha}","languages_url":"https://api.github.com/repos/jenkinsci/external-workspace-manager-plugin/languages","stargazers_url":"https://api.github.com/repos/jenkinsci/external-workspace-manager-plugin/stargazers","contributors_url":"https://api.github.com/repos/jenkinsci/external-workspace-manager-plugin/contributors","subscribers_url":"https://api.github.com/repos/jenkinsci/external-workspace-manager-plugin/subscribers","subscription_url":"https://api.github.com/repos/jenkinsci/external-workspace-manager-plugin/subscription","commits_url":"https://api.github.com/repos/jenkinsci/external-workspace-manager-plugin/commits{/sha}","git_commits_url":"https://api.github.com/repos/jenkinsci/external-workspace-manager-plugin/git/commits{/sha}","comments_url":"https://api.github.com/repos/jenkinsci/external-workspace-manager-plugin/comments{/number}","issue_comment_url":"https://api.github.com/repos/jenkinsci/external-workspace-manager-plugin/issues/comments{/number}","contents_url":"https://api.github.com/repos/jenkinsci/external-workspace-manager-plugin/contents/{+path}","compare_url":"https://api.github.com/repos/jenkinsci/external-workspace-manager-plugin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jenkinsci/external-workspace-manager-plugin/merges","archive_url":"https://api.github.com/repos/jenkinsci/external-workspace-manager-plugin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jenkinsci/external-workspace-manager-plugin/downloads","issues_url":"https://api.github.com/repos/jenkinsci/external-workspace-manager-plugin/issues{/number}","pulls_url":"https://api.github.com/repos/jenkinsci/external-workspace-manager-plugin/pulls{/number}","milestones_url":"https://api.github.com/repos/jenkinsci/external-workspace-manager-plugin/milestones{/number}","notifications_url":"https://api.github.com/repos/jenkinsci/external-workspace-manager-plugin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jenkinsci/external-workspace-manager-plugin/labels{/name}","releases_url":"https://api.github.com/repos/jenkinsci/external-workspace-manager-plugin/releases{/id}","deployments_url":"https://api.github.com/repos/jenkinsci/external-workspace-manager-plugin/deployments","created_at":"2016-05-16T12:57:04Z","updated_at":"2016-08-08T20:01:31Z","pushed_at":"2016-08-12T17:12:22Z","git_url":"git://github.com/jenkinsci/external-workspace-manager-plugin.git","ssh_url":"git@github.com:jenkinsci/external-workspace-manager-plugin.git","clone_url":"https://github.com/jenkinsci/external-workspace-manager-plugin.git","svn_url":"https://github.com/jenkinsci/external-workspace-manager-plugin","homepage":"https://wiki.jenkins-ci.org/display/JENKINS/External+Workspace+Manager+Plugin","size":1362,"stargazers_count":4,"watchers_count":4,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":7,"mirror_url":null,"open_issues_count":2,"forks":7,"open_issues":2,"watchers":4,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/jenkinsci/external-workspace-manager-plugin/pulls/35"},"html":{"href":"https://github.com/jenkinsci/external-workspace-manager-plugin/pull/35"},"issue":{"href":"https://api.github.com/repos/jenkinsci/external-workspace-manager-plugin/issues/35"},"comments":{"href":"https://api.github.com/repos/jenkinsci/external-workspace-manager-plugin/issues/35/comments"},"review_comments":{"href":"https://api.github.com/repos/jenkinsci/external-workspace-manager-plugin/pulls/35/comments"},"review_comment":{"href":"https://api.github.com/repos/jenkinsci/external-workspace-manager-plugin/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/jenkinsci/external-workspace-manager-plugin/pulls/35/commits"},"statuses":{"href":"https://api.github.com/repos/jenkinsci/external-workspace-manager-plugin/statuses/f94632896da60211d620cac12e0718ca251ddf03"}}}}
{"actor":{"display_login":"oleg-nenashev"}}