genvid.toolbox.SDK

class genvid.toolbox.SDK(cluster_id='local', **kwargs)

Bases: genvid.toolbox.basetool.BaseTool

Common commands for setting up the SDK

This class wrap the ClusterAPI and BastionAPI for setting up a new Genvid SDK into the current cluster.

NAME = 'sdk'
SDK_CONFIG_VERSION = '1.7.0'
clean()

Stops the base sdk services

clean_config()

Clean the configuration

clean_images()

Remove all images for the cluster

get_config() → dict

Get the current cluster configuration

get_images_config() → dict

Get the image configuration from the cloud. The images name must match DockerTool.RE_IMAGE_IMAGEID.

get_s3_bucket_id()

Get the S3 bucket ID

get_sdk_config() → dict

Get the default SDK configuration

is_jobs_running()

Return True if a job is configured to be running

merge_dict(source, destination)

Merge 2 dictionaries

Parameters:
  • source – The source dictionary
  • destination – The destination dictionary
remove_config(config: dict)

Remove values from the configuration :param config: The configuration to remove

set_config(config: dict = None)

Merge the configuration with the current one :param config: The configuration

setup()

Starts the base SDK services

start_jobs(jobs: typing.List[str])

Start all or the specified jobs :param jobs: The list of jobs to start

stop_jobs(jobs: typing.List[str])

Stop all or the specified jobs :param jobs: The list of jobs to stop

update_config(config: dict = None)

Update the configuration :param config: The configuration to update :return: The updated configuration

upload_images(prefixes: typing.List[str])

Upload the images with the specified prefixes The images name must match DockerTool.RE_IMAGE_IMAGEID.

Parameters:prefixes – Only file with these prefix are uploaded
upload_images_sdk()

Upload the images for the SDK