vcenter_content_library

vCenter Content Library — libraries + items + OVF deploy.

saltext.vcf.clients.vcenter_content_library.list_(opts, profile=None)[source]

List all content library IDs.

saltext.vcf.clients.vcenter_content_library.create_local(opts, name, storage_backings, profile=None, **spec)[source]

Create a local content library.

storage_backings is a list like [{"type": "DATASTORE", "datastore_id": "datastore-12"}].

saltext.vcf.clients.vcenter_content_library.create_subscribed(opts, name, subscription_url, storage_backings, profile=None, **spec)[source]

Create a subscribed content library.

saltext.vcf.clients.vcenter_content_library.list_items(opts, library_id, profile=None)[source]

List item IDs in a content library.

saltext.vcf.clients.vcenter_content_library.update_local(opts, library_id, spec, profile=None)[source]

PATCH a local content library (rename, change publish_info, etc.).

saltext.vcf.clients.vcenter_content_library.update_subscribed(opts, library_id, spec, profile=None)[source]

PATCH a subscribed content library (change url, password, auto sync…).

saltext.vcf.clients.vcenter_content_library.sync_subscribed(opts, library_id, profile=None)[source]

Trigger an immediate sync of a subscribed library.

saltext.vcf.clients.vcenter_content_library.publish_library(opts, library_id, subscriptions=None, profile=None)[source]

Publish a local library to its subscribers.

subscriptions is an optional list of subscription IDs; if None, publish to all.

saltext.vcf.clients.vcenter_content_library.find_libraries(opts, name=None, type=None, profile=None)[source]

Search for libraries by name/type.

saltext.vcf.clients.vcenter_content_library.create_item(opts, library_id, name, type, profile=None, **spec)[source]

Create an empty library item; populate via an update session.

saltext.vcf.clients.vcenter_content_library.update_item(opts, item_id, spec, profile=None)[source]

PATCH a library item (rename, change description, change type).

saltext.vcf.clients.vcenter_content_library.update_session_create(opts, item_id, profile=None, **spec)[source]

Open an update session against item_id. Returns the session id.

saltext.vcf.clients.vcenter_content_library.update_session_add_file(opts, session_id, name, source_type='PUSH', profile=None, **spec)[source]

Register a file for upload into an update session.

Returns a structure with an upload_endpoint URI the caller PUTs bytes to (when source_type is PUSH).

saltext.vcf.clients.vcenter_content_library.ovf_deploy(opts, library_item_id, deployment_target, deployment_spec, profile=None, timeout=1800)[source]

Deploy an OVF library item to a target resource pool/folder/host.

deployment_target{"resource_pool_id": ..., "folder_id": ..., "host_id": ...} deployment_spec{"name": ..., "accept_all_eula": true, ...} timeout — request timeout in seconds. Defaults to 1800 (30 min) because vCenter holds the HTTP connection open for the full deploy, which routinely exceeds the global 30s default.

saltext.vcf.clients.vcenter_content_library.ovf_filter(opts, library_item_id, deployment_target, profile=None)[source]

Return the OVF item’s network/storage/disk inventory bound to a target.

saltext.vcf.clients.vcenter_content_library.ovf_create_from_vm(opts, vm_id, create_spec, profile=None)[source]

Export vm_id as a new OVF library item.

saltext.vcf.clients.vcenter_content_library.vm_template_create(opts, create_spec, profile=None)[source]

Capture a VM as a VM-template library item.

create_spec must include name, library, source_vm and a placement block.

saltext.vcf.clients.vcenter_content_library.vm_template_deploy(opts, item_id, deploy_spec, profile=None)[source]

Deploy a new VM from a VM-template library item.