NetApp ONTAP: Fix JSON serialization error on EMS logs

The NetApp cDOT Driver is now fixed to periodically generate EMS
logging messages. The issue was occurring due to incompatible
python 3 code when gathering volume names.

Change-Id: I5ded00b0d743bfb1a9da33d602b9264630979f19
Closes-bug: #1833115
This commit is contained in:
Fernando F. Silva 2019-06-19 16:44:13 -03:00
parent 6cbc53b718
commit 31d8f6b38f
4 changed files with 13 additions and 3 deletions

View File

@ -432,7 +432,9 @@ class NetAppBlockStorageCmodeLibrary(block_base.NetAppBlockStorageLibrary,
def _get_backing_flexvol_names(self):
"""Returns a list of backing flexvol names."""
return self.ssc_library.get_ssc().keys()
ssc = self.ssc_library.get_ssc()
return list(ssc.keys())
def create_group(self, group):
"""Driver entry point for creating a generic volume group.

View File

@ -687,7 +687,9 @@ class NetAppCmodeNfsDriver(nfs_base.NetAppNfsDriver,
def _get_backing_flexvol_names(self):
"""Returns a list of backing flexvol names."""
return self.ssc_library.get_ssc().keys()
ssc = self.ssc_library.get_ssc()
return list(ssc.keys())
def _get_flexvol_names_from_hosts(self, hosts):
"""Returns a set of flexvol names."""

View File

@ -99,8 +99,9 @@ class CapabilitiesLibrary(object):
def get_ssc_flexvol_names(self):
"""Get the names of the FlexVols in the Storage Service Catalog."""
ssc = self.get_ssc()
return ssc.keys()
return list(ssc.keys())
def get_ssc_for_flexvol(self, flexvol_name):
"""Get map of Storage Service Catalog entries for a single flexvol."""

View File

@ -0,0 +1,5 @@
---
fixes:
- |
Fix python 3 incompatibility issues preventing NetApp cDOT driver from
generating EMS logging messages (Bug #1833115).