Subscribe to a Content Library
You can subscribe to local content libraries. When you subscribe to a library, you must specify the backing storage for the library content. If the library requires basic authentication, you must also provide the correct user name and password.
Note: If you subscribe to libraries created with basic
authentication on a vCenter Server
instance, make sure that you pass vcsp as an argument for the
user name.
Prerequisites
- vCenter Server instance where you want to create the library. on the
- on the destination datastore.
Procedure
- Create a StorageBacking instance to define the location where the content of the subscribed library is stored.
-
Create a
SubscriptionInfo
instance to define the subscription behavior of the library.
-
Provide the
mechanism to be used by the subscribed library to authenticate to the published
library.
You can select between no authentication and basic authentication depending on the settings of the published library you subscribe to. If the library is published with basic authentication, you must set the basic authentication in the SubscriptionInfo instance. To match the credentials of the published library, set the user name and the password of the SubscriptionInfo instance.
- Provide the URL to the endpoint where the metadata of the published library is stored.
-
Define the
synchronization mechanism of the subscribed library.
You can select between two synchronization modes: automatic and on demand. If you enable automatic synchronization for a subscribed library, both the content and the metadata are synchronized with the published library. To save storage space, you can synchronize the subscribed library on demand and update only the metadata for the published library content.
- Set the thumbprint that is used for validating the certificate of the published library.
-
Provide the
mechanism to be used by the subscribed library to authenticate to the published
library.
- Create a LibraryModel instance and set the library type to subscribed (LibraryModel.LibraryType.SUBSCRIBED).
- Access the SubscribedLibrary service and create the subscribed library instance.