{"action":"created","comment":{"url":"https://api.github.com/repos/Azure/device-simulation-dotnet/pulls/comments/235590583","pull_request_review_id":177491316,"id":235590583,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzNTU5MDU4Mw==","diff_hunk":"@@ -375,6 +375,11 @@ public async Task<Models.Simulation> MergeAsync(SimulationPatch patch)\n             // modify other fields, so we need to check for null\n             if (patch.Enabled != null) simulation.Enabled = patch.Enabled.Value;\n \n+            if (patch.DeleteDevicesOnce != null)","path":"Services/Simulations.cs","position":4,"original_position":4,"commit_id":"fafcc0a598f22b50c1d73fb55c1da327c99dd7fd","original_commit_id":"fafcc0a598f22b50c1d73fb55c1da327c99dd7fd","user":{"login":"dluc","id":371009,"node_id":"MDQ6VXNlcjM3MTAwOQ==","avatar_url":"https://avatars2.githubusercontent.com/u/371009?v=4","gravatar_id":"","url":"https://api.github.com/users/dluc","html_url":"https://github.com/dluc","followers_url":"https://api.github.com/users/dluc/followers","following_url":"https://api.github.com/users/dluc/following{/other_user}","gists_url":"https://api.github.com/users/dluc/gists{/gist_id}","starred_url":"https://api.github.com/users/dluc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dluc/subscriptions","organizations_url":"https://api.github.com/users/dluc/orgs","repos_url":"https://api.github.com/users/dluc/repos","events_url":"https://api.github.com/users/dluc/events{/privacy}","received_events_url":"https://api.github.com/users/dluc/received_events","type":"User","site_admin":false},"body":"'if patch.DeleteDevicesOnce.HasValue`","created_at":"2018-11-22T03:04:15Z","updated_at":"2018-11-22T03:04:15Z","html_url":"https://github.com/Azure/device-simulation-dotnet/pull/313#discussion_r235590583","pull_request_url":"https://api.github.com/repos/Azure/device-simulation-dotnet/pulls/313","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/Azure/device-simulation-dotnet/pulls/comments/235590583"},"html":{"href":"https://github.com/Azure/device-simulation-dotnet/pull/313#discussion_r235590583"},"pull_request":{"href":"https://api.github.com/repos/Azure/device-simulation-dotnet/pulls/313"}}},"pull_request":{"url":"https://api.github.com/repos/Azure/device-simulation-dotnet/pulls/313","id":229849472,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI5ODQ5NDcy","html_url":"https://github.com/Azure/device-simulation-dotnet/pull/313","diff_url":"https://github.com/Azure/device-simulation-dotnet/pull/313.diff","patch_url":"https://github.com/Azure/device-simulation-dotnet/pull/313.patch","issue_url":"https://api.github.com/repos/Azure/device-simulation-dotnet/issues/313","number":313,"state":"open","locked":false,"title":"Delete all devices even after the simulation is stopped","user":{"login":"sasathy","id":39567983,"node_id":"MDQ6VXNlcjM5NTY3OTgz","avatar_url":"https://avatars0.githubusercontent.com/u/39567983?v=4","gravatar_id":"","url":"https://api.github.com/users/sasathy","html_url":"https://github.com/sasathy","followers_url":"https://api.github.com/users/sasathy/followers","following_url":"https://api.github.com/users/sasathy/following{/other_user}","gists_url":"https://api.github.com/users/sasathy/gists{/gist_id}","starred_url":"https://api.github.com/users/sasathy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sasathy/subscriptions","organizations_url":"https://api.github.com/users/sasathy/orgs","repos_url":"https://api.github.com/users/sasathy/repos","events_url":"https://api.github.com/users/sasathy/events{/privacy}","received_events_url":"https://api.github.com/users/sasathy/received_events","type":"User","site_admin":false},"body":"Currently, user can choose to delete devices associated with a simulation only while creating a new simulation. \r\n\r\nIn this PR, we are adding functionality to delete devices associated with the simulation after the simulation has stopped.\n\n<!-- Reviewable:start -->\n---\nThis change is [<img src=\"https://reviewable.io/review_button.svg\" height=\"34\" align=\"absmiddle\" alt=\"Reviewable\"/>](https://reviewable.io/reviews/azure/device-simulation-dotnet/313)\n<!-- Reviewable:end -->\n","created_at":"2018-11-09T23:43:33Z","updated_at":"2018-11-22T03:04:15Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8462e00a7c66b7d0b799da4faa2c429d481da21f","assignee":null,"assignees":[],"requested_reviewers":[{"login":"peterfelts","id":5828480,"node_id":"MDQ6VXNlcjU4Mjg0ODA=","avatar_url":"https://avatars0.githubusercontent.com/u/5828480?v=4","gravatar_id":"","url":"https://api.github.com/users/peterfelts","html_url":"https://github.com/peterfelts","followers_url":"https://api.github.com/users/peterfelts/followers","following_url":"https://api.github.com/users/peterfelts/following{/other_user}","gists_url":"https://api.github.com/users/peterfelts/gists{/gist_id}","starred_url":"https://api.github.com/users/peterfelts/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/peterfelts/subscriptions","organizations_url":"https://api.github.com/users/peterfelts/orgs","repos_url":"https://api.github.com/users/peterfelts/repos","events_url":"https://api.github.com/users/peterfelts/events{/privacy}","received_events_url":"https://api.github.com/users/peterfelts/received_events","type":"User","site_admin":false},{"login":"maple10001","id":8744187,"node_id":"MDQ6VXNlcjg3NDQxODc=","avatar_url":"https://avatars0.githubusercontent.com/u/8744187?v=4","gravatar_id":"","url":"https://api.github.com/users/maple10001","html_url":"https://github.com/maple10001","followers_url":"https://api.github.com/users/maple10001/followers","following_url":"https://api.github.com/users/maple10001/following{/other_user}","gists_url":"https://api.github.com/users/maple10001/gists{/gist_id}","starred_url":"https://api.github.com/users/maple10001/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maple10001/subscriptions","organizations_url":"https://api.github.com/users/maple10001/orgs","repos_url":"https://api.github.com/users/maple10001/repos","events_url":"https://api.github.com/users/maple10001/events{/privacy}","received_events_url":"https://api.github.com/users/maple10001/received_events","type":"User","site_admin":false},{"login":"avanikp","id":32693971,"node_id":"MDQ6VXNlcjMyNjkzOTcx","avatar_url":"https://avatars1.githubusercontent.com/u/32693971?v=4","gravatar_id":"","url":"https://api.github.com/users/avanikp","html_url":"https://github.com/avanikp","followers_url":"https://api.github.com/users/avanikp/followers","following_url":"https://api.github.com/users/avanikp/following{/other_user}","gists_url":"https://api.github.com/users/avanikp/gists{/gist_id}","starred_url":"https://api.github.com/users/avanikp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/avanikp/subscriptions","organizations_url":"https://api.github.com/users/avanikp/orgs","repos_url":"https://api.github.com/users/avanikp/repos","events_url":"https://api.github.com/users/avanikp/events{/privacy}","received_events_url":"https://api.github.com/users/avanikp/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/Azure/device-simulation-dotnet/pulls/313/commits","review_comments_url":"https://api.github.com/repos/Azure/device-simulation-dotnet/pulls/313/comments","review_comment_url":"https://api.github.com/repos/Azure/device-simulation-dotnet/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Azure/device-simulation-dotnet/issues/313/comments","statuses_url":"https://api.github.com/repos/Azure/device-simulation-dotnet/statuses/fafcc0a598f22b50c1d73fb55c1da327c99dd7fd","head":{"label":"Azure:bulkDeletion","ref":"bulkDeletion","sha":"fafcc0a598f22b50c1d73fb55c1da327c99dd7fd","user":{"login":"Azure","id":6844498,"node_id":"MDEyOk9yZ2FuaXphdGlvbjY4NDQ0OTg=","avatar_url":"https://avatars0.githubusercontent.com/u/6844498?v=4","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":89741887,"node_id":"MDEwOlJlcG9zaXRvcnk4OTc0MTg4Nw==","name":"device-simulation-dotnet","full_name":"Azure/device-simulation-dotnet","private":false,"owner":{"login":"Azure","id":6844498,"node_id":"MDEyOk9yZ2FuaXphdGlvbjY4NDQ0OTg=","avatar_url":"https://avatars0.githubusercontent.com/u/6844498?v=4","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},"html_url":"https://github.com/Azure/device-simulation-dotnet","description":"IoT Simulation service","fork":false,"url":"https://api.github.com/repos/Azure/device-simulation-dotnet","forks_url":"https://api.github.com/repos/Azure/device-simulation-dotnet/forks","keys_url":"https://api.github.com/repos/Azure/device-simulation-dotnet/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Azure/device-simulation-dotnet/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Azure/device-simulation-dotnet/teams","hooks_url":"https://api.github.com/repos/Azure/device-simulation-dotnet/hooks","issue_events_url":"https://api.github.com/repos/Azure/device-simulation-dotnet/issues/events{/number}","events_url":"https://api.github.com/repos/Azure/device-simulation-dotnet/events","assignees_url":"https://api.github.com/repos/Azure/device-simulation-dotnet/assignees{/user}","branches_url":"https://api.github.com/repos/Azure/device-simulation-dotnet/branches{/branch}","tags_url":"https://api.github.com/repos/Azure/device-simulation-dotnet/tags","blobs_url":"https://api.github.com/repos/Azure/device-simulation-dotnet/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Azure/device-simulation-dotnet/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Azure/device-simulation-dotnet/git/refs{/sha}","trees_url":"https://api.github.com/repos/Azure/device-simulation-dotnet/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Azure/device-simulation-dotnet/statuses/{sha}","languages_url":"https://api.github.com/repos/Azure/device-simulation-dotnet/languages","stargazers_url":"https://api.github.com/repos/Azure/device-simulation-dotnet/stargazers","contributors_url":"https://api.github.com/repos/Azure/device-simulation-dotnet/contributors","subscribers_url":"https://api.github.com/repos/Azure/device-simulation-dotnet/subscribers","subscription_url":"https://api.github.com/repos/Azure/device-simulation-dotnet/subscription","commits_url":"https://api.github.com/repos/Azure/device-simulation-dotnet/commits{/sha}","git_commits_url":"https://api.github.com/repos/Azure/device-simulation-dotnet/git/commits{/sha}","comments_url":"https://api.github.com/repos/Azure/device-simulation-dotnet/comments{/number}","issue_comment_url":"https://api.github.com/repos/Azure/device-simulation-dotnet/issues/comments{/number}","contents_url":"https://api.github.com/repos/Azure/device-simulation-dotnet/contents/{+path}","compare_url":"https://api.github.com/repos/Azure/device-simulation-dotnet/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Azure/device-simulation-dotnet/merges","archive_url":"https://api.github.com/repos/Azure/device-simulation-dotnet/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Azure/device-simulation-dotnet/downloads","issues_url":"https://api.github.com/repos/Azure/device-simulation-dotnet/issues{/number}","pulls_url":"https://api.github.com/repos/Azure/device-simulation-dotnet/pulls{/number}","milestones_url":"https://api.github.com/repos/Azure/device-simulation-dotnet/milestones{/number}","notifications_url":"https://api.github.com/repos/Azure/device-simulation-dotnet/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Azure/device-simulation-dotnet/labels{/name}","releases_url":"https://api.github.com/repos/Azure/device-simulation-dotnet/releases{/id}","deployments_url":"https://api.github.com/repos/Azure/device-simulation-dotnet/deployments","created_at":"2017-04-28T20:20:08Z","updated_at":"2018-11-22T00:21:33Z","pushed_at":"2018-11-22T01:30:37Z","git_url":"git://github.com/Azure/device-simulation-dotnet.git","ssh_url":"git@github.com:Azure/device-simulation-dotnet.git","clone_url":"https://github.com/Azure/device-simulation-dotnet.git","svn_url":"https://github.com/Azure/device-simulation-dotnet","homepage":"","size":2686,"stargazers_count":34,"watchers_count":34,"language":"C#","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":42,"mirror_url":null,"archived":false,"open_issues_count":79,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":42,"open_issues":79,"watchers":34,"default_branch":"master"}},"base":{"label":"Azure:master","ref":"master","sha":"8a1dbb5f7f4cecf0353ecc2ddefbcc63e7079e4e","user":{"login":"Azure","id":6844498,"node_id":"MDEyOk9yZ2FuaXphdGlvbjY4NDQ0OTg=","avatar_url":"https://avatars0.githubusercontent.com/u/6844498?v=4","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":89741887,"node_id":"MDEwOlJlcG9zaXRvcnk4OTc0MTg4Nw==","name":"device-simulation-dotnet","full_name":"Azure/device-simulation-dotnet","private":false,"owner":{"login":"Azure","id":6844498,"node_id":"MDEyOk9yZ2FuaXphdGlvbjY4NDQ0OTg=","avatar_url":"https://avatars0.githubusercontent.com/u/6844498?v=4","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},"html_url":"https://github.com/Azure/device-simulation-dotnet","description":"IoT Simulation service","fork":false,"url":"https://api.github.com/repos/Azure/device-simulation-dotnet","forks_url":"https://api.github.com/repos/Azure/device-simulation-dotnet/forks","keys_url":"https://api.github.com/repos/Azure/device-simulation-dotnet/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Azure/device-simulation-dotnet/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Azure/device-simulation-dotnet/teams","hooks_url":"https://api.github.com/repos/Azure/device-simulation-dotnet/hooks","issue_events_url":"https://api.github.com/repos/Azure/device-simulation-dotnet/issues/events{/number}","events_url":"https://api.github.com/repos/Azure/device-simulation-dotnet/events","assignees_url":"https://api.github.com/repos/Azure/device-simulation-dotnet/assignees{/user}","branches_url":"https://api.github.com/repos/Azure/device-simulation-dotnet/branches{/branch}","tags_url":"https://api.github.com/repos/Azure/device-simulation-dotnet/tags","blobs_url":"https://api.github.com/repos/Azure/device-simulation-dotnet/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Azure/device-simulation-dotnet/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Azure/device-simulation-dotnet/git/refs{/sha}","trees_url":"https://api.github.com/repos/Azure/device-simulation-dotnet/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Azure/device-simulation-dotnet/statuses/{sha}","languages_url":"https://api.github.com/repos/Azure/device-simulation-dotnet/languages","stargazers_url":"https://api.github.com/repos/Azure/device-simulation-dotnet/stargazers","contributors_url":"https://api.github.com/repos/Azure/device-simulation-dotnet/contributors","subscribers_url":"https://api.github.com/repos/Azure/device-simulation-dotnet/subscribers","subscription_url":"https://api.github.com/repos/Azure/device-simulation-dotnet/subscription","commits_url":"https://api.github.com/repos/Azure/device-simulation-dotnet/commits{/sha}","git_commits_url":"https://api.github.com/repos/Azure/device-simulation-dotnet/git/commits{/sha}","comments_url":"https://api.github.com/repos/Azure/device-simulation-dotnet/comments{/number}","issue_comment_url":"https://api.github.com/repos/Azure/device-simulation-dotnet/issues/comments{/number}","contents_url":"https://api.github.com/repos/Azure/device-simulation-dotnet/contents/{+path}","compare_url":"https://api.github.com/repos/Azure/device-simulation-dotnet/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Azure/device-simulation-dotnet/merges","archive_url":"https://api.github.com/repos/Azure/device-simulation-dotnet/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Azure/device-simulation-dotnet/downloads","issues_url":"https://api.github.com/repos/Azure/device-simulation-dotnet/issues{/number}","pulls_url":"https://api.github.com/repos/Azure/device-simulation-dotnet/pulls{/number}","milestones_url":"https://api.github.com/repos/Azure/device-simulation-dotnet/milestones{/number}","notifications_url":"https://api.github.com/repos/Azure/device-simulation-dotnet/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Azure/device-simulation-dotnet/labels{/name}","releases_url":"https://api.github.com/repos/Azure/device-simulation-dotnet/releases{/id}","deployments_url":"https://api.github.com/repos/Azure/device-simulation-dotnet/deployments","created_at":"2017-04-28T20:20:08Z","updated_at":"2018-11-22T00:21:33Z","pushed_at":"2018-11-22T01:30:37Z","git_url":"git://github.com/Azure/device-simulation-dotnet.git","ssh_url":"git@github.com:Azure/device-simulation-dotnet.git","clone_url":"https://github.com/Azure/device-simulation-dotnet.git","svn_url":"https://github.com/Azure/device-simulation-dotnet","homepage":"","size":2686,"stargazers_count":34,"watchers_count":34,"language":"C#","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":42,"mirror_url":null,"archived":false,"open_issues_count":79,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":42,"open_issues":79,"watchers":34,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Azure/device-simulation-dotnet/pulls/313"},"html":{"href":"https://github.com/Azure/device-simulation-dotnet/pull/313"},"issue":{"href":"https://api.github.com/repos/Azure/device-simulation-dotnet/issues/313"},"comments":{"href":"https://api.github.com/repos/Azure/device-simulation-dotnet/issues/313/comments"},"review_comments":{"href":"https://api.github.com/repos/Azure/device-simulation-dotnet/pulls/313/comments"},"review_comment":{"href":"https://api.github.com/repos/Azure/device-simulation-dotnet/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Azure/device-simulation-dotnet/pulls/313/commits"},"statuses":{"href":"https://api.github.com/repos/Azure/device-simulation-dotnet/statuses/fafcc0a598f22b50c1d73fb55c1da327c99dd7fd"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"dluc"}}