Example #1
0
    def __init__(self, custom_image_properties=None):
        self.image_schema = images.get_schema(custom_image_properties)
        self.image_collection_schema = images.get_collection_schema(
            custom_image_properties)
        self.member_schema = image_members.get_schema()
        self.member_collection_schema = image_members.get_collection_schema()
        self.task_schema = tasks.get_task_schema()
        self.task_collection_schema = tasks.get_collection_schema()

        # Metadef schemas
        self.metadef_namespace_schema = metadef_namespaces.get_schema()
        self.metadef_namespace_collection_schema = (
            metadef_namespaces.get_collection_schema())

        self.metadef_resource_type_schema = metadef_resource_types.get_schema()
        self.metadef_resource_type_collection_schema = (
            metadef_resource_types.get_collection_schema())

        self.metadef_property_schema = metadef_properties.get_schema()
        self.metadef_property_collection_schema = (
            metadef_properties.get_collection_schema())

        self.metadef_object_schema = metadef_objects.get_schema()
        self.metadef_object_collection_schema = (
            metadef_objects.get_collection_schema())

        self.metadef_tag_schema = metadef_tags.get_schema()
        self.metadef_tag_collection_schema = (
            metadef_tags.get_collection_schema())
Example #2
0
 def update(self, request):
     try:
         schema = v2_api.get_schema()
         schema_format = {"tags": [request.urlvars.get('tag_value')]}
         schema.validate(schema_format)
     except exception.InvalidObject as e:
         raise webob.exc.HTTPBadRequest(explanation=e.msg)
     return super(RequestDeserializer, self).default(request)
Example #3
0
 def __init__(self, custom_image_properties=None):
     self.image_schema = images.get_schema(custom_image_properties)
     self.image_collection_schema = images.get_collection_schema(
         custom_image_properties)
     self.member_schema = image_members.get_schema()
     self.member_collection_schema = image_members.get_collection_schema()
     self.task_schema = tasks.get_task_schema()
     self.task_collection_schema = tasks.get_collection_schema()
Example #4
0
 def update(self, request):
     try:
         schema = v2_api.get_schema()
         schema_format = {"tags": [request.urlvars.get('tag_value')]}
         schema.validate(schema_format)
     except exception.InvalidObject as e:
         raise webob.exc.HTTPBadRequest(explanation=e.msg)
     return super(RequestDeserializer, self).default(request)
Example #5
0
 def __init__(self, custom_image_properties=None):
     self.image_schema = images.get_schema(custom_image_properties)
     self.image_collection_schema = images.get_collection_schema(
         custom_image_properties)
Example #6
0
 def __init__(self, custom_image_properties=None):
     self.access_schema = image_access.get_schema()
     self.image_schema = images.get_schema(custom_image_properties)
     self.image_collection_schema = images.get_collection_schema(
             custom_image_properties)