Versions Compared

Key

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

...

To increase the number of parallel uploads, multiple SSVMs needs to be created. This will be handled automatically by the management server using the system.vm.auto.reserve.capacity, secstorage.capacity.standby and secstorage.session.max configuration variables.

API changes

A new API getUploadParams which takes all the params as the registertemplate/uploadvolume except for URL and  which returns all the required params plus a post URL to be used to uploadVolume/registerTemplate

  • Request 
    • type: volume or template : required
    • params while uploading a volume
      • format: the format for the volume. Possible values include QCOW2, OVA, and VHD : required
      • name: the name of the volume : required
      • zoneid: the ID of the zone the volume is to be hosted on : required
      • account: an optional accountName. Must be used with domainId.
      • checksum: the MD5 checksum value of this volume
      • domainid: an optional domainId. If the account parameter is used, domainId must also be used.
      • imagestoreuuid: Image store uuid
      • projectid: Upload volume for the project
    • params while uploading a tempalte
      • displaytext: the display text of the template. This is usually used for display purposes: required
      • format: the format for the template. Possible values include QCOW2, RAW, and VHD : required
      • hypervisor: the target hypervisor for the template : required
      • name: the name of the template : required
      • ostypeid: the ID of the OS Type that best represents the OS of this template : required
      • zoneid: the ID of the zone the template is to be hosted on : required
      • account: an optional accountName. Must be used with domainId.
      • bits: 32 or 64 bits support. 64 by default
      • checksum: the MD5 checksum value of this template
      • details: Template details in key/value pairs.
      • domainid: an optional domainId. If the account parameter is used, domainId must also be used.
      • isdynamicallyscalable: true if template contains XS/VMWare tools inorder to support dynamic scaling of VM cpu/memory
      • isextractable: true if the template or its derivatives are extractable; default is false
      • isfeatured: true if this template is a featured template, false otherwise
      • ispublic: true if the template is available to all accounts; default is true
      • isrouting: true if the template type is routing i.e., if template is used to deploy router
      • passwordenabled: true if the template supports the password reset feature; default is false
      • projectid: Register template for the project
      • requireshvm: true if this template requires HVM
      • sshkeyenabled: true if the template supports the sshkey upload feature; default is false
      • templatetag: the tag for this template.
  • Response
    • postURL: post url to upload the file to. Ex: "https://ssvmpublicip/upload/signature" (signature in the postURL is SHA1 key generated using PSK initially shared between SSVM agent and Management Server and the params in the response.)
    • params: params to be sent in the post request Ex: params:{"store":{"com.cloud.agent.api.to.NfsTO":"nfs://10.147.28.7/export/home/rajani/lxc/secondary"}, "hvm":false,"description":"lxc1","maxDownloadSizeInBytes":53687091200,"id":207,"resourceType":"TEMPLATE","installPath":"template/tmpl/2/207", "format":"TAR","accountId":2,"name":"207-2-09c78adc-065f-3dc8-9621-9e7a036d7dc9"}

POST url to post the data on to SSVM. This post url is returned from the getUploadParams api call Ex: https://ssvmpublicip/upload/key 

  • Request: (this is a POST request)
    • params: json string of params returned from previous getUploadParams api call file: file to upload
    • file: the location of the template/volume to be posted a multipart/form-data
  • Response: 
    • '200 OK' on successful upload
    • '401 Authorization error' incase the signature key validation or any other validation failed
    • '500 internal server' incase the file upload fails

...