chariot package

Subpackages

Submodules

chariot.cert module

chariot.cert.check_cert_not_after(cert)[source]
chariot.cert.get_cert_and_key_from_p12(pkcs12: str | bytes | None, pkcs12_password: str = '') tuple[str, str][source]

chariot.client module

chariot.client.connect(*, credentials: str | None = None, host: str | None = None, bearer_token: str | None = None, client_id: str | None = None, client_secret: str | None = None, client_scope: str | None = None, key_filename: str | None = None, cert_filename: str | None = None, pkcs12: str | bytes | None = None, pkcs12_password: str | None = None, retries: Retry | None = None, timeout: Timeout | None = None, **kwargs) None[source]

Connect to Chariot API.

Parameters

credentials: str

path to a credentials json file downloaded from Chariot

host: str

host url of Chariot API

bearer_token: str

bearer token of Chariot user

client_id: str

client id

client_secret: str

client secret

client_scope: str

space delimited string of desired scopes for access token of client

key_filename: str

filename of client certificate private key. Client key_filename and cert_filename are often required on closed networks to perform PKI authentication. Used for PKI authentication.

cert_filename: str

filename of client certificate. Used for PKI authentication.

pkcs12: str | bytes

p12 filename or bytes that will be used to extract client cert and key only if both cert_filename and key_filename are not specified. Used for PKI authentication.

pkcs12_password: str

password used to decrypt p12 file. Used for PKI authentication.

retries: Optional[urllib3.Retry]

retry configuration

timeout: Optional[urllib3.Timeout]

timeout configuration

Returns

None

chariot.client.get_version()[source]

chariot.config module

chariot.config.get_bearer_token(refresh: bool = False)[source]
chariot.config.reload()[source]

Reload Chariot settings.

chariot.context module

chariot.context.clear()[source]
chariot.context.create_context(context: str, *, client_id: str = None, secret: str = None, url: str = None, user_id: str = None, scope: str = 'user', tls_verify: bool = True, overwrite: bool = True, **kwargs)[source]
chariot.context.current_context()[source]
chariot.context.delete_context(context)[source]
chariot.context.get_conf_files_from_context(context)[source]
chariot.context.get_contexts(detailed=False)[source]
chariot.context.use_context(context)[source]

chariot.resources module

class chariot.resources.Resource(project_id: str | None = None, id: str | None = None, project_name: str | None = None, subproject_name: str | None = None, organization_id: str | None = None, name: str | None = None, version: str | None = None, metadata: Any | None = None)[source]

Bases: object

Base class for Chariot Resources.

Attributes

project_id

id of the project that the resource belongs to

id

id of the resource

_meta

metainformation of the resource. this is what is returned by the get-by-id endpoint of the corresponding microservice.

chariot.resources.get_capacity()[source]

Returns the current total allocated, total allocatable, and single node allocatable resource capacity of the cluster

Module contents