{"action":"created","comment":{"url":"https://api.github.com/repos/RackHD/on-tasks/pulls/comments/145052179","pull_request_review_id":69792887,"id":145052179,"diff_hunk":"@@ -258,131 +241,104 @@ function DellWsmanDiscoveryJobFactory(\n         }\n         logger.error('No credential found for Node ' + ip);\n         return undefined;\n-    }\n+    };\n \n \n     DellWsmanDiscoveryJob.prototype.getIpv4Ranges = function(entry) {\n \n-    \tvar _lastIp = entry.endIp.split(\".\");\n-    \tvar _firstIp = entry.startIp.split(\".\");\n-\n-    \tvar current;\n-    \tvar last;\n-\n-    \tfor(var i=0; i<=3; i++) {\n-    \t\tcurrent |= (parseInt(_firstIp[i])) << ((3-i)*8);\n-    \t\tlast |= (parseInt(_lastIp[i])) << ((3-i)*8);\n-    \t}\n-\t\tif((current & 0xffffff00) == (last & 0xffffff00)){ // this is a valid range\n-\t\t\tlogger.debug('GetRanges - Passed in range is valid... returning');\n-\t\t\treturn [{\n- \t \t       \"deviceType\": entry.deviceTypesToDiscover,\n-\t \t       \"deviceStartIp\": entry.startIp,\n-\t \t       \"deviceEndIp\": entry.endIp,\n-\t \t       \"credential\": entry.credentials\n-\t\t\t}];\n-\t\t}\n-\n-    \tvar start = [];\n-    \tvar end = [];\n-    \tvar ranges = [];\n-    \tvar newRange = {\n-    \t \t       \"deviceType\": entry.deviceTypesToDiscover,\n-    \t \t       \"deviceStartIp\": entry.startIp,\n-    \t \t       \"deviceEndIp\": null,\n-    \t \t       \"credential\": entry.credentials\n-    \t\t       }\n-\n-    \tcurrent |= 0xFF;\n-    \tfor(var i=0; i<=3; i++) {\n-    \t\tend[i] = (current >> ((3-i)*8)) & 0xff;\n-    \t}\n-    \tnewRange.deviceEndIp = end.join('.');\n-    \tranges.push(newRange);\n-\t\tlogger.debug('GetRanges - First sub range: ' + JSON.stringify(newRange));\n-\n-\t\tcurrent += 2;  // increment from x.x.x.255 to x.x.x+1.1\n-\n-\t\twhile((current & 0xffffff00) != (last & 0xffffff00)){\n-\t    \tfor(var i=0; i<=3; i++) {\n-\t    \t\tstart[i] = (current >> ((3-i)*8)) & 0xff;\n-\t    \t\tif(i==3){\n-\t    \t\t\tend[i] = 0xFF;\n-\t    \t\t} else {\n-\t    \t\t\tend[i] = (current >> ((3-i)*8)) & 0xff;\n-\t    \t\t}\n-\t    \t}\n-\t    \tvar newRange = {\n-\t    \t \t       \"deviceType\": entry.deviceTypesToDiscover,\n-\t    \t \t       \"deviceStartIp\": null,\n-\t    \t \t       \"deviceEndIp\": null,\n-\t    \t \t       \"credential\": entry.credentials\n-\t    \t\t       }\n-\t    \tnewRange.deviceStartIp = start.join('.');\n-\t    \tnewRange.deviceEndIp = end.join('.');\n-\t    \tranges.push(newRange);\n-\t\t\tlogger.debug('GetRanges - Sub range: ' + JSON.stringify(newRange));\n-\n-\t    \tcurrent += 256;  // increment from x.x.x.255 to x.x.x+1.1\n-\t\t}\n-\n-    \tfor(var i=0; i<=3; i++) {\n-    \t\tstart[i] = (current >> ((3-i)*8)) & 0xff;\n-   \t\t\tend[i] = (last >> ((3-i)*8)) & 0xff;\n-    \t}\n-\n-    \tvar newRange = {\n- \t \t       \"deviceType\": entry.deviceTypesToDiscover,\n- \t \t       \"deviceStartIp\": null,\n- \t \t       \"deviceEndIp\": null,\n- \t \t       \"credential\": entry.credentials\n- \t\t       }\n-    \tnewRange.deviceStartIp = start.join('.');\n-    \tnewRange.deviceEndIp = end.join('.');\n-    \tranges.push(newRange);\n-\t\tlogger.debug('GetRanges - Last sub range: ' + JSON.stringify(newRange));\n-\n-    \treturn ranges;\n-    }\n+        var _lastIp = entry.endIp.split(\".\");\n+        var _firstIp = entry.startIp.split(\".\");\n \n+        var current;\n+        var last;\n \n-    DellWsmanDiscoveryJob.prototype.clientRequest = function(host, path, method, data) {\n-        var self = this;\n+        for(var i=0; i<=3; i++) {","path":"lib/jobs/dell-wsman-discovery.js","position":296,"original_position":296,"commit_id":"9d62a5057a83990a72e3d322d6388acd49e2d1ae","original_commit_id":"9d62a5057a83990a72e3d322d6388acd49e2d1ae","user":{"login":"houndci-bot","id":6697940,"avatar_url":"https://avatars0.githubusercontent.com/u/6697940?v=4","gravatar_id":"","url":"https://api.github.com/users/houndci-bot","html_url":"https://github.com/houndci-bot","followers_url":"https://api.github.com/users/houndci-bot/followers","following_url":"https://api.github.com/users/houndci-bot/following{/other_user}","gists_url":"https://api.github.com/users/houndci-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/houndci-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/houndci-bot/subscriptions","organizations_url":"https://api.github.com/users/houndci-bot/orgs","repos_url":"https://api.github.com/users/houndci-bot/repos","events_url":"https://api.github.com/users/houndci-bot/events{/privacy}","received_events_url":"https://api.github.com/users/houndci-bot/received_events","type":"User","site_admin":false},"body":"Unexpected use of '++'.","created_at":"2017-10-17T07:53:59Z","updated_at":"2017-10-17T07:53:59Z","html_url":"https://github.com/RackHD/on-tasks/pull/527#discussion_r145052179","pull_request_url":"https://api.github.com/repos/RackHD/on-tasks/pulls/527","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/RackHD/on-tasks/pulls/comments/145052179"},"html":{"href":"https://github.com/RackHD/on-tasks/pull/527#discussion_r145052179"},"pull_request":{"href":"https://api.github.com/repos/RackHD/on-tasks/pulls/527"}}},"pull_request":{"url":"https://api.github.com/repos/RackHD/on-tasks/pulls/527","id":146961373,"html_url":"https://github.com/RackHD/on-tasks/pull/527","diff_url":"https://github.com/RackHD/on-tasks/pull/527.diff","patch_url":"https://github.com/RackHD/on-tasks/pull/527.patch","issue_url":"https://api.github.com/repos/RackHD/on-tasks/issues/527","number":527,"state":"open","locked":false,"title":"refactor WsmanTool and wsman-related jobs","user":{"login":"lanchongyizu","id":2138456,"avatar_url":"https://avatars0.githubusercontent.com/u/2138456?v=4","gravatar_id":"","url":"https://api.github.com/users/lanchongyizu","html_url":"https://github.com/lanchongyizu","followers_url":"https://api.github.com/users/lanchongyizu/followers","following_url":"https://api.github.com/users/lanchongyizu/following{/other_user}","gists_url":"https://api.github.com/users/lanchongyizu/gists{/gist_id}","starred_url":"https://api.github.com/users/lanchongyizu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lanchongyizu/subscriptions","organizations_url":"https://api.github.com/users/lanchongyizu/orgs","repos_url":"https://api.github.com/users/lanchongyizu/repos","events_url":"https://api.github.com/users/lanchongyizu/events{/privacy}","received_events_url":"https://api.github.com/users/lanchongyizu/received_events","type":"User","site_admin":false},"body":"1) create a base job for wsman-related jobs, which handles both syncRequest and asyncRequest\r\n2) refactor JobUtils.WsmanTool\r\n3) refine the code for wsman-related jobs\r\n\r\n@RackHD/corecommitters","created_at":"2017-10-17T07:24:31Z","updated_at":"2017-10-17T07:53:59Z","closed_at":null,"merged_at":null,"merge_commit_sha":"26769400c0e3711785f154d8185cec4edb438e31","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/RackHD/on-tasks/pulls/527/commits","review_comments_url":"https://api.github.com/repos/RackHD/on-tasks/pulls/527/comments","review_comment_url":"https://api.github.com/repos/RackHD/on-tasks/pulls/comments{/number}","comments_url":"https://api.github.com/repos/RackHD/on-tasks/issues/527/comments","statuses_url":"https://api.github.com/repos/RackHD/on-tasks/statuses/9d62a5057a83990a72e3d322d6388acd49e2d1ae","head":{"label":"lanchongyizu:refactor-wsman-tool","ref":"refactor-wsman-tool","sha":"9d62a5057a83990a72e3d322d6388acd49e2d1ae","user":{"login":"lanchongyizu","id":2138456,"avatar_url":"https://avatars0.githubusercontent.com/u/2138456?v=4","gravatar_id":"","url":"https://api.github.com/users/lanchongyizu","html_url":"https://github.com/lanchongyizu","followers_url":"https://api.github.com/users/lanchongyizu/followers","following_url":"https://api.github.com/users/lanchongyizu/following{/other_user}","gists_url":"https://api.github.com/users/lanchongyizu/gists{/gist_id}","starred_url":"https://api.github.com/users/lanchongyizu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lanchongyizu/subscriptions","organizations_url":"https://api.github.com/users/lanchongyizu/orgs","repos_url":"https://api.github.com/users/lanchongyizu/repos","events_url":"https://api.github.com/users/lanchongyizu/events{/privacy}","received_events_url":"https://api.github.com/users/lanchongyizu/received_events","type":"User","site_admin":false},"repo":{"id":58695996,"name":"on-tasks","full_name":"lanchongyizu/on-tasks","owner":{"login":"lanchongyizu","id":2138456,"avatar_url":"https://avatars0.githubusercontent.com/u/2138456?v=4","gravatar_id":"","url":"https://api.github.com/users/lanchongyizu","html_url":"https://github.com/lanchongyizu","followers_url":"https://api.github.com/users/lanchongyizu/followers","following_url":"https://api.github.com/users/lanchongyizu/following{/other_user}","gists_url":"https://api.github.com/users/lanchongyizu/gists{/gist_id}","starred_url":"https://api.github.com/users/lanchongyizu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lanchongyizu/subscriptions","organizations_url":"https://api.github.com/users/lanchongyizu/orgs","repos_url":"https://api.github.com/users/lanchongyizu/repos","events_url":"https://api.github.com/users/lanchongyizu/events{/privacy}","received_events_url":"https://api.github.com/users/lanchongyizu/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/lanchongyizu/on-tasks","description":null,"fork":true,"url":"https://api.github.com/repos/lanchongyizu/on-tasks","forks_url":"https://api.github.com/repos/lanchongyizu/on-tasks/forks","keys_url":"https://api.github.com/repos/lanchongyizu/on-tasks/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lanchongyizu/on-tasks/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lanchongyizu/on-tasks/teams","hooks_url":"https://api.github.com/repos/lanchongyizu/on-tasks/hooks","issue_events_url":"https://api.github.com/repos/lanchongyizu/on-tasks/issues/events{/number}","events_url":"https://api.github.com/repos/lanchongyizu/on-tasks/events","assignees_url":"https://api.github.com/repos/lanchongyizu/on-tasks/assignees{/user}","branches_url":"https://api.github.com/repos/lanchongyizu/on-tasks/branches{/branch}","tags_url":"https://api.github.com/repos/lanchongyizu/on-tasks/tags","blobs_url":"https://api.github.com/repos/lanchongyizu/on-tasks/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lanchongyizu/on-tasks/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lanchongyizu/on-tasks/git/refs{/sha}","trees_url":"https://api.github.com/repos/lanchongyizu/on-tasks/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lanchongyizu/on-tasks/statuses/{sha}","languages_url":"https://api.github.com/repos/lanchongyizu/on-tasks/languages","stargazers_url":"https://api.github.com/repos/lanchongyizu/on-tasks/stargazers","contributors_url":"https://api.github.com/repos/lanchongyizu/on-tasks/contributors","subscribers_url":"https://api.github.com/repos/lanchongyizu/on-tasks/subscribers","subscription_url":"https://api.github.com/repos/lanchongyizu/on-tasks/subscription","commits_url":"https://api.github.com/repos/lanchongyizu/on-tasks/commits{/sha}","git_commits_url":"https://api.github.com/repos/lanchongyizu/on-tasks/git/commits{/sha}","comments_url":"https://api.github.com/repos/lanchongyizu/on-tasks/comments{/number}","issue_comment_url":"https://api.github.com/repos/lanchongyizu/on-tasks/issues/comments{/number}","contents_url":"https://api.github.com/repos/lanchongyizu/on-tasks/contents/{+path}","compare_url":"https://api.github.com/repos/lanchongyizu/on-tasks/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lanchongyizu/on-tasks/merges","archive_url":"https://api.github.com/repos/lanchongyizu/on-tasks/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lanchongyizu/on-tasks/downloads","issues_url":"https://api.github.com/repos/lanchongyizu/on-tasks/issues{/number}","pulls_url":"https://api.github.com/repos/lanchongyizu/on-tasks/pulls{/number}","milestones_url":"https://api.github.com/repos/lanchongyizu/on-tasks/milestones{/number}","notifications_url":"https://api.github.com/repos/lanchongyizu/on-tasks/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lanchongyizu/on-tasks/labels{/name}","releases_url":"https://api.github.com/repos/lanchongyizu/on-tasks/releases{/id}","deployments_url":"https://api.github.com/repos/lanchongyizu/on-tasks/deployments","created_at":"2016-05-13T03:24:05Z","updated_at":"2016-05-13T03:24:07Z","pushed_at":"2017-10-17T07:53:42Z","git_url":"git://github.com/lanchongyizu/on-tasks.git","ssh_url":"git@github.com:lanchongyizu/on-tasks.git","clone_url":"https://github.com/lanchongyizu/on-tasks.git","svn_url":"https://github.com/lanchongyizu/on-tasks","homepage":null,"size":2655,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_projects":true,"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":"4a4984678167246b8fb17b17e9232abc3575d0c7","user":{"login":"RackHD","id":13982662,"avatar_url":"https://avatars2.githubusercontent.com/u/13982662?v=4","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":41690099,"name":"on-tasks","full_name":"RackHD/on-tasks","owner":{"login":"RackHD","id":13982662,"avatar_url":"https://avatars2.githubusercontent.com/u/13982662?v=4","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-tasks","description":null,"fork":false,"url":"https://api.github.com/repos/RackHD/on-tasks","forks_url":"https://api.github.com/repos/RackHD/on-tasks/forks","keys_url":"https://api.github.com/repos/RackHD/on-tasks/keys{/key_id}","collaborators_url":"https://api.github.com/repos/RackHD/on-tasks/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/RackHD/on-tasks/teams","hooks_url":"https://api.github.com/repos/RackHD/on-tasks/hooks","issue_events_url":"https://api.github.com/repos/RackHD/on-tasks/issues/events{/number}","events_url":"https://api.github.com/repos/RackHD/on-tasks/events","assignees_url":"https://api.github.com/repos/RackHD/on-tasks/assignees{/user}","branches_url":"https://api.github.com/repos/RackHD/on-tasks/branches{/branch}","tags_url":"https://api.github.com/repos/RackHD/on-tasks/tags","blobs_url":"https://api.github.com/repos/RackHD/on-tasks/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/RackHD/on-tasks/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/RackHD/on-tasks/git/refs{/sha}","trees_url":"https://api.github.com/repos/RackHD/on-tasks/git/trees{/sha}","statuses_url":"https://api.github.com/repos/RackHD/on-tasks/statuses/{sha}","languages_url":"https://api.github.com/repos/RackHD/on-tasks/languages","stargazers_url":"https://api.github.com/repos/RackHD/on-tasks/stargazers","contributors_url":"https://api.github.com/repos/RackHD/on-tasks/contributors","subscribers_url":"https://api.github.com/repos/RackHD/on-tasks/subscribers","subscription_url":"https://api.github.com/repos/RackHD/on-tasks/subscription","commits_url":"https://api.github.com/repos/RackHD/on-tasks/commits{/sha}","git_commits_url":"https://api.github.com/repos/RackHD/on-tasks/git/commits{/sha}","comments_url":"https://api.github.com/repos/RackHD/on-tasks/comments{/number}","issue_comment_url":"https://api.github.com/repos/RackHD/on-tasks/issues/comments{/number}","contents_url":"https://api.github.com/repos/RackHD/on-tasks/contents/{+path}","compare_url":"https://api.github.com/repos/RackHD/on-tasks/compare/{base}...{head}","merges_url":"https://api.github.com/repos/RackHD/on-tasks/merges","archive_url":"https://api.github.com/repos/RackHD/on-tasks/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/RackHD/on-tasks/downloads","issues_url":"https://api.github.com/repos/RackHD/on-tasks/issues{/number}","pulls_url":"https://api.github.com/repos/RackHD/on-tasks/pulls{/number}","milestones_url":"https://api.github.com/repos/RackHD/on-tasks/milestones{/number}","notifications_url":"https://api.github.com/repos/RackHD/on-tasks/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/RackHD/on-tasks/labels{/name}","releases_url":"https://api.github.com/repos/RackHD/on-tasks/releases{/id}","deployments_url":"https://api.github.com/repos/RackHD/on-tasks/deployments","created_at":"2015-08-31T17:29:32Z","updated_at":"2017-07-10T02:07:09Z","pushed_at":"2017-10-17T07:53:44Z","git_url":"git://github.com/RackHD/on-tasks.git","ssh_url":"git@github.com:RackHD/on-tasks.git","clone_url":"https://github.com/RackHD/on-tasks.git","svn_url":"https://github.com/RackHD/on-tasks","homepage":null,"size":2571,"stargazers_count":7,"watchers_count":7,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":74,"mirror_url":null,"open_issues_count":9,"forks":74,"open_issues":9,"watchers":7,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/RackHD/on-tasks/pulls/527"},"html":{"href":"https://github.com/RackHD/on-tasks/pull/527"},"issue":{"href":"https://api.github.com/repos/RackHD/on-tasks/issues/527"},"comments":{"href":"https://api.github.com/repos/RackHD/on-tasks/issues/527/comments"},"review_comments":{"href":"https://api.github.com/repos/RackHD/on-tasks/pulls/527/comments"},"review_comment":{"href":"https://api.github.com/repos/RackHD/on-tasks/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/RackHD/on-tasks/pulls/527/commits"},"statuses":{"href":"https://api.github.com/repos/RackHD/on-tasks/statuses/9d62a5057a83990a72e3d322d6388acd49e2d1ae"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"houndci-bot"}}