Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

3.)  Metering of these dynamically assigned resources for usage details.

 

Design details:

Dynamic Offerings.

...

storing these values in the dynamicuservm_service_offering_details table. This table will contain the dynamic_offering id, VM  VM id and a name,

value pair.

Different size of root disk when using same template.

we introduce a new parameter rootDisksize to deployVM API , using this parameter we mention the size of the root disk. This 

parameter should be used only when we use templates for VM deployment.

To specify

Parameter when using
Template

Parameter when using
ISO

root disk size

rootDiskSize*

size

data disk size

size

cannot specify

* to be used only when using templates for deploying a VM.The rootdisk size can be specified using a map of custom parameters. 

Metering.

Every time a VM is launched or scaled we generate a usage event. The usage event has a serviceOffeirng ID. If the VM is created form a dynamic service offering we populate 

...

DeployVM API.  

parameters added. we added a map of  custom parameters called customparameters. all the custom values need to be specified using this map.

presently on cpu cores. rootDisk size, cpu, memory and cpuNumber. cpu speed can be specified only when using dynamic service offering.

DAO changes.

Adding a new DAO to access the dynamic_offeirng_details table and Usage Usage_details_table. 

Changes to the ServiceOfferingDao.

...

  • if the offering is dynamic store the dynamic service offering Id custom parameter values in the vm_instance table instead of the serviceOffeirng id.
  • modify the method findById() to retrieve the dynamic_offering vo first if the isdynamic flag is true, and then use it to retrieve the corresponding service offering VO. populate the dynamic parameter details in the service offering Vo and return it. if not dynamic offering then return the service offering VO. (no need to access the dynamic_service_offering_details)
  • For this method to work the id of the dynamic service offerings and the normal service offerings should be unique. we ensure this by using a counter which will keep count of the id. every time we create a new service offering dynamic or normal we set the id to the counter value and increment the counter. This will ensure that the ids of the dynamic offering and normal service offering are unique in other words different. 

...

  • uservmdetails table. when trying to retrieve a dynamic offering we populate the custom values after reading form the uservmdetails and retun the serviceofferng.

changing the return types to objects to indicate that they can be null.

 

Things Open to discussion.

...

 need to call the api deploy vm with the additional parameters memory, cpu and cpunumber new parameter called custom parameters when using

dynamic service offering.

Upgrade:

No Upgrade changes. 

Note the custom root disk size support  will be available in next release.