From 564dc8d5a9d228c239efe6cfa1f251e48dbef587 Mon Sep 17 00:00:00 2001 From: David Sullivan Date: Thu, 27 Sep 2018 11:43:03 -0400 Subject: [PATCH] Correct parameter usage in nova api get_device_usage called PciDevicesManager list with an incorrect parameter. This change appears to have been a merge error in commit 876844f0fd966525da52c2a2f568d3f1bdcff29b. That commit also removed the class_id attr from the DeviceUsage class. That attr has been added back. Change-Id: I9ae47a8ff4d4a3e5c6ea671a9f1be848045c3b02 Signed-off-by: David Sullivan Closes-Bug: 1792463 --- .../starlingx-dashboard/starlingx_dashboard/api/nova.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/starlingx-dashboard/starlingx-dashboard/starlingx_dashboard/api/nova.py b/starlingx-dashboard/starlingx-dashboard/starlingx_dashboard/api/nova.py index bc6e872c..8e3a23f1 100644 --- a/starlingx-dashboard/starlingx-dashboard/starlingx_dashboard/api/nova.py +++ b/starlingx-dashboard/starlingx-dashboard/starlingx_dashboard/api/nova.py @@ -36,7 +36,7 @@ def provider_network_get(request, providernet_id): class DeviceUsage(base.APIResourceWrapper): """Wrapper for Inventory Device Usage """ - _attrs = ['device_id', 'device_name', 'vendor_id', + _attrs = ['device_id', 'device_name', 'vendor_id', 'class_id', 'pci_vfs_configured', 'pci_vfs_used', 'pci_pfs_configured', 'pci_pfs_used'] @@ -51,7 +51,7 @@ def get_device_usage(request, device_id): raise nova_exceptions.ResourceNotFound usage = wrs_pci.PciDevicesManager(novaclient(request)).list( - device_id=device_id) + device=device_id) return DeviceUsage(usage[0])