{"action":"created","comment":{"url":"https://api.github.com/repos/RackHD/on-http/pulls/comments/119923141","pull_request_review_id":41850701,"id":119923141,"diff_hunk":"@@ -1166,6 +1178,104 @@ var doReset = controller(function(req,res) {\n     });\n });\n \n+\n+/**\n+ * List the ethernet interfaces for specified system\n+ * @param  {Object}     req\n+ * @param  {Object}     res\n+ */\n+var listSystemEthernetInterfaces = controller(function(req, res)  {\n+    var identifier = req.swagger.params.identifier.value;\n+    var options = redfish.makeOptions(req, res, identifier);\n+\n+    return nodeApi.getNodeById(identifier)\n+    .then(function(node) {\n+        // look for Dell service tag in identifiers list\n+        var dellFound = false;\n+        node.identifiers.forEach(function(ident) {\n+            if(/^[0-9|A-Z]{7}$/.test(ident)){\n+                dellFound=true;\n+            }\n+        });\n+        options.name = \"Systems Ethernet Interface Collection\";\n+        if(dellFound){\n+            return dataFactory(identifier, 'nics').then(function(nics) {\n+                options.baseprofile = 'Systems';\n+                options.net = [];\n+\n+                _.forEach(nics.data, (function(data) {\n+                    options.net.push(data.fqdd);\n+                }))\n+                return options;\n+            });\n+        } else {\n+            throw new Errors.NotFoundError('No Ethernet found for node ' + identifier);\n+        }\n+    }).then(function(options) {\n+        return redfish.render('redfish.1.0.0.ethernetinterfacecollection.json',\n+                              'EthernetInterfaceCollection.json#/definitions/EthernetInterfaceCollection',\n+                              options);\n+    }).catch(function(error) {\n+        return redfish.handleError(error, res);\n+    });\n+});\n+\n+\n+/**\n+ * List an ethernet interface by system and id\n+ * @param  {Object}     req\n+ * @param  {Object}     res\n+ */\n+var listSystemEthernetInterfacesById = controller(function(req, res)  {\n+    var identifier = req.swagger.params.identifier.value;\n+    var options = redfish.makeOptions(req, res, identifier);\n+    var index = req.swagger.params.index.value;\n+\n+    return nodeApi.getNodeById(identifier)\n+    .then(function(node) {\n+        // look for Dell service tag in identifiers list\n+        var dellFound = false;\n+        node.identifiers.forEach(function(ident) {\n+            if(/^[0-9|A-Z]{7}$/.test(ident)){\n+                dellFound=true;\n+            }\n+        });\n+        if(dellFound){\n+            return dataFactory(identifier, 'nics').then(function(nics) {\n+                options.baseprofile = 'Systems';\n+                options.net = [];\n+                _.forEach(nics.data, (function(data) {\n+                    if(data.fqdd === index) {\n+                        options.nic = data;\n+                    }\n+                }));\n+                if(typeof options.nic == 'undefined') {\n+                    // raise an exception\n+                    throw new Errors.NotFoundError('No Ethernet index found for node ' + index);\n+                }\n+                options.name = \"Systems Ethernet Interface\";\n+                options.index = index;\n+                options.autoneg = autoNeg[options.nic['autoNegotiation']];\n+                options.description = options.nic['deviceDescription'];\n+                options.fullduplex = fullDuplex[options.nic['linkDuplex']];","path":"lib/api/redfish-1.0/systems.js","position":109,"original_position":109,"commit_id":"24c330620a5d05129fbafbf975bf2c5ff4c52cfa","original_commit_id":"24c330620a5d05129fbafbf975bf2c5ff4c52cfa","user":{"login":"houndci-bot","id":6697940,"avatar_url":"https://avatars3.githubusercontent.com/u/6697940?v=3","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":"['linkDuplex'] is better written in dot notation.","created_at":"2017-06-02T18:27:05Z","updated_at":"2017-06-02T18:27:06Z","html_url":"https://github.com/RackHD/on-http/pull/663#discussion_r119923141","pull_request_url":"https://api.github.com/repos/RackHD/on-http/pulls/663","_links":{"self":{"href":"https://api.github.com/repos/RackHD/on-http/pulls/comments/119923141"},"html":{"href":"https://github.com/RackHD/on-http/pull/663#discussion_r119923141"},"pull_request":{"href":"https://api.github.com/repos/RackHD/on-http/pulls/663"}}},"pull_request":{"url":"https://api.github.com/repos/RackHD/on-http/pulls/663","id":123774486,"html_url":"https://github.com/RackHD/on-http/pull/663","diff_url":"https://github.com/RackHD/on-http/pull/663.diff","patch_url":"https://github.com/RackHD/on-http/pull/663.patch","issue_url":"https://api.github.com/repos/RackHD/on-http/issues/663","number":663,"state":"open","locked":false,"title":"RAC-4172 GET Systems/EthernetInterfaces","user":{"login":"jimturnquist","id":6660443,"avatar_url":"https://avatars3.githubusercontent.com/u/6660443?v=3","gravatar_id":"","url":"https://api.github.com/users/jimturnquist","html_url":"https://github.com/jimturnquist","followers_url":"https://api.github.com/users/jimturnquist/followers","following_url":"https://api.github.com/users/jimturnquist/following{/other_user}","gists_url":"https://api.github.com/users/jimturnquist/gists{/gist_id}","starred_url":"https://api.github.com/users/jimturnquist/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jimturnquist/subscriptions","organizations_url":"https://api.github.com/users/jimturnquist/orgs","repos_url":"https://api.github.com/users/jimturnquist/repos","events_url":"https://api.github.com/users/jimturnquist/events{/privacy}","received_events_url":"https://api.github.com/users/jimturnquist/received_events","type":"User","site_admin":false},"body":"* Add support for the following API endpoints:\r\n\r\n  GET /redfish/v1/Systems/identifier/EthernetInterfaces\r\n  GET /redfish/v1/Systems/identifier/EthernetInterfaces/index\r\n\r\n* Add redfish 2016.3 schema into redfish.yaml definition\r\n\r\n* npm tests added\r\n\r\n* Fix manager.js and systems.js to share ethernet interface\r\n  rendering files.  Pass through necessary context info\r\n  in options block.","created_at":"2017-06-02T18:26:54Z","updated_at":"2017-06-02T18:27:06Z","closed_at":null,"merged_at":null,"merge_commit_sha":"19782176ce38c0558fd0a530f10ac1c22a3e3a5b","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/RackHD/on-http/pulls/663/commits","review_comments_url":"https://api.github.com/repos/RackHD/on-http/pulls/663/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/663/comments","statuses_url":"https://api.github.com/repos/RackHD/on-http/statuses/24c330620a5d05129fbafbf975bf2c5ff4c52cfa","head":{"label":"jimturnquist:ethernet-idrac","ref":"ethernet-idrac","sha":"24c330620a5d05129fbafbf975bf2c5ff4c52cfa","user":{"login":"jimturnquist","id":6660443,"avatar_url":"https://avatars3.githubusercontent.com/u/6660443?v=3","gravatar_id":"","url":"https://api.github.com/users/jimturnquist","html_url":"https://github.com/jimturnquist","followers_url":"https://api.github.com/users/jimturnquist/followers","following_url":"https://api.github.com/users/jimturnquist/following{/other_user}","gists_url":"https://api.github.com/users/jimturnquist/gists{/gist_id}","starred_url":"https://api.github.com/users/jimturnquist/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jimturnquist/subscriptions","organizations_url":"https://api.github.com/users/jimturnquist/orgs","repos_url":"https://api.github.com/users/jimturnquist/repos","events_url":"https://api.github.com/users/jimturnquist/events{/privacy}","received_events_url":"https://api.github.com/users/jimturnquist/received_events","type":"User","site_admin":false},"repo":{"id":91815633,"name":"on-http","full_name":"jimturnquist/on-http","owner":{"login":"jimturnquist","id":6660443,"avatar_url":"https://avatars3.githubusercontent.com/u/6660443?v=3","gravatar_id":"","url":"https://api.github.com/users/jimturnquist","html_url":"https://github.com/jimturnquist","followers_url":"https://api.github.com/users/jimturnquist/followers","following_url":"https://api.github.com/users/jimturnquist/following{/other_user}","gists_url":"https://api.github.com/users/jimturnquist/gists{/gist_id}","starred_url":"https://api.github.com/users/jimturnquist/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jimturnquist/subscriptions","organizations_url":"https://api.github.com/users/jimturnquist/orgs","repos_url":"https://api.github.com/users/jimturnquist/repos","events_url":"https://api.github.com/users/jimturnquist/events{/privacy}","received_events_url":"https://api.github.com/users/jimturnquist/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jimturnquist/on-http","description":null,"fork":true,"url":"https://api.github.com/repos/jimturnquist/on-http","forks_url":"https://api.github.com/repos/jimturnquist/on-http/forks","keys_url":"https://api.github.com/repos/jimturnquist/on-http/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jimturnquist/on-http/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jimturnquist/on-http/teams","hooks_url":"https://api.github.com/repos/jimturnquist/on-http/hooks","issue_events_url":"https://api.github.com/repos/jimturnquist/on-http/issues/events{/number}","events_url":"https://api.github.com/repos/jimturnquist/on-http/events","assignees_url":"https://api.github.com/repos/jimturnquist/on-http/assignees{/user}","branches_url":"https://api.github.com/repos/jimturnquist/on-http/branches{/branch}","tags_url":"https://api.github.com/repos/jimturnquist/on-http/tags","blobs_url":"https://api.github.com/repos/jimturnquist/on-http/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jimturnquist/on-http/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jimturnquist/on-http/git/refs{/sha}","trees_url":"https://api.github.com/repos/jimturnquist/on-http/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jimturnquist/on-http/statuses/{sha}","languages_url":"https://api.github.com/repos/jimturnquist/on-http/languages","stargazers_url":"https://api.github.com/repos/jimturnquist/on-http/stargazers","contributors_url":"https://api.github.com/repos/jimturnquist/on-http/contributors","subscribers_url":"https://api.github.com/repos/jimturnquist/on-http/subscribers","subscription_url":"https://api.github.com/repos/jimturnquist/on-http/subscription","commits_url":"https://api.github.com/repos/jimturnquist/on-http/commits{/sha}","git_commits_url":"https://api.github.com/repos/jimturnquist/on-http/git/commits{/sha}","comments_url":"https://api.github.com/repos/jimturnquist/on-http/comments{/number}","issue_comment_url":"https://api.github.com/repos/jimturnquist/on-http/issues/comments{/number}","contents_url":"https://api.github.com/repos/jimturnquist/on-http/contents/{+path}","compare_url":"https://api.github.com/repos/jimturnquist/on-http/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jimturnquist/on-http/merges","archive_url":"https://api.github.com/repos/jimturnquist/on-http/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jimturnquist/on-http/downloads","issues_url":"https://api.github.com/repos/jimturnquist/on-http/issues{/number}","pulls_url":"https://api.github.com/repos/jimturnquist/on-http/pulls{/number}","milestones_url":"https://api.github.com/repos/jimturnquist/on-http/milestones{/number}","notifications_url":"https://api.github.com/repos/jimturnquist/on-http/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jimturnquist/on-http/labels{/name}","releases_url":"https://api.github.com/repos/jimturnquist/on-http/releases{/id}","deployments_url":"https://api.github.com/repos/jimturnquist/on-http/deployments","created_at":"2017-05-19T14:43:08Z","updated_at":"2017-05-19T14:43:12Z","pushed_at":"2017-06-02T18:22:07Z","git_url":"git://github.com/jimturnquist/on-http.git","ssh_url":"git@github.com:jimturnquist/on-http.git","clone_url":"https://github.com/jimturnquist/on-http.git","svn_url":"https://github.com/jimturnquist/on-http","homepage":null,"size":4678,"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":"e2e4ba69157873b1be62ebbf9352f3300a56808a","user":{"login":"RackHD","id":13982662,"avatar_url":"https://avatars1.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://avatars1.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":null,"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}","deployments_url":"https://api.github.com/repos/RackHD/on-http/deployments","created_at":"2015-08-31T17:29:08Z","updated_at":"2017-04-06T13:22:30Z","pushed_at":"2017-06-02T18:26:54Z","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":4673,"stargazers_count":11,"watchers_count":11,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":67,"mirror_url":null,"open_issues_count":8,"forks":67,"open_issues":8,"watchers":11,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/RackHD/on-http/pulls/663"},"html":{"href":"https://github.com/RackHD/on-http/pull/663"},"issue":{"href":"https://api.github.com/repos/RackHD/on-http/issues/663"},"comments":{"href":"https://api.github.com/repos/RackHD/on-http/issues/663/comments"},"review_comments":{"href":"https://api.github.com/repos/RackHD/on-http/pulls/663/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/663/commits"},"statuses":{"href":"https://api.github.com/repos/RackHD/on-http/statuses/24c330620a5d05129fbafbf975bf2c5ff4c52cfa"}}}}
{"actor":{"display_login":"houndci-bot"}}