{"action":"created","comment":{"url":"https://api.github.com/repos/RackHD/on-http/pulls/comments/46105698","id":46105698,"diff_hunk":"@@ -0,0 +1,196 @@\n+#!/usr/bin/env node\n+\n+'use strict';\n+\n+var exec = require('child_process').exec;\n+\n+var cmdDriveWwid = 'ls -l /dev/disk/by-id';\n+var cmdVdInfo = 'ls -l /dev/disk/by-path';\n+var cmdScsiId = 'lsscsi';\n+var options = {\n+    timeout: 10000\n+};\n+\n+/**\n+ * Parse the Drive WWID output\n+ * @param {String} data\n+ * @return\n+ */\n+function parseDriveWwid(idList) {\n+    //idList example\n+    //lrwxrwxrwx. 1 root root  9 Nov 18 20:30 ata-SATADOM-SV_3SE_20150522AA9992050085 -> ../../sdb\n+    var lines = idList.split('\\n').map(function(line) {\n+        var split = line.split(/\\s+/);\n+        return [split[8],split[10]].join('->');","path":"data/templates/get_driveid.js","position":24,"original_position":24,"commit_id":"9a609f1b572288a89e25bc77dbbde13f56992946","original_commit_id":"9a609f1b572288a89e25bc77dbbde13f56992946","user":{"login":"yyscamper","id":511378,"avatar_url":"https://avatars.githubusercontent.com/u/511378?v=3","gravatar_id":"","url":"https://api.github.com/users/yyscamper","html_url":"https://github.com/yyscamper","followers_url":"https://api.github.com/users/yyscamper/followers","following_url":"https://api.github.com/users/yyscamper/following{/other_user}","gists_url":"https://api.github.com/users/yyscamper/gists{/gist_id}","starred_url":"https://api.github.com/users/yyscamper/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yyscamper/subscriptions","organizations_url":"https://api.github.com/users/yyscamper/orgs","repos_url":"https://api.github.com/users/yyscamper/repos","events_url":"https://api.github.com/users/yyscamper/events{/privacy}","received_events_url":"https://api.github.com/users/yyscamper/received_events","type":"User","site_admin":false},"body":"Could you please add a comment to show an example for the output? It's hard for uses to know the what split[8] and split[10] means.","created_at":"2015-11-30T03:08:45Z","updated_at":"2015-11-30T03:08:45Z","html_url":"https://github.com/RackHD/on-http/pull/53#discussion_r46105698","pull_request_url":"https://api.github.com/repos/RackHD/on-http/pulls/53","_links":{"self":{"href":"https://api.github.com/repos/RackHD/on-http/pulls/comments/46105698"},"html":{"href":"https://github.com/RackHD/on-http/pull/53#discussion_r46105698"},"pull_request":{"href":"https://api.github.com/repos/RackHD/on-http/pulls/53"}}},"pull_request":{"url":"https://api.github.com/repos/RackHD/on-http/pulls/53","id":51881699,"html_url":"https://github.com/RackHD/on-http/pull/53","diff_url":"https://github.com/RackHD/on-http/pull/53.diff","patch_url":"https://github.com/RackHD/on-http/pull/53.patch","issue_url":"https://api.github.com/repos/RackHD/on-http/issues/53","number":53,"state":"open","locked":false,"title":"Add script to get drive IDs information","user":{"login":"pengz1","id":13991453,"avatar_url":"https://avatars.githubusercontent.com/u/13991453?v=3","gravatar_id":"","url":"https://api.github.com/users/pengz1","html_url":"https://github.com/pengz1","followers_url":"https://api.github.com/users/pengz1/followers","following_url":"https://api.github.com/users/pengz1/following{/other_user}","gists_url":"https://api.github.com/users/pengz1/gists{/gist_id}","starred_url":"https://api.github.com/users/pengz1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pengz1/subscriptions","organizations_url":"https://api.github.com/users/pengz1/orgs","repos_url":"https://api.github.com/users/pengz1/repos","events_url":"https://api.github.com/users/pengz1/events{/privacy}","received_events_url":"https://api.github.com/users/pengz1/received_events","type":"User","site_admin":false},"body":"Add script in on-http/data/templates folder for collecting drive IDs.","created_at":"2015-11-26T07:57:46Z","updated_at":"2015-11-30T03:08:45Z","closed_at":null,"merged_at":null,"merge_commit_sha":"50163f0b2f814a2a0af1a4aa87c5ec1e07e6f18c","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/RackHD/on-http/pulls/53/commits","review_comments_url":"https://api.github.com/repos/RackHD/on-http/pulls/53/comments","review_comment_url":"https://api.github.com/repos/RackHD/on-http/pulls/comments{/number}","comments_url":"https://api.github.com/repos/RackHD/on-http/issues/53/comments","statuses_url":"https://api.github.com/repos/RackHD/on-http/statuses/9a609f1b572288a89e25bc77dbbde13f56992946","head":{"label":"pengz1:feature/MAG-333-orfs97-implement-the-catalog-for-drive-ids","ref":"feature/MAG-333-orfs97-implement-the-catalog-for-drive-ids","sha":"9a609f1b572288a89e25bc77dbbde13f56992946","user":{"login":"pengz1","id":13991453,"avatar_url":"https://avatars.githubusercontent.com/u/13991453?v=3","gravatar_id":"","url":"https://api.github.com/users/pengz1","html_url":"https://github.com/pengz1","followers_url":"https://api.github.com/users/pengz1/followers","following_url":"https://api.github.com/users/pengz1/following{/other_user}","gists_url":"https://api.github.com/users/pengz1/gists{/gist_id}","starred_url":"https://api.github.com/users/pengz1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pengz1/subscriptions","organizations_url":"https://api.github.com/users/pengz1/orgs","repos_url":"https://api.github.com/users/pengz1/repos","events_url":"https://api.github.com/users/pengz1/events{/privacy}","received_events_url":"https://api.github.com/users/pengz1/received_events","type":"User","site_admin":false},"repo":{"id":45822614,"name":"on-http","full_name":"pengz1/on-http","owner":{"login":"pengz1","id":13991453,"avatar_url":"https://avatars.githubusercontent.com/u/13991453?v=3","gravatar_id":"","url":"https://api.github.com/users/pengz1","html_url":"https://github.com/pengz1","followers_url":"https://api.github.com/users/pengz1/followers","following_url":"https://api.github.com/users/pengz1/following{/other_user}","gists_url":"https://api.github.com/users/pengz1/gists{/gist_id}","starred_url":"https://api.github.com/users/pengz1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pengz1/subscriptions","organizations_url":"https://api.github.com/users/pengz1/orgs","repos_url":"https://api.github.com/users/pengz1/repos","events_url":"https://api.github.com/users/pengz1/events{/privacy}","received_events_url":"https://api.github.com/users/pengz1/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/pengz1/on-http","description":"","fork":true,"url":"https://api.github.com/repos/pengz1/on-http","forks_url":"https://api.github.com/repos/pengz1/on-http/forks","keys_url":"https://api.github.com/repos/pengz1/on-http/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pengz1/on-http/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pengz1/on-http/teams","hooks_url":"https://api.github.com/repos/pengz1/on-http/hooks","issue_events_url":"https://api.github.com/repos/pengz1/on-http/issues/events{/number}","events_url":"https://api.github.com/repos/pengz1/on-http/events","assignees_url":"https://api.github.com/repos/pengz1/on-http/assignees{/user}","branches_url":"https://api.github.com/repos/pengz1/on-http/branches{/branch}","tags_url":"https://api.github.com/repos/pengz1/on-http/tags","blobs_url":"https://api.github.com/repos/pengz1/on-http/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pengz1/on-http/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pengz1/on-http/git/refs{/sha}","trees_url":"https://api.github.com/repos/pengz1/on-http/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pengz1/on-http/statuses/{sha}","languages_url":"https://api.github.com/repos/pengz1/on-http/languages","stargazers_url":"https://api.github.com/repos/pengz1/on-http/stargazers","contributors_url":"https://api.github.com/repos/pengz1/on-http/contributors","subscribers_url":"https://api.github.com/repos/pengz1/on-http/subscribers","subscription_url":"https://api.github.com/repos/pengz1/on-http/subscription","commits_url":"https://api.github.com/repos/pengz1/on-http/commits{/sha}","git_commits_url":"https://api.github.com/repos/pengz1/on-http/git/commits{/sha}","comments_url":"https://api.github.com/repos/pengz1/on-http/comments{/number}","issue_comment_url":"https://api.github.com/repos/pengz1/on-http/issues/comments{/number}","contents_url":"https://api.github.com/repos/pengz1/on-http/contents/{+path}","compare_url":"https://api.github.com/repos/pengz1/on-http/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pengz1/on-http/merges","archive_url":"https://api.github.com/repos/pengz1/on-http/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pengz1/on-http/downloads","issues_url":"https://api.github.com/repos/pengz1/on-http/issues{/number}","pulls_url":"https://api.github.com/repos/pengz1/on-http/pulls{/number}","milestones_url":"https://api.github.com/repos/pengz1/on-http/milestones{/number}","notifications_url":"https://api.github.com/repos/pengz1/on-http/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pengz1/on-http/labels{/name}","releases_url":"https://api.github.com/repos/pengz1/on-http/releases{/id}","created_at":"2015-11-09T07:37:44Z","updated_at":"2015-11-09T07:37:45Z","pushed_at":"2015-11-26T09:17:41Z","git_url":"git://github.com/pengz1/on-http.git","ssh_url":"git@github.com:pengz1/on-http.git","clone_url":"https://github.com/pengz1/on-http.git","svn_url":"https://github.com/pengz1/on-http","homepage":null,"size":1373,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"RackHD:master","ref":"master","sha":"7c3155bf6c65311d40c259af6a1f8b1d80575a0b","user":{"login":"RackHD","id":13982662,"avatar_url":"https://avatars.githubusercontent.com/u/13982662?v=3","gravatar_id":"","url":"https://api.github.com/users/RackHD","html_url":"https://github.com/RackHD","followers_url":"https://api.github.com/users/RackHD/followers","following_url":"https://api.github.com/users/RackHD/following{/other_user}","gists_url":"https://api.github.com/users/RackHD/gists{/gist_id}","starred_url":"https://api.github.com/users/RackHD/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RackHD/subscriptions","organizations_url":"https://api.github.com/users/RackHD/orgs","repos_url":"https://api.github.com/users/RackHD/repos","events_url":"https://api.github.com/users/RackHD/events{/privacy}","received_events_url":"https://api.github.com/users/RackHD/received_events","type":"Organization","site_admin":false},"repo":{"id":41690081,"name":"on-http","full_name":"RackHD/on-http","owner":{"login":"RackHD","id":13982662,"avatar_url":"https://avatars.githubusercontent.com/u/13982662?v=3","gravatar_id":"","url":"https://api.github.com/users/RackHD","html_url":"https://github.com/RackHD","followers_url":"https://api.github.com/users/RackHD/followers","following_url":"https://api.github.com/users/RackHD/following{/other_user}","gists_url":"https://api.github.com/users/RackHD/gists{/gist_id}","starred_url":"https://api.github.com/users/RackHD/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RackHD/subscriptions","organizations_url":"https://api.github.com/users/RackHD/orgs","repos_url":"https://api.github.com/users/RackHD/repos","events_url":"https://api.github.com/users/RackHD/events{/privacy}","received_events_url":"https://api.github.com/users/RackHD/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/RackHD/on-http","description":"","fork":false,"url":"https://api.github.com/repos/RackHD/on-http","forks_url":"https://api.github.com/repos/RackHD/on-http/forks","keys_url":"https://api.github.com/repos/RackHD/on-http/keys{/key_id}","collaborators_url":"https://api.github.com/repos/RackHD/on-http/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/RackHD/on-http/teams","hooks_url":"https://api.github.com/repos/RackHD/on-http/hooks","issue_events_url":"https://api.github.com/repos/RackHD/on-http/issues/events{/number}","events_url":"https://api.github.com/repos/RackHD/on-http/events","assignees_url":"https://api.github.com/repos/RackHD/on-http/assignees{/user}","branches_url":"https://api.github.com/repos/RackHD/on-http/branches{/branch}","tags_url":"https://api.github.com/repos/RackHD/on-http/tags","blobs_url":"https://api.github.com/repos/RackHD/on-http/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/RackHD/on-http/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/RackHD/on-http/git/refs{/sha}","trees_url":"https://api.github.com/repos/RackHD/on-http/git/trees{/sha}","statuses_url":"https://api.github.com/repos/RackHD/on-http/statuses/{sha}","languages_url":"https://api.github.com/repos/RackHD/on-http/languages","stargazers_url":"https://api.github.com/repos/RackHD/on-http/stargazers","contributors_url":"https://api.github.com/repos/RackHD/on-http/contributors","subscribers_url":"https://api.github.com/repos/RackHD/on-http/subscribers","subscription_url":"https://api.github.com/repos/RackHD/on-http/subscription","commits_url":"https://api.github.com/repos/RackHD/on-http/commits{/sha}","git_commits_url":"https://api.github.com/repos/RackHD/on-http/git/commits{/sha}","comments_url":"https://api.github.com/repos/RackHD/on-http/comments{/number}","issue_comment_url":"https://api.github.com/repos/RackHD/on-http/issues/comments{/number}","contents_url":"https://api.github.com/repos/RackHD/on-http/contents/{+path}","compare_url":"https://api.github.com/repos/RackHD/on-http/compare/{base}...{head}","merges_url":"https://api.github.com/repos/RackHD/on-http/merges","archive_url":"https://api.github.com/repos/RackHD/on-http/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/RackHD/on-http/downloads","issues_url":"https://api.github.com/repos/RackHD/on-http/issues{/number}","pulls_url":"https://api.github.com/repos/RackHD/on-http/pulls{/number}","milestones_url":"https://api.github.com/repos/RackHD/on-http/milestones{/number}","notifications_url":"https://api.github.com/repos/RackHD/on-http/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/RackHD/on-http/labels{/name}","releases_url":"https://api.github.com/repos/RackHD/on-http/releases{/id}","created_at":"2015-08-31T17:29:08Z","updated_at":"2015-11-05T03:05:52Z","pushed_at":"2015-11-26T09:17:42Z","git_url":"git://github.com/RackHD/on-http.git","ssh_url":"git@github.com:RackHD/on-http.git","clone_url":"https://github.com/RackHD/on-http.git","svn_url":"https://github.com/RackHD/on-http","homepage":null,"size":1371,"stargazers_count":4,"watchers_count":4,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":12,"mirror_url":null,"open_issues_count":1,"forks":12,"open_issues":1,"watchers":4,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/RackHD/on-http/pulls/53"},"html":{"href":"https://github.com/RackHD/on-http/pull/53"},"issue":{"href":"https://api.github.com/repos/RackHD/on-http/issues/53"},"comments":{"href":"https://api.github.com/repos/RackHD/on-http/issues/53/comments"},"review_comments":{"href":"https://api.github.com/repos/RackHD/on-http/pulls/53/comments"},"review_comment":{"href":"https://api.github.com/repos/RackHD/on-http/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/RackHD/on-http/pulls/53/commits"},"statuses":{"href":"https://api.github.com/repos/RackHD/on-http/statuses/9a609f1b572288a89e25bc77dbbde13f56992946"}}}}