VMware Cloud Director and the VMware Cloud Director API include a framework for integration of extension services that VMware Cloud Director API client can access as though they were native services. In addition to service-specific objects or operations they provide, extension services can implement new operations for existing API objects.

Note: Starting with VMware Cloud Director 10.6, the AMQP-based functionality is deprecated. To ensure continued support, consider using an equivalent MQTT-backed functionality.

A VMware Cloud Director extension service is a program that presents a REST interface to VMware Cloud Director API clients. When you register an extension service with theVMware Cloud Director API, you specify one or more URL patterns that the VMware Cloud Director REST service treats as extension requests. When it receives an extension request, the VMware Cloud Director REST service creates an AMQP notification with a service-specific exchange and routing key, and sends it to the VMware Cloud Director AMQP service. Each extension service subscribes to AMQP notifications that have its service-specific routing key. A service processes its notifications, takes whatever actions they require, and returns a response to the AMQP service, where the VMware Cloud Director REST service retrieves it and uses its contents to generate a response to the client that made the request.

Message Routing

Extension services use the VMware Cloud Director AMQP service to communicate with VMware Cloud Director. Every extension service must register a unique AMQP routing key, which VMware Cloud Director prepends to AMQP messages destined for that service. To collect replies from services, VMware Cloud Director creates a single reply exchange for all services, creates a separate reply queue for each cell, and binds each of those queues to the reply exchange.

VMware Cloud Director extension services can also be VMware Cloud Director API clients, authenticating to the VMware Cloud Director API and making their own REST requests to the VMware Cloud Director API URL. This type of interaction is required when creating tasks and events that track the progress of requests made to the service. It is also required by services that operate on VMware Cloud Director objects like vApps and virtual machines.

Creating Events and Tasks

The VMware Cloud Director API extension framework implements operations that allow an extension service to create and update an organization's lists of tasks and events, so the status of asynchronous events running in extension services can be displayed with the same kinds of information posted by native services.

Authorization Framework

All requests to extension services are processed through the VMware Cloud Director authentication framework. A user making a request to an extension service must be authenticated by VMware Cloud Director as a system administrator or a member of a VMware Cloud Director organization.

An extension service can add service-specific rights and associate those rights with operations on its own objects or with operations it adds to VMware Cloud Director API objects .

Service APIs

An extension service can define its own request and response body elements if it needs to. API schema files can be specified as part of service registration or can be added later. Schema files can reside at any location that is reachable by the extension service.

Support for Idempotent Operations

Most requests to extension services can include an operationKey attribute, which is a string meant to uniquely identify the operation so that if it is invoked multiple times, the result will be the same as if it had been invoked only once. The following types support use of the operationKey attribute:

  • AclRuleType
  • ApiDefinitionType
  • ApiFilterType
  • FileDescriptorType
  • ResourceClassActionType
  • ResourceClassType
  • ServiceLinkType
  • ServiceResourceType
  • ServiceType