sightline.simon.data
— Data API¶
DTaaS provides Bucket
and Volume
interfaces. Buckets provide
the standard S3 API over object storage, and Volumes allow for mounting of
file systems in containers using Kubernetes Persistent Volume Claims.
Bucket
¶
Attributes¶
- Bucket.id: str¶
- Bucket.name: str¶
- Bucket.description: str¶
- Bucket.tags: List[str]¶
- Bucket.created: datetime¶
- Bucket.size¶
The current size in Megabytes
- Type
int
- Bucket.s3¶
A URL to access this bucket using an S3 API
- Type
str
- Bucket.capabilities: List[Capability]¶
- Bucket.derived_from: List[V1Resource]¶
Class Methods¶
Methods¶
- Bucket.update([name=None][, description=None][, tags=None])[source]¶
Updates the Bucket with whichever fields are set.
- Parameters
name (Optional[str]) – Changes the name of the Bucket
description (Optional[str]) – Changes the description of the Bucket
tags (Optional[List[str]]) – Changes the tags of the Bucket
Volume
¶
Volumes are automatically mounted in Instance when passed into a config for the
instance. The mount point can be found with
volume_path()
.
Attributes¶
- Volume.id: str¶
- Volume.name: str¶
- Volume.description: str¶
- Volume.tags: List[str]¶
- Volume.created: datetime¶
- Volume.max_size¶
The maximum size of the Persistent Volume, in Megabytes.
- Type
int
- Volume.access_modes¶
Can be one of ReadWriteOnce, ReadOnlyMany, ReadWriteMany. These are defined by Kubernetes. ReadWriteOnce is the default.
- Type
str
- Bucket.capabilities: List[Capability]¶
- Bucket.derived_from: List[V1Resource]¶
Class Methods¶
- Volume.create(size, name[, access_modes=None][, description=''][, tags=None])[source]¶
Creates a new Volume.
- Classmethod
- Parameters
size (int) – The maximum size of the Persistent Volume in Megabytes.
access_modes – The access mode for this Volume. Can be one of ReadWriteOnce, ReadOnlyMany, ReadWriteMany. These are defined by Kubernetes. ReadWriteOnce is the default if not specified.
name (str) – The name of the Volume
description (str) – A description of the Servable
tags (Optional[List[str]]) – Tags for the servable
- Return type