Resource Type


Resource Types represent entities that can be provisioned in a Cloud Service. Cloud Services need to define resource types only for those entities that require provisioning. It is possible that the cloud service has explicitly provisioned resources that will never need provisioning from CPBM. In this case, it is not reuqired to declare that ResourceType in CPBM. However, it is encouraged that all possible provisioned types be declared such that this decision is deferred to the operator. Resources consumed without a subscription will default to using utility pricing.


A Resource Type is composed of zero or more Resource Components. Multiple resource components may be required to provision a resource of a given resource type. In addition, it is possible that a ResourceType may be provisioned with different combinations of components. For example, in CloudStack or Accelerite CloudPlatform, it is possible to provision a virtual machine with either a service offering and a template or a service offering, an ISO and a hypervisor. In order to provision a resource of a resource type, one may be required to select from one or more options for each of its resource components. The Resource Type can have either one or no groups, wherein the group can have 1-to-n components in it. The Resource Type can have components within the group or components only (without any group).


The exact list of options for a given resource type will be determined at runtime by querying the metadata registry. This list returned by the MetadataRegistry may vary depending on the account and/or user on behalf of whom the list is being requested. This allows resource components that are owned exclusively by a given account or user to be incorporated into the provisioing process.


In addition, a Resource Type can declare dependencies and constraints related to the provisioning of that resource. A resource type dependency can span across services. For example, a monitoring resource type may need to point to a specific virtual machine to monitor. When refering to resource types from another service, the syntax <service_id/name> is used. For example, com.citrix.ccp/VirtualMachine.

The ResourceType metadata element is declared as follows:
Table 1. ResourceType
Element (Items in italics are attributes)Description
ResourceType Name The name of the resource type. This should be a single word, CapCased.

A component of the resource type. There may be multiple flavors of a component. The list of possible flavors can be obtained by calling getResources method on the MetadataRegistry interface.

name Name of the component
discriminator Discriminator attribute name. A resource component value may be used as a discriminator for usage implicitly, for all usage types that this resource type generates

The list of Usage Types generated by a provisioned instance of this Resource. See Usage Type definition for more information.

Usage Name of usage type generated by an instance of the enclosing resource type. Value contains name of UsageType
Depends Depends on another resource type based on semantics identified by dependency type
type The type of dependency.
Possible values are
ADD_ON - implies that this resource requires an instance of the target resource type for provisioning
  AVAILABLE - implies that this resource depends upon the availability (ie should've already been provisioned) of an instance of the depended upon resource
Specifies provisioning constraints for this resource type
Constraint type The number of subscriptions supported. Possible values are
SINGLETON - One per account
ACCOUNT - Can be provisioned only at the account level
PER_USER - One per user
NONE - No limit
Properties Custom fields that can or should be provided for a specific resource to be provisioned (TBD)  

When a resource type has an ADD_ON dependency on another resource type, CPBM will request the user to select a provisioned instance of the target resource type as a configuration parameter for this resource type.


When a resource type has an AVAILABLE dependency on another resource type, CPBM will verify that the current user or account has an existing resource of the target resource type.


Deprecated feature: Group element

The group element was used to group Resource Components to support variations in configuration. A Resource Type can no longer have multiple groups of Resource Components.
Note: Any use of the Group element should be discontinued as it may be removed in a future release.

Currently, a ResourceType can have either one or no groups, wherein the group can have 1-to-n components in it.

The ResourceType can have either:
  • Components within a Group


  • Components only (without any group tag)
Sample metadata:
  • Components within a group:
    <ResourceType name="VirtualMachine" constraint="NONE">    .    .    .    .    <Group name="fromISO">      <Component name="serviceOfferingUuid" discriminator="serviceOfferingUuid" reconfigurable="true" />      <Component name="isoUuid" discriminator="isoUuid" />      <Component name="hypervisorType" discriminator="hypervisorType" />    </Group>    .    .  </ResourceType>
  • Components only (without any group tag):
    <ResourceType name="Volume" constraint="NONE">    .    .    <Component name="diskOfferingUuid" discriminator="diskOfferingUuid"/>    .    .    .  </ResourceType>

For Upgrade:

  • If the ResourceType has only one group tag, the group tag can be removed.
    • A Resource Type having more than one group is not supported. If the ResourceType has more than one group tag, then manual intervention is required to remove all references to these multiple groups.
  • A new component can be added within the group tag.
  • A new component can be added to a ResourceType that has no groups.
Sample ResourceType metadata: (the group "fromDiskOffering" can be removed)
<ResourceType name="Volume" constraint="NONE">    .    .    <Group name="fromDiskOffering">      <Component name="diskOfferingUuid" discriminator="diskOfferingUuid"/>    </Group>    .    .    .  </ResourceType>
After removing the group tag:
<ResourceType name="Volume" constraint="NONE">    .    .    <Component name="diskOfferingUuid" discriminator="diskOfferingUuid"/>    .    .    .  </ResourceType>
Vous avez d’autres questions ? Envoyer une demande