Skip to content
ocx
install

ConfigCommands, PatchCommands

ConfigCommandsclassdataclass#

Re-exported from ocx_sdk._clientView source
class ConfigCommands(_runner: _Runner)

The ocx config command group — the corporate managed-config tier.

setupmethod#

def setup(managed_config: str | None = None, dry_run: bool = False, force: bool = False, timeout: MaybeTimeout = UNSET, retry: MaybeRetry = UNSET) -> ConfigSetupReport

Adopt, or clear, the managed-config tier.

Installs no binary and touches no shell profile — the automation-shaped counterpart to self setup --managed-config.

Parameters

NameTypeDefaultDescription
managed_configstr | NoneNoneAn OCI reference to a managed-config artifact. MANAGED_CONFIG_DISABLED clears an existing seed. None falls back to the ambient source, then the existing seed.
dry_runboolFalseReport the intended actions without writing.
forceboolFalseOverwrite a managed fence that carries local edits.
timeoutMaybeTimeoutUNSETSeconds per attempt. Omitted takes the config’s.
retryMaybeRetryUNSETRetry policy. None opts out; omitted takes the config’s.

Returns

ConfigSetupReport
The status ocx recorded.

Raises

DirtyRcBlockError
The fence carries local edits and force is unset.

updatemethod#

def update(version: str | None = None, *, check_only: bool = False, pause: str | None = None, resume: bool = False, timeout: MaybeTimeout = UNSET, retry: MaybeRetry = UNSET) -> ConfigUpdateReport

Refresh the managed-config snapshot from the registry.

Unlike the project-tier lock --check, this command answers --check with a full payload — status reads checked or check_unavailable.

Parameters

NameTypeDefaultDescription
versionstr | NoneNoneA tag, sha256:<hex>, or tag@sha256:<hex> to sync. None follows the seed’s own source.
check_onlyboolFalseReport status — drift, pause, pin — without fetching or swapping. ocx’s --check.
pausestr | NoneNoneHold the background refresh for a duration such as 4h or 3d, up to seven days.
resumeboolFalseClear an active pause and refresh immediately.
timeoutMaybeTimeoutUNSETSeconds per attempt. Omitted takes the config’s.
retryMaybeRetryUNSETRetry policy. None opts out; omitted takes the config’s.

Returns

ConfigUpdateReport
The tier’s status, source, digest, and policy.

PatchCommandsclassdataclass#

Re-exported from ocx_sdk._clientView source
class PatchCommands(_runner: _Runner)

The ocx patch command group.

syncmethod#

def sync(platform: str | None = None, timeout: MaybeTimeout = UNSET, retry: MaybeRetry = UNSET) -> CommandResult

Refresh patch descriptors and companion packages.

Re-checks every installed package, including ones installed before patches were configured, and needs network access. Returns the raw result: no payload shape is pinned for this command yet.

Parameters

NameTypeDefaultDescription
platformstr | NoneNoneThe platform to resolve against.
timeoutMaybeTimeoutUNSETSeconds per attempt. Omitted takes the config’s.
retryMaybeRetryUNSETRetry policy. None opts out; omitted takes the config’s.

Returns

CommandResult
The exit code and whatever ocx printed.