Data Provider
Adapters
You can use a Data
Provider Adapter to retrieve almost any data, including data agnostic to
vSphere, provided that you can format it as a set of objects and related
properties.
A Data Provider Adapter is
responsible for all aspects of data retrieval, including parsing a query,
computing the results of access operations, finding the matching objects or
properties, and formatting results as responses compatible with the Data
Service.
Typically, you use a Data
Provider Adapter to retrieve data on custom objects that you added to your
vSphere environment. The specific implementation of the Data Provider Adapter’s
data access depends on the data source for your custom object. Your Data
Provider Adapter might query a database for configuration data, or retrieve
operational data directly from a particular device.
You may not register a
provider for an existing VMware property or object type. For example, if your
solution needs to identify a host by an alternate name, you may create an
adapter to implement a property such as
alt_name
, but it may not modify the original
name
property.
When designing a Data Provider
Adapter, consider the following constraints:
- You must be able to represent the external data by using the same object and property model as the Data Service.
- The Java service that you create to act as the Data Provider Adapter must perform all necessary data fetching operations from your remote data source.
- The service you create must process Data Service queries and return Data Service result sets.
- In general, you should not use a Data Provider Adapter to add properties to an existing resource. if you register a Data Provider Adapter to service a request for any properties of the resource, your provider must be able to provide all properties for the resource. A best practice is to use a Property Provider Adapter to add properties to an existing resource.