{"action":"created","comment":{"url":"https://api.github.com/repos/Microsoft/service-fabric-client-dotnet/pulls/comments/215339842","pull_request_review_id":152581914,"id":215339842,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxNTMzOTg0Mg==","diff_hunk":"@@ -0,0 +1,100 @@\n+// ------------------------------------------------------------\n+// Copyright (c) Microsoft Corporation. All rights reserved.\n+// Licensed under the MIT License (MIT). See License.txt in the repo root for license information.\n+// ------------------------------------------------------------\n+\n+namespace Microsoft.ServiceFabric.Powershell.Http\n+{\n+    using System;\n+    using System.Collections.Generic;\n+    using System.IO;\n+    using System.Linq;\n+    using Newtonsoft.Json;\n+    using SfSbzYamlMergeUtils;\n+\n+    /// <summary>\n+    /// Utility and extension methods for YAML/JSON operations.\n+    /// </summary>\n+    internal static class YamlUtils\n+    {\n+        internal enum ResourseType\n+        {\n+            VOLUME,\n+            NETWORK,\n+            APPLICATION,\n+            GATEWAY,\n+            UNKNOWN,\n+        }\n+\n+        internal static List<Tuple<ResourseType, string, string, string>> GetFinalResourceDescriptionFromYamls(List<string> yamlInputFileList, string outputRootDirectory)\n+        {\n+            GenerateMergedResourceDescription(yamlInputFileList, outputRootDirectory);\n+\n+            // Get allfiles SortedbyName from the folder\n+            var generatedFilesList = Directory.GetFiles(outputRootDirectory, \"*.json\", SearchOption.AllDirectories).Select(fn => new FileInfo(fn)).OrderBy(f => f.Name);\n+\n+            var resourceDescriptionList = new List<Tuple<ResourseType, string, string, string>>();\n+            foreach (var fileIter in generatedFilesList)\n+            {\n+                // generate a list of tuple<name, type, description string>\n+                // call get resource description from file\n+                resourceDescriptionList.Add(GetResourceDescriptionFromFile(fileIter.FullName));\n+            }\n+\n+            return resourceDescriptionList;\n+        }\n+\n+        /// <summary>\n+        /// Returns the Resource description from a JSON file\n+        /// </summary>\n+        /// <param name=\"jsonFilePath\">the path of the json</param>\n+        /// <returns>Resource description</returns>\n+        internal static Tuple<ResourseType, string, string, string> GetResourceDescriptionFromFile(string jsonFilePath)","path":"src/Microsoft.ServiceFabric.Powershell.Http/YamlUtils.cs","position":52,"original_position":52,"commit_id":"823dd735751973049c3cec2f312eeb73dd323a2e","original_commit_id":"823dd735751973049c3cec2f312eeb73dd323a2e","user":{"login":"amanbha","id":11221966,"node_id":"MDQ6VXNlcjExMjIxOTY2","avatar_url":"https://avatars0.githubusercontent.com/u/11221966?v=4","gravatar_id":"","url":"https://api.github.com/users/amanbha","html_url":"https://github.com/amanbha","followers_url":"https://api.github.com/users/amanbha/followers","following_url":"https://api.github.com/users/amanbha/following{/other_user}","gists_url":"https://api.github.com/users/amanbha/gists{/gist_id}","starred_url":"https://api.github.com/users/amanbha/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amanbha/subscriptions","organizations_url":"https://api.github.com/users/amanbha/orgs","repos_url":"https://api.github.com/users/amanbha/repos","events_url":"https://api.github.com/users/amanbha/events{/privacy}","received_events_url":"https://api.github.com/users/amanbha/received_events","type":"User","site_admin":false},"body":">ResourseType, string, string, string [](start = 30, length = 36)\r\n\r\nCreate a ResourceInformation class to encapsulate this.","created_at":"2018-09-05T16:27:03Z","updated_at":"2018-09-05T16:27:03Z","html_url":"https://github.com/Microsoft/service-fabric-client-dotnet/pull/34#discussion_r215339842","pull_request_url":"https://api.github.com/repos/Microsoft/service-fabric-client-dotnet/pulls/34","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/Microsoft/service-fabric-client-dotnet/pulls/comments/215339842"},"html":{"href":"https://github.com/Microsoft/service-fabric-client-dotnet/pull/34#discussion_r215339842"},"pull_request":{"href":"https://api.github.com/repos/Microsoft/service-fabric-client-dotnet/pulls/34"}}},"pull_request":{"url":"https://api.github.com/repos/Microsoft/service-fabric-client-dotnet/pulls/34","id":213291571,"node_id":"MDExOlB1bGxSZXF1ZXN0MjEzMjkxNTcx","html_url":"https://github.com/Microsoft/service-fabric-client-dotnet/pull/34","diff_url":"https://github.com/Microsoft/service-fabric-client-dotnet/pull/34.diff","patch_url":"https://github.com/Microsoft/service-fabric-client-dotnet/pull/34.patch","issue_url":"https://api.github.com/repos/Microsoft/service-fabric-client-dotnet/issues/34","number":34,"state":"open","locked":false,"title":"Orchestrator cmdlet added","user":{"login":"anantshankar17","id":39825466,"node_id":"MDQ6VXNlcjM5ODI1NDY2","avatar_url":"https://avatars1.githubusercontent.com/u/39825466?v=4","gravatar_id":"","url":"https://api.github.com/users/anantshankar17","html_url":"https://github.com/anantshankar17","followers_url":"https://api.github.com/users/anantshankar17/followers","following_url":"https://api.github.com/users/anantshankar17/following{/other_user}","gists_url":"https://api.github.com/users/anantshankar17/gists{/gist_id}","starred_url":"https://api.github.com/users/anantshankar17/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anantshankar17/subscriptions","organizations_url":"https://api.github.com/users/anantshankar17/orgs","repos_url":"https://api.github.com/users/anantshankar17/repos","events_url":"https://api.github.com/users/anantshankar17/events{/privacy}","received_events_url":"https://api.github.com/users/anantshankar17/received_events","type":"User","site_admin":false},"body":"Adding the orchestrator cmdlet.","created_at":"2018-09-05T13:20:32Z","updated_at":"2018-09-05T16:27:03Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f82fd9eab961d824e9c2927965b65504dc5ce4a9","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/Microsoft/service-fabric-client-dotnet/pulls/34/commits","review_comments_url":"https://api.github.com/repos/Microsoft/service-fabric-client-dotnet/pulls/34/comments","review_comment_url":"https://api.github.com/repos/Microsoft/service-fabric-client-dotnet/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Microsoft/service-fabric-client-dotnet/issues/34/comments","statuses_url":"https://api.github.com/repos/Microsoft/service-fabric-client-dotnet/statuses/823dd735751973049c3cec2f312eeb73dd323a2e","head":{"label":"Microsoft:users/ashank/deployorchestrator","ref":"users/ashank/deployorchestrator","sha":"823dd735751973049c3cec2f312eeb73dd323a2e","user":{"login":"Microsoft","id":6154722,"node_id":"MDEyOk9yZ2FuaXphdGlvbjYxNTQ3MjI=","avatar_url":"https://avatars2.githubusercontent.com/u/6154722?v=4","gravatar_id":"","url":"https://api.github.com/users/Microsoft","html_url":"https://github.com/Microsoft","followers_url":"https://api.github.com/users/Microsoft/followers","following_url":"https://api.github.com/users/Microsoft/following{/other_user}","gists_url":"https://api.github.com/users/Microsoft/gists{/gist_id}","starred_url":"https://api.github.com/users/Microsoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Microsoft/subscriptions","organizations_url":"https://api.github.com/users/Microsoft/orgs","repos_url":"https://api.github.com/users/Microsoft/repos","events_url":"https://api.github.com/users/Microsoft/events{/privacy}","received_events_url":"https://api.github.com/users/Microsoft/received_events","type":"Organization","site_admin":false},"repo":{"id":124460971,"node_id":"MDEwOlJlcG9zaXRvcnkxMjQ0NjA5NzE=","name":"service-fabric-client-dotnet","full_name":"Microsoft/service-fabric-client-dotnet","owner":{"login":"Microsoft","id":6154722,"node_id":"MDEyOk9yZ2FuaXphdGlvbjYxNTQ3MjI=","avatar_url":"https://avatars2.githubusercontent.com/u/6154722?v=4","gravatar_id":"","url":"https://api.github.com/users/Microsoft","html_url":"https://github.com/Microsoft","followers_url":"https://api.github.com/users/Microsoft/followers","following_url":"https://api.github.com/users/Microsoft/following{/other_user}","gists_url":"https://api.github.com/users/Microsoft/gists{/gist_id}","starred_url":"https://api.github.com/users/Microsoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Microsoft/subscriptions","organizations_url":"https://api.github.com/users/Microsoft/orgs","repos_url":"https://api.github.com/users/Microsoft/repos","events_url":"https://api.github.com/users/Microsoft/events{/privacy}","received_events_url":"https://api.github.com/users/Microsoft/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Microsoft/service-fabric-client-dotnet","description":".NET client library for Service Fabric","fork":false,"url":"https://api.github.com/repos/Microsoft/service-fabric-client-dotnet","forks_url":"https://api.github.com/repos/Microsoft/service-fabric-client-dotnet/forks","keys_url":"https://api.github.com/repos/Microsoft/service-fabric-client-dotnet/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Microsoft/service-fabric-client-dotnet/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Microsoft/service-fabric-client-dotnet/teams","hooks_url":"https://api.github.com/repos/Microsoft/service-fabric-client-dotnet/hooks","issue_events_url":"https://api.github.com/repos/Microsoft/service-fabric-client-dotnet/issues/events{/number}","events_url":"https://api.github.com/repos/Microsoft/service-fabric-client-dotnet/events","assignees_url":"https://api.github.com/repos/Microsoft/service-fabric-client-dotnet/assignees{/user}","branches_url":"https://api.github.com/repos/Microsoft/service-fabric-client-dotnet/branches{/branch}","tags_url":"https://api.github.com/repos/Microsoft/service-fabric-client-dotnet/tags","blobs_url":"https://api.github.com/repos/Microsoft/service-fabric-client-dotnet/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Microsoft/service-fabric-client-dotnet/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Microsoft/service-fabric-client-dotnet/git/refs{/sha}","trees_url":"https://api.github.com/repos/Microsoft/service-fabric-client-dotnet/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Microsoft/service-fabric-client-dotnet/statuses/{sha}","languages_url":"https://api.github.com/repos/Microsoft/service-fabric-client-dotnet/languages","stargazers_url":"https://api.github.com/repos/Microsoft/service-fabric-client-dotnet/stargazers","contributors_url":"https://api.github.com/repos/Microsoft/service-fabric-client-dotnet/contributors","subscribers_url":"https://api.github.com/repos/Microsoft/service-fabric-client-dotnet/subscribers","subscription_url":"https://api.github.com/repos/Microsoft/service-fabric-client-dotnet/subscription","commits_url":"https://api.github.com/repos/Microsoft/service-fabric-client-dotnet/commits{/sha}","git_commits_url":"https://api.github.com/repos/Microsoft/service-fabric-client-dotnet/git/commits{/sha}","comments_url":"https://api.github.com/repos/Microsoft/service-fabric-client-dotnet/comments{/number}","issue_comment_url":"https://api.github.com/repos/Microsoft/service-fabric-client-dotnet/issues/comments{/number}","contents_url":"https://api.github.com/repos/Microsoft/service-fabric-client-dotnet/contents/{+path}","compare_url":"https://api.github.com/repos/Microsoft/service-fabric-client-dotnet/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Microsoft/service-fabric-client-dotnet/merges","archive_url":"https://api.github.com/repos/Microsoft/service-fabric-client-dotnet/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Microsoft/service-fabric-client-dotnet/downloads","issues_url":"https://api.github.com/repos/Microsoft/service-fabric-client-dotnet/issues{/number}","pulls_url":"https://api.github.com/repos/Microsoft/service-fabric-client-dotnet/pulls{/number}","milestones_url":"https://api.github.com/repos/Microsoft/service-fabric-client-dotnet/milestones{/number}","notifications_url":"https://api.github.com/repos/Microsoft/service-fabric-client-dotnet/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Microsoft/service-fabric-client-dotnet/labels{/name}","releases_url":"https://api.github.com/repos/Microsoft/service-fabric-client-dotnet/releases{/id}","deployments_url":"https://api.github.com/repos/Microsoft/service-fabric-client-dotnet/deployments","created_at":"2018-03-08T23:34:01Z","updated_at":"2018-08-31T03:11:37Z","pushed_at":"2018-09-05T13:20:33Z","git_url":"git://github.com/Microsoft/service-fabric-client-dotnet.git","ssh_url":"git@github.com:Microsoft/service-fabric-client-dotnet.git","clone_url":"https://github.com/Microsoft/service-fabric-client-dotnet.git","svn_url":"https://github.com/Microsoft/service-fabric-client-dotnet","homepage":null,"size":4951,"stargazers_count":25,"watchers_count":25,"language":"C#","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":7,"mirror_url":null,"archived":false,"open_issues_count":5,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":7,"open_issues":5,"watchers":25,"default_branch":"develop"}},"base":{"label":"Microsoft:mesh_vnext","ref":"mesh_vnext","sha":"f6b8af70b8df8c523d6af398f421ec815f2ec764","user":{"login":"Microsoft","id":6154722,"node_id":"MDEyOk9yZ2FuaXphdGlvbjYxNTQ3MjI=","avatar_url":"https://avatars2.githubusercontent.com/u/6154722?v=4","gravatar_id":"","url":"https://api.github.com/users/Microsoft","html_url":"https://github.com/Microsoft","followers_url":"https://api.github.com/users/Microsoft/followers","following_url":"https://api.github.com/users/Microsoft/following{/other_user}","gists_url":"https://api.github.com/users/Microsoft/gists{/gist_id}","starred_url":"https://api.github.com/users/Microsoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Microsoft/subscriptions","organizations_url":"https://api.github.com/users/Microsoft/orgs","repos_url":"https://api.github.com/users/Microsoft/repos","events_url":"https://api.github.com/users/Microsoft/events{/privacy}","received_events_url":"https://api.github.com/users/Microsoft/received_events","type":"Organization","site_admin":false},"repo":{"id":124460971,"node_id":"MDEwOlJlcG9zaXRvcnkxMjQ0NjA5NzE=","name":"service-fabric-client-dotnet","full_name":"Microsoft/service-fabric-client-dotnet","owner":{"login":"Microsoft","id":6154722,"node_id":"MDEyOk9yZ2FuaXphdGlvbjYxNTQ3MjI=","avatar_url":"https://avatars2.githubusercontent.com/u/6154722?v=4","gravatar_id":"","url":"https://api.github.com/users/Microsoft","html_url":"https://github.com/Microsoft","followers_url":"https://api.github.com/users/Microsoft/followers","following_url":"https://api.github.com/users/Microsoft/following{/other_user}","gists_url":"https://api.github.com/users/Microsoft/gists{/gist_id}","starred_url":"https://api.github.com/users/Microsoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Microsoft/subscriptions","organizations_url":"https://api.github.com/users/Microsoft/orgs","repos_url":"https://api.github.com/users/Microsoft/repos","events_url":"https://api.github.com/users/Microsoft/events{/privacy}","received_events_url":"https://api.github.com/users/Microsoft/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Microsoft/service-fabric-client-dotnet","description":".NET client library for Service Fabric","fork":false,"url":"https://api.github.com/repos/Microsoft/service-fabric-client-dotnet","forks_url":"https://api.github.com/repos/Microsoft/service-fabric-client-dotnet/forks","keys_url":"https://api.github.com/repos/Microsoft/service-fabric-client-dotnet/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Microsoft/service-fabric-client-dotnet/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Microsoft/service-fabric-client-dotnet/teams","hooks_url":"https://api.github.com/repos/Microsoft/service-fabric-client-dotnet/hooks","issue_events_url":"https://api.github.com/repos/Microsoft/service-fabric-client-dotnet/issues/events{/number}","events_url":"https://api.github.com/repos/Microsoft/service-fabric-client-dotnet/events","assignees_url":"https://api.github.com/repos/Microsoft/service-fabric-client-dotnet/assignees{/user}","branches_url":"https://api.github.com/repos/Microsoft/service-fabric-client-dotnet/branches{/branch}","tags_url":"https://api.github.com/repos/Microsoft/service-fabric-client-dotnet/tags","blobs_url":"https://api.github.com/repos/Microsoft/service-fabric-client-dotnet/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Microsoft/service-fabric-client-dotnet/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Microsoft/service-fabric-client-dotnet/git/refs{/sha}","trees_url":"https://api.github.com/repos/Microsoft/service-fabric-client-dotnet/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Microsoft/service-fabric-client-dotnet/statuses/{sha}","languages_url":"https://api.github.com/repos/Microsoft/service-fabric-client-dotnet/languages","stargazers_url":"https://api.github.com/repos/Microsoft/service-fabric-client-dotnet/stargazers","contributors_url":"https://api.github.com/repos/Microsoft/service-fabric-client-dotnet/contributors","subscribers_url":"https://api.github.com/repos/Microsoft/service-fabric-client-dotnet/subscribers","subscription_url":"https://api.github.com/repos/Microsoft/service-fabric-client-dotnet/subscription","commits_url":"https://api.github.com/repos/Microsoft/service-fabric-client-dotnet/commits{/sha}","git_commits_url":"https://api.github.com/repos/Microsoft/service-fabric-client-dotnet/git/commits{/sha}","comments_url":"https://api.github.com/repos/Microsoft/service-fabric-client-dotnet/comments{/number}","issue_comment_url":"https://api.github.com/repos/Microsoft/service-fabric-client-dotnet/issues/comments{/number}","contents_url":"https://api.github.com/repos/Microsoft/service-fabric-client-dotnet/contents/{+path}","compare_url":"https://api.github.com/repos/Microsoft/service-fabric-client-dotnet/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Microsoft/service-fabric-client-dotnet/merges","archive_url":"https://api.github.com/repos/Microsoft/service-fabric-client-dotnet/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Microsoft/service-fabric-client-dotnet/downloads","issues_url":"https://api.github.com/repos/Microsoft/service-fabric-client-dotnet/issues{/number}","pulls_url":"https://api.github.com/repos/Microsoft/service-fabric-client-dotnet/pulls{/number}","milestones_url":"https://api.github.com/repos/Microsoft/service-fabric-client-dotnet/milestones{/number}","notifications_url":"https://api.github.com/repos/Microsoft/service-fabric-client-dotnet/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Microsoft/service-fabric-client-dotnet/labels{/name}","releases_url":"https://api.github.com/repos/Microsoft/service-fabric-client-dotnet/releases{/id}","deployments_url":"https://api.github.com/repos/Microsoft/service-fabric-client-dotnet/deployments","created_at":"2018-03-08T23:34:01Z","updated_at":"2018-08-31T03:11:37Z","pushed_at":"2018-09-05T13:20:33Z","git_url":"git://github.com/Microsoft/service-fabric-client-dotnet.git","ssh_url":"git@github.com:Microsoft/service-fabric-client-dotnet.git","clone_url":"https://github.com/Microsoft/service-fabric-client-dotnet.git","svn_url":"https://github.com/Microsoft/service-fabric-client-dotnet","homepage":null,"size":4951,"stargazers_count":25,"watchers_count":25,"language":"C#","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":7,"mirror_url":null,"archived":false,"open_issues_count":5,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":7,"open_issues":5,"watchers":25,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/Microsoft/service-fabric-client-dotnet/pulls/34"},"html":{"href":"https://github.com/Microsoft/service-fabric-client-dotnet/pull/34"},"issue":{"href":"https://api.github.com/repos/Microsoft/service-fabric-client-dotnet/issues/34"},"comments":{"href":"https://api.github.com/repos/Microsoft/service-fabric-client-dotnet/issues/34/comments"},"review_comments":{"href":"https://api.github.com/repos/Microsoft/service-fabric-client-dotnet/pulls/34/comments"},"review_comment":{"href":"https://api.github.com/repos/Microsoft/service-fabric-client-dotnet/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Microsoft/service-fabric-client-dotnet/pulls/34/commits"},"statuses":{"href":"https://api.github.com/repos/Microsoft/service-fabric-client-dotnet/statuses/823dd735751973049c3cec2f312eeb73dd323a2e"}},"author_association":"NONE"}}
{"actor":{"display_login":"amanbha"}}