-
Notifications
You must be signed in to change notification settings - Fork 77
Add NB redfish support for SEL and LC log collection via wsman #651
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…und redfish. Add wsman service for real time log collection.
Add SEL/LC logging via inventory microservice. Expose through northb…
lib/services/wsman-service.js
Outdated
| 'use strict'; | ||
|
|
||
| var di = require('di'); | ||
| var ejs = require('ejs'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'ejs' is defined but never used.
| var self = this; | ||
| return waterline.obms.findByNode(node.id, 'dell-wsman-obm-service', true) | ||
| .then(function(obm) { | ||
| if (!obm) { throw new errors.NotFoundError('Failed to find Wsman obm settings'); } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'errors' is not defined.
lib/services/wsman-service.js
Outdated
| return result; | ||
| }) | ||
| }); | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing semicolon.
lib/services/wsman-service.js
Outdated
| result.isRedfishCapable = false; // Change to true to enable southbound redfish | ||
| } | ||
| return result; | ||
| }) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing semicolon.
| return waterline.nodes.getNodeById(identifier) | ||
| .then(function(node){ | ||
| result.node = node; | ||
| for(var i=0; i<node.identifiers.length; i++) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unexpected use of '++'.
| var driveIndices = []; | ||
| for(i = 0; i < payload.volume.Links.Drives.length; i++) | ||
| { | ||
| var odataId = payload.volume.Links.Drives[i]['@odata.id'].split('/'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'i' is not defined.
lib/api/redfish-1.0/systems.js
Outdated
| // if (dellFound){ | ||
| return wsman.isDellSystem(identifier) | ||
| .then(function(result){ | ||
| var node = result.node; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'node' is defined but never used.
| } | ||
| }).then(function(){ | ||
| return nodeApi.setNodeWorkflowById({ name: graphName, options: graphOptions }, identifier); | ||
| return nodeApi.setNodeWorkflowById({ name: graphName, options: graphOptions }, identifier); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line is too long.
lib/api/redfish-1.0/systems.js
Outdated
| // if (dellFound){ | ||
| return wsman.isDellSystem(identifier) | ||
| .then(function(result){ | ||
| var node = result.node; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'node' is defined but never used.
| } | ||
| }).then(function(){ | ||
| return nodeApi.setNodeWorkflowById({ name: graphName, options: graphOptions }, identifier); | ||
| return nodeApi.setNodeWorkflowById({ name: graphName, options: graphOptions }, identifier); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line is too long.
| '/LogServices/lc/Entries/1234567') | ||
| .expect('Content-Type', /^application\/json/) | ||
| .expect(200) | ||
| .expect(function(res) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'res' is defined but never used.
| '/LogServices/lc/Entries') | ||
| .expect('Content-Type', /^application\/json/) | ||
| .expect(200) | ||
| .expect(function(res) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'res' is defined but never used.
| '/LogServices/lc') | ||
| .expect('Content-Type', /^application\/json/) | ||
| .expect(200) | ||
| .expect(function(res) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'res' is defined but never used.
| '/LogServices/sel/Entries/23') | ||
| .expect('Content-Type', /^application\/json/) | ||
| .expect(200) | ||
| .expect(function(res) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'res' is defined but never used.
| '/LogServices/sel/Entries') | ||
| .expect('Content-Type', /^application\/json/) | ||
| .expect(200) | ||
| .expect(function(res) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'res' is defined but never used.
| if (driveIndices.length === 0){ throw "No Drives specified for the Volume to use.";} | ||
| graphOptions.defaults.ipAddress = hardware.data.id; | ||
| var driveIndices = []; | ||
| for(var i = 0; i < payload.volume.Links.Drives.length; i++) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unexpected use of '++'.
| console.log(hardware.data.id); | ||
| }).then(function(){ | ||
| return nodeApi.setNodeWorkflowById({ name: graphName, options: graphOptions }, identifier); | ||
| return nodeApi.setNodeWorkflowById({ name: graphName, options: graphOptions }, identifier); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line is too long.
| //convert drive fqdds into the ids used for redfish | ||
| _.forEach(hardware.data.storage.virtualDisks[volumeIndex].physicalDiskIds, function(ele){ | ||
| for(var i = 0; i < ele.length; i++){ | ||
| if (ele == hardware.data.storage.physicalDisks[i].fqdd){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Expected '===' and instead saw '=='.
| options.driveIds = []; | ||
| //convert drive fqdds into the ids used for redfish | ||
| _.forEach(hardware.data.storage.virtualDisks[volumeIndex].physicalDiskIds, function(ele){ | ||
| for(var i = 0; i < ele.length; i++){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unexpected use of '++'.
| options.volume = hardware.data.storage.virtualDisks[volumeIndex]; | ||
| options.driveIds = []; | ||
| //convert drive fqdds into the ids used for redfish | ||
| _.forEach(hardware.data.storage.virtualDisks[volumeIndex].physicalDiskIds, function(ele){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line is too long.
Add wsman service to collect logs real time via inventory microservice.
Moved logic to check if node is Dell systems to wsman service.
Modify related controllers to differentiate between Dell and non-Dell servers.
Add endpoints to redfish.yaml for lc logs.
Clean up UT redfish code for Storage config on Dell servers.