Host removed from volumes csv report

Host is not collected, so we should remove them from csv report

Change-Id: Ia420c8c12934411a06ba35caa5839755895438f9
Closes-Bug: #1456690
This commit is contained in:
Alexander Kislitsky 2015-05-20 16:38:43 +03:00
parent 4b224453cc
commit 64ce7989a7
2 changed files with 7 additions and 1 deletions

View File

@ -179,7 +179,6 @@ OSWL_SKELETONS = {
'status': None,
'volume_type': None,
'size': None,
'host': None,
'snapshot_id': None,
'tenant_id': None
},

View File

@ -515,3 +515,10 @@ class OswlStatsToCsvTest(OswlTest, DbTest):
resource_type, oswl_keys_paths, vm_keys_paths, oswls)
# Checking only invalid data is not exported
self.assertEqual(num - 1, len(list(flatten_resources)))
def test_volume_host_not_in_keys_paths(self):
exporter = OswlStatsToCsv()
resource_type = consts.OSWL_RESOURCE_TYPES.volume
oswl_keys_paths, resource_keys_paths, csv_keys_paths = \
exporter.get_resource_keys_paths(resource_type)
self.assertNotIn(['volume', 'host'], csv_keys_paths)