In order to specify filtering of returned servers based on
metadata or system metadata a key/value pair string is passed to
the API. However, the string is never converted to a separate
key/value dictionary. This results in the db failing to filter
correctly and causes a stack trace.
This change correctly converts the string values for system
metadata and metadata to dictionaries and fixes the compute api
unittests which previously erroneously assumed that the compute
api layer would be passed search opts in dict format when
required.
Reviewed: https:/ /review. openstack. org/123059 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=ba15ddbf9ba 2db3bf4768a91b5 1d1ca10d2d2833
Committed: https:/
Submitter: Jenkins
Branch: master
commit ba15ddbf9ba2db3 bf4768a91b51d1c a10d2d2833
Author: Chris Yeoh <email address hidden>
Date: Mon Sep 22 16:40:41 2014 +0930
Fixes server list filtering on metadata
In order to specify filtering of returned servers based on
metadata or system metadata a key/value pair string is passed to
the API. However, the string is never converted to a separate
key/value dictionary. This results in the db failing to filter
correctly and causes a stack trace.
This change correctly converts the string values for system
metadata and metadata to dictionaries and fixes the compute api
unittests which previously erroneously assumed that the compute
api layer would be passed search opts in dict format when
required.
Change-Id: I886d5e770fe16f c2194b33c563a13 1b550f13f59
Closes-Bug: 1372218