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:
Hironori Shiina
2017-01-24 03:53:32 +09:00
parent 8a1d09e898
commit 1afaaa18c7
2 changed files with 2 additions and 2 deletions

View File

@@ -1221,7 +1221,7 @@ class NodeManagerTest(testtools.TestCase):
self.mgr.inject_nmi(NODE1['uuid'])
expect = [
('PUT', '/v1/nodes/%s/management/inject_nmi' % NODE1['uuid'],
{}, None),
{}, {}),
]
self.assertEqual(expect, self.api.calls)

View File

@@ -425,7 +425,7 @@ class NodeManager(base.CreateManager):
def inject_nmi(self, 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):
path = "%s/management/boot_device/supported" % node_uuid