Skip to content

Conversation

@srinia6
Copy link
Contributor

@srinia6 srinia6 commented Oct 20, 2016

This PR Jenkins:depends on RackHD/on-core#222 and Jenkins:depends on RackHD/on-tasks#361

In this PR:

Move sshSettings from nodes.
Create /ibms and /ibms/{identifier} like the obms .
Backward compatible with 1.1 like obms.
Schema/view for ibms.
unit-test fix

@RackHD/corecommitters @dalebremner @brianparry @BillyAbildgaard @geoff-reid

@rackhdmirror
Copy link

@RackHD/corecommitters please review.

password: 'REDACTED'
};
} else {
delete node['sshSettings'];

Choose a reason for hiding this comment

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

['sshSettings'] is better written in dot notation.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ignoring this.

Copy link
Member

Choose a reason for hiding this comment

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

it's recommended style also keep consistent with other codes

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

.then(function (newNode) {
return eventsProtocol.publishNodeAttrEvent(oldNode, newNode, 'ibms');
})
.catch(function (error) {

Choose a reason for hiding this comment

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

'error' is defined but never used.

.then(function(newNode) {
return eventsProtocol.publishNodeAttrEvent(oldNode, newNode, 'ibms');
})
.catch(function (error) {

Choose a reason for hiding this comment

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

'error' is defined but never used.

Copy link
Contributor

Choose a reason for hiding this comment

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

@srinia6 It's probably worth appending error.message to your base error message.

@srinia6
Copy link
Contributor Author

srinia6 commented Oct 21, 2016

@RackHD/corecommitters - the unit test failures are due to on-core dependency.

@srinia6
Copy link
Contributor Author

srinia6 commented Oct 21, 2016

FYI the unit-test failure is due to on-core dependency.

var ibmsPatchById = controller( function(req) {
var ibmId = req.swagger.params.identifier.value;
var values = req.swagger.params.body.value;
return waterline.ibms.needByIdentifier(ibmId)
Copy link
Member

@anhou anhou Oct 25, 2016

Choose a reason for hiding this comment

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

duplicated codes, it also exists in some other places for ibm and obm. two places will be maintained, and easy to miss something if one place is changed. it needs some optimization, or move the common codes to /lib/services/xxxx. maybe it also could be waterline.[xxx].needByxxxx().

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@anhou : I can create a ibm service and move the code for Patch and Delete. But the obm calls the obms waterline collection and ibms calls its own collection. Trying to think if thats what you meant? And not sure what you mean if one place changes ? They are 2 different collections that inherit from base class under on-core/models.

Copy link
Contributor

Choose a reason for hiding this comment

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

@anhou @srinia6 The duplicated code is in ibmsGet, ibmsPut, ibmsGetById, and ibmsGetAll. These are all basically one-liners, does it really make sense to create another layer of abstraction for this? The two verbs with some substance to them (patch and delete) are not common anyway. They could be moved to a service, but that does not avoid duplication.

Copy link
Member

@anhou anhou Oct 26, 2016

Choose a reason for hiding this comment

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

some of the codes are copied from /lib/services/obm-api-services.js the code logic is the same. I think don't need another abstract layer to service api, if ibm and obm really almost the similar in document operation. maybe just a map/dict could reduce the duplication. maintain obm/ibm in /lib/services/bm-api-service.js or lib/services/nm-api-service.js(network management) all the document openration like waterline.obms.xxxx could be waterline.nm[type].xxx, just a method I could think of to de-duplication. or you could use other better ways to do it.

Copy link
Contributor

@brianparry brianparry left a comment

Choose a reason for hiding this comment

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

@srinia6 Looks good overall, just a few questions / comments.

var ibmsPatchById = controller( function(req) {
var ibmId = req.swagger.params.identifier.value;
var values = req.swagger.params.body.value;
return waterline.ibms.needByIdentifier(ibmId)
Copy link
Contributor

Choose a reason for hiding this comment

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

@anhou @srinia6 The duplicated code is in ibmsGet, ibmsPut, ibmsGetById, and ibmsGetAll. These are all basically one-liners, does it really make sense to create another layer of abstraction for this? The two verbs with some substance to them (patch and delete) are not common anyway. They could be moved to a service, but that does not avoid duplication.

.then(function(newNode) {
return eventsProtocol.publishNodeAttrEvent(oldNode, newNode, 'ibms');
})
.catch(function (error) {
Copy link
Contributor

Choose a reason for hiding this comment

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

@srinia6 It's probably worth appending error.message to your base error message.

return waterline.ibms.needByIdentifier(ibmId)
.then(function(oldIbm) {
/* Get nodes that need to publish events */
if (oldIbm.node && !values.nodeId) {
Copy link
Contributor

Choose a reason for hiding this comment

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

srinia6 Is this logic needed? Couldn't we just compare the old node to the new node and alert if anything has changed? Or maybe even just always alert?

Copy link
Member

Choose a reason for hiding this comment

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

I think this part of codes are copied from /lib/service/obm-api-service.js they are written and tested by me several months ago. the logic could be referenced from the unit test cases. the behavior is documented in RackHD/docs in 'event notification' section about obms.assigned/unassigned/updated

Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks @anhou

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@anhou - we have created another story to handle slightly similar code in this story - https://www.pivotaltracker.com/story/show/133740825

@changev
Copy link
Member

changev commented Oct 27, 2016

@srinia6 a strange issue.
When get description by github api
It get

This PR Jenkins:depends on https://github.com/RackHD/on-core/pull/222 and Jenkins:depends on RackHD/on-tasks#361

RackHD/on-tasks#361 but not a URL.

I add sub line to correct this
jenkins: depends on RackHD/on-tasks#361

test this please


still not support branch feature/ibms not exists in all repos

Thanks.

var obms = Promise.map(waterline.obms.find({node: node.id}), function(obm) {
return _.pick(obm.toJSON(), 'service', 'config');
});
var sshSettings = waterline.ibms.findByNode(node.id, 'ssh-ibm-service');
Copy link
Contributor

Choose a reason for hiding this comment

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

Since this is only for a 1.1 API backwards compatibility edge case, I'm not going to raise an issue. But in any 2.0 controller I would object to hardcoding for specific IBM service types, especially just for doing 'REDACT' which shouldn't be handled at this layer anyways.

Copy link
Contributor

Choose a reason for hiding this comment

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

Besides, the function name is _renderNodeObmSettings but the function covers both obm & ibm (ssh), so this doesn't match.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@benbp : Thanks ben! @yyscamper : I will rename the function.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

@yyscamper
Copy link
Contributor

@srinia6 : this is a reminder for you. When I worked on the issue https://github.com/RackHD/RackHD/issues/483, I found the obm setting was not added while manually adding node, so the node's discovery will fail. The solution is in my PR #524.

After the ibm is merged, and when you plan to move the snmpSettings into ibm, don't forget this issue.

"type": "object",
"properties": {
"host": {
"description": "BMC address",
Copy link
Contributor

Choose a reason for hiding this comment

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

This is not BMC address!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

OK

get:
description: 'Get a list of all In Band Management settings that have been associated

with nodes.
Copy link
Contributor

Choose a reason for hiding this comment

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

This multiple lines style is very strange for me. this line should be put together with line630, the same for a lot below lines.

Copy link
Contributor Author

@srinia6 srinia6 Nov 4, 2016

Choose a reason for hiding this comment

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

@yyscamper Because this pr has been sitting in review for ~14 days, it needs to be changed per the new master file. Will update it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

"type": "<%=type%>",
"workflows": "<%=basepath %>/nodes/<%=id%>/workflows"
"workflows": "<%=basepath %>/nodes/<%=id%>/workflows",
<% if (ibms === null) { %>
Copy link
Contributor

Choose a reason for hiding this comment

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

A minor suggestion, put the ibm together with obm will help people to compare the difference between them.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Since this has been tested with these changes, i plan to keep them as is for now. Will change them in the snmp story.

)
'Assert',
'Errors'
)
Copy link
Contributor

Choose a reason for hiding this comment

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

The previous indent is better, please remain it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ok

@srinia6 srinia6 changed the base branch from master to feature/ibms November 4, 2016 08:36
@JenkinsRHD
Copy link
Contributor

BUILD on-http #2799 : FAILURE

BUILD unit-tests #10007 Error Logs ▼

Test Name: Http.Api.Ibms /api/2.0/ibms should return a list of IBM instances
Error Details: Should wrap property of object
Stack Trace: TypeError: Should wrap property of object
at Object.wrapMethod (node_modules/sinon/lib/sinon/util/core.js:67:23)
at Object.stub (node_modules/sinon/lib/sinon/stub.js:61:26)
at Context.<anonymous> (spec/lib/api/2.0/ibms-spec.js:106:26)

Test Name: Http.Api.Ibms /api/2.0/ibms should put an IBM instance
Error Details: Should wrap property of object
Stack Trace: TypeError: Should wrap property of object
at Object.wrapMethod (node_modules/sinon/lib/sinon/util/core.js:67:23)
at Object.stub (node_modules/sinon/lib/sinon/stub.js:61:26)
at Context.<anonymous> (spec/lib/api/2.0/ibms-spec.js:121:26)

Test Name: Http.Api.Ibms /api/2.0/ibms should 400 when put with unloaded schema
Error Details: Should wrap property of object
Stack Trace: TypeError: Should wrap property of object
at Object.wrapMethod (node_modules/sinon/lib/sinon/util/core.js:67:23)
at Object.stub (node_modules/sinon/lib/sinon/stub.js:61:26)
at Context.<anonymous> (spec/lib/api/2.0/ibms-spec.js:133:26)

Test Name: Http.Api.Ibms /api/2.0/ibms should 400 when put with missing field
Error Details: Should wrap property of object
Stack Trace: TypeError: Should wrap property of object
at Object.wrapMethod (node_modules/sinon/lib/sinon/util/core.js:67:23)
at Object.stub (node_modules/sinon/lib/sinon/stub.js:61:26)
at Context.<anonymous> (spec/lib/api/2.0/ibms-spec.js:145:26)

Test Name: Http.Api.Ibms /api/2.0/ibms/:id "before each" hook for "should get an IBM instance"
Error Details: Should wrap property of object
Stack Trace: TypeError: Should wrap property of object
at Object.wrapMethod (node_modules/sinon/lib/sinon/util/core.js:67:23)
at Object.stub (node_modules/sinon/lib/sinon/stub.js:61:26)
at Context.<anonymous> (spec/lib/api/2.0/ibms-spec.js:160:19)

Test Name: Http.Api.Ibms /api/2.0/ibms/:id "after each" hook for "should get an IBM instance"
Error Details: Cannot read property 'needByIdentifier' of undefined
Stack Trace: TypeError: Cannot read property 'needByIdentifier' of undefined
at Context.<anonymous> (spec/lib/api/2.0/ibms-spec.js:166:27)

Test Name: 2.0 Http.Api.Nodes GET /nodes/:identifier/ssh should return a list of the node's ssh settings
Error Details: Cannot read property 'findAllByNode' of undefined
Stack Trace: TypeError: Cannot read property 'findAllByNode' of undefined
at Context.<anonymous> (spec/lib/api/2.0/nodes-spec.js:383:27)

Test Name: 2.0 Http.Api.Nodes GET /nodes/:identifier/ssh should return a 404 if the node has no ssh settings
Error Details: Cannot read property 'findAllByNode' of undefined
Stack Trace: TypeError: Cannot read property 'findAllByNode' of undefined
at Context.<anonymous> (spec/lib/api/2.0/nodes-spec.js:400:27)

Test Name: 2.0 Http.Api.Nodes POST /nodes/:identifier/ssh should replace existing settings with a new set of ssh settings
Error Details: Cannot read property 'upsertByNode' of undefined
Stack Trace: TypeError: Cannot read property 'upsertByNode' of undefined
at Context.<anonymous> (spec/lib/api/2.0/nodes-spec.js:436:27)

Test Name: 2.0 Http.Api.Nodes POST /nodes/:identifier/ssh should add a new set of ssh settings if none exist
Error Details: Cannot read property 'upsertByNode' of undefined
Stack Trace: TypeError: Cannot read property 'upsertByNode' of undefined
at Context.<anonymous> (spec/lib/api/2.0/nodes-spec.js:449:27)

@srinia6
Copy link
Contributor Author

srinia6 commented Nov 4, 2016

@yyscamper : Looking at your PR, that is no way related to this PR. #524 What issue are you talking about?

@JenkinsRHD
Copy link
Contributor

BUILD on-http #2803 : FAILURE

BUILD unit-tests #10011 Error Logs ▼

Test Name: Http.Api.Ibms /api/2.0/ibms/definitions should get the ssh IBM schema
Error Details: expected 200 "OK", got 404 "Not Found" Response body: { message: '/api/2.0/ibms/definitions/ssh-ibm-service.json Not Found', status: '404', UUID: '12979859-636f-4346-b6b9-a23fb9a50467' } Error: expected 200 "OK", got 404 "Not Found" at Test._assertStatus (/home/jenkins/workspace/on-http/build/node_modules/supertest/lib/test.js:232:12) at Test._assertFunction (/home/jenkins/workspace/on-http/build/node_modules/supertest/lib/test.js:247:11) at Test.assert (/home/jenkins/workspace/on-http/build/node_modules/supertest/lib/test.js:148:18) at assert (/home/jenkins/workspace/on-http/build/node_modules/supertest/lib/test.js:127:12) at /home/jenkins/workspace/on-http/build/node_modules/supertest/lib/test.js:124:5 at Test.Request.callback (/home/jenkins/workspace/on-http/build/node_modules/supertest/node_modules/superagent/lib/node/index.js:703:3) at IncomingMessage.<anonymous> (/home/jenkins/workspace/on-http/build/node_modules/supertest/node_modules/superagent/lib/node/index.js:922:12) at emitNone (events.js:72:20) at IncomingMessage.emit (events.js:166:7) at endReadableNT (_stream_readable.js:921:12) at nextTickCallbackWith2Args (node.js:442:9) at process._tickDomainCallback (node.js:397:17)
Stack Trace: Error: expected 200 "OK", got 404 "Not Found"
at Test._assertStatus (node_modules/supertest/lib/test.js:232:12)
at Test._assertFunction (node_modules/supertest/lib/test.js:247:11)
at Test.assert (node_modules/supertest/lib/test.js:148:18)
at assert (node_modules/supertest/lib/test.js:127:12)
at node_modules/supertest/lib/test.js:124:5
at Test.Request.callback (node_modules/supertest/node_modules/superagent/lib/node/index.js:703:3)
at IncomingMessage.<anonymous> (node_modules/supertest/node_modules/superagent/lib/node/index.js:922:12)
at endReadableNT (_stream_readable.js:921:12)

Test Name: Http.Api.Ibms /api/2.0/ibms should return a list of IBM instances
Error Details: Should wrap property of object
Stack Trace: TypeError: Should wrap property of object
at Object.wrapMethod (node_modules/sinon/lib/sinon/util/core.js:67:23)
at Object.stub (node_modules/sinon/lib/sinon/stub.js:61:26)
at Context.<anonymous> (spec/lib/api/2.0/ibms-spec.js:106:26)

Test Name: Http.Api.Ibms /api/2.0/ibms should put an IBM instance
Error Details: Should wrap property of object
Stack Trace: TypeError: Should wrap property of object
at Object.wrapMethod (node_modules/sinon/lib/sinon/util/core.js:67:23)
at Object.stub (node_modules/sinon/lib/sinon/stub.js:61:26)
at Context.<anonymous> (spec/lib/api/2.0/ibms-spec.js:121:26)

Test Name: Http.Api.Ibms /api/2.0/ibms should 400 when put with unloaded schema
Error Details: Should wrap property of object
Stack Trace: TypeError: Should wrap property of object
at Object.wrapMethod (node_modules/sinon/lib/sinon/util/core.js:67:23)
at Object.stub (node_modules/sinon/lib/sinon/stub.js:61:26)
at Context.<anonymous> (spec/lib/api/2.0/ibms-spec.js:133:26)

Test Name: Http.Api.Ibms /api/2.0/ibms should 400 when put with missing field
Error Details: Should wrap property of object
Stack Trace: TypeError: Should wrap property of object
at Object.wrapMethod (node_modules/sinon/lib/sinon/util/core.js:67:23)
at Object.stub (node_modules/sinon/lib/sinon/stub.js:61:26)
at Context.<anonymous> (spec/lib/api/2.0/ibms-spec.js:145:26)

Test Name: Http.Api.Ibms /api/2.0/ibms/:id "before each" hook for "should get an IBM instance"
Error Details: Should wrap property of object
Stack Trace: TypeError: Should wrap property of object
at Object.wrapMethod (node_modules/sinon/lib/sinon/util/core.js:67:23)
at Object.stub (node_modules/sinon/lib/sinon/stub.js:61:26)
at Context.<anonymous> (spec/lib/api/2.0/ibms-spec.js:160:19)

Test Name: Http.Api.Ibms /api/2.0/ibms/:id "after each" hook for "should get an IBM instance"
Error Details: Cannot read property 'needByIdentifier' of undefined
Stack Trace: TypeError: Cannot read property 'needByIdentifier' of undefined
at Context.<anonymous> (spec/lib/api/2.0/ibms-spec.js:166:27)

Test Name: 2.0 Http.Api.Nodes GET /nodes/:identifier/ssh should return a list of the node's ssh settings
Error Details: Cannot read property 'findAllByNode' of undefined
Stack Trace: TypeError: Cannot read property 'findAllByNode' of undefined
at Context.<anonymous> (spec/lib/api/2.0/nodes-spec.js:383:27)

Test Name: 2.0 Http.Api.Nodes GET /nodes/:identifier/ssh should return a 404 if the node has no ssh settings
Error Details: Cannot read property 'findAllByNode' of undefined
Stack Trace: TypeError: Cannot read property 'findAllByNode' of undefined
at Context.<anonymous> (spec/lib/api/2.0/nodes-spec.js:400:27)

Test Name: 2.0 Http.Api.Nodes POST /nodes/:identifier/ssh should replace existing settings with a new set of ssh settings
Error Details: Cannot read property 'upsertByNode' of undefined
Stack Trace: TypeError: Cannot read property 'upsertByNode' of undefined
at Context.<anonymous> (spec/lib/api/2.0/nodes-spec.js:436:27)

Test Name: 2.0 Http.Api.Nodes POST /nodes/:identifier/ssh should add a new set of ssh settings if none exist
Error Details: Cannot read property 'upsertByNode' of undefined
Stack Trace: TypeError: Cannot read property 'upsertByNode' of undefined
at Context.<anonymous> (spec/lib/api/2.0/nodes-spec.js:449:27)

Test Name: 2.0 Http.Api.Nodes POST /nodes/:identifier/ssh should return a 404 if the node was not found
Error Details: expected 404 "Not Found", got 400 "Bad Request" Response body: { message: '&#34;ssh-ibm-service.json#/definitions/Ibm is not loaded&#34;', status: '400', UUID: 'c77afd34-dde8-424a-b2aa-c4673b2eba1a' } Error: expected 404 "Not Found", got 400 "Bad Request" at Test._assertStatus (/home/jenkins/workspace/on-http/build/node_modules/supertest/lib/test.js:232:12) at Test._assertFunction (/home/jenkins/workspace/on-http/build/node_modules/supertest/lib/test.js:247:11) at Test.assert (/home/jenkins/workspace/on-http/build/node_modules/supertest/lib/test.js:148:18) at assert (/home/jenkins/workspace/on-http/build/node_modules/supertest/lib/test.js:127:12) at /home/jenkins/workspace/on-http/build/node_modules/supertest/lib/test.js:124:5 at Test.Request.callback (/home/jenkins/workspace/on-http/build/node_modules/supertest/node_modules/superagent/lib/node/index.js:703:3) at IncomingMessage.<anonymous> (/home/jenkins/workspace/on-http/build/node_modules/supertest/node_modules/superagent/lib/node/index.js:922:12) at emitNone (events.js:72:20) at IncomingMessage.emit (events.js:166:7) at endReadableNT (_stream_readable.js:921:12) at nextTickCallbackWith2Args (node.js:442:9) at process._tickDomainCallback (node.js:397:17)
Stack Trace: Error: expected 404 "Not Found", got 400 "Bad Request"
at Test._assertStatus (node_modules/supertest/lib/test.js:232:12)
at Test._assertFunction (node_modules/supertest/lib/test.js:247:11)
at Test.assert (node_modules/supertest/lib/test.js:148:18)
at assert (node_modules/supertest/lib/test.js:127:12)
at node_modules/supertest/lib/test.js:124:5
at Test.Request.callback (node_modules/supertest/node_modules/superagent/lib/node/index.js:703:3)
at IncomingMessage.<anonymous> (node_modules/supertest/node_modules/superagent/lib/node/index.js:922:12)
at endReadableNT (_stream_readable.js:921:12)

@JenkinsRHD
Copy link
Contributor

BUILD on-http #2804 : FAILURE

BUILD unit-tests #10012 Error Logs ▼

Test Name: Http.Api.Ibms /api/2.0/ibms/definitions should get the ssh IBM schema
Error Details: expected 200 "OK", got 404 "Not Found" Response body: { message: '/api/2.0/ibms/definitions/ssh-ibm-service.json Not Found', status: '404', UUID: '57020694-0115-418e-a6c0-a238e01cd30f' } Error: expected 200 "OK", got 404 "Not Found" at Test._assertStatus (/home/jenkins/workspace/on-http/build/node_modules/supertest/lib/test.js:232:12) at Test._assertFunction (/home/jenkins/workspace/on-http/build/node_modules/supertest/lib/test.js:247:11) at Test.assert (/home/jenkins/workspace/on-http/build/node_modules/supertest/lib/test.js:148:18) at assert (/home/jenkins/workspace/on-http/build/node_modules/supertest/lib/test.js:127:12) at /home/jenkins/workspace/on-http/build/node_modules/supertest/lib/test.js:124:5 at Test.Request.callback (/home/jenkins/workspace/on-http/build/node_modules/supertest/node_modules/superagent/lib/node/index.js:703:3) at IncomingMessage.<anonymous> (/home/jenkins/workspace/on-http/build/node_modules/supertest/node_modules/superagent/lib/node/index.js:922:12) at emitNone (events.js:72:20) at IncomingMessage.emit (events.js:166:7) at endReadableNT (_stream_readable.js:921:12) at nextTickCallbackWith2Args (node.js:442:9) at process._tickDomainCallback (node.js:397:17)
Stack Trace: Error: expected 200 "OK", got 404 "Not Found"
at Test._assertStatus (node_modules/supertest/lib/test.js:232:12)
at Test._assertFunction (node_modules/supertest/lib/test.js:247:11)
at Test.assert (node_modules/supertest/lib/test.js:148:18)
at assert (node_modules/supertest/lib/test.js:127:12)
at node_modules/supertest/lib/test.js:124:5
at Test.Request.callback (node_modules/supertest/node_modules/superagent/lib/node/index.js:703:3)
at IncomingMessage.<anonymous> (node_modules/supertest/node_modules/superagent/lib/node/index.js:922:12)
at endReadableNT (_stream_readable.js:921:12)

Test Name: Http.Api.Ibms /api/2.0/ibms should return a list of IBM instances
Error Details: Should wrap property of object
Stack Trace: TypeError: Should wrap property of object
at Object.wrapMethod (node_modules/sinon/lib/sinon/util/core.js:67:23)
at Object.stub (node_modules/sinon/lib/sinon/stub.js:61:26)
at Context.<anonymous> (spec/lib/api/2.0/ibms-spec.js:106:26)

Test Name: Http.Api.Ibms /api/2.0/ibms should put an IBM instance
Error Details: Should wrap property of object
Stack Trace: TypeError: Should wrap property of object
at Object.wrapMethod (node_modules/sinon/lib/sinon/util/core.js:67:23)
at Object.stub (node_modules/sinon/lib/sinon/stub.js:61:26)
at Context.<anonymous> (spec/lib/api/2.0/ibms-spec.js:121:26)

Test Name: Http.Api.Ibms /api/2.0/ibms should 400 when put with unloaded schema
Error Details: Should wrap property of object
Stack Trace: TypeError: Should wrap property of object
at Object.wrapMethod (node_modules/sinon/lib/sinon/util/core.js:67:23)
at Object.stub (node_modules/sinon/lib/sinon/stub.js:61:26)
at Context.<anonymous> (spec/lib/api/2.0/ibms-spec.js:133:26)

Test Name: Http.Api.Ibms /api/2.0/ibms should 400 when put with missing field
Error Details: Should wrap property of object
Stack Trace: TypeError: Should wrap property of object
at Object.wrapMethod (node_modules/sinon/lib/sinon/util/core.js:67:23)
at Object.stub (node_modules/sinon/lib/sinon/stub.js:61:26)
at Context.<anonymous> (spec/lib/api/2.0/ibms-spec.js:145:26)

Test Name: Http.Api.Ibms /api/2.0/ibms/:id "before each" hook for "should get an IBM instance"
Error Details: Should wrap property of object
Stack Trace: TypeError: Should wrap property of object
at Object.wrapMethod (node_modules/sinon/lib/sinon/util/core.js:67:23)
at Object.stub (node_modules/sinon/lib/sinon/stub.js:61:26)
at Context.<anonymous> (spec/lib/api/2.0/ibms-spec.js:160:19)

Test Name: Http.Api.Ibms /api/2.0/ibms/:id "after each" hook for "should get an IBM instance"
Error Details: Cannot read property 'needByIdentifier' of undefined
Stack Trace: TypeError: Cannot read property 'needByIdentifier' of undefined
at Context.<anonymous> (spec/lib/api/2.0/ibms-spec.js:166:27)

Test Name: 2.0 Http.Api.Nodes GET /nodes/:identifier/ssh should return a list of the node's ssh settings
Error Details: Cannot read property 'findAllByNode' of undefined
Stack Trace: TypeError: Cannot read property 'findAllByNode' of undefined
at Context.<anonymous> (spec/lib/api/2.0/nodes-spec.js:383:27)

Test Name: 2.0 Http.Api.Nodes GET /nodes/:identifier/ssh should return a 404 if the node has no ssh settings
Error Details: Cannot read property 'findAllByNode' of undefined
Stack Trace: TypeError: Cannot read property 'findAllByNode' of undefined
at Context.<anonymous> (spec/lib/api/2.0/nodes-spec.js:400:27)

Test Name: 2.0 Http.Api.Nodes POST /nodes/:identifier/ssh should replace existing settings with a new set of ssh settings
Error Details: Cannot read property 'upsertByNode' of undefined
Stack Trace: TypeError: Cannot read property 'upsertByNode' of undefined
at Context.<anonymous> (spec/lib/api/2.0/nodes-spec.js:436:27)

Test Name: 2.0 Http.Api.Nodes POST /nodes/:identifier/ssh should add a new set of ssh settings if none exist
Error Details: Cannot read property 'upsertByNode' of undefined
Stack Trace: TypeError: Cannot read property 'upsertByNode' of undefined
at Context.<anonymous> (spec/lib/api/2.0/nodes-spec.js:449:27)

Test Name: 2.0 Http.Api.Nodes POST /nodes/:identifier/ssh should return a 404 if the node was not found
Error Details: expected 404 "Not Found", got 400 "Bad Request" Response body: { message: '&#34;ssh-ibm-service.json#/definitions/Ibm is not loaded&#34;', status: '400', UUID: 'd1e956ed-482a-4af7-863c-c93e134580b3' } Error: expected 404 "Not Found", got 400 "Bad Request" at Test._assertStatus (/home/jenkins/workspace/on-http/build/node_modules/supertest/lib/test.js:232:12) at Test._assertFunction (/home/jenkins/workspace/on-http/build/node_modules/supertest/lib/test.js:247:11) at Test.assert (/home/jenkins/workspace/on-http/build/node_modules/supertest/lib/test.js:148:18) at assert (/home/jenkins/workspace/on-http/build/node_modules/supertest/lib/test.js:127:12) at /home/jenkins/workspace/on-http/build/node_modules/supertest/lib/test.js:124:5 at Test.Request.callback (/home/jenkins/workspace/on-http/build/node_modules/supertest/node_modules/superagent/lib/node/index.js:703:3) at IncomingMessage.<anonymous> (/home/jenkins/workspace/on-http/build/node_modules/supertest/node_modules/superagent/lib/node/index.js:922:12) at emitNone (events.js:72:20) at IncomingMessage.emit (events.js:166:7) at endReadableNT (_stream_readable.js:921:12) at nextTickCallbackWith2Args (node.js:442:9) at process._tickDomainCallback (node.js:397:17)
Stack Trace: Error: expected 404 "Not Found", got 400 "Bad Request"
at Test._assertStatus (node_modules/supertest/lib/test.js:232:12)
at Test._assertFunction (node_modules/supertest/lib/test.js:247:11)
at Test.assert (node_modules/supertest/lib/test.js:148:18)
at assert (node_modules/supertest/lib/test.js:127:12)
at node_modules/supertest/lib/test.js:124:5
at Test.Request.callback (node_modules/supertest/node_modules/superagent/lib/node/index.js:703:3)
at IncomingMessage.<anonymous> (node_modules/supertest/node_modules/superagent/lib/node/index.js:922:12)
at endReadableNT (_stream_readable.js:921:12)

@srinia6
Copy link
Contributor Author

srinia6 commented Nov 7, 2016

FYI - Jenkins build and CI failures are due to unavailability of on-core models.

Copy link
Contributor

@brianparry brianparry left a comment

Choose a reason for hiding this comment

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

👍

@brianparry brianparry merged commit 0667de2 into RackHD:feature/ibms Nov 7, 2016
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.