def get_schema(custom_properties=None): properties = _get_base_properties() links = _get_base_links() if CONF.allow_additional_image_properties: schema = glance.schema.PermissiveSchema("image", properties, links) else: schema = glance.schema.Schema("image", properties) schema.merge_properties(custom_properties or {}) return schema
def get_schema(custom_properties=None): properties = copy.deepcopy(_BASE_PROPERTIES) links = copy.deepcopy(_BASE_LINKS) if CONF.allow_additional_image_properties: schema = glance.schema.PermissiveSchema('image', properties, links) else: schema = glance.schema.Schema('image', properties) schema.merge_properties(custom_properties or {}) return schema
def get_schema(custom_properties=None): properties = copy.deepcopy(_BASE_PROPERTIES) links = copy.deepcopy(_BASE_LINKS) if CONF.allow_additional_image_properties: schema = glance.schema.PermissiveSchema("image", properties, links) else: schema = glance.schema.Schema("image", properties) schema.merge_properties(custom_properties or {}) return schema
def get_schema(custom_properties=None): properties = _get_base_properties() links = _get_base_links() if CONF.allow_additional_image_properties: schema = glance.schema.PermissiveSchema('image', properties, links) else: schema = glance.schema.Schema('image', properties) schema.merge_properties(custom_properties or {}) return schema
def get_schema(custom_properties=None): properties = get_base_properties() links = _get_base_links() if CONF.allow_additional_image_properties: schema = glance.schema.PermissiveSchema('image', properties, links) else: schema = glance.schema.Schema('image', properties) if custom_properties: for property_value in custom_properties.values(): property_value['is_base'] = False schema.merge_properties(custom_properties) return schema