Skip additionalProperties checks when LegacyV2CompatibleWrapper enabled

LegacyV2CompatibleWrapper adds environ variable 'openstack.legacy_v2'
to indicate request coming from v2 request.

Based on 'openstack.legacy_v2' will skip additionalProperties checks
in JSON-Schema validation.

Partial implements blueprint api-relax-validation

Change-Id: Ic95dd0d1b77994ce6e47498c8ae0d7ae079706be
This commit is contained in:
He Jie Xu 2015-06-21 10:58:55 +08:00
parent 0f3e746f73
commit e850bda58f

View File

@ -341,11 +341,11 @@ class OSAPIFixture(fixtures.Fixture):
'debug': True
}
self.useFixture(ConfPatcher(**conf_overrides))
osapi = service.WSGIService("osapi_compute")
osapi.start()
self.addCleanup(osapi.stop)
self.osapi = service.WSGIService("osapi_compute")
self.osapi.start()
self.addCleanup(self.osapi.stop)
self.auth_url = 'http://%(host)s:%(port)s/%(api_version)s' % ({
'host': osapi.host, 'port': osapi.port,
'host': self.osapi.host, 'port': self.osapi.port,
'api_version': self.api_version})
self.api = client.TestOpenStackClient('fake', 'fake', self.auth_url)
self.admin_api = client.TestOpenStackClient(