diff --git a/ironic_python_agent/ironic_api_client.py b/ironic_python_agent/ironic_api_client.py index 296bac5b0..fabf857ed 100644 --- a/ironic_python_agent/ironic_api_client.py +++ b/ironic_python_agent/ironic_api_client.py @@ -25,6 +25,7 @@ from ironic_python_agent.openstack.common import loopingcall class APIClient(object): api_version = 'v1' + payload_version = '1' def __init__(self, api_url): self.api_url = api_url.rstrip('/') @@ -116,7 +117,8 @@ class APIClient(object): # This hardware won't be saved on the node currently, because of # how driver_vendor_passthru is implemented (no node saving). data = { - 'hardware': hardware_info + 'version': self.payload_version, + 'inventory': hardware_info } # Make the POST, make sure we get back normal data/status codes and diff --git a/ironic_python_agent/tests/ironic_api_client.py b/ironic_python_agent/tests/ironic_api_client.py index 08593a4ca..566dba810 100644 --- a/ironic_python_agent/tests/ironic_api_client.py +++ b/ironic_python_agent/tests/ironic_api_client.py @@ -173,7 +173,8 @@ class TestBaseIronicPythonAgent(test_base.BaseTestCase): data = self.api_client.session.request.call_args[1]['data'] content = json.loads(data) - self.assertEqual(content['hardware'], [ + self.assertEqual(content['version'], self.api_client.payload_version) + self.assertEqual(content['inventory'], [ { 'type': 'mac_address', 'id': 'aa:bb:cc:dd:ee:ff',