You can configure the drop-down menu items for VM types and persistent disk types in your tile.
On-Demand service tiles have a configuration pane for each service plan. You can use the drop-down menu on the configuration pane to set the VM type and persistent disk type for each instance of that plan.
Tanzu Operations Manager populates the menu with options that are based on the VM and disk options available on the current IaaS. When you set default values for VMs and disk types, it helps you to select the right resources for on-demand service broker (ODB) services when you use on-demand plans.
Note Tanzu Operations Manager versions 2.9 and later support defining VM and disk type defaults and constraints.
The property that defines the VM type options is vm_type_dropdown
property, and the menu items for disk type come from the disk_type_dropdown
property.
Tile authors do not specify the menu items in the product template.
Because VM and disk options differ by IaaS, Tanzu Operations Manager uses a best-fit algorithm to match defaults to their closest equivalents on the IaaS, similar to the way the Resource Config pane handles the VM Type and Persistent Disk Type options.
If a tile developer does not include a default value for a VM or disk resource, and then you configure the tile. You do not choose a value from the drop-down menu. Tanzu Operations Manager, by default, sets the resource to the smallest option available on the IaaS.
For the vm_type_dropdown
property, the resources are ram
, ephemeral_disk
, and cpu
.
Tile developers can apply constraints
to any of these resources.
Constraints can include min
or power_of_two
.
For example:
- name: example_vm_type
type: vm_type_dropdown
configurable: true
resource_definitions:
- name: ram
default: 1024
constraints:
min: 1024
power_of_two: true
- name: ephemeral_disk
default: 1024
- name: cpu
default: 1
For the disk_type_dropdown
property, the resource is persistent_disk
.
Tile developers can apply constraints
to this resource.
Constraints can include min
or power_of_two
.
For example:
- name: example_disk_type_dropdown
type: disk_type_dropdown
configurable: true
resource_definitions:
- name: persistent_disk
default: 2000
constraints:
min: 50
power_of_two: false