{"action":"created","comment":{"url":"https://api.github.com/repos/apache/cloudstack/pulls/comments/236702016","pull_request_review_id":178829901,"id":236702016,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzNjcwMjAxNg==","diff_hunk":"@@ -1714,23 +1720,37 @@ public AccountVO updateAccount(UpdateAccountCmd cmd) {\n         // Check if user performing the action is allowed to modify this account\n         checkAccess(getCurrentCallingAccount(), _domainMgr.getDomain(account.getDomainId()));\n \n-        // check if the given account name is unique in this domain for updating\n-        Account duplicateAcccount = _accountDao.findActiveAccount(newAccountName, domainId);\n-        if (duplicateAcccount != null && duplicateAcccount.getId() != account.getId()) {\n-            throw new InvalidParameterValueException(\n-                    \"There already exists an account with the name:\" + newAccountName + \" in the domain:\" + domainId + \" with existing account id:\" + duplicateAcccount.getId());\n+        if(newAccountName != null) {","path":"server/src/main/java/com/cloud/user/AccountManagerImpl.java","position":58,"original_position":58,"commit_id":"f2cac021cfd2c7077c89deedb62c1c7d0e129ec3","original_commit_id":"f2cac021cfd2c7077c89deedb62c1c7d0e129ec3","user":{"login":"bwsw","id":15047882,"node_id":"MDQ6VXNlcjE1MDQ3ODgy","avatar_url":"https://avatars2.githubusercontent.com/u/15047882?v=4","gravatar_id":"","url":"https://api.github.com/users/bwsw","html_url":"https://github.com/bwsw","followers_url":"https://api.github.com/users/bwsw/followers","following_url":"https://api.github.com/users/bwsw/following{/other_user}","gists_url":"https://api.github.com/users/bwsw/gists{/gist_id}","starred_url":"https://api.github.com/users/bwsw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bwsw/subscriptions","organizations_url":"https://api.github.com/users/bwsw/orgs","repos_url":"https://api.github.com/users/bwsw/repos","events_url":"https://api.github.com/users/bwsw/events{/privacy}","received_events_url":"https://api.github.com/users/bwsw/received_events","type":"User","site_admin":false},"body":"@rafaelweingartner \r\nHm, I don't think so or don't get the idea. I would like to distinguish three situations:\r\n1. newAccountName is not specified\r\n2. newAccountName is specified but empty string -> exception 1\r\n3. newAccountName is specified and not empty string -> action or exception\r\n\r\nSo, don't get how `StringUtils.isEmpty()` helps.","created_at":"2018-11-27T15:02:39Z","updated_at":"2018-11-27T15:02:39Z","html_url":"https://github.com/apache/cloudstack/pull/3058#discussion_r236702016","pull_request_url":"https://api.github.com/repos/apache/cloudstack/pulls/3058","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/apache/cloudstack/pulls/comments/236702016"},"html":{"href":"https://github.com/apache/cloudstack/pull/3058#discussion_r236702016"},"pull_request":{"href":"https://api.github.com/repos/apache/cloudstack/pulls/3058"}},"in_reply_to_id":236619297},"pull_request":{"url":"https://api.github.com/repos/apache/cloudstack/pulls/3058","id":233724446,"node_id":"MDExOlB1bGxSZXF1ZXN0MjMzNzI0NDQ2","html_url":"https://github.com/apache/cloudstack/pull/3058","diff_url":"https://github.com/apache/cloudstack/pull/3058.diff","patch_url":"https://github.com/apache/cloudstack/pull/3058.patch","issue_url":"https://api.github.com/repos/apache/cloudstack/issues/3058","number":3058,"state":"open","locked":false,"title":"CLOUDSTACK-3049: update dynamic role for an account","user":{"login":"bwsw","id":15047882,"node_id":"MDQ6VXNlcjE1MDQ3ODgy","avatar_url":"https://avatars2.githubusercontent.com/u/15047882?v=4","gravatar_id":"","url":"https://api.github.com/users/bwsw","html_url":"https://github.com/bwsw","followers_url":"https://api.github.com/users/bwsw/followers","following_url":"https://api.github.com/users/bwsw/following{/other_user}","gists_url":"https://api.github.com/users/bwsw/gists{/gist_id}","starred_url":"https://api.github.com/users/bwsw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bwsw/subscriptions","organizations_url":"https://api.github.com/users/bwsw/orgs","repos_url":"https://api.github.com/users/bwsw/repos","events_url":"https://api.github.com/users/bwsw/events{/privacy}","received_events_url":"https://api.github.com/users/bwsw/received_events","type":"User","site_admin":false},"body":"## Description\r\n<!--- Describe your changes in detail -->\r\n\r\nExisting 'updateAccount' API call now can update role as well as account name and network domain. During the implementation 'newname' attribute was marked as optional, previously in the API was annotated as required, which is not a right behavior.\r\n\r\nNew Dockerfile was added Dockerfile.smokedev which is convenient if you develop smoke tests.\r\n\r\nHelper script was added to deploy datacenter and run tests from the same docker image which guarantees a predictable environment.\r\n\r\n```bash\r\ndocker run -v ~/dev/tmp:/tmp \\\r\n      -v ~/IdeaProjects/cloudstack/test/integration/smoke:/root/test/integration/smoke \\\r\n      -it \\\r\n      --name simulator -p 8080:8080 -p8096:8096 simulator:4.12\r\n\r\n# second console \r\ndocker exec -it simulator bash\r\n# deploy datacenter\r\nbash /root/docker_run_tests.sh advanced smoke\r\n# follow the instructions\r\n```\r\n\r\n<!-- For new features, provide link to FS, dev ML discussion etc. -->\r\n<!-- In case of bug fix, the expected and actual behaviours, steps to reproduce. -->\r\n\r\nImplements #3049 \r\n\r\n<!-- When \"Fixes: #<id>\" is specified, the issue/PR will automatically be closed when this PR gets merged -->\r\n<!-- For addressing multiple issues/PRs, use multiple \"Fixes: #<id>\" -->\r\n<!-- Fixes: # -->\r\n\r\n## Types of changes\r\n<!--- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->\r\n- [x] Enhancement (improves an existing feature and functionality)\r\n\r\n## Screenshots (if appropriate):\r\n\r\n## How Has This Been Tested?\r\n<!-- Please describe in detail how you tested your changes. -->\r\n<!-- Include details of your testing environment, and the tests you ran to -->\r\n<!-- see how your change affects other areas of the code, etc. -->\r\n\r\n- The code was tested with cloudmonkey\r\n- Smoketest for Marvin was implemented\r\n\r\n<!-- Please read the [CONTRIBUTING](https://github.com/apache/cloudstack/blob/master/CONTRIBUTING.md) document -->\r\n","created_at":"2018-11-26T22:58:18Z","updated_at":"2018-11-27T15:02:39Z","closed_at":null,"merged_at":null,"merge_commit_sha":"653eed618de6ca6774cf195adaed40ff75d38865","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/apache/cloudstack/pulls/3058/commits","review_comments_url":"https://api.github.com/repos/apache/cloudstack/pulls/3058/comments","review_comment_url":"https://api.github.com/repos/apache/cloudstack/pulls/comments{/number}","comments_url":"https://api.github.com/repos/apache/cloudstack/issues/3058/comments","statuses_url":"https://api.github.com/repos/apache/cloudstack/statuses/f2cac021cfd2c7077c89deedb62c1c7d0e129ec3","head":{"label":"bwsw:3049-update-dynamic-role","ref":"3049-update-dynamic-role","sha":"f2cac021cfd2c7077c89deedb62c1c7d0e129ec3","user":{"login":"bwsw","id":15047882,"node_id":"MDQ6VXNlcjE1MDQ3ODgy","avatar_url":"https://avatars2.githubusercontent.com/u/15047882?v=4","gravatar_id":"","url":"https://api.github.com/users/bwsw","html_url":"https://github.com/bwsw","followers_url":"https://api.github.com/users/bwsw/followers","following_url":"https://api.github.com/users/bwsw/following{/other_user}","gists_url":"https://api.github.com/users/bwsw/gists{/gist_id}","starred_url":"https://api.github.com/users/bwsw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bwsw/subscriptions","organizations_url":"https://api.github.com/users/bwsw/orgs","repos_url":"https://api.github.com/users/bwsw/repos","events_url":"https://api.github.com/users/bwsw/events{/privacy}","received_events_url":"https://api.github.com/users/bwsw/received_events","type":"User","site_admin":false},"repo":{"id":155092026,"node_id":"MDEwOlJlcG9zaXRvcnkxNTUwOTIwMjY=","name":"cloudstack","full_name":"bwsw/cloudstack","private":false,"owner":{"login":"bwsw","id":15047882,"node_id":"MDQ6VXNlcjE1MDQ3ODgy","avatar_url":"https://avatars2.githubusercontent.com/u/15047882?v=4","gravatar_id":"","url":"https://api.github.com/users/bwsw","html_url":"https://github.com/bwsw","followers_url":"https://api.github.com/users/bwsw/followers","following_url":"https://api.github.com/users/bwsw/following{/other_user}","gists_url":"https://api.github.com/users/bwsw/gists{/gist_id}","starred_url":"https://api.github.com/users/bwsw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bwsw/subscriptions","organizations_url":"https://api.github.com/users/bwsw/orgs","repos_url":"https://api.github.com/users/bwsw/repos","events_url":"https://api.github.com/users/bwsw/events{/privacy}","received_events_url":"https://api.github.com/users/bwsw/received_events","type":"User","site_admin":false},"html_url":"https://github.com/bwsw/cloudstack","description":"Apache Cloudstack","fork":true,"url":"https://api.github.com/repos/bwsw/cloudstack","forks_url":"https://api.github.com/repos/bwsw/cloudstack/forks","keys_url":"https://api.github.com/repos/bwsw/cloudstack/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bwsw/cloudstack/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bwsw/cloudstack/teams","hooks_url":"https://api.github.com/repos/bwsw/cloudstack/hooks","issue_events_url":"https://api.github.com/repos/bwsw/cloudstack/issues/events{/number}","events_url":"https://api.github.com/repos/bwsw/cloudstack/events","assignees_url":"https://api.github.com/repos/bwsw/cloudstack/assignees{/user}","branches_url":"https://api.github.com/repos/bwsw/cloudstack/branches{/branch}","tags_url":"https://api.github.com/repos/bwsw/cloudstack/tags","blobs_url":"https://api.github.com/repos/bwsw/cloudstack/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bwsw/cloudstack/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bwsw/cloudstack/git/refs{/sha}","trees_url":"https://api.github.com/repos/bwsw/cloudstack/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bwsw/cloudstack/statuses/{sha}","languages_url":"https://api.github.com/repos/bwsw/cloudstack/languages","stargazers_url":"https://api.github.com/repos/bwsw/cloudstack/stargazers","contributors_url":"https://api.github.com/repos/bwsw/cloudstack/contributors","subscribers_url":"https://api.github.com/repos/bwsw/cloudstack/subscribers","subscription_url":"https://api.github.com/repos/bwsw/cloudstack/subscription","commits_url":"https://api.github.com/repos/bwsw/cloudstack/commits{/sha}","git_commits_url":"https://api.github.com/repos/bwsw/cloudstack/git/commits{/sha}","comments_url":"https://api.github.com/repos/bwsw/cloudstack/comments{/number}","issue_comment_url":"https://api.github.com/repos/bwsw/cloudstack/issues/comments{/number}","contents_url":"https://api.github.com/repos/bwsw/cloudstack/contents/{+path}","compare_url":"https://api.github.com/repos/bwsw/cloudstack/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bwsw/cloudstack/merges","archive_url":"https://api.github.com/repos/bwsw/cloudstack/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bwsw/cloudstack/downloads","issues_url":"https://api.github.com/repos/bwsw/cloudstack/issues{/number}","pulls_url":"https://api.github.com/repos/bwsw/cloudstack/pulls{/number}","milestones_url":"https://api.github.com/repos/bwsw/cloudstack/milestones{/number}","notifications_url":"https://api.github.com/repos/bwsw/cloudstack/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bwsw/cloudstack/labels{/name}","releases_url":"https://api.github.com/repos/bwsw/cloudstack/releases{/id}","deployments_url":"https://api.github.com/repos/bwsw/cloudstack/deployments","created_at":"2018-10-28T16:34:48Z","updated_at":"2018-11-07T16:17:17Z","pushed_at":"2018-11-26T23:54:32Z","git_url":"git://github.com/bwsw/cloudstack.git","ssh_url":"git@github.com:bwsw/cloudstack.git","clone_url":"https://github.com/bwsw/cloudstack.git","svn_url":"https://github.com/bwsw/cloudstack","homepage":"","size":528139,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"apache:master","ref":"master","sha":"c499be256a8b6cc5e4643679a9187dfd96871b45","user":{"login":"apache","id":47359,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ3MzU5","avatar_url":"https://avatars0.githubusercontent.com/u/47359?v=4","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"repo":{"id":9759448,"node_id":"MDEwOlJlcG9zaXRvcnk5NzU5NDQ4","name":"cloudstack","full_name":"apache/cloudstack","private":false,"owner":{"login":"apache","id":47359,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ3MzU5","avatar_url":"https://avatars0.githubusercontent.com/u/47359?v=4","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/apache/cloudstack","description":"Apache Cloudstack","fork":false,"url":"https://api.github.com/repos/apache/cloudstack","forks_url":"https://api.github.com/repos/apache/cloudstack/forks","keys_url":"https://api.github.com/repos/apache/cloudstack/keys{/key_id}","collaborators_url":"https://api.github.com/repos/apache/cloudstack/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/apache/cloudstack/teams","hooks_url":"https://api.github.com/repos/apache/cloudstack/hooks","issue_events_url":"https://api.github.com/repos/apache/cloudstack/issues/events{/number}","events_url":"https://api.github.com/repos/apache/cloudstack/events","assignees_url":"https://api.github.com/repos/apache/cloudstack/assignees{/user}","branches_url":"https://api.github.com/repos/apache/cloudstack/branches{/branch}","tags_url":"https://api.github.com/repos/apache/cloudstack/tags","blobs_url":"https://api.github.com/repos/apache/cloudstack/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/apache/cloudstack/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/apache/cloudstack/git/refs{/sha}","trees_url":"https://api.github.com/repos/apache/cloudstack/git/trees{/sha}","statuses_url":"https://api.github.com/repos/apache/cloudstack/statuses/{sha}","languages_url":"https://api.github.com/repos/apache/cloudstack/languages","stargazers_url":"https://api.github.com/repos/apache/cloudstack/stargazers","contributors_url":"https://api.github.com/repos/apache/cloudstack/contributors","subscribers_url":"https://api.github.com/repos/apache/cloudstack/subscribers","subscription_url":"https://api.github.com/repos/apache/cloudstack/subscription","commits_url":"https://api.github.com/repos/apache/cloudstack/commits{/sha}","git_commits_url":"https://api.github.com/repos/apache/cloudstack/git/commits{/sha}","comments_url":"https://api.github.com/repos/apache/cloudstack/comments{/number}","issue_comment_url":"https://api.github.com/repos/apache/cloudstack/issues/comments{/number}","contents_url":"https://api.github.com/repos/apache/cloudstack/contents/{+path}","compare_url":"https://api.github.com/repos/apache/cloudstack/compare/{base}...{head}","merges_url":"https://api.github.com/repos/apache/cloudstack/merges","archive_url":"https://api.github.com/repos/apache/cloudstack/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/apache/cloudstack/downloads","issues_url":"https://api.github.com/repos/apache/cloudstack/issues{/number}","pulls_url":"https://api.github.com/repos/apache/cloudstack/pulls{/number}","milestones_url":"https://api.github.com/repos/apache/cloudstack/milestones{/number}","notifications_url":"https://api.github.com/repos/apache/cloudstack/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/apache/cloudstack/labels{/name}","releases_url":"https://api.github.com/repos/apache/cloudstack/releases{/id}","deployments_url":"https://api.github.com/repos/apache/cloudstack/deployments","created_at":"2013-04-29T22:27:12Z","updated_at":"2018-11-27T11:39:27Z","pushed_at":"2018-11-27T14:09:33Z","git_url":"git://github.com/apache/cloudstack.git","ssh_url":"git@github.com:apache/cloudstack.git","clone_url":"https://github.com/apache/cloudstack.git","svn_url":"https://github.com/apache/cloudstack","homepage":"","size":527445,"stargazers_count":642,"watchers_count":642,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":671,"mirror_url":null,"archived":false,"open_issues_count":196,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":671,"open_issues":196,"watchers":642,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/apache/cloudstack/pulls/3058"},"html":{"href":"https://github.com/apache/cloudstack/pull/3058"},"issue":{"href":"https://api.github.com/repos/apache/cloudstack/issues/3058"},"comments":{"href":"https://api.github.com/repos/apache/cloudstack/issues/3058/comments"},"review_comments":{"href":"https://api.github.com/repos/apache/cloudstack/pulls/3058/comments"},"review_comment":{"href":"https://api.github.com/repos/apache/cloudstack/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/apache/cloudstack/pulls/3058/commits"},"statuses":{"href":"https://api.github.com/repos/apache/cloudstack/statuses/f2cac021cfd2c7077c89deedb62c1c7d0e129ec3"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"bwsw"}}