VMware

Library Namespace

The Library namespace provides commands to manage and find LibraryModel entities. The Library namespace provides support for generic functionality which can be applied equally to all types of libraries. The functionality provided by this namespace will not affect the properties specific to the type of library. See also LocalLibrary and SubscribedLibrary.

List of commands:



Get Command

dcli com vmware content library get

Description

Returns a given LibraryModel.

Options

Option Name Type Required Description
library‑id string Yes Identifier of the library to return. The parameter must be an identifier for the resource type: com.vmware.content.Library.

Example

dcli com vmware content library get --library-id testId


List Command

dcli com vmware content library list

Description

Returns the identifiers of all libraries of any type in the Content Library.

Example

dcli com vmware content library list


Find Command

dcli com vmware content library find

Description

Returns a list of all the visible (as determined by authorization policy) libraries matching the requested Library.FindSpec.

Options

Option Name Type Required Description
name string No Name of the library to search. The name is case-insensitive. See LibraryModel.name. If not specified any name will be searched.
type string No Library type to search. See LibraryModel.type. If not specified any library type will be searched. Valid values are: {LOCAL, SUBSCRIBED}

Example

dcli com vmware content library find


Update Command

dcli com vmware content library update

Description

Updates the properties of a library. This is an incremental update to the library. Any option in the LibraryModel class that is unset will not be modified. This command will only update the common properties for all library types. This will not, for example, update the LibraryModel.publish-info of a local library, nor the LibraryModel.subscription-info of a subscribed library. Specific properties are updated in LocalLibrary.update and SubscribedLibrary.update.

Options

Option Name Type Required Description
library‑id string Yes Identifier of the library to update. The parameter must be an identifier for the resource type: com.vmware.content.Library.
description string No A human-readable description for this library. This option is optional for the create command. Leaving it unset during creation will result in an empty string value. It will always be present in the result of a get or list command. It is optional for the update command. Leaving it unset during update indicates that the description should be left unchanged.
name string No The name of the library. A Library is identified by a human-readable name. Library names cannot be undefined or an empty string. Names do not have to be unique. This option must be provided for the create command. It will always be present in the output of the get or list commands. It is optional for the update command.
version string No A version number which is updated on metadata changes. This value allows clients to detect concurrent updates and prevent accidental clobbering of data. This value represents a number which is incremented every time library properties, such as name or description, are changed. It is not incremented by changes to a library item within the library, including adding or removing items. It is also not affected by tagging the library. This option is not used for the create command. It will always be present in the result of a get or list command. It is optional for the update command. Leaving it unset during update indicates that you do not need to detect concurrent updates.
publish‑info‑authentication‑method string No Indicates how a subscribed library should authenticate (BASIC, NONE) to the published library endpoint. This option must be provided for the create command. It will always be present in the output of the get or list commands. It is optional for the update command. Valid values are: {BASIC, NONE}
publish‑info‑published bool No Whether the local library is published. This option must be provided for the create command. It will always be present in the output of the get or list commands. It is optional for the update command.
publish‑info‑user‑name string No The username to require for authentication. This option is optional for the create and update command. When the authentication is not required, the username can be left unset. When the authentication method is basic, the username is ignored in the current release. It defaults to "vcsp". It is preferable to leave this unset. If specified, it must be set to "vcsp".
publish‑info‑password string No The password to require for authentication. This option is optional for the create command. When the authentication method is NONE, the password can be left unset. When the authentication method is BASIC, the password should be a non-empty string. This option is optional for the update command. Leaving it unset during update indicates that the password is not changed. This option is not used for the get or list command.
publish‑info‑persist‑json‑enabled bool No Whether library and library item metadata are persisted in the storage backing as JSON files. This flag only applies if the local library is published. Enabling JSON persistence allows you to synchronize a subscribed library manually instead of over HTTP. You copy the local library content and metadata to another storage backing manually and then create a subscribed library referencing the location of the library JSON file in the SubscriptionInfo.subscription-url. When the subscribed library's storage backing matches the subscription URL, files do not need to be copied to the subscribed library. For a library backed by a datastore, the library JSON file will be stored at the path contentlib-{library_id}/lib.json on the datastore. For a library backed by a remote file system, the library JSON file will be stored at {library_id}/lib.json in the remote file system path. This option is optional for the create command. It will always be present in the output of the get or list commands. It is optional for the update command.
subscription‑info‑authentication‑method string No Indicate how the subscribed library should authenticate (BASIC, NONE) with the published library endpoint. This option must be provided for the create command. It will always be present in the output of the get or list commands. It is optional for the update command. Valid values are: {BASIC, NONE}
subscription‑info‑automatic‑sync‑enabled bool No Whether the library should participate in automatic library synchronization. In order for automatic synchronization to happen, the global ConfigurationModel.automatic-sync-enabled option must also be true. The subscription is still active even when automatic synchronization is turned off, but synchronization is only activated with an explicit call to SubscribedLibrary.sync or SubscribedItem.sync. In other words, manual synchronization is still available even when automatic synchronization is disabled. This option must be provided for the create command. It will always be present in the output of the get or list commands. It is optional for the update command.
subscription‑info‑on‑demand bool No Indicates whether a library item's content will be synchronized only on demand. If this is set to true, then the library item's metadata will be synchronized but the item's content (its files) will not be synchronized. The Content Library Service will synchronize the content upon request only. This can cause the first use of the content to have a noticeable delay. Items without synchronized content can be forcefully synchronized in advance using the SubscribedItem.sync call with forceSyncContent set to true. Once content has been synchronized, the content can removed with the SubscribedItem.evict call. If this value is set to false, all content will be synchronized in advance. This option must be provided for the create command. It will always be present in the output of the get or list commands. It is optional for the update command.
subscription‑info‑password string No The password to use when authenticating. The password must be set when using a password-based authentication method; empty strings are not allowed. This option is optional for the create command. It will not be present in the output of the get or list commands. It is optional for the update command.
subscription‑info‑ssl‑thumbprint string No An optional SHA-1 hash of the SSL certificate for the remote endpoint. If this value is defined the SSL certificate will be verified by comparing it to the SSL thumbprint. The SSL certificate must verify against the thumbprint. When specified, the standard certificate chain validation behavior is not used. The certificate chain is validated normally if this value is unset. This option is optional for the create command. It will not be present in the output of the get or list commands. It is optional for the update command.
subscription‑info‑subscription‑url string No The URL of the endpoint where the metadata for the remotely published library is being served. This URL can be the PublishInfo.publish-url of the published library (for example, https://server/path/lib.json). If the source content comes from a published library with PublishInfo.persist-json-enabled, the subscription URL can be a URL pointing to the library JSON file on a datastore or remote file system. The supported formats are: vSphere 6.5
  • ds:///vmfs/volumes/{uuid}/mylibrary/lib.json (for datastore)
  • nfs://server/path/mylibrary/lib.json (for NFSv3 server on vCenter Server Appliance)
  • nfs://server/path/mylibrary/lib.json?version=4 (for NFSv4 server on vCenter Server Appliance)
  • smb://server/path/mylibrary/lib.json (for SMB server)
vSphere 6.0
  • file://server/mylibrary/lib.json (for UNC server on vCenter Server for Windows)
  • file:///path/mylibrary/lib.json (for local file system)
When you specify a DS subscription URL, the datastore must be on the same vCenter Server as the subscribed library. When you specify an NFS or SMB subscription URL, the StorageBacking.storage-uri of the subscribed library must be on the same remote file server and should share a common parent path with the subscription URL. This option must be provided for the create command. It will always be present in the output of the get or list commands. It is optional for the update command.
subscription‑info‑user‑name string No The username to use when authenticating. The username must be set when using a password-based authentication method. Empty strings are allowed for usernames. This option is optional for the create command. It is optional in the output of the get or list commands. It is optional for the update command.

Example

dcli com vmware content library update --library-id testId