Fix backward compatibility of compare volume stats

When we fixed tempest test "test_compare_volume_stats_values" (Change-Id
I04d0eaa1f6dba16bd11052f91a3d1d0967029ea6) to make it work with the
"storage_protocol" canonical names that are returned by Cinder master on
the get-pools call (after Change-Id Change-Id:
I07d74078dbb102490dd722029e32c74cec3aa44c) we made the test non-backward
compatible, because stable releases don't return canonical names.

For example the NFS driver will return value "nfs" in stable releases,
but the test expects it to be "NFS" and thus will fail.

This patch fixes this by converting "storage_protocol" for the result of
both the get-pools and get-capabilities calls.

So we have 3 different cases:

- Current cinder master code --> Should work with current test

- Stable cinder branches with some backends (eg: NFS) --> Fixed by this
  patch

- Future Cinder when get-capabilities returns canonical name (Change-Id
  I8b21fbc2c8ef29689f101f6c397550604662cd8a) --> Works with or without
  this patch.

Closes-Bug: #1979826
Change-Id: I56099463791bb9a0bda18cbf7d315825562042aa
1 file changed