Fix var src_extra_specs error

This error was discovered by tool coverity. If we don't
initialize this var src_extra_specs, line 225 may sometimes
raise an error.

Change-Id: I992b56b64d56f35c8355b22707c3db5112964b31
This commit is contained in:
chenke
2019-08-06 11:02:01 +08:00
parent f2020a9283
commit cbc2b9eb37

View File

@@ -207,6 +207,7 @@ class StorageCapacityBalance(base.WorkloadStabilizationBaseStrategy):
def check_pool_type(self, volume, dest_pool):
target_type = None
src_extra_specs = {}
# check type feature
if not volume.volume_type:
return target_type