def setUp(self): self.body_serializers = { 'application/json': JSONSerializer(), 'application/xml': XMLSerializer(), } self.serializer = wsgi.ResponseSerializer(self.body_serializers, HeadersSerializer())
def get_resources(self): resources = [] body_serializers = { 'application/xml': FloatingIPPoolsSerializer(), } serializer = wsgi.ResponseSerializer(body_serializers) res = extensions.ResourceExtension('os-floating-ip-pools', FloatingIPPoolsController(), serializer=serializer, member_actions={}) resources.append(res) return resources
def __init__(self, application): controller = RequestExtensionController(application) wsgi.Resource.__init__(self, controller, serializer=wsgi.ResponseSerializer(), deserializer=wsgi.RequestDeserializer())