vcfa_lifecycle

VCF Automation lifecycle management (/lcm/api/...).

VCFA’s embedded LCM tracks installed-product versions, manages upgrade requests, and keeps system snapshots that operators can roll back to. Auth is the same VCFA bearer-token surface used by every vcfa_* client (saltext.vcf.utils.vcfa).

Endpoints wrapped here (paths may vary slightly between minor versions of VCFA; /lcm/api/v1 and /lcm/api/v2 are both seen in the wild — this module sticks to the unversioned form which the gateway routes to the current default):

  • GET    /lcm/api/products — installed product catalog

  • GET    /lcm/api/products/{productId} — one product

  • GET    /lcm/api/products/{productId}/versions — installed + available versions

  • GET    /lcm/api/upgrades — list upgrade requests

  • GET    /lcm/api/upgrades/{upgradeId} — one upgrade request

  • POST   /lcm/api/upgrades — start an upgrade

  • POST   /lcm/api/upgrades/{upgradeId}/actions — cancel / retry / resume

  • GET    /lcm/api/snapshots — list system snapshots

  • GET    /lcm/api/snapshots/{snapshotId} — one snapshot

  • POST   /lcm/api/snapshots — create a snapshot

  • DELETE /lcm/api/snapshots/{snapshotId} — delete a snapshot

  • POST   /lcm/api/snapshots/{snapshotId}/restore— restore a snapshot

saltext.vcf.clients.vcfa_lifecycle.list_versions(opts, product_id, profile=None)[source]

Return installed + available versions for product_id.

saltext.vcf.clients.vcfa_lifecycle.start_upgrade(opts, upgrade_spec, profile=None)[source]

Submit an upgrade request.

upgrade_spec shape (per VCFA LCM): {"productId": "...", "targetVersion": "...", "options": {...}}. Returns the upgrade record (with id, state).

saltext.vcf.clients.vcfa_lifecycle.wait_for_upgrade(opts, upgrade_id, *, timeout=7200, poll_interval=30, profile=None)[source]

Block until an upgrade reaches a terminal state. Returns the final record.

Raises TimeoutError if the upgrade doesn’t finish within timeout seconds, or RuntimeError on terminal failure / cancellation.

saltext.vcf.clients.vcfa_lifecycle.create_snapshot(opts, snapshot_spec, profile=None)[source]

Take a system snapshot.

snapshot_spec keys: name, description, includeData (bool).

saltext.vcf.clients.vcfa_lifecycle.restore_snapshot(opts, snapshot_id, profile=None)[source]

Restore the system to snapshot_id. Returns the restore record.