Skip to main content

Module clients.dai_engine_version.client

Classes

DAIEngineVersionClient

class DAIEngineVersionClient(connection_config: h2o_engine_manager.clients.connection_config.ConnectionConfig, verify_ssl: bool = True, ssl_ca_cert: Optional[str] = None)

DAIEngineVersionClient manages DAIEngineVersions.

Initializes DAIEngineVersionClient.

Args
connection_config : ConnectionConfig
AIEM connection configuration object.
verify_ssl
Set to False to disable SSL certificate verification.
ssl_ca_cert
Path to a CA cert bundle with certificates of trusted CAs.

Methods

apply_dai_engine_version_configs

def apply_dai_engine_version_configs(self, configs: List[h2o_engine_manager.clients.dai_engine_version.dai_engine_version_config.DAIEngineVersionConfig], parent: str = 'workspaces/global') ‑> List[h2o_engine_manager.clients.dai_engine_version.version.DAIEngineVersion]

Set all DAIEngineVersions to a state defined in the configs in the specified parent workspace. DAIEngineVersions that are not specified in the configs will be deleted in the specified parent workspace. DAIEngineVersions that are specified in the configs will be recreated with the new values in the specified parent workspace.

Args
configs
DAIEngineVersion configurations that should be applied.
parent
Workspace name in which to apply configs. Format is workspaces/*.

Returns: applied DAIEngineVersions

assign_dai_engine_version_aliases

def assign_dai_engine_version_aliases(self, name: str, aliases: Optional[List[str]] = None) ‑> List[h2o_engine_manager.clients.dai_engine_version.version.DAIEngineVersion]

Assign new set of resourceID aliases to DAIEngineVersion. This will replace existing DAIEngineVersion resourceID aliases with the new aliases. If there are other DAIEngineVersions with the same alias that we try to assign to this DAIEngineVersion, they will be deleted from the other DAIEngineVersions.

Example 1 - two versions in the same workspace: - daiw1v1(name="workspaces/w1/daiEngineVersions/v1", aliases=["latest", "bar"]) - daiw1v2(name="workspaces/w1/daiEngineVersions/v2", aliases=["baz", "foo"]) - AssignAliases(daiw1v1, aliases=["latest", "baz"]) => daiw1v1.aliases=["latest", "baz"] (changed) => daiw1v2.aliases=["foo"] (changed)

Example 2 - two versions in different workspaces: - daiw1v1(name="workspaces/w1/daiEngineVersions/v1", aliases=["latest", "bar"]) - daiw2v1(name="workspaces/w2/daiEngineVersions/v1", aliases=["latest", "baz"]) - AssignAliases(daiw1v1, aliases=["latest", "baz"]) => daiw1v1.aliases=["latest", "baz"] (changed) => daiw2v1.aliases=["latest", "baz"] (unchanged)

Args
name
DAIEngineVersion resource name. Format is workspaces/*/daiEngineVersions/*.
aliases
New resourceID aliases of the DAIEngineVersion.

Returns: all DAIEngineVersions from the same workspace.

create_dai_engine_version

def create_dai_engine_version(self, parent: str, dai_engine_version: h2o_engine_manager.clients.dai_engine_version.version.DAIEngineVersion, dai_engine_version_id: str) ‑> h2o_engine_manager.clients.dai_engine_version.version.DAIEngineVersion

Standard Create method.

Args
parent : str
Name of the version's parent workspace. Format: workspaces/*.
dai_engine_version : DAIEngineVersion
DAIEngineVersion to create.
dai_engine_version_id : str
Specify the DAIEngineVersion ID, which will become a part of the DAIEngineVersion resource name. It must: - be in semver format (more segments than three segments allowed) - contain max 63 characters Examples: "1.10.3", "1.10.3-alpha", "1.10.3.2", "1.10.3.2-alpha"
Returns
DAIEngineVersion
created DAIEngineVersion.

delete_all_dai_engine_versions

def delete_all_dai_engine_versions(self, parent: str) ‑> None

Help method for deleting all DAIEngineVersions in a specified parent workspace.

Args
parent : str
Parent workspace name. Format is workspaces/*.

delete_dai_engine_version

def delete_dai_engine_version(self, name: str) ‑> None

Standard Delete method.

Args
name : str
Name of the DAIEngineVersion to delete. Format is workspaces/*/daiEngineVersions/*

get_dai_engine_version

def get_dai_engine_version(self, name: str) ‑> h2o_engine_manager.clients.dai_engine_version.version.DAIEngineVersion

Standard Get method.

Args
name
Name of the DAIEngineVersion to retrieve. Format: workspaces/*/daiEngineVersions/*

list_all_dai_engine_versions

def list_all_dai_engine_versions(self, parent: str) ‑> List[h2o_engine_manager.clients.dai_engine_version.version.DAIEngineVersion]

Help method for listing all DAIEngineVersions.

Args
parent : str
Name of the workspace from which to list versions. Format: workspaces/*.

list_dai_engine_versions

def list_dai_engine_versions(self, parent: str, page_size: int = 0, page_token: str = '') ‑> h2o_engine_manager.clients.dai_engine_version.page.DAIEngineVersionsPage

Standard list method.

Args
parent : str
Name of the workspace from which to list versions. Format: workspaces/*.
page_size : int
Maximum number of DAIEngineVersions to return in a response. If unspecified (or set to 0), at most 50 DAIEngineVersions will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.
page_token : str
Page token. Leave unset to receive the initial page. To list any subsequent pages use the value of 'next_page_token' returned from the DAIEngineVersionsPage.
Returns
DAIEngineVersionsPage
DAIEngineVersionsPage object.

update_dai_engine_version

def update_dai_engine_version(self, dai_engine_version: h2o_engine_manager.clients.dai_engine_version.version.DAIEngineVersion, update_mask: str = '*') ‑> h2o_engine_manager.clients.dai_engine_version.version.DAIEngineVersion

Standard Update method.

Args
dai_engine_version : DAIEngineVersion
version to update.
update_mask : str
The field mask to use for the update. Allowed field paths are: - deprecated - image - image_pull_policy - image_pull_secrets Default value "*" will update all updatable fields.
Returns
DAIEngineVersion
Updated DAIEngineVersion.

Feedback