Fix node-inject-nmi to pass an empty body
Fix a request of inject_nmi API to pass an empty body because PUT request must be a JSON dict. A request without a body causes a validation error in the server. Change-Id: Iaaa9e88b4a4b1e1086217900480fb528bfae56dc Partial-Bug: #1526226
This commit is contained in:
		| @@ -1221,7 +1221,7 @@ class NodeManagerTest(testtools.TestCase): | |||||||
|         self.mgr.inject_nmi(NODE1['uuid']) |         self.mgr.inject_nmi(NODE1['uuid']) | ||||||
|         expect = [ |         expect = [ | ||||||
|             ('PUT', '/v1/nodes/%s/management/inject_nmi' % NODE1['uuid'], |             ('PUT', '/v1/nodes/%s/management/inject_nmi' % NODE1['uuid'], | ||||||
|              {}, None), |              {}, {}), | ||||||
|         ] |         ] | ||||||
|         self.assertEqual(expect, self.api.calls) |         self.assertEqual(expect, self.api.calls) | ||||||
|  |  | ||||||
|   | |||||||
| @@ -425,7 +425,7 @@ class NodeManager(base.CreateManager): | |||||||
|  |  | ||||||
|     def inject_nmi(self, node_uuid): |     def inject_nmi(self, node_uuid): | ||||||
|         path = "%s/management/inject_nmi" % node_uuid |         path = "%s/management/inject_nmi" % node_uuid | ||||||
|         return self.update(path, None, http_method='PUT') |         return self.update(path, {}, http_method='PUT') | ||||||
|  |  | ||||||
|     def get_supported_boot_devices(self, node_uuid): |     def get_supported_boot_devices(self, node_uuid): | ||||||
|         path = "%s/management/boot_device/supported" % node_uuid |         path = "%s/management/boot_device/supported" % node_uuid | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Hironori Shiina
					Hironori Shiina