{"action":"created","comment":{"url":"https://api.github.com/repos/Azure/azure-xplat-cli/pulls/comments/41955095","id":41955095,"diff_hunk":"@@ -0,0 +1,119 @@\n+/**\n+ * Copyright (c) Microsoft.  All rights reserved.\n+ *\n+ * Licensed under the Apache License, Version 2.0 (the \"License\");\n+ * you may not use this file except in compliance with the License.\n+ * You may obtain a copy of the License at\n+ *   http://www.apache.org/licenses/LICENSE-2.0\n+ *\n+ * Unless required by applicable law or agreed to in writing, software\n+ * distributed under the License is distributed on an \"AS IS\" BASIS,\n+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+ * See the License for the specific language governing permissions and\n+ * limitations under the License.\n+ */\n+'use strict';\n+\n+var should = require('should');\n+var util = require('util');\n+var testUtils = require('../../../util/util');\n+var CLITest = require('../../../framework/arm-cli-test');\n+var testprefix = 'arm-network-express-route-tests';\n+var networkTestUtil = require('../../../util/networkTestUtil');\n+var groupName, location,\n+  groupPrefix = 'xplatTestGExpressRoute';\n+var expressRCPrefix = 'xplatExpressRoute',\n+  serviceProvider = 'InterCloud',\n+  peeringLocation = 'London',\n+  bandwidth2 = '70',\n+  skuTier = 'Standard',\n+  skuFamily = 'MeteredData',\n+  tags1 = 'tag1=val1';\n+\n+var requiredEnvironment = [{\n+  name: 'AZURE_VM_TEST_LOCATION',\n+  defaultValue: 'eastus'\n+}];\n+\n+describe('arm', function() {\n+  describe('network', function() {\n+    var suite,\n+      retry = 5;\n+    var networkUtil = new networkTestUtil();\n+    before(function(done) {\n+      suite = new CLITest(this, testprefix, requiredEnvironment);\n+      suite.setupSuite(function() {\n+        location = process.env.AZURE_VM_TEST_LOCATION;\n+        groupName = suite.isMocked ? groupPrefix : suite.generateId(groupPrefix, null);\n+        expressRCPrefix = suite.isMocked ? expressRCPrefix : suite.generateId(expressRCPrefix, null);\n+        done();\n+      });\n+    });\n+    after(function(done) {\n+      networkUtil.deleteUsedGroup(groupName, suite, function() {\n+        suite.teardownSuite(done);\n+      });\n+    });\n+    beforeEach(function(done) {\n+      suite.setupTest(done);\n+    });\n+    afterEach(function(done) {\n+      suite.teardownTest(done);\n+    });\n+\n+    describe('express-route', function() {\n+      it('create should pass', function(done) {\n+        networkUtil.createGroup(groupName, location, suite, function() {\n+          var cmd = util.format('network express-route create %s %s %s -p %s -i %s -b 50 -e %s -f %s -t %s --json', groupName, expressRCPrefix, location, serviceProvider, peeringLocation, skuTier, skuFamily, tags1).split(' ');\n+          testUtils.executeCommand(suite, retry, cmd, function(result) {\n+            result.exitStatus.should.equal(0);\n+            done();\n+          });\n+        });\n+      });\n+      it('set should modify express-route', function(done) {\n+        var cmd = util.format('network express-route set %s %s -b %s --no-tags --json', groupName, expressRCPrefix, bandwidth2).split(' ');\n+        testUtils.executeCommand(suite, retry, cmd, function(result) {\n+          result.exitStatus.should.equal(0);\n+          done();\n+        });\n+      });\n+      it('show should display details of express-route', function(done) {\n+        var cmd = util.format('network express-route show %s %s --json', groupName, expressRCPrefix).split(' ');\n+        testUtils.executeCommand(suite, retry, cmd, function(result) {\n+          result.exitStatus.should.equal(0);\n+          var allresources = JSON.parse(result.text);\n+          allresources.name.should.equal(expressRCPrefix);\n+          done();\n+        });\n+      });\n+      it('list should dispaly all express-routes from resource group', function(done) {\n+        var cmd = util.format('network express-route list %s --json', groupName).split(' ');\n+        testUtils.executeCommand(suite, retry, cmd, function(result) {\n+          result.exitStatus.should.equal(0);\n+          var allResources = JSON.parse(result.text);\n+          allResources.some(function(res) {\n+            return res.name === expressRCPrefix;\n+          }).should.be.true;\n+          done();\n+        });\n+      });\n+      it('delete should delete express-route', function(done) {\n+        var cmd = util.format('network express-route delete %s %s --quiet --json', groupName, expressRCPrefix).split(' ');\n+        testUtils.executeCommand(suite, retry, cmd, function(result) {\n+          result.exitStatus.should.equal(0);\n+          done();\n+        });\n+      });\n+      it('provider list', function(done) {\n+        var cmd = util.format('network express-route provider list --json').split(' ');\n+        testUtils.executeCommand(suite, retry, cmd, function(result) {\n+          result.exitStatus.should.equal(0);\n+          done();\n+        });\n+      });\n+","path":"test/commands/arm/network/arm-network-express-route-circuit-tests.js","position":115,"original_position":115,"commit_id":"689ef4822105a61747e0541c65bea504771a84cd","original_commit_id":"689ef4822105a61747e0541c65bea504771a84cd","user":{"login":"yugangw-msft","id":6014209,"avatar_url":"https://avatars.githubusercontent.com/u/6014209?v=3","gravatar_id":"","url":"https://api.github.com/users/yugangw-msft","html_url":"https://github.com/yugangw-msft","followers_url":"https://api.github.com/users/yugangw-msft/followers","following_url":"https://api.github.com/users/yugangw-msft/following{/other_user}","gists_url":"https://api.github.com/users/yugangw-msft/gists{/gist_id}","starred_url":"https://api.github.com/users/yugangw-msft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yugangw-msft/subscriptions","organizations_url":"https://api.github.com/users/yugangw-msft/orgs","repos_url":"https://api.github.com/users/yugangw-msft/repos","events_url":"https://api.github.com/users/yugangw-msft/events{/privacy}","received_events_url":"https://api.github.com/users/yugangw-msft/received_events","type":"User","site_admin":false},"body":"remove this empty line and another one right below","created_at":"2015-10-14T04:56:45Z","updated_at":"2015-10-14T04:56:45Z","html_url":"https://github.com/Azure/azure-xplat-cli/pull/2192#discussion_r41955095","pull_request_url":"https://api.github.com/repos/Azure/azure-xplat-cli/pulls/2192","_links":{"self":{"href":"https://api.github.com/repos/Azure/azure-xplat-cli/pulls/comments/41955095"},"html":{"href":"https://github.com/Azure/azure-xplat-cli/pull/2192#discussion_r41955095"},"pull_request":{"href":"https://api.github.com/repos/Azure/azure-xplat-cli/pulls/2192"}}},"pull_request":{"url":"https://api.github.com/repos/Azure/azure-xplat-cli/pulls/2192","id":47429304,"html_url":"https://github.com/Azure/azure-xplat-cli/pull/2192","diff_url":"https://github.com/Azure/azure-xplat-cli/pull/2192.diff","patch_url":"https://github.com/Azure/azure-xplat-cli/pull/2192.patch","issue_url":"https://api.github.com/repos/Azure/azure-xplat-cli/issues/2192","number":2192,"state":"open","locked":false,"title":"ARM: Express Route Circuits commands implemented","user":{"login":"romangromov","id":1655573,"avatar_url":"https://avatars.githubusercontent.com/u/1655573?v=3","gravatar_id":"","url":"https://api.github.com/users/romangromov","html_url":"https://github.com/romangromov","followers_url":"https://api.github.com/users/romangromov/followers","following_url":"https://api.github.com/users/romangromov/following{/other_user}","gists_url":"https://api.github.com/users/romangromov/gists{/gist_id}","starred_url":"https://api.github.com/users/romangromov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/romangromov/subscriptions","organizations_url":"https://api.github.com/users/romangromov/orgs","repos_url":"https://api.github.com/users/romangromov/repos","events_url":"https://api.github.com/users/romangromov/events{/privacy}","received_events_url":"https://api.github.com/users/romangromov/received_events","type":"User","site_admin":false},"body":"This PR includes `Express Route Circuits` commands implemented:\r\n* create Express Route Circuit\r\n* set Express Route Circuit\r\n* list Express Route Circuit\r\n* show Express Route Circuit\r\n* delete Express Route Circuit\r\n\r\nRequested by @DeepakRajendranMsft and @FrankSiegemund.","created_at":"2015-10-12T14:59:05Z","updated_at":"2015-10-14T04:56:45Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9eb44a6d3dac578f566afffcdbe68a69f4a77bb9","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Azure/azure-xplat-cli/pulls/2192/commits","review_comments_url":"https://api.github.com/repos/Azure/azure-xplat-cli/pulls/2192/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/2192/comments","statuses_url":"https://api.github.com/repos/Azure/azure-xplat-cli/statuses/689ef4822105a61747e0541c65bea504771a84cd","head":{"label":"MSOpenTech:dev-arm-express-route-circuit","ref":"dev-arm-express-route-circuit","sha":"689ef4822105a61747e0541c65bea504771a84cd","user":{"login":"MSOpenTech","id":1638184,"avatar_url":"https://avatars.githubusercontent.com/u/1638184?v=3","gravatar_id":"","url":"https://api.github.com/users/MSOpenTech","html_url":"https://github.com/MSOpenTech","followers_url":"https://api.github.com/users/MSOpenTech/followers","following_url":"https://api.github.com/users/MSOpenTech/following{/other_user}","gists_url":"https://api.github.com/users/MSOpenTech/gists{/gist_id}","starred_url":"https://api.github.com/users/MSOpenTech/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MSOpenTech/subscriptions","organizations_url":"https://api.github.com/users/MSOpenTech/orgs","repos_url":"https://api.github.com/users/MSOpenTech/repos","events_url":"https://api.github.com/users/MSOpenTech/events{/privacy}","received_events_url":"https://api.github.com/users/MSOpenTech/received_events","type":"Organization","site_admin":false},"repo":{"id":20235625,"name":"azure-xplat-cli","full_name":"MSOpenTech/azure-xplat-cli","owner":{"login":"MSOpenTech","id":1638184,"avatar_url":"https://avatars.githubusercontent.com/u/1638184?v=3","gravatar_id":"","url":"https://api.github.com/users/MSOpenTech","html_url":"https://github.com/MSOpenTech","followers_url":"https://api.github.com/users/MSOpenTech/followers","following_url":"https://api.github.com/users/MSOpenTech/following{/other_user}","gists_url":"https://api.github.com/users/MSOpenTech/gists{/gist_id}","starred_url":"https://api.github.com/users/MSOpenTech/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MSOpenTech/subscriptions","organizations_url":"https://api.github.com/users/MSOpenTech/orgs","repos_url":"https://api.github.com/users/MSOpenTech/repos","events_url":"https://api.github.com/users/MSOpenTech/events{/privacy}","received_events_url":"https://api.github.com/users/MSOpenTech/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/MSOpenTech/azure-xplat-cli","description":"Microsoft Azure Cross Platform Command Line","fork":true,"url":"https://api.github.com/repos/MSOpenTech/azure-xplat-cli","forks_url":"https://api.github.com/repos/MSOpenTech/azure-xplat-cli/forks","keys_url":"https://api.github.com/repos/MSOpenTech/azure-xplat-cli/keys{/key_id}","collaborators_url":"https://api.github.com/repos/MSOpenTech/azure-xplat-cli/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/MSOpenTech/azure-xplat-cli/teams","hooks_url":"https://api.github.com/repos/MSOpenTech/azure-xplat-cli/hooks","issue_events_url":"https://api.github.com/repos/MSOpenTech/azure-xplat-cli/issues/events{/number}","events_url":"https://api.github.com/repos/MSOpenTech/azure-xplat-cli/events","assignees_url":"https://api.github.com/repos/MSOpenTech/azure-xplat-cli/assignees{/user}","branches_url":"https://api.github.com/repos/MSOpenTech/azure-xplat-cli/branches{/branch}","tags_url":"https://api.github.com/repos/MSOpenTech/azure-xplat-cli/tags","blobs_url":"https://api.github.com/repos/MSOpenTech/azure-xplat-cli/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/MSOpenTech/azure-xplat-cli/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/MSOpenTech/azure-xplat-cli/git/refs{/sha}","trees_url":"https://api.github.com/repos/MSOpenTech/azure-xplat-cli/git/trees{/sha}","statuses_url":"https://api.github.com/repos/MSOpenTech/azure-xplat-cli/statuses/{sha}","languages_url":"https://api.github.com/repos/MSOpenTech/azure-xplat-cli/languages","stargazers_url":"https://api.github.com/repos/MSOpenTech/azure-xplat-cli/stargazers","contributors_url":"https://api.github.com/repos/MSOpenTech/azure-xplat-cli/contributors","subscribers_url":"https://api.github.com/repos/MSOpenTech/azure-xplat-cli/subscribers","subscription_url":"https://api.github.com/repos/MSOpenTech/azure-xplat-cli/subscription","commits_url":"https://api.github.com/repos/MSOpenTech/azure-xplat-cli/commits{/sha}","git_commits_url":"https://api.github.com/repos/MSOpenTech/azure-xplat-cli/git/commits{/sha}","comments_url":"https://api.github.com/repos/MSOpenTech/azure-xplat-cli/comments{/number}","issue_comment_url":"https://api.github.com/repos/MSOpenTech/azure-xplat-cli/issues/comments{/number}","contents_url":"https://api.github.com/repos/MSOpenTech/azure-xplat-cli/contents/{+path}","compare_url":"https://api.github.com/repos/MSOpenTech/azure-xplat-cli/compare/{base}...{head}","merges_url":"https://api.github.com/repos/MSOpenTech/azure-xplat-cli/merges","archive_url":"https://api.github.com/repos/MSOpenTech/azure-xplat-cli/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/MSOpenTech/azure-xplat-cli/downloads","issues_url":"https://api.github.com/repos/MSOpenTech/azure-xplat-cli/issues{/number}","pulls_url":"https://api.github.com/repos/MSOpenTech/azure-xplat-cli/pulls{/number}","milestones_url":"https://api.github.com/repos/MSOpenTech/azure-xplat-cli/milestones{/number}","notifications_url":"https://api.github.com/repos/MSOpenTech/azure-xplat-cli/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/MSOpenTech/azure-xplat-cli/labels{/name}","releases_url":"https://api.github.com/repos/MSOpenTech/azure-xplat-cli/releases{/id}","created_at":"2014-05-27T21:08:32Z","updated_at":"2015-09-28T11:06:41Z","pushed_at":"2015-10-14T00:24:51Z","git_url":"git://github.com/MSOpenTech/azure-xplat-cli.git","ssh_url":"git@github.com:MSOpenTech/azure-xplat-cli.git","clone_url":"https://github.com/MSOpenTech/azure-xplat-cli.git","svn_url":"https://github.com/MSOpenTech/azure-xplat-cli","homepage":"","size":63097,"stargazers_count":20,"watchers_count":20,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":15,"mirror_url":null,"open_issues_count":43,"forks":15,"open_issues":43,"watchers":20,"default_branch":"master"}},"base":{"label":"Azure:dev","ref":"dev","sha":"ef29e11d6bb4cdc6df9f0eb1283819be108743e7","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-10-12T20:44:32Z","pushed_at":"2015-10-14T00:33:46Z","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":66100,"stargazers_count":295,"watchers_count":295,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":225,"mirror_url":null,"open_issues_count":201,"forks":225,"open_issues":201,"watchers":295,"default_branch":"dev"}},"_links":{"self":{"href":"https://api.github.com/repos/Azure/azure-xplat-cli/pulls/2192"},"html":{"href":"https://github.com/Azure/azure-xplat-cli/pull/2192"},"issue":{"href":"https://api.github.com/repos/Azure/azure-xplat-cli/issues/2192"},"comments":{"href":"https://api.github.com/repos/Azure/azure-xplat-cli/issues/2192/comments"},"review_comments":{"href":"https://api.github.com/repos/Azure/azure-xplat-cli/pulls/2192/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/2192/commits"},"statuses":{"href":"https://api.github.com/repos/Azure/azure-xplat-cli/statuses/689ef4822105a61747e0541c65bea504771a84cd"}}}}