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

class sightline.simon.data.Bucket[source]

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

  • Bucket.list()[source]

    Returns all of the Buckets.

    Classmethod

    Return type

    List[Bucket]

  • Bucket.from_id(id)[source]

    A constructor for Buckets, looks up a bucket by id.

    Classmethod

    Parameters

    id (str) –

    Return type

    Bucket

  • Bucket.create(name[, description=''][, tags=None])[source]

    Creates a new Bucket.

    Classmethod

    Parameters
    • name (str) – The name of the Servable

    • description (str) – A description of the Servable

    • tags (Optional[List[str]]) – Tags for the servable

    Return type

    Bucket

Methods

  • Bucket.delete()[source]

    Deletes a Bucket.

    Return type

    None

  • 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().

class sightline.simon.data.Volume[source]

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.list()[source]

    Returns all of the Volume.

    Classmethod

    Return type

    List[Volume]

  • Volume.from_id(id)[source]

    A constructor for Volume, looks up a volume by id.

    Classmethod

    Parameters

    id (str) –

    Return type

    Volume

  • 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

    Bucket

Methods

  • Volume.delete()[source]

    Deletes a Volume.

    Return type

    None