{"action":"created","comment":{"url":"https://api.github.com/repos/AzCiS/azure-powershell/pulls/comments/24834146","id":24834146,"diff_hunk":"@@ -0,0 +1,327 @@\n+﻿// ----------------------------------------------------------------------------------\n+//\n+// Copyright Microsoft Corporation\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+// 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+\n+using System;\n+using System.Linq;\n+using System.Management.Automation;\n+using Microsoft.WindowsAzure.Commands.Common;\n+using Microsoft.WindowsAzure.Management.StorSimple.Models;\n+using Microsoft.WindowsAzure.Commands.StorSimple.Properties;\n+using System.Net.Sockets;\n+using System.Net;\n+\n+namespace Microsoft.WindowsAzure.Commands.StorSimple.Cmdlets\n+{\n+    /// <summary>\n+    /// Update device config for an Azure StorSimple Device.\n+    /// \n+    /// If the device is being configured for the first time, then some of the\n+    /// arguments will be mandatory - TimeZone, PrimaryDnsServer, Config for Data0\n+    /// </summary>\n+    [Cmdlet(VerbsCommon.Set, \"AzureStorSimpleDevice\"), OutputType(typeof(DeviceDetails))]\n+    public class SetAzureStorSimpleDevice : StorSimpleCmdletBase\n+    {\n+                /// <summary>\n+        /// Device Id of the device to configure.\n+        /// </summary>\n+        [Parameter(Mandatory = true, Position = 0, ParameterSetName = StorSimpleCmdletParameterSet.IdentifyById, HelpMessage = StorSimpleCmdletHelpMessage.HelpMessageDeviceId)]\n+        [ValidateNotNullOrEmptyAttribute] \n+        public string DeviceId { get; set; }\n+\n+        /// <summary>\n+        /// Friendly Name of the device to configure.\n+        /// </summary>\n+        [Parameter(Mandatory = true, Position = 0, ParameterSetName = StorSimpleCmdletParameterSet.IdentifyByName, HelpMessage = StorSimpleCmdletHelpMessage.HelpMessageDeviceName)]\n+        [ValidateNotNullOrEmptyAttribute] \n+        public string DeviceName { get; set; }\n+\n+        /// <summary>\n+        /// New friendly name for the device.\n+        /// </summary>\n+        [Parameter(Position = 1, HelpMessage = StorSimpleCmdletHelpMessage.HelpMessageNewDeviceName)]\n+        [ValidateNotNullOrEmptyAttribute]\n+        public string NewName { get; set; }\n+        \n+        /// <summary>\n+        /// TimeZone for the device.\n+        /// </summary>\n+        [Parameter(Position = 2, HelpMessage = StorSimpleCmdletHelpMessage.HelpMessageTimeZone)]\n+        [ValidateNotNullOrEmptyAttribute] \n+        public TimeZone TimeZone { get; set; }","path":"src/ServiceManagement/StorSimple/Commands.StorSimple/Cmdlets/DeviceDetails/SetAzureStorSimpleDevice.cs","position":61,"original_position":61,"commit_id":"f24e36ebb33d40fd509c1866a6707894bd6d5262","original_commit_id":"f24e36ebb33d40fd509c1866a6707894bd6d5262","user":{"login":"avirupch","id":8154441,"avatar_url":"https://avatars.githubusercontent.com/u/8154441?v=3","gravatar_id":"","url":"https://api.github.com/users/avirupch","html_url":"https://github.com/avirupch","followers_url":"https://api.github.com/users/avirupch/followers","following_url":"https://api.github.com/users/avirupch/following{/other_user}","gists_url":"https://api.github.com/users/avirupch/gists{/gist_id}","starred_url":"https://api.github.com/users/avirupch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/avirupch/subscriptions","organizations_url":"https://api.github.com/users/avirupch/orgs","repos_url":"https://api.github.com/users/avirupch/repos","events_url":"https://api.github.com/users/avirupch/events{/privacy}","received_events_url":"https://api.github.com/users/avirupch/received_events","type":"User","site_admin":false},"body":"How will the user provide TimeZone?","created_at":"2015-02-17T17:28:33Z","updated_at":"2015-02-17T17:28:33Z","html_url":"https://github.com/AzCiS/azure-powershell/pull/3#discussion_r24834146","pull_request_url":"https://api.github.com/repos/AzCiS/azure-powershell/pulls/3","_links":{"self":{"href":"https://api.github.com/repos/AzCiS/azure-powershell/pulls/comments/24834146"},"html":{"href":"https://github.com/AzCiS/azure-powershell/pull/3#discussion_r24834146"},"pull_request":{"href":"https://api.github.com/repos/AzCiS/azure-powershell/pulls/3"}}},"pull_request":{"url":"https://api.github.com/repos/AzCiS/azure-powershell/pulls/3","id":29445747,"html_url":"https://github.com/AzCiS/azure-powershell/pull/3","diff_url":"https://github.com/AzCiS/azure-powershell/pull/3.diff","patch_url":"https://github.com/AzCiS/azure-powershell/pull/3.patch","issue_url":"https://api.github.com/repos/AzCiS/azure-powershell/issues/3","number":3,"state":"open","locked":false,"title":"Device config and device job changes","user":{"login":"rajsing","id":10336910,"avatar_url":"https://avatars.githubusercontent.com/u/10336910?v=3","gravatar_id":"","url":"https://api.github.com/users/rajsing","html_url":"https://github.com/rajsing","followers_url":"https://api.github.com/users/rajsing/followers","following_url":"https://api.github.com/users/rajsing/following{/other_user}","gists_url":"https://api.github.com/users/rajsing/gists{/gist_id}","starred_url":"https://api.github.com/users/rajsing/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rajsing/subscriptions","organizations_url":"https://api.github.com/users/rajsing/orgs","repos_url":"https://api.github.com/users/rajsing/repos","events_url":"https://api.github.com/users/rajsing/events{/privacy}","received_events_url":"https://api.github.com/users/rajsing/received_events","type":"User","site_admin":false},"body":"These are untested, so I expect to have lots of changes after this.\r\n\r\nPlease ignore the stub for getting DevicePublicKey","created_at":"2015-02-17T14:30:15Z","updated_at":"2015-02-17T17:28:33Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7adf7c2a3658ca0f7cb4fa70381fdc35fb193d5e","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/AzCiS/azure-powershell/pulls/3/commits","review_comments_url":"https://api.github.com/repos/AzCiS/azure-powershell/pulls/3/comments","review_comment_url":"https://api.github.com/repos/AzCiS/azure-powershell/pulls/comments/{number}","comments_url":"https://api.github.com/repos/AzCiS/azure-powershell/issues/3/comments","statuses_url":"https://api.github.com/repos/AzCiS/azure-powershell/statuses/f24e36ebb33d40fd509c1866a6707894bd6d5262","head":{"label":"AzCiS:device-config","ref":"device-config","sha":"f24e36ebb33d40fd509c1866a6707894bd6d5262","user":{"login":"AzCiS","id":8486956,"avatar_url":"https://avatars.githubusercontent.com/u/8486956?v=3","gravatar_id":"","url":"https://api.github.com/users/AzCiS","html_url":"https://github.com/AzCiS","followers_url":"https://api.github.com/users/AzCiS/followers","following_url":"https://api.github.com/users/AzCiS/following{/other_user}","gists_url":"https://api.github.com/users/AzCiS/gists{/gist_id}","starred_url":"https://api.github.com/users/AzCiS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AzCiS/subscriptions","organizations_url":"https://api.github.com/users/AzCiS/orgs","repos_url":"https://api.github.com/users/AzCiS/repos","events_url":"https://api.github.com/users/AzCiS/events{/privacy}","received_events_url":"https://api.github.com/users/AzCiS/received_events","type":"Organization","site_admin":false},"repo":{"id":27542281,"name":"azure-powershell","full_name":"AzCiS/azure-powershell","owner":{"login":"AzCiS","id":8486956,"avatar_url":"https://avatars.githubusercontent.com/u/8486956?v=3","gravatar_id":"","url":"https://api.github.com/users/AzCiS","html_url":"https://github.com/AzCiS","followers_url":"https://api.github.com/users/AzCiS/followers","following_url":"https://api.github.com/users/AzCiS/following{/other_user}","gists_url":"https://api.github.com/users/AzCiS/gists{/gist_id}","starred_url":"https://api.github.com/users/AzCiS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AzCiS/subscriptions","organizations_url":"https://api.github.com/users/AzCiS/orgs","repos_url":"https://api.github.com/users/AzCiS/repos","events_url":"https://api.github.com/users/AzCiS/events{/privacy}","received_events_url":"https://api.github.com/users/AzCiS/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/AzCiS/azure-powershell","description":"Microsoft Azure PowerShell","fork":true,"url":"https://api.github.com/repos/AzCiS/azure-powershell","forks_url":"https://api.github.com/repos/AzCiS/azure-powershell/forks","keys_url":"https://api.github.com/repos/AzCiS/azure-powershell/keys{/key_id}","collaborators_url":"https://api.github.com/repos/AzCiS/azure-powershell/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/AzCiS/azure-powershell/teams","hooks_url":"https://api.github.com/repos/AzCiS/azure-powershell/hooks","issue_events_url":"https://api.github.com/repos/AzCiS/azure-powershell/issues/events{/number}","events_url":"https://api.github.com/repos/AzCiS/azure-powershell/events","assignees_url":"https://api.github.com/repos/AzCiS/azure-powershell/assignees{/user}","branches_url":"https://api.github.com/repos/AzCiS/azure-powershell/branches{/branch}","tags_url":"https://api.github.com/repos/AzCiS/azure-powershell/tags","blobs_url":"https://api.github.com/repos/AzCiS/azure-powershell/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/AzCiS/azure-powershell/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/AzCiS/azure-powershell/git/refs{/sha}","trees_url":"https://api.github.com/repos/AzCiS/azure-powershell/git/trees{/sha}","statuses_url":"https://api.github.com/repos/AzCiS/azure-powershell/statuses/{sha}","languages_url":"https://api.github.com/repos/AzCiS/azure-powershell/languages","stargazers_url":"https://api.github.com/repos/AzCiS/azure-powershell/stargazers","contributors_url":"https://api.github.com/repos/AzCiS/azure-powershell/contributors","subscribers_url":"https://api.github.com/repos/AzCiS/azure-powershell/subscribers","subscription_url":"https://api.github.com/repos/AzCiS/azure-powershell/subscription","commits_url":"https://api.github.com/repos/AzCiS/azure-powershell/commits{/sha}","git_commits_url":"https://api.github.com/repos/AzCiS/azure-powershell/git/commits{/sha}","comments_url":"https://api.github.com/repos/AzCiS/azure-powershell/comments{/number}","issue_comment_url":"https://api.github.com/repos/AzCiS/azure-powershell/issues/comments/{number}","contents_url":"https://api.github.com/repos/AzCiS/azure-powershell/contents/{+path}","compare_url":"https://api.github.com/repos/AzCiS/azure-powershell/compare/{base}...{head}","merges_url":"https://api.github.com/repos/AzCiS/azure-powershell/merges","archive_url":"https://api.github.com/repos/AzCiS/azure-powershell/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/AzCiS/azure-powershell/downloads","issues_url":"https://api.github.com/repos/AzCiS/azure-powershell/issues{/number}","pulls_url":"https://api.github.com/repos/AzCiS/azure-powershell/pulls{/number}","milestones_url":"https://api.github.com/repos/AzCiS/azure-powershell/milestones{/number}","notifications_url":"https://api.github.com/repos/AzCiS/azure-powershell/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/AzCiS/azure-powershell/labels{/name}","releases_url":"https://api.github.com/repos/AzCiS/azure-powershell/releases{/id}","created_at":"2014-12-04T13:43:38Z","updated_at":"2015-02-17T12:49:42Z","pushed_at":"2015-02-17T14:27:50Z","git_url":"git://github.com/AzCiS/azure-powershell.git","ssh_url":"git@github.com:AzCiS/azure-powershell.git","clone_url":"https://github.com/AzCiS/azure-powershell.git","svn_url":"https://github.com/AzCiS/azure-powershell","homepage":null,"size":16661,"stargazers_count":0,"watchers_count":0,"language":"C#","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":2,"forks":1,"open_issues":2,"watchers":0,"default_branch":"dev"}},"base":{"label":"AzCiS:onesdk-phase2","ref":"onesdk-phase2","sha":"6d82fadb1289e1ca208e0d47129eb6d999a0934f","user":{"login":"AzCiS","id":8486956,"avatar_url":"https://avatars.githubusercontent.com/u/8486956?v=3","gravatar_id":"","url":"https://api.github.com/users/AzCiS","html_url":"https://github.com/AzCiS","followers_url":"https://api.github.com/users/AzCiS/followers","following_url":"https://api.github.com/users/AzCiS/following{/other_user}","gists_url":"https://api.github.com/users/AzCiS/gists{/gist_id}","starred_url":"https://api.github.com/users/AzCiS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AzCiS/subscriptions","organizations_url":"https://api.github.com/users/AzCiS/orgs","repos_url":"https://api.github.com/users/AzCiS/repos","events_url":"https://api.github.com/users/AzCiS/events{/privacy}","received_events_url":"https://api.github.com/users/AzCiS/received_events","type":"Organization","site_admin":false},"repo":{"id":27542281,"name":"azure-powershell","full_name":"AzCiS/azure-powershell","owner":{"login":"AzCiS","id":8486956,"avatar_url":"https://avatars.githubusercontent.com/u/8486956?v=3","gravatar_id":"","url":"https://api.github.com/users/AzCiS","html_url":"https://github.com/AzCiS","followers_url":"https://api.github.com/users/AzCiS/followers","following_url":"https://api.github.com/users/AzCiS/following{/other_user}","gists_url":"https://api.github.com/users/AzCiS/gists{/gist_id}","starred_url":"https://api.github.com/users/AzCiS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AzCiS/subscriptions","organizations_url":"https://api.github.com/users/AzCiS/orgs","repos_url":"https://api.github.com/users/AzCiS/repos","events_url":"https://api.github.com/users/AzCiS/events{/privacy}","received_events_url":"https://api.github.com/users/AzCiS/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/AzCiS/azure-powershell","description":"Microsoft Azure PowerShell","fork":true,"url":"https://api.github.com/repos/AzCiS/azure-powershell","forks_url":"https://api.github.com/repos/AzCiS/azure-powershell/forks","keys_url":"https://api.github.com/repos/AzCiS/azure-powershell/keys{/key_id}","collaborators_url":"https://api.github.com/repos/AzCiS/azure-powershell/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/AzCiS/azure-powershell/teams","hooks_url":"https://api.github.com/repos/AzCiS/azure-powershell/hooks","issue_events_url":"https://api.github.com/repos/AzCiS/azure-powershell/issues/events{/number}","events_url":"https://api.github.com/repos/AzCiS/azure-powershell/events","assignees_url":"https://api.github.com/repos/AzCiS/azure-powershell/assignees{/user}","branches_url":"https://api.github.com/repos/AzCiS/azure-powershell/branches{/branch}","tags_url":"https://api.github.com/repos/AzCiS/azure-powershell/tags","blobs_url":"https://api.github.com/repos/AzCiS/azure-powershell/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/AzCiS/azure-powershell/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/AzCiS/azure-powershell/git/refs{/sha}","trees_url":"https://api.github.com/repos/AzCiS/azure-powershell/git/trees{/sha}","statuses_url":"https://api.github.com/repos/AzCiS/azure-powershell/statuses/{sha}","languages_url":"https://api.github.com/repos/AzCiS/azure-powershell/languages","stargazers_url":"https://api.github.com/repos/AzCiS/azure-powershell/stargazers","contributors_url":"https://api.github.com/repos/AzCiS/azure-powershell/contributors","subscribers_url":"https://api.github.com/repos/AzCiS/azure-powershell/subscribers","subscription_url":"https://api.github.com/repos/AzCiS/azure-powershell/subscription","commits_url":"https://api.github.com/repos/AzCiS/azure-powershell/commits{/sha}","git_commits_url":"https://api.github.com/repos/AzCiS/azure-powershell/git/commits{/sha}","comments_url":"https://api.github.com/repos/AzCiS/azure-powershell/comments{/number}","issue_comment_url":"https://api.github.com/repos/AzCiS/azure-powershell/issues/comments/{number}","contents_url":"https://api.github.com/repos/AzCiS/azure-powershell/contents/{+path}","compare_url":"https://api.github.com/repos/AzCiS/azure-powershell/compare/{base}...{head}","merges_url":"https://api.github.com/repos/AzCiS/azure-powershell/merges","archive_url":"https://api.github.com/repos/AzCiS/azure-powershell/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/AzCiS/azure-powershell/downloads","issues_url":"https://api.github.com/repos/AzCiS/azure-powershell/issues{/number}","pulls_url":"https://api.github.com/repos/AzCiS/azure-powershell/pulls{/number}","milestones_url":"https://api.github.com/repos/AzCiS/azure-powershell/milestones{/number}","notifications_url":"https://api.github.com/repos/AzCiS/azure-powershell/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/AzCiS/azure-powershell/labels{/name}","releases_url":"https://api.github.com/repos/AzCiS/azure-powershell/releases{/id}","created_at":"2014-12-04T13:43:38Z","updated_at":"2015-02-17T12:49:42Z","pushed_at":"2015-02-17T14:27:50Z","git_url":"git://github.com/AzCiS/azure-powershell.git","ssh_url":"git@github.com:AzCiS/azure-powershell.git","clone_url":"https://github.com/AzCiS/azure-powershell.git","svn_url":"https://github.com/AzCiS/azure-powershell","homepage":null,"size":16661,"stargazers_count":0,"watchers_count":0,"language":"C#","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":2,"forks":1,"open_issues":2,"watchers":0,"default_branch":"dev"}},"_links":{"self":{"href":"https://api.github.com/repos/AzCiS/azure-powershell/pulls/3"},"html":{"href":"https://github.com/AzCiS/azure-powershell/pull/3"},"issue":{"href":"https://api.github.com/repos/AzCiS/azure-powershell/issues/3"},"comments":{"href":"https://api.github.com/repos/AzCiS/azure-powershell/issues/3/comments"},"review_comments":{"href":"https://api.github.com/repos/AzCiS/azure-powershell/pulls/3/comments"},"review_comment":{"href":"https://api.github.com/repos/AzCiS/azure-powershell/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/AzCiS/azure-powershell/pulls/3/commits"},"statuses":{"href":"https://api.github.com/repos/AzCiS/azure-powershell/statuses/f24e36ebb33d40fd509c1866a6707894bd6d5262"}}}}