When trying to compare two values that are non-numeric using the driver
filter, the filter function will give an error. This is not desirable as
it might be interesting to support comparatives with non-numeric values
provided by the filter objects (share, host, etc). For example, the
following formula failed before the fix:
Reviewed: https:/ /review. opendev. org/c/openstack /manila/ +/843288 /opendev. org/openstack/ manila/ commit/ a2ebe1eb9a54e15 f842cdd85d32212 f497e21c02
Committed: https:/
Submitter: "Zuul (22348)"
Branch: master
commit a2ebe1eb9a54e15 f842cdd85d32212 f497e21c02
Author: Maurice Escher <email address hidden>
Date: Wed May 25 11:38:46 2022 +0200
Fix DriverFilter/ GoodnessWeigher string evaluations
When trying to compare two values that are non-numeric using the driver
filter, the filter function will give an error. This is not desirable as
it might be interesting to support comparatives with non-numeric values
provided by the filter objects (share, host, etc). For example, the
following formula failed before the fix:
filter_function = '(share.project_id == "bb212f09317a4f 4a8952ef3f729c2 551")'
Copied from cinder https:/ /opendev. org/openstack/ cinder/ commit/ 87a7e80a2cbc4c8 abcf4394242a02f cc5140e44b
Closes-Bug: #1975715 ebdd0784337db09 21cc7763c53
Change-Id: Icbfabb3bc0f608