{"action":"created","comment":{"url":"https://api.github.com/repos/Azure/azure-xplat-cli/pulls/comments/36572544","id":36572544,"diff_hunk":"@@ -224,6 +227,94 @@ describe('arm', function () {\n           done();\n         });\n       });\n+\n+      it('create new role should work', function (done) {\n+        var filePath = path.join(__dirname, '../../../data/CustomRoleDefValid.json');\n+        suite.execute('role create -f %s --json', filePath, function (result) {\n+          result.exitStatus.should.equal(0);\n+          var createdRole = JSON.parse(result.text);\n+          createdRole.roleDefinition.properties.roleName.should.equal(\"CustomRole Test\");\n+          createdRole.roleDefinition.properties.assignableScopes.length.should.be.above(0);\n+          createdRole.roleDefinition.properties.assignableScopes[0].should.equal(\"/subscriptions/4004a9fd-d58e-48dc-aeb2-4a4aec58606f\");\n+          createdRole.roleDefinition.properties.permissions.length.should.be.above(0);\n+          createdRole.roleDefinition.properties.permissions[0].actions.length.should.be.above(0);\n+            \n+          // TODO: Clean up role after delete is implemented","path":"test/commands/arm/role/arm.role-tests.js","position":null,"original_position":35,"commit_id":"de238153c64130cfb8c4996fee9932504748ae41","original_commit_id":"e83ba453b24770165940ea9a4780f4990e92a93f","user":{"login":"namratab","id":189186,"avatar_url":"https://avatars.githubusercontent.com/u/189186?v=3","gravatar_id":"","url":"https://api.github.com/users/namratab","html_url":"https://github.com/namratab","followers_url":"https://api.github.com/users/namratab/followers","following_url":"https://api.github.com/users/namratab/following{/other_user}","gists_url":"https://api.github.com/users/namratab/gists{/gist_id}","starred_url":"https://api.github.com/users/namratab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/namratab/subscriptions","organizations_url":"https://api.github.com/users/namratab/orgs","repos_url":"https://api.github.com/users/namratab/repos","events_url":"https://api.github.com/users/namratab/events{/privacy}","received_events_url":"https://api.github.com/users/namratab/received_events","type":"User","site_admin":false},"body":"As discussed offline, Shubham will be implementing the delete in a day or so and he will update these tests to clean up","created_at":"2015-08-08T00:51:03Z","updated_at":"2015-08-08T00:51:03Z","html_url":"https://github.com/Azure/azure-xplat-cli/pull/1991#discussion_r36572544","pull_request_url":"https://api.github.com/repos/Azure/azure-xplat-cli/pulls/1991","_links":{"self":{"href":"https://api.github.com/repos/Azure/azure-xplat-cli/pulls/comments/36572544"},"html":{"href":"https://github.com/Azure/azure-xplat-cli/pull/1991#discussion_r36572544"},"pull_request":{"href":"https://api.github.com/repos/Azure/azure-xplat-cli/pulls/1991"}}},"pull_request":{"url":"https://api.github.com/repos/Azure/azure-xplat-cli/pulls/1991","id":41845227,"html_url":"https://github.com/Azure/azure-xplat-cli/pull/1991","diff_url":"https://github.com/Azure/azure-xplat-cli/pull/1991.diff","patch_url":"https://github.com/Azure/azure-xplat-cli/pull/1991.patch","issue_url":"https://api.github.com/repos/Azure/azure-xplat-cli/issues/1991","number":1991,"state":"open","locked":false,"title":"Authorization: Changes for Create and Update of Role definitions","user":{"login":"namratab","id":189186,"avatar_url":"https://avatars.githubusercontent.com/u/189186?v=3","gravatar_id":"","url":"https://api.github.com/users/namratab","html_url":"https://github.com/namratab","followers_url":"https://api.github.com/users/namratab/followers","following_url":"https://api.github.com/users/namratab/following{/other_user}","gists_url":"https://api.github.com/users/namratab/gists{/gist_id}","starred_url":"https://api.github.com/users/namratab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/namratab/subscriptions","organizations_url":"https://api.github.com/users/namratab/orgs","repos_url":"https://api.github.com/users/namratab/repos","events_url":"https://api.github.com/users/namratab/events{/privacy}","received_events_url":"https://api.github.com/users/namratab/received_events","type":"User","site_admin":false},"body":"This change adds the 'create' and 'set' options for role definitions (custom roles). \r\nDelete will be added in a separate PR at which point the tests will be updated to clean-up ","created_at":"2015-08-06T23:10:04Z","updated_at":"2015-08-08T00:51:03Z","closed_at":null,"merged_at":null,"merge_commit_sha":"35bfe059f2d23e188dd0952adb613337c58d2d0e","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Azure/azure-xplat-cli/pulls/1991/commits","review_comments_url":"https://api.github.com/repos/Azure/azure-xplat-cli/pulls/1991/comments","review_comment_url":"https://api.github.com/repos/Azure/azure-xplat-cli/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Azure/azure-xplat-cli/issues/1991/comments","statuses_url":"https://api.github.com/repos/Azure/azure-xplat-cli/statuses/de238153c64130cfb8c4996fee9932504748ae41","head":{"label":"namratab:UpdateRoleDef","ref":"UpdateRoleDef","sha":"de238153c64130cfb8c4996fee9932504748ae41","user":{"login":"namratab","id":189186,"avatar_url":"https://avatars.githubusercontent.com/u/189186?v=3","gravatar_id":"","url":"https://api.github.com/users/namratab","html_url":"https://github.com/namratab","followers_url":"https://api.github.com/users/namratab/followers","following_url":"https://api.github.com/users/namratab/following{/other_user}","gists_url":"https://api.github.com/users/namratab/gists{/gist_id}","starred_url":"https://api.github.com/users/namratab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/namratab/subscriptions","organizations_url":"https://api.github.com/users/namratab/orgs","repos_url":"https://api.github.com/users/namratab/repos","events_url":"https://api.github.com/users/namratab/events{/privacy}","received_events_url":"https://api.github.com/users/namratab/received_events","type":"User","site_admin":false},"repo":{"id":39664097,"name":"azure-xplat-cli","full_name":"namratab/azure-xplat-cli","owner":{"login":"namratab","id":189186,"avatar_url":"https://avatars.githubusercontent.com/u/189186?v=3","gravatar_id":"","url":"https://api.github.com/users/namratab","html_url":"https://github.com/namratab","followers_url":"https://api.github.com/users/namratab/followers","following_url":"https://api.github.com/users/namratab/following{/other_user}","gists_url":"https://api.github.com/users/namratab/gists{/gist_id}","starred_url":"https://api.github.com/users/namratab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/namratab/subscriptions","organizations_url":"https://api.github.com/users/namratab/orgs","repos_url":"https://api.github.com/users/namratab/repos","events_url":"https://api.github.com/users/namratab/events{/privacy}","received_events_url":"https://api.github.com/users/namratab/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/namratab/azure-xplat-cli","description":"Microsoft Azure Cross Platform Command Line","fork":true,"url":"https://api.github.com/repos/namratab/azure-xplat-cli","forks_url":"https://api.github.com/repos/namratab/azure-xplat-cli/forks","keys_url":"https://api.github.com/repos/namratab/azure-xplat-cli/keys{/key_id}","collaborators_url":"https://api.github.com/repos/namratab/azure-xplat-cli/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/namratab/azure-xplat-cli/teams","hooks_url":"https://api.github.com/repos/namratab/azure-xplat-cli/hooks","issue_events_url":"https://api.github.com/repos/namratab/azure-xplat-cli/issues/events{/number}","events_url":"https://api.github.com/repos/namratab/azure-xplat-cli/events","assignees_url":"https://api.github.com/repos/namratab/azure-xplat-cli/assignees{/user}","branches_url":"https://api.github.com/repos/namratab/azure-xplat-cli/branches{/branch}","tags_url":"https://api.github.com/repos/namratab/azure-xplat-cli/tags","blobs_url":"https://api.github.com/repos/namratab/azure-xplat-cli/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/namratab/azure-xplat-cli/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/namratab/azure-xplat-cli/git/refs{/sha}","trees_url":"https://api.github.com/repos/namratab/azure-xplat-cli/git/trees{/sha}","statuses_url":"https://api.github.com/repos/namratab/azure-xplat-cli/statuses/{sha}","languages_url":"https://api.github.com/repos/namratab/azure-xplat-cli/languages","stargazers_url":"https://api.github.com/repos/namratab/azure-xplat-cli/stargazers","contributors_url":"https://api.github.com/repos/namratab/azure-xplat-cli/contributors","subscribers_url":"https://api.github.com/repos/namratab/azure-xplat-cli/subscribers","subscription_url":"https://api.github.com/repos/namratab/azure-xplat-cli/subscription","commits_url":"https://api.github.com/repos/namratab/azure-xplat-cli/commits{/sha}","git_commits_url":"https://api.github.com/repos/namratab/azure-xplat-cli/git/commits{/sha}","comments_url":"https://api.github.com/repos/namratab/azure-xplat-cli/comments{/number}","issue_comment_url":"https://api.github.com/repos/namratab/azure-xplat-cli/issues/comments{/number}","contents_url":"https://api.github.com/repos/namratab/azure-xplat-cli/contents/{+path}","compare_url":"https://api.github.com/repos/namratab/azure-xplat-cli/compare/{base}...{head}","merges_url":"https://api.github.com/repos/namratab/azure-xplat-cli/merges","archive_url":"https://api.github.com/repos/namratab/azure-xplat-cli/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/namratab/azure-xplat-cli/downloads","issues_url":"https://api.github.com/repos/namratab/azure-xplat-cli/issues{/number}","pulls_url":"https://api.github.com/repos/namratab/azure-xplat-cli/pulls{/number}","milestones_url":"https://api.github.com/repos/namratab/azure-xplat-cli/milestones{/number}","notifications_url":"https://api.github.com/repos/namratab/azure-xplat-cli/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/namratab/azure-xplat-cli/labels{/name}","releases_url":"https://api.github.com/repos/namratab/azure-xplat-cli/releases{/id}","created_at":"2015-07-24T23:51:25Z","updated_at":"2015-07-24T23:51:30Z","pushed_at":"2015-08-08T00:44:43Z","git_url":"git://github.com/namratab/azure-xplat-cli.git","ssh_url":"git@github.com:namratab/azure-xplat-cli.git","clone_url":"https://github.com/namratab/azure-xplat-cli.git","svn_url":"https://github.com/namratab/azure-xplat-cli","homepage":"","size":56204,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","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":"dev"}},"base":{"label":"Azure:dev","ref":"dev","sha":"cf022c80fce2aa544c1007c231b94d77a839c44f","user":{"login":"Azure","id":6844498,"avatar_url":"https://avatars.githubusercontent.com/u/6844498?v=3","gravatar_id":"","url":"https://api.github.com/users/Azure","html_url":"https://github.com/Azure","followers_url":"https://api.github.com/users/Azure/followers","following_url":"https://api.github.com/users/Azure/following{/other_user}","gists_url":"https://api.github.com/users/Azure/gists{/gist_id}","starred_url":"https://api.github.com/users/Azure/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Azure/subscriptions","organizations_url":"https://api.github.com/users/Azure/orgs","repos_url":"https://api.github.com/users/Azure/repos","events_url":"https://api.github.com/users/Azure/events{/privacy}","received_events_url":"https://api.github.com/users/Azure/received_events","type":"Organization","site_admin":false},"repo":{"id":6506651,"name":"azure-xplat-cli","full_name":"Azure/azure-xplat-cli","owner":{"login":"Azure","id":6844498,"avatar_url":"https://avatars.githubusercontent.com/u/6844498?v=3","gravatar_id":"","url":"https://api.github.com/users/Azure","html_url":"https://github.com/Azure","followers_url":"https://api.github.com/users/Azure/followers","following_url":"https://api.github.com/users/Azure/following{/other_user}","gists_url":"https://api.github.com/users/Azure/gists{/gist_id}","starred_url":"https://api.github.com/users/Azure/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Azure/subscriptions","organizations_url":"https://api.github.com/users/Azure/orgs","repos_url":"https://api.github.com/users/Azure/repos","events_url":"https://api.github.com/users/Azure/events{/privacy}","received_events_url":"https://api.github.com/users/Azure/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Azure/azure-xplat-cli","description":"Microsoft Azure Cross Platform Command Line","fork":false,"url":"https://api.github.com/repos/Azure/azure-xplat-cli","forks_url":"https://api.github.com/repos/Azure/azure-xplat-cli/forks","keys_url":"https://api.github.com/repos/Azure/azure-xplat-cli/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Azure/azure-xplat-cli/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Azure/azure-xplat-cli/teams","hooks_url":"https://api.github.com/repos/Azure/azure-xplat-cli/hooks","issue_events_url":"https://api.github.com/repos/Azure/azure-xplat-cli/issues/events{/number}","events_url":"https://api.github.com/repos/Azure/azure-xplat-cli/events","assignees_url":"https://api.github.com/repos/Azure/azure-xplat-cli/assignees{/user}","branches_url":"https://api.github.com/repos/Azure/azure-xplat-cli/branches{/branch}","tags_url":"https://api.github.com/repos/Azure/azure-xplat-cli/tags","blobs_url":"https://api.github.com/repos/Azure/azure-xplat-cli/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Azure/azure-xplat-cli/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Azure/azure-xplat-cli/git/refs{/sha}","trees_url":"https://api.github.com/repos/Azure/azure-xplat-cli/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Azure/azure-xplat-cli/statuses/{sha}","languages_url":"https://api.github.com/repos/Azure/azure-xplat-cli/languages","stargazers_url":"https://api.github.com/repos/Azure/azure-xplat-cli/stargazers","contributors_url":"https://api.github.com/repos/Azure/azure-xplat-cli/contributors","subscribers_url":"https://api.github.com/repos/Azure/azure-xplat-cli/subscribers","subscription_url":"https://api.github.com/repos/Azure/azure-xplat-cli/subscription","commits_url":"https://api.github.com/repos/Azure/azure-xplat-cli/commits{/sha}","git_commits_url":"https://api.github.com/repos/Azure/azure-xplat-cli/git/commits{/sha}","comments_url":"https://api.github.com/repos/Azure/azure-xplat-cli/comments{/number}","issue_comment_url":"https://api.github.com/repos/Azure/azure-xplat-cli/issues/comments{/number}","contents_url":"https://api.github.com/repos/Azure/azure-xplat-cli/contents/{+path}","compare_url":"https://api.github.com/repos/Azure/azure-xplat-cli/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Azure/azure-xplat-cli/merges","archive_url":"https://api.github.com/repos/Azure/azure-xplat-cli/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Azure/azure-xplat-cli/downloads","issues_url":"https://api.github.com/repos/Azure/azure-xplat-cli/issues{/number}","pulls_url":"https://api.github.com/repos/Azure/azure-xplat-cli/pulls{/number}","milestones_url":"https://api.github.com/repos/Azure/azure-xplat-cli/milestones{/number}","notifications_url":"https://api.github.com/repos/Azure/azure-xplat-cli/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Azure/azure-xplat-cli/labels{/name}","releases_url":"https://api.github.com/repos/Azure/azure-xplat-cli/releases{/id}","created_at":"2012-11-02T13:43:50Z","updated_at":"2015-07-28T22:29:00Z","pushed_at":"2015-08-08T00:44:44Z","git_url":"git://github.com/Azure/azure-xplat-cli.git","ssh_url":"git@github.com:Azure/azure-xplat-cli.git","clone_url":"https://github.com/Azure/azure-xplat-cli.git","svn_url":"https://github.com/Azure/azure-xplat-cli","homepage":"","size":61312,"stargazers_count":269,"watchers_count":269,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":202,"mirror_url":null,"open_issues_count":143,"forks":202,"open_issues":143,"watchers":269,"default_branch":"dev"}},"_links":{"self":{"href":"https://api.github.com/repos/Azure/azure-xplat-cli/pulls/1991"},"html":{"href":"https://github.com/Azure/azure-xplat-cli/pull/1991"},"issue":{"href":"https://api.github.com/repos/Azure/azure-xplat-cli/issues/1991"},"comments":{"href":"https://api.github.com/repos/Azure/azure-xplat-cli/issues/1991/comments"},"review_comments":{"href":"https://api.github.com/repos/Azure/azure-xplat-cli/pulls/1991/comments"},"review_comment":{"href":"https://api.github.com/repos/Azure/azure-xplat-cli/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Azure/azure-xplat-cli/pulls/1991/commits"},"statuses":{"href":"https://api.github.com/repos/Azure/azure-xplat-cli/statuses/de238153c64130cfb8c4996fee9932504748ae41"}}}}