Skip to content

Conversation

@tannoa2
Copy link
Contributor

@tannoa2 tannoa2 commented Mar 20, 2017

No description provided.

PowerState : 'On'
}
},
testActions = {

Choose a reason for hiding this comment

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

'testActions' is defined but never used.

base.runInterfaceTestCases();
});
});`
`

Choose a reason for hiding this comment

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

Missing semicolon.

});
base.runInterfaceTestCases();
});
});`

Choose a reason for hiding this comment

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

'template literal syntax' is only available in ES6 (use 'esversion: 6').

id = [config.ucs, data.path];
}

config['dn'] = data.path

Choose a reason for hiding this comment

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

['dn'] is better written in dot notation.
Missing semicolon.

@JenkinsRHD
Copy link
Contributor

BUILD on-tasks #5 : FAILURE

BUILD on-tasks #5 Error Logs ▼Test Name: UCS OBM Service base ObmService interface reboot() should call BaseObmService.run() with the correct options Error Details: Cannot read property 'findOne' of undefined Stack Trace: TypeError: Cannot read property 'findOne' of undefined at UcsObmServiceFactory.UcsObmService.run (lib/services/ucs-obm-service.js:9:4022) at UcsObmServiceFactory.UcsObmService._runInternal (lib/services/ucs-obm-service.js:9:3565) at UcsObmServiceFactory.UcsObmService.reboot (lib/services/ucs-obm-service.js:9:1911) at Context.<anonymous> (spec/lib/services/base-obm-services-spec.js:89:45)

Test Name: UCS OBM Service base ObmService interface powerOn() should call BaseObmService.run() with the correct options
Error Details: Cannot read property 'findOne' of undefined
Stack Trace: TypeError: Cannot read property 'findOne' of undefined
at UcsObmServiceFactory.UcsObmService.run (lib/services/ucs-obm-service.js:9:4022)
at UcsObmServiceFactory.UcsObmService._runInternal (lib/services/ucs-obm-service.js:9:3565)
at UcsObmServiceFactory.UcsObmService.powerOn (lib/services/ucs-obm-service.js:9:1526)
at Context.<anonymous> (spec/lib/services/base-obm-services-spec.js:89:45)

Test Name: UCS OBM Service base ObmService interface powerOff() should call BaseObmService.run() with the correct options
Error Details: Cannot read property 'findOne' of undefined
Stack Trace: TypeError: Cannot read property 'findOne' of undefined
at UcsObmServiceFactory.UcsObmService.run (lib/services/ucs-obm-service.js:9:4022)
at UcsObmServiceFactory.UcsObmService._runInternal (lib/services/ucs-obm-service.js:9:3565)
at UcsObmServiceFactory.UcsObmService.powerOff (lib/services/ucs-obm-service.js:9:1719)
at Context.<anonymous> (spec/lib/services/base-obm-services-spec.js:89:45)

Test Name: UCS OBM Service base ObmService interface powerStatus() should call BaseObmService.run() with the correct options
Error Details: Cannot read property 'dn' of undefined
Stack Trace: TypeError: Cannot read property 'dn' of undefined
at UcsObmServiceFactory.UcsObmService.powerStatus (lib/services/ucs-obm-service.js:9:2569)
at Context.<anonymous> (spec/lib/services/base-obm-services-spec.js:89:45)

Test Name: UCS OBM Service base ObmService interface powerOn() should call BaseObmService.run() with the correct options
Error Details: Cannot read property 'findOne' of undefined
Stack Trace: TypeError: Cannot read property 'findOne' of undefined
at UcsObmServiceFactory.UcsObmService.run (lib/services/ucs-obm-service.js:9:4022)
at UcsObmServiceFactory.UcsObmService._runInternal (lib/services/ucs-obm-service.js:9:3565)
at UcsObmServiceFactory.UcsObmService.powerOn (lib/services/ucs-obm-service.js:9:1526)
at Context.<anonymous> (spec/lib/services/base-obm-services-spec.js:89:45)

Test Name: UCS OBM Service base ObmService interface powerOff() should call BaseObmService.run() with the correct options
Error Details: Cannot read property 'findOne' of undefined
Stack Trace: TypeError: Cannot read property 'findOne' of undefined
at UcsObmServiceFactory.UcsObmService.run (lib/services/ucs-obm-service.js:9:4022)
at UcsObmServiceFactory.UcsObmService._runInternal (lib/services/ucs-obm-service.js:9:3565)
at UcsObmServiceFactory.UcsObmService.powerOff (lib/services/ucs-obm-service.js:9:1719)
at Context.<anonymous> (spec/lib/services/base-obm-services-spec.js:89:45)

Test Name: UCS OBM Service base ObmService interface reboot() should call BaseObmService.run() with the correct options
Error Details: Cannot read property 'findOne' of undefined
Stack Trace: TypeError: Cannot read property 'findOne' of undefined
at UcsObmServiceFactory.UcsObmService.run (lib/services/ucs-obm-service.js:9:4022)
at UcsObmServiceFactory.UcsObmService._runInternal (lib/services/ucs-obm-service.js:9:3565)
at UcsObmServiceFactory.UcsObmService.reboot (lib/services/ucs-obm-service.js:9:1911)
at Context.<anonymous> (spec/lib/services/base-obm-services-spec.js:89:45)

Test Name: UCS OBM Service base ObmService interface NMI() should call BaseObmService.run() with the correct options
Error Details: expected undefined to be above 0
Stack Trace: AssertionError: expected undefined to be above 0
at spec/lib/services/base-obm-services-spec.js:98:65
at Object.finallyHandler (node_modules/on-core/node_modules/bluebird/js/main/finally.js:39:23)
at Object.tryCatcher (node_modules/on-core/node_modules/bluebird/js/main/util.js:26:23)
at Promise._settlePromiseFromHandler (node_modules/on-core/node_modules/bluebird/js/main/promise.js:510:31)
at Promise._settlePromiseAt (node_modules/on-core/node_modules/bluebird/js/main/promise.js:584:18)
at Promise._settlePromises (node_modules/on-core/node_modules/bluebird/js/main/promise.js:700:14)
at Async._drainQueue (node_modules/on-core/node_modules/bluebird/js/main/async.js:123:16)
at Async._drainQueues (node_modules/on-core/node_modules/bluebird/js/main/async.js:133:10)
at Immediate.Async.drainQueues [as _onImmediate] (node_modules/on-core/node_modules/bluebird/js/main/async.js:15:14)

Test Name: UCS OBM Service base ObmService interface powerButton() should call BaseObmService.run() with the correct options
Error Details: Cannot read property 'findOne' of undefined
Stack Trace: TypeError: Cannot read property 'findOne' of undefined
at UcsObmServiceFactory.UcsObmService.run (lib/services/ucs-obm-service.js:9:4022)
at UcsObmServiceFactory.UcsObmService._runInternal (lib/services/ucs-obm-service.js:9:3565)
at UcsObmServiceFactory.UcsObmService.powerButton (lib/services/ucs-obm-service.js:9:2300)
at Context.<anonymous> (spec/lib/services/base-obm-services-spec.js:89:45)

Test Name: UCS OBM Service base ObmService interface powerStatus() should call BaseObmService.run() with the correct options
Error Details: Cannot read property 'dn' of undefined
Stack Trace: TypeError: Cannot read property 'dn' of undefined
at UcsObmServiceFactory.UcsObmService.powerStatus (lib/services/ucs-obm-service.js:9:2569)
at Context.<anonymous> (spec/lib/services/base-obm-services-spec.js:89:45)

};

describe('base', function() {
var waterline

Choose a reason for hiding this comment

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

Missing semicolon.

@JenkinsRHD
Copy link
Contributor

BUILD on-tasks #6 : FAILURE

@JenkinsRHD
Copy link
Contributor

BUILD on-tasks #7 : FAILURE

BUILD on-tasks #7 Error Logs ▼Test Name: Redfish Registries "before all" hook: start HTTP server Error Details: timeout of 5000ms exceeded. Ensure the done() callback is being called in this test. Stack Trace: Error: timeout of 5000ms exceeded. Ensure the done() callback is being called in this test.

Test Name: Redfish TaskService "before all" hook: start HTTP server
Error Details: timeout of 5000ms exceeded. Ensure the done() callback is being called in this test.
Stack Trace: Error: timeout of 5000ms exceeded. Ensure the done() callback is being called in this test.
at bound (domain.js:287:14)
at runBound (domain.js:300:12)
at tryCatcher (node_modules/on-core/node_modules/bluebird/js/main/util.js:26:23)
at Promise._settlePromiseFromHandler (node_modules/on-core/node_modules/bluebird/js/main/promise.js:510:31)
at Promise._settlePromiseAt (node_modules/on-core/node_modules/bluebird/js/main/promise.js:584:18)
at Promise._settlePromises (node_modules/on-core/node_modules/bluebird/js/main/promise.js:700:14)
at Async._drainQueue (node_modules/on-core/node_modules/bluebird/js/main/async.js:123:16)
at Async._drainQueues (node_modules/on-core/node_modules/bluebird/js/main/async.js:133:10)
at Immediate.Async.drainQueues [as _onImmediate] (node_modules/on-core/node_modules/bluebird/js/main/async.js:15:14)

@tannoa2 tannoa2 force-pushed the obmServiceForUcs branch 2 times, most recently from 00c5fbb to 006646f Compare March 20, 2017 19:59
@JenkinsRHD
Copy link
Contributor

BUILD on-tasks #8 : FAILURE

@JenkinsRHD
Copy link
Contributor

BUILD on-tasks #9 : FAILURE

@tannoa2 tannoa2 force-pushed the obmServiceForUcs branch 2 times, most recently from 542116a to fd41eff Compare March 21, 2017 14:11
@JenkinsRHD
Copy link
Contributor

BUILD on-tasks #10 : FAILURE

BUILD on-tasks #10 Error Logs ▼Test Name: test_nodes_discovery Error Details: timeout waiting for task discovery -------------------- >> begin captured logging << -------------------- tests.api.v2_0.nodes_tests: INFO: Wait start time: 2017-03-21 10:31:15.731148 amqp: DEBUG: Start from server, version: 0.9, properties: {u'information': u'Licensed under the MPL. See http://www.rabbitmq.com/', u'product': u'RabbitMQ', u'copyright': u'Copyright (C) 2007-2013 GoPivotal, Inc.', u'capabilities': {u'exchange_exchange_bindings': True, u'connection.blocked': True, u'authentication_failure_close': True, u'basic.nack': True, u'consumer_priorities': True, u'consumer_cancel_notify': True, u'publisher_confirms': True}, u'platform': u'Erlang/OTP', u'version': u'3.2.4'}, mechanisms: [u'AMQPLAIN', u'PLAIN'], locales: [u'en_US'] amqp: DEBUG: Open OK! kombu: INFO: Starting AMQP worker -> graph.finished.*> amqp: DEBUG: Start from server, version: 0.9, properties: {u'information': u'Licensed under the MPL. See http://www.rabbitmq.com/', u'product': u'RabbitMQ', u'copyright': u'Copyright (C) 2007-2013 GoPivotal, Inc.', u'capabilities': {u'exchange_exchange_bindings': True, u'connection.blocked': True, u'authentication_failure_close': True, u'basic.nack': True, u'consumer_priorities': True, u'consumer_cancel_notify': True, u'publisher_confirms': True}, u'platform': u'Erlang/OTP', u'version': u'3.2.4'}, mechanisms: [u'AMQPLAIN', u'PLAIN'], locales: [u'en_US'] amqp: DEBUG: Open OK! kombu.mixins: INFO: Connected to amqp://guest:**@127.0.0.1:9091// amqp: DEBUG: using channel_id: 1 amqp: DEBUG: Channel open tests.api.v2_0.nodes_tests: INFO: { "duration": "0:01:56.258787", "graph_name": "Graph.SKU.Discovery", "route_id": "dede3e62-635d-4bdf-91b5-935302eb4c70", "status": "succeeded" } tests.api.v2_0.nodes_tests: INFO: { "duration": "0:01:58.527576", "graph_name": "Graph.SKU.Discovery", "route_id": "6c0ced0d-2826-48cd-aeaa-a6779a82f120", "status": "succeeded" } modules.worker: ERROR: subtask timeout after 1200 seconds, (id=discovery), stopping.. kombu: INFO: Stopping AMQP worker -> graph.finished.*> modules.worker: INFO: stopping subtask for discovery amqp: DEBUG: Closed channel #1 --------------------- >> end captured logging << --------------------- Stack Trace: File "/usr/lib/python2.7/unittest/case.py", line 331, in run testMethod() File "/usr/lib/python2.7/unittest/case.py", line 1043, in runTest self._testFunc() File "/home/jenkins/workspace/on-tasks/RackHD/test/.venv/on-build-config/local/lib/python2.7/site-packages/proboscis/case.py", line 296, in testng_method_mistake_capture_func compatability.capture_type_error(s_func) File "/home/jenkins/workspace/on-tasks/RackHD/test/.venv/on-build-config/local/lib/python2.7/site-packages/proboscis/compatability/exceptions_2_6.py", line 27, in capture_type_error func() File "/home/jenkins/workspace/on-tasks/RackHD/test/.venv/on-build-config/local/lib/python2.7/site-packages/proboscis/case.py", line 350, in func func(test_case.state.get_state()) File "/home/jenkins/workspace/on-tasks/RackHD/test/tests/api/v2_0/nodes_tests.py", line 126, in test_nodes_discovery message='timeout waiting for task {0}'.format(self.__task.id)) File "/home/jenkins/workspace/on-tasks/RackHD/test/.venv/on-build-config/local/lib/python2.7/site-packages/proboscis/asserts.py", line 67, in assert_false raise ASSERTION_ERROR(message) 'timeout waiting for task discovery\n-------------------- >> begin captured logging << --------------------\ntests.api.v2_0.nodes_tests: INFO: Wait start time: 2017-03-21 10:31:15.731148\namqp: DEBUG: Start from server, version: 0.9, properties: {u\'information\': u\'Licensed under the MPL. See http://www.rabbitmq.com/\', u\'product\': u\'RabbitMQ\', u\'copyright\': u\'Copyright (C) 2007-2013 GoPivotal, Inc.\', u\'capabilities\': {u\'exchange_exchange_bindings\': True, u\'connection.blocked\': True, u\'authentication_failure_close\': True, u\'basic.nack\': True, u\'consumer_priorities\': True, u\'consumer_cancel_notify\': True, u\'publisher_confirms\': True}, u\'platform\': u\'Erlang/OTP\', u\'version\': u\'3.2.4\'}, mechanisms: [u\'AMQPLAIN\', u\'PLAIN\'], locales: [u\'en_US\']\namqp: DEBUG: Open OK!\nkombu: INFO: Starting AMQP worker -> graph.finished.*>\namqp: DEBUG: Start from server, version: 0.9, properties: {u\'information\': u\'Licensed under the MPL. See http://www.rabbitmq.com/\', u\'product\': u\'RabbitMQ\', u\'copyright\': u\'Copyright (C) 2007-2013 GoPivotal, Inc.\', u\'capabilities\': {u\'exchange_exchange_bindings\': True, u\'connection.blocked\': True, u\'authentication_failure_close\': True, u\'basic.nack\': True, u\'consumer_priorities\': True, u\'consumer_cancel_notify\': True, u\'publisher_confirms\': True}, u\'platform\': u\'Erlang/OTP\', u\'version\': u\'3.2.4\'}, mechanisms: [u\'AMQPLAIN\', u\'PLAIN\'], locales: [u\'en_US\']\namqp: DEBUG: Open OK!\nkombu.mixins: INFO: Connected to amqp://guest:**@127.0.0.1:9091//\namqp: DEBUG: using channel_id: 1\namqp: DEBUG: Channel open\ntests.api.v2_0.nodes_tests: INFO: {\n "duration": "0:01:56.258787",\n "graph_name": "Graph.SKU.Discovery",\n "route_id": "dede3e62-635d-4bdf-91b5-935302eb4c70",\n "status": "succeeded"\n}\ntests.api.v2_0.nodes_tests: INFO: {\n "duration": "0:01:58.527576",\n "graph_name": "Graph.SKU.Discovery",\n "route_id": "6c0ced0d-2826-48cd-aeaa-a6779a82f120",\n "status": "succeeded"\n}\nmodules.worker: ERROR: subtask timeout after 1200 seconds, (id=discovery), stopping..\nkombu: INFO: Stopping AMQP worker -> graph.finished.*>\nmodules.worker: INFO: stopping subtask for discovery\namqp: DEBUG: Closed channel #1\n--------------------- >> end captured logging << ---------------------'

Test Name: test_tag_create
Error Details: (404)
Reason: Not Found
HTTP response headers: HTTPHeaderDict({'Content-Length': '110', 'X-Powered-By': 'Express', 'Connection': 'keep-alive', 'ETag': 'W/"6e-UnNXir3mUmxiTsArtKIZiJhjNXQ"', 'Date': 'Tue, 21 Mar 2017 14:51:33 GMT', 'Access-Control-Allow-Origin': '*', 'Content-Type': 'application/json; charset=utf-8'})
HTTP response body: {"message":"No Catalogs Found for Source (dmi).","status":"404","UUID":"1e34ba11-e12c-4f1b-bccd-b4e2a7573f62"}

Stack Trace: Traceback (most recent call last):
File "/usr/lib/python2.7/unittest/case.py", line 331, in run
testMethod()
File "/usr/lib/python2.7/unittest/case.py", line 1043, in runTest
self._testFunc()
File "/home/jenkins/workspace/on-tasks/RackHD/test/.venv/on-build-config/local/lib/python2.7/site-packages/proboscis/case.py", line 296, in testng_method_mistake_capture_func
compatability.capture_type_error(s_func)
File "/home/jenkins/workspace/on-tasks/RackHD/test/.venv/on-build-config/local/lib/python2.7/site-packages/proboscis/compatability/exceptions_2_6.py", line 27, in capture_type_error
func()
File "/home/jenkins/workspace/on-tasks/RackHD/test/.venv/on-build-config/local/lib/python2.7/site-packages/proboscis/case.py", line 350, in func
func(test_case.state.get_state())
File "/home/jenkins/workspace/on-tasks/RackHD/test/tests/api/v2_0/tags_tests.py", line 45, in test_tag_create
tagsWithRules = self.__create_tag_rule(n.get('id'))
File "/home/jenkins/workspace/on-tasks/RackHD/test/tests/api/v2_0/tags_tests.py", line 26, in __create_tag_rule
Api().nodes_get_catalog_source_by_id(identifier=id,source='dmi')
File "/home/jenkins/workspace/on-tasks/RackHD/test/.venv/on-build-config/local/lib/python2.7/site-packages/on_http_api2_0/apis/api_api.py", line 1862, in nodes_get_catalog_source_by_id
callback=params.get('callback'))
File "/home/jenkins/workspace/on-tasks/RackHD/test/.venv/on-build-config/local/lib/python2.7/site-packages/on_http_api2_0/api_client.py", line 322, in call_api
response_type, auth_settings, callback)
File "/home/jenkins/workspace/on-tasks/RackHD/test/.venv/on-build-config/local/lib/python2.7/site-packages/on_http_api2_0/api_client.py", line 149, in __call_api
post_params=post_params, body=body)
File "/home/jenkins/workspace/on-tasks/RackHD/test/.venv/on-build-config/local/lib/python2.7/site-packages/on_http_api2_0/api_client.py", line 342, in request
headers=headers)
File "/home/jenkins/workspace/on-tasks/RackHD/test/.venv/on-build-config/local/lib/python2.7/site-packages/on_http_api2_0/rest.py", line 184, in GET
query_params=query_params)
File "/home/jenkins/workspace/on-tasks/RackHD/test/.venv/on-build-config/local/lib/python2.7/site-packages/on_http_api2_0/rest.py", line 177, in request
raise ApiException(http_resp=r)
ApiException: (404)
Reason: Not Found
HTTP response headers: HTTPHeaderDict({'Content-Length': '110', 'X-Powered-By': 'Express', 'Connection': 'keep-alive', 'ETag': 'W/"6e-UnNXir3mUmxiTsArtKIZiJhjNXQ"', 'Date': 'Tue, 21 Mar 2017 14:51:33 GMT', 'Access-Control-Allow-Origin': '*', 'Content-Type': 'application/json; charset=utf-8'})
HTTP response body: {"message":"No Catalogs Found for Source (dmi).","status":"404","UUID":"1e34ba11-e12c-4f1b-bccd-b4e2a7573f62"}

Test Name: get_sku_nodes
Error Details: (404)
Reason: Not Found
HTTP response headers: HTTPHeaderDict({'Content-Length': '110', 'X-Powered-By': 'Express', 'Connection': 'keep-alive', 'ETag': 'W/"6e-LJf9lQt/8RJ+HduwDn1S7GlY6mw"', 'Date': 'Tue, 21 Mar 2017 14:51:36 GMT', 'Access-Control-Allow-Origin': '*', 'Content-Type': 'application/json; charset=utf-8'})
HTTP response body: {"message":"No Catalogs Found for Source (dmi).","status":"404","UUID":"f51d8f10-656f-4c44-958f-2e1a07fa8c86"}

Stack Trace: Traceback (most recent call last):
File "/usr/lib/python2.7/unittest/case.py", line 331, in run
testMethod()
File "/usr/lib/python2.7/unittest/case.py", line 1043, in runTest
self._testFunc()
File "/home/jenkins/workspace/on-tasks/RackHD/test/.venv/on-build-config/local/lib/python2.7/site-packages/proboscis/case.py", line 296, in testng_method_mistake_capture_func
compatability.capture_type_error(s_func)
File "/home/jenkins/workspace/on-tasks/RackHD/test/.venv/on-build-config/local/lib/python2.7/site-packages/proboscis/compatability/exceptions_2_6.py", line 27, in capture_type_error
func()
File "/home/jenkins/workspace/on-tasks/RackHD/test/.venv/on-build-config/local/lib/python2.7/site-packages/proboscis/case.py", line 350, in func
func(test_case.state.get_state())
File "/home/jenkins/workspace/on-tasks/RackHD/test/tests/api/v2_0/skupack_tests.py", line 148, in get_sku_nodes
Api().nodes_get_catalog_source_by_id(identifier=node_id,source='dmi')
File "/home/jenkins/workspace/on-tasks/RackHD/test/.venv/on-build-config/local/lib/python2.7/site-packages/on_http_api2_0/apis/api_api.py", line 1862, in nodes_get_catalog_source_by_id
callback=params.get('callback'))
File "/home/jenkins/workspace/on-tasks/RackHD/test/.venv/on-build-config/local/lib/python2.7/site-packages/on_http_api2_0/api_client.py", line 322, in call_api
response_type, auth_settings, callback)
File "/home/jenkins/workspace/on-tasks/RackHD/test/.venv/on-build-config/local/lib/python2.7/site-packages/on_http_api2_0/api_client.py", line 149, in __call_api
post_params=post_params, body=body)
File "/home/jenkins/workspace/on-tasks/RackHD/test/.venv/on-build-config/local/lib/python2.7/site-packages/on_http_api2_0/api_client.py", line 342, in request
headers=headers)
File "/home/jenkins/workspace/on-tasks/RackHD/test/.venv/on-build-config/local/lib/python2.7/site-packages/on_http_api2_0/rest.py", line 184, in GET
query_params=query_params)
File "/home/jenkins/workspace/on-tasks/RackHD/test/.venv/on-build-config/local/lib/python2.7/site-packages/on_http_api2_0/rest.py", line 177, in request
raise ApiException(http_resp=r)
ApiException: (404)
Reason: Not Found
HTTP response headers: HTTPHeaderDict({'Content-Length': '110', 'X-Powered-By': 'Express', 'Connection': 'keep-alive', 'ETag': 'W/"6e-LJf9lQt/8RJ+HduwDn1S7GlY6mw"', 'Date': 'Tue, 21 Mar 2017 14:51:36 GMT', 'Access-Control-Allow-Origin': '*', 'Content-Type': 'application/json; charset=utf-8'})
HTTP response body: {"message":"No Catalogs Found for Source (dmi).","status":"404","UUID":"f51d8f10-656f-4c44-958f-2e1a07fa8c86"}

Test Name: post_skupacks
Error Details: (404)
Reason: Not Found
HTTP response headers: HTTPHeaderDict({'Content-Length': '110', 'X-Powered-By': 'Express', 'Connection': 'keep-alive', 'ETag': 'W/"6e-ZZvaMbJvezp+vQReO8KxcaL7Hhk"', 'Date': 'Tue, 21 Mar 2017 14:51:41 GMT', 'Access-Control-Allow-Origin': '*', 'Content-Type': 'application/json; charset=utf-8'})
HTTP response body: {"message":"No Catalogs Found for Source (dmi).","status":"404","UUID":"df5c31f7-65a7-4f7e-a3c3-d700ed2e277d"}

Stack Trace: Traceback (most recent call last):
File "/usr/lib/python2.7/unittest/case.py", line 331, in run
testMethod()
File "/usr/lib/python2.7/unittest/case.py", line 1043, in runTest
self._testFunc()
File "/home/jenkins/workspace/on-tasks/RackHD/test/.venv/on-build-config/local/lib/python2.7/site-packages/proboscis/case.py", line 296, in testng_method_mistake_capture_func
compatability.capture_type_error(s_func)
File "/home/jenkins/workspace/on-tasks/RackHD/test/.venv/on-build-config/local/lib/python2.7/site-packages/proboscis/compatability/exceptions_2_6.py", line 27, in capture_type_error
func()
File "/home/jenkins/workspace/on-tasks/RackHD/test/.venv/on-build-config/local/lib/python2.7/site-packages/proboscis/case.py", line 350, in func
func(test_case.state.get_state())
File "/home/jenkins/workspace/on-tasks/RackHD/test/tests/api/v2_0/sel_alert_poller_tests.py", line 54, in post_skupacks
Api().nodes_get_catalog_source_by_id(identifier=node_id, source='dmi')
File "/home/jenkins/workspace/on-tasks/RackHD/test/.venv/on-build-config/local/lib/python2.7/site-packages/on_http_api2_0/apis/api_api.py", line 1862, in nodes_get_catalog_source_by_id
callback=params.get('callback'))
File "/home/jenkins/workspace/on-tasks/RackHD/test/.venv/on-build-config/local/lib/python2.7/site-packages/on_http_api2_0/api_client.py", line 322, in call_api
response_type, auth_settings, callback)
File "/home/jenkins/workspace/on-tasks/RackHD/test/.venv/on-build-config/local/lib/python2.7/site-packages/on_http_api2_0/api_client.py", line 149, in __call_api
post_params=post_params, body=body)
File "/home/jenkins/workspace/on-tasks/RackHD/test/.venv/on-build-config/local/lib/python2.7/site-packages/on_http_api2_0/api_client.py", line 342, in request
headers=headers)
File "/home/jenkins/workspace/on-tasks/RackHD/test/.venv/on-build-config/local/lib/python2.7/site-packages/on_http_api2_0/rest.py", line 184, in GET
query_params=query_params)
File "/home/jenkins/workspace/on-tasks/RackHD/test/.venv/on-build-config/local/lib/python2.7/site-packages/on_http_api2_0/rest.py", line 177, in request
raise ApiException(http_resp=r)
ApiException: (404)
Reason: Not Found
HTTP response headers: HTTPHeaderDict({'Content-Length': '110', 'X-Powered-By': 'Express', 'Connection': 'keep-alive', 'ETag': 'W/"6e-ZZvaMbJvezp+vQReO8KxcaL7Hhk"', 'Date': 'Tue, 21 Mar 2017 14:51:41 GMT', 'Access-Control-Allow-Origin': '*', 'Content-Type': 'application/json; charset=utf-8'})
HTTP response body: {"message":"No Catalogs Found for Source (dmi).","status":"404","UUID":"df5c31f7-65a7-4f7e-a3c3-d700ed2e277d"}

Test Name: test_get_chassis
Error Details: (404)
Reason: Not Found
HTTP response headers: HTTPHeaderDict({'Content-Length': '2251', 'X-Powered-By': 'Express', 'Connection': 'keep-alive', 'ETag': 'W/"8cb-ykFlt6dOKoXIiY0YfyvRbVbZYBw"', 'Date': 'Tue, 21 Mar 2017 14:51:43 GMT', 'Access-Control-Allow-Origin': '*', 'Content-Type': 'application/json; charset=utf-8'})
HTTP response body: {"error":{"code":"Base.1.0.GeneralError","message":"A general error has occurred. See ExtendedInfo for more information.","@Message.ExtendedInfo":[{"@odata.type":"#Message.1.0.0.Message","MessageId":"Base.1.0.Messages.InternalError","Description":"Indicates that the request failed for an unknown internal error but that the service is still operational.","Message":"The request failed due to an internal service error. The service is still operational.","Resolution":"Resubmit the request. If the problem persists, consider resetting the service.","Severity":"Critical"},{"MessageId":"RackHD.1.0.DetailedErrorMessage","Message":{"name":"NotFoundError","message":"There is no cache record for the poller with ID 58d139a7ec9416b90a648741.Perhaps it has not been run yet?","stack":"NotFoundError: There is no cache record for the poller with ID 58d139a7ec9416b90a648741.Perhaps it has not been run yet?\n at PollerMessageCacheJob.requestPollerCacheCallback (/home/vagrant/src/on-taskgraph/node_modules/on-tasks/lib/jobs/message-cache-job.js:169:35)\n at /home/vagrant/src/on-taskgraph/node_modules/on-core/lib/protocol/task.js:437:28\n at tryCatcher (/home/vagrant/src/on-taskgraph/node_modules/on-core/node_modules/bluebird/js/main/util.js:26:23)\n at Promise._settlePromiseFromHandler (/home/vagrant/src/on-taskgraph/node_modules/on-core/node_modules/bluebird/js/main/promise.js:510:31)\n at Promise._settlePromiseAt (/home/vagrant/src/on-taskgraph/node_modules/on-core/node_modules/bluebird/js/main/promise.js:584:18)\n at Promise._settlePromiseAtPostResolution (/home/vagrant/src/on-taskgraph/node_modules/on-core/node_modules/bluebird/js/main/promise.js:248:10)\n at Async._drainQueue (/home/vagrant/src/on-taskgraph/node_modules/on-core/node_modules/bluebird/js/main/async.js:128:12)\n at Async._drainQueues (/home/vagrant/src/on-taskgraph/node_modules/on-core/node_modules/bluebird/js/main/async.js:133:10)\n at Immediate.Async.drainQueues [as _onImmediate] (/home/vagrant/src/on-taskgraph/node_modules/on-core/node_modules/bluebird/js/main/async.js:15:14)\n at processImmediate [as _immediateCallback] (timers.js:383:17)","context":{},"status":404},"Description":"Contains the detailed error message contents"}]}}

-------------------- >> begin captured logging << --------------------
tests.api.redfish_1_0.chassis_tests: INFO: 58d139a6ec9416b90a64873e
--------------------- >> end captured logging << ---------------------
Stack Trace: File "/usr/lib/python2.7/unittest/case.py", line 331, in run
testMethod()
File "/usr/lib/python2.7/unittest/case.py", line 1043, in runTest
self._testFunc()
File "/home/jenkins/workspace/on-tasks/RackHD/test/.venv/on-build-config/local/lib/python2.7/site-packages/proboscis/case.py", line 296, in testng_method_mistake_capture_func
compatability.capture_type_error(s_func)
File "/home/jenkins/workspace/on-tasks/RackHD/test/.venv/on-build-config/local/lib/python2.7/site-packages/proboscis/compatability/exceptions_2_6.py", line 27, in capture_type_error
func()
File "/home/jenkins/workspace/on-tasks/RackHD/test/.venv/on-build-config/local/lib/python2.7/site-packages/proboscis/case.py", line 350, in func
func(test_case.state.get_state())
File "/home/jenkins/workspace/on-tasks/RackHD/test/tests/api/redfish_1_0/chassis_tests.py", line 48, in test_get_chassis
redfish().get_chassis(dataId)
File "/home/jenkins/workspace/on-tasks/RackHD/test/.venv/on-build-config/local/lib/python2.7/site-packages/on_http_redfish_1_0/apis/redfishv_api.py", line 890, in get_chassis
callback=params.get('callback'))
File "/home/jenkins/workspace/on-tasks/RackHD/test/.venv/on-build-config/local/lib/python2.7/site-packages/on_http_redfish_1_0/api_client.py", line 322, in call_api
response_type, auth_settings, callback)
File "/home/jenkins/workspace/on-tasks/RackHD/test/.venv/on-build-config/local/lib/python2.7/site-packages/on_http_redfish_1_0/api_client.py", line 149, in __call_api
post_params=post_params, body=body)
File "/home/jenkins/workspace/on-tasks/RackHD/test/.venv/on-build-config/local/lib/python2.7/site-packages/on_http_redfish_1_0/api_client.py", line 342, in request
headers=headers)
File "/home/jenkins/workspace/on-tasks/RackHD/test/.venv/on-build-config/local/lib/python2.7/site-packages/on_http_redfish_1_0/rest.py", line 184, in GET
query_params=query_params)
File "/home/jenkins/workspace/on-tasks/RackHD/test/.venv/on-build-config/local/lib/python2.7/site-packages/on_http_redfish_1_0/rest.py", line 177, in request
raise ApiException(http_resp=r)
'(404)\nReason: Not Found\nHTTP response headers: HTTPHeaderDict({'Content-Length': '2251', 'X-Powered-By': 'Express', 'Connection': 'keep-alive', 'ETag': 'W/"8cb-ykFlt6dOKoXIiY0YfyvRbVbZYBw"', 'Date': 'Tue, 21 Mar 2017 14:51:43 GMT', 'Access-Control-Allow-Origin': '*', 'Content-Type': 'application/json; charset=utf-8'})\nHTTP response body: {"error":{"code":"Base.1.0.GeneralError","message":"A general error has occurred. See ExtendedInfo for more information.","@Message.ExtendedInfo":[{"@odata.type":"#Message.1.0.0.Message","MessageId":"Base.1.0.Messages.InternalError","Description":"Indicates that the request failed for an unknown internal error but that the service is still operational.","Message":"The request failed due to an internal service error. The service is still operational.","Resolution":"Resubmit the request. If the problem persists, consider resetting the service.","Severity":"Critical"},{"MessageId":"RackHD.1.0.DetailedErrorMessage","Message":{"name":"NotFoundError","message":"There is no cache record for the poller with ID 58d139a7ec9416b90a648741.Perhaps it has not been run yet?","stack":"NotFoundError: There is no cache record for the poller with ID 58d139a7ec9416b90a648741.Perhaps it has not been run yet?\n at PollerMessageCacheJob.requestPollerCacheCallback (/home/vagrant/src/on-taskgraph/node_modules/on-tasks/lib/jobs/message-cache-job.js:169:35)\n at /home/vagrant/src/on-taskgraph/node_modules/on-core/lib/protocol/task.js:437:28\n at tryCatcher (/home/vagrant/src/on-taskgraph/node_modules/on-core/node_modules/bluebird/js/main/util.js:26:23)\n at Promise._settlePromiseFromHandler (/home/vagrant/src/on-taskgraph/node_modules/on-core/node_modules/bluebird/js/main/promise.js:510:31)\n at Promise._settlePromiseAt (/home/vagrant/src/on-taskgraph/node_modules/on-core/node_modules/bluebird/js/main/promise.js:584:18)\n at Promise._settlePromiseAtPostResolution (/home/vagrant/src/on-taskgraph/node_modules/on-core/node_modules/bluebird/js/main/promise.js:248:10)\n at Async._drainQueue (/home/vagrant/src/on-taskgraph/node_modules/on-core/node_modules/bluebird/js/main/async.js:128:12)\n at Async._drainQueues (/home/vagrant/src/on-taskgraph/node_modules/on-core/node_modules/bluebird/js/main/async.js:133:10)\n at Immediate.Async.drainQueues [as _onImmediate] (/home/vagrant/src/on-taskgraph/node_modules/on-core/node_modules/bluebird/js/main/async.js:15:14)\n at processImmediate [as _immediateCallback] (timers.js:383:17)","context":{},"status":404},"Description":"Contains the detailed error message contents"}]}}\n\n-------------------- >> begin captured logging << --------------------\ntests.api.redfish_1_0.chassis_tests: INFO: 58d139a6ec9416b90a64873e\n--------------------- >> end captured logging << ---------------------'

@JenkinsRHD
Copy link
Contributor

BUILD on-tasks #11 : FAILURE

@tannoa2
Copy link
Contributor Author

tannoa2 commented Mar 21, 2017

test this please

@JenkinsRHD
Copy link
Contributor

BUILD on-tasks #12 : FAILURE

@tannoa2
Copy link
Contributor Author

tannoa2 commented Mar 21, 2017

test this please

@@ -0,0 +1,113 @@
// Copyright 2016, EMC, Inc.
Copy link
Contributor

Choose a reason for hiding this comment

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

Incorrect copyright date

);
di.annotate(UcsObmServiceFactory,
new di.Inject(
'OBM.base',
Copy link
Contributor

Choose a reason for hiding this comment

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

Add indent

id = [config.ucs, data.path];
}

config.dn = data.path;
Copy link
Contributor

Choose a reason for hiding this comment

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

Please change a better variable name, dn is too short and never tell anything.

UcsObmService.prototype.run = function (options) {
var self = this;
assert.object(options);
assert.string(options.action);
Copy link
Contributor

@yyscamper yyscamper Mar 22, 2017

Choose a reason for hiding this comment

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

The function run is designed to return a Promise either success or fail, but these assertion logic break the design. when assertion fails, it throws error rather than return a rejected Promise.

Usually, the good practice in our code is wrapping the assertion within Promise.try:

return Promise.try(function() {
    assertion.object(option);
    assertion.string(options.action);
})
.then(function() {
    return waterline.nodes.findOne(....)
});

Copy link
Contributor

Choose a reason for hiding this comment

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

You may copy this code from our existing code, but I want to say the existing code isn't always a good example

assert.object(options);
assert.string(options.action);
var action = options.action;
return waterline.nodes.findOne(this.options.nodeId)
Copy link
Contributor

@yyscamper yyscamper Mar 22, 2017

Choose a reason for hiding this comment

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

Since you need nodeId here, then why not add an assertion for it, just like action?

module.exports = UcsObmServiceFactory;

di.annotate(UcsObmServiceFactory,
new di.Provide('ucs-obm-service')
Copy link
Contributor

Choose a reason for hiding this comment

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

Add the new obm service into schema https://github.com/RackHD/on-tasks/blob/master/lib/task-data/base-tasks/obm.js#L30, otherwise this obm will not pass the basic validation.

var url= "/power?" + "identifier=" + data.name + "&action=" + action;
return self.ucs.clientRequest(url, "POST");
});
})

Choose a reason for hiding this comment

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

Missing semicolon.

assert.object(options);
assert.string(options.action);
var action = options.action;
var nodeId = this.options.nodeId

Choose a reason for hiding this comment

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

Missing semicolon.

@JenkinsRHD
Copy link
Contributor

BUILD on-tasks #15 : FAILURE

@tannoa2
Copy link
Contributor Author

tannoa2 commented Mar 22, 2017

test this please

assert.object(options);
assert.string(options.action);
var action = options.action;
var nodeId = this.options.nodeId;
Copy link
Contributor

Choose a reason for hiding this comment

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

Use self rather than this. The anonymous function will has its own this context, it is not the same with self

@geoff-reid geoff-reid merged commit 4fc16fb into RackHD:master Mar 24, 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.

6 participants