Skip to content

Conversation

@jimturnquist
Copy link
Contributor

Added the following endpoints:

GET /redfish/v1/Systems/{identifier}/Bios
GET /redfish/v1/Systems/{identifier}/Bios/Settings
PATCH /redfish/v1/Systems/{identifier}/Bios/Settings

  • This implements redfish systems bios settings for Dell
    nodes only.

@derrickostertag @larry-dean

Added the following endpoints:

  GET /redfish/v1/Systems/{identifier}/Bios
  GET /redfish/v1/Systems/{identifier}/Bios/Settings
  PATCH /redfish/v1/Systems/{identifier}/Bios/Settings

- This implements redfish systems bios settings for Dell
  nodes only.
graphOptions.defaults.serverComponents[0].attributes.push({name: key, value: payload.Attributes[key]});
}
return [ graphName, graphOptions ];
}).spread(function(name, options) {

Choose a reason for hiding this comment

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

'options' is defined but never used.
'name' is defined but never used.

}
return [ graphName, graphOptions ];
}).spread(function(name, options) {
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.

serverComponents: [{fqdd: "BIOS.Setup.1-1", attributes: []}]
}
};
for (var key in payload.Attributes) {

Choose a reason for hiding this comment

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

The body of a for in should be wrapped in an if statement to filter unwanted properties from the prototype.

}
};
for (var key in payload.Attributes) {
graphOptions.defaults.serverComponents[0].attributes.push({name: key, value: payload.Attributes[key]});

Choose a reason for hiding this comment

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

Line is too long.

serverIP: summary.data.id,
fileName: "",
shareType: 0,
shareAddress: southbound_api_router.address,

Choose a reason for hiding this comment

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

Identifier 'southbound_api_router' is not in camel case.

.then(function(node){
var dellFound = false;
for(var i=0; i<node.identifiers.length; i++)
if(/^[0-9|A-Z]{7}$/.test(node.identifiers[i])){

Choose a reason for hiding this comment

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

Expected '{' and instead saw 'if'.

return waterline.nodes.getNodeById(identifier)
.then(function(node){
var dellFound = false;
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 '++'.

}
// normalize the currentValue field (some need value fields)
for(var key in bios.attributes) {
if (bios.attributes[key].currentValue[0] == null) {

Choose a reason for hiding this comment

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

Expected '===' and instead saw '=='.

}
}
// normalize the currentValue field (some need value fields)
for(var key in bios.attributes) {

Choose a reason for hiding this comment

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

'key' is already defined.

.then(function(node){
var dellFound = false;
for(var i=0; i<node.identifiers.length; i++)
if(/^[0-9|A-Z]{7}$/.test(node.identifiers[i])){

Choose a reason for hiding this comment

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

Expected '{' and instead saw 'if'.

.then(function(node){
var dellFound = false;

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

// create a single bios attribute list (not organized by type)
for(key in bios.data) {

Choose a reason for hiding this comment

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

The body of a for in should be wrapped in an if statement to filter unwanted properties from the prototype.

return waterline.nodes.getNodeById(identifier)
.then(function(node){
var dellFound = false;
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 '++'.

return waterline.nodes.getNodeById(identifier)
.then(function(node){
var dellFound = false;
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 moment = require('moment');
var configuration = injector.get('Services.Configuration');

var southboundApiRouter = _.filter(configuration.get('httpEndpoints', []), _.matches({routers:'southbound-api-router'}))[0];

Choose a reason for hiding this comment

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

Line is too long.

@jimturnquist
Copy link
Contributor Author

Cleaning up warnings using captive audience of houndci. No merge please.

}
}).catch(function(error) {
return redfish.handleError(error, res);
});

Choose a reason for hiding this comment

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

Expected an identifier and instead saw ')'.

// TODO: Non-Dell still needs work
options.bios = {"source": "bios", "attributes": []};
}
}).catch(function(error) {

Choose a reason for hiding this comment

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

Expected an identifier and instead saw ')'.
Expected an operator and instead saw '.'.
Missing semicolon.
Expected an identifier and instead saw 'catch'.
Expected an operator and instead saw '('.
Missing name in function declaration.
'function' is defined but never used.

}).spread(function(result) {
return nodeApi.setNodeWorkflowById({ name: result.name, options: result.options }, identifier);
});
} else {

Choose a reason for hiding this comment

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

Expected ')' and instead saw 'else'.
Missing semicolon.

name: graphName,
options: graphOptions
}).spread(function(result) {
return nodeApi.setNodeWorkflowById({ name: result.name, options: result.options }, 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.

forEach(var ident in node.identifiers) {
if(/^[0-9|A-Z]{7}$/.test(ident)){
dellFound = true;
break;

Choose a reason for hiding this comment

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

Unexpected 'break'.

}
for (key = bios.attributes.length - 1; key >= 0; key -= 1) {
// remove entries that are readOnly
if (bios.attributes[key].isReadOnly.value == "true") {

Choose a reason for hiding this comment

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

Expected '===' and instead saw '=='.

forEach(var ident in node.identifiers) {
if(/^[0-9|A-Z]{7}$/.test(ident)){
dellFound = true;
break;

Choose a reason for hiding this comment

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

Unexpected 'break'.

return waterline.nodes.getNodeById(identifier)
.then(function(node){
var dellFound = false;
forEach(var ident in node.identifiers) {

Choose a reason for hiding this comment

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

Expected an identifier and instead saw 'var'.
Expected ')' and instead saw 'ident'.
Missing semicolon.
Expected an identifier and instead saw ')'.

forEach(var ident in node.identifiers) {
if(/^[0-9|A-Z]{7}$/.test(ident)){
dellFound = true;
break;

Choose a reason for hiding this comment

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

Unexpected 'break'.

return waterline.nodes.getNodeById(identifier)
.then(function(node){
var dellFound = false;
forEach(var ident in node.identifiers) {

Choose a reason for hiding this comment

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

Expected an identifier and instead saw 'var'.
Expected ')' and instead saw 'ident'.
Missing semicolon.
Expected an identifier and instead saw ')'.

@jimturnquist
Copy link
Contributor Author

Test this please

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