Create Resource Pool

To create a resource pool, use the following request:

1
2
POST /vdcs.xml
POST /vdcs.json

XML Request Example

1
curl -i -X POST -u user:password --url http://onapp.test/vdcs.xml -H 'Accept: application/xml' -H 'Content-type: application/xml' -d '<vdc><label>foobar</label><user_group_id>8</user_group_id><provider_vdc_id>1</provider_vdc_id><network_pool_identifier>222and215-97dd-4531-96cf-ce2dc2ac426f</network_pool_identifier><allocation_model>AllocationPool</allocation_model><cpu_allocated>1.1</cpu_allocated><memory_allocated>10</memory_allocated><guaranteed_cpu>30</guaranteed_cpu><guaranteed_memory>20</guaranteed_memory><vm_quota>100</vm_quota><network_quota>500</network_quota><thin_provisioning>true</thin_provisioning><fast_provisioning>true</fast_provisioning><data_store_attributes></data_store_attributes><data_store><data_store_group_id>4</data_store_group_id><data_store_size>55</data_store_size></data_store></vdc>'

JSON Request Example

1
curl -i -X POST -u user:password --url http://onapp.test/vdcs.json -H 'Accept: application/json' -H 'Content-type: application/json' -d '{"vdc": {"label": "foobar2", "network_pool_identifier": "222and215-97dd-4531-96cf-ce2dc2ac426f", "user_group_id": "8", "provider_vdc_id": "1", "allocation_model": "AllocationPool", "cpu_allocated": "1.1", "memory_allocated": "10", "guaranteed_cpu": "30", "guaranteed_memory": "20", "vm_quota": "100", "network_quota": "500", "thin_provisioning": "true", "fast_provisioning": "true", "data_stores_attributes": [{"data_store_group_id": "4", "data_store_size": "22", "data_store_type": "vcloud"}]}}'

Where:

label - specify a name for the resource pool

user_group_id - specify the ID of a user group to which this resource pool will be assigned

provider_vdc_id - indicate the provider resource pool ID

network_pool_identifier - fill in the ID of the default network pool for the resource pool

allocation_model - choose the type of resource pool (AllocationVApp, AllocationPool, ReservationPool). Depending on the type selected, the compute resource parameters will differ:

AllocationVApp (Pay-As-You-Go):

guaranteed_cpu - specify the amount of guaranteed CPU allocation (%)

guaranteed_memory - specify the amount of guaranteed memory allocation (%)

vm_quota - specify the number of VSs that can be created after the resource pool is deployed

network_quota - specify the number of org networks that can be created after the resource pool is deployed

cpu_limit - specify the maximum amount of CPU (in GHz) that can be requested

memory_limit - specify the maximum amount of memory (in GB) which can be used

vcpu_speed - specify the vCPU speed that can be consumed after the resource pool is created (in MHz)

AllocationPool:

cpu_allocated - specify the amount of CPU resources (GHz) that will be allocated after the resource pool is created

memory_allocated - specify the amount of memory (in GB) allocated to this resource pool

guaranteed_cpu - specify the amount of guaranteed CPU allocation (%)

guaranteed_memory - specify the amount of guaranteed memory allocation (%)

vm_quota - specify the number of VSs that can be created after the resource pool is deployed

network_quota - specify the number of org networks that can be created after the resource pool is deployed

ReservationPool:

cpu_allocated - specify the amount of CPU resources (GHz) that will be allocated after the resource pool is created

memory_allocated - specify the amount of memory (in GB) allocated to this resource pool

vm_quota - specify the number of VSs that can be created after the resource pool is deployed

network_quota - specify the number of org networks that can be created after the resource pool is deployed

Data Stores Attributes:

thin_provisioning - true if thin provisioning is enabled for this resource pool; otherwise, false

fast_provisioning - true if fast provisioning is enabled for this resource pool; otherwise, false

data_store_group_id - indicate the data store group ID

data_store_size - specify the size of the data store. For Pay-As-You-Go resource pools, you can set 0 to create a data store with unlimited capacity.

data_store_type - specify the type of the data store (vcloud)

Page History

v 6.0

  • Added the network_quota parameter.

v 5.0

  • Added the network_pool_identifier parameter.