Objectstore Documentation
This page contains the Objectstore Package documentation.
The bucket Module
Simple object store using Blobs and JSON files on disk.
-
class nova.objectstore.bucket.Bucket(name)
Bases: object
-
static all()
- list of all buckets
-
static create(bucket_name, context)
Create a new bucket owned by a project.
@bucket_name: a string representing the name of the bucket to create
@context: a nova.auth.api.ApiContext object representing who owns the bucket.
- Raises:
- NotAuthorized: if the bucket is already exists or has invalid name
-
delete()
-
is_authorized(context)
-
list_keys(prefix='', marker=None, max_keys=1000, terse=False)
-
metadata
- dictionary of metadata around bucket,
keys are ‘Name’ and ‘CreationDate’
-
owner_id
The handler Module
The image Module
Take uploaded bucket contents and register them as disk images (AMIs).
Requires decryption using keys in the manifest.
-
class nova.objectstore.image.Image(image_id)
Bases: object
-
static add(src, description, kernel=None, ramdisk=None, public=True)
adds an image to imagestore
@type src: str
@param src: location of the partition image on disk
@type description: str
@param description: string describing the image contents
@type kernel: bool or str
@param kernel: either TRUE meaning this partition is a kernel image or
a string of the image id for the kernel
@type ramdisk: bool or str
@param ramdisk: either TRUE meaning this partition is a ramdisk image or
a string of the image id for the ramdisk
@type public: bool
@param public: determine if this is a public image or private
@rtype: str
@return: a string with the image id
-
static all()
-
static decrypt_image(encrypted_filename, encrypted_key, encrypted_iv, cloud_private_key, decrypted_filename)
-
delete()
-
image_path
-
is_authorized(context, readonly=False)
-
metadata
-
owner_id
-
static register_aws_image(image_id, image_location, context)
-
set_public(state)
-
static untarzip_image(path, filename)
-
update_user_editable_fields(args)
- args is from the request parameters, so requires extra cleaning
The stored Module
Properties of an object stored within a bucket.
-
class nova.objectstore.stored.Object(bucket, key)
Bases: object
-
delete()
- deletes the file
-
file
- return a file object for the key
-
md5
- computes the MD5 of the contents of file
-
mtime
- mtime of file
-
read()
- read all contents of key into memory and return
RELATED TESTS
The objectstore_unittest Module