Skip to content

Conversation

@phelpdh
Copy link
Contributor

@phelpdh phelpdh commented May 20, 2017

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.

phelpdh added 2 commits May 19, 2017 16:37
…und redfish. Add wsman service for real time log collection.
Add SEL/LC logging via inventory microservice.  Expose through northb…
'use strict';

var di = require('di');
var ejs = require('ejs');

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'); }

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'errors' is not defined.

return result;
})
});
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing semicolon.

result.isRedfishCapable = false; // Change to true to enable southbound redfish
}
return result;
})

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++) {

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('/');

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'i' is not defined.

// if (dellFound){
return wsman.isDellSystem(identifier)
.then(function(result){
var node = result.node;

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);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line is too long.

// if (dellFound){
return wsman.isDellSystem(identifier)
.then(function(result){
var node = result.node;

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);

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) {

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) {

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) {

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) {

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) {

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++)

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);

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){

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++){

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){

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line is too long.

@phelpdh phelpdh closed this May 26, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants