- integrations
- Python
- ocx_sdk
ConfigCommands, PatchCommands
ConfigCommandsclassdataclass#
Re-exported from
ocx_sdk._clientView sourceclass 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) -> ConfigSetupReportAdopt, or clear, the managed-config tier.
Installs no binary and touches no shell profile — the
automation-shaped counterpart to self setup --managed-config.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
managed_config | str | None | None | An 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_run | bool | False | Report the intended actions without writing. |
force | bool | False | Overwrite a managed fence that carries local edits. |
timeout | MaybeTimeout | UNSET | Seconds per attempt. Omitted takes the config’s. |
retry | MaybeRetry | UNSET | Retry policy. None opts out; omitted takes the config’s. |
Returns
ConfigSetupReport- The status ocx recorded.
Raises
DirtyRcBlockError- The fence carries local edits and
forceis 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) -> ConfigUpdateReportRefresh 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
| Name | Type | Default | Description |
|---|---|---|---|
version | str | None | None | A tag, sha256:<hex>, or tag@sha256:<hex> to sync.
None follows the seed’s own source. |
check_only | bool | False | Report status — drift, pause, pin — without fetching
or swapping. ocx’s --check. |
pause | str | None | None | Hold the background refresh for a duration such as 4h
or 3d, up to seven days. |
resume | bool | False | Clear an active pause and refresh immediately. |
timeout | MaybeTimeout | UNSET | Seconds per attempt. Omitted takes the config’s. |
retry | MaybeRetry | UNSET | Retry 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 sourceclass PatchCommands(_runner: _Runner)The ocx patch command group.
syncmethod#
def sync(platform: str | None = None, timeout: MaybeTimeout = UNSET, retry: MaybeRetry = UNSET) -> CommandResultRefresh 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
| Name | Type | Default | Description |
|---|---|---|---|
platform | str | None | None | The platform to resolve against. |
timeout | MaybeTimeout | UNSET | Seconds per attempt. Omitted takes the config’s. |
retry | MaybeRetry | UNSET | Retry policy. None opts out; omitted takes the config’s. |
Returns
CommandResult- The exit code and whatever ocx printed.