Recently, as a result of the nova 2.1/3.0 discussion, tempest has been adding validation of the json dictionaries and headers returned by nova api calls. This is done by specifying json schema for these values. As proposed, these schema do not specify "additionalProperties": False, which means that if a header is added or a new key is added to a returned dict, the tempest test will not fail. The current api change guidelines say this:

     Generally Considered OK

 * The change is the only way to fix a security bug
 * Fixing a bug so that a request which resulted in an error response
   before is now successful
 * Adding a new response header
 * Changing an error response code to be more accurate
 * OK when conditionally added as a new API extension
     o Adding a property to a resource representation
     o Adding an optional property to a resource representation which
       may be supplied by clients, assuming the API previously would
       ignore this property


This seems to say that you need an api extension to add a value to a returned dict but not to add a new header. So that would imply that checking the headers should allow additional properties but checking the body should not. Is that the desired behavior? Would there be harm in allowing values to be added to a returned dict as well as the headers? Saying that application code should check if there is an extension to add a new value before trying to use the value seems pretty close to just checking for the existence of the value. In any event, we need to decide what the correct value is for these schemas.

 -David
_______________________________________________
OpenStack-dev mailing list
OpenStack-dev@lists.openstack.org
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev

Reply via email to