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
spec‑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.
spec‑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.
update‑spec‑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.
update‑spec‑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.
update‑spec‑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.
update‑spec‑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}
update‑spec‑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.
update‑spec‑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".
update‑spec‑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.
update‑spec‑publish‑info‑persist‑json‑enabled bool No Whether library and library item metadata are persisted in storage backing as json files. This flag only applies if the local library is published and its storage backing type is OTHER. Enabling json persistance 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 StorageBacking.storage-uri matches the subscription URL, files do not need to be copied to the subscribed library. 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.
update‑spec‑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}
update‑spec‑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.
update‑spec‑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.
update‑spec‑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.
update‑spec‑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.
update‑spec‑subscription‑info‑subscription‑url string No The URL of the endpoint where the metadata for the remotely published library is being served. The supported schemes are http, https, and file. This value can be the PublishInfo.publish-url of the published library (for example, https://server/path/lib.json). If the published library has PublishInfo.persist-json-enabled turned on, this value can be the file-based URL of the published library's json file (for example, file:///path/lib.json). 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.
update‑spec‑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