Currently, we use field and value attributes of API Query as they
are required, but never force this rule in code. If user post alarm
via ceilometerclient or directly url, and set alarm.threshold_rule.query
with wrong key 'q.field' instead 'field', then 500 will be returned.
This is because the Query accepts any attribute while its required
attribute field is not forced to be set, since UnsetType object is
not in valid keys, then its try to check if it is a metadata filter,
but we assume this value definitely is string, which is wrong since
UnsetType not string type.
This patch makes field and value attributes to be mandatory, then
400 with correct faultstring will be returned if user calls API in wrong
way.
Change-Id: I87b17fb3750c39672f2e0ac813ba0dac42e30326
Closes-Bug: #1429707