Versions Compared

Key

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

...

  1. 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

    1. volume upload api

      Parameter NameDescriptionRequired
      typevolume or template uploadtrue
      formatthe format for the volume. Possible values include QCOW2, OVA, and VHD.true
      namethe name of the volumetrue
      zoneidthe ID of the zone the volume is to be hosted ontrue
      accountan optional accountName. Must be used with domainId.false
      checksumthe MD5 checksum value of this volumefalse
      domainidan optional domainId. If the account parameter is used, domainId must also be used.false
      imagestoreuuidImage store uuidfalse
      projectidUpload volume for the projectfalse
    2. template upload api

       

      Parameter NameDescriptionRequired
      typevolume or template uploadtrue
      displaytextthe display text of the template. This is usually used for display purposes.true
      formatthe format for the template. Possible values include QCOW2, RAW, and VHD.true
      hypervisorthe target hypervisor for the templatetrue
      namethe name of the templatetrue
      ostypeidthe ID of the OS Type that best represents the OS of this template.true
      zoneidthe ID of the zone the template is to be hosted ontrue
      accountan optional accountName. Must be used with domainId.false
      bits32 or 64 bits support. 64 by defaultfalse
      checksumthe MD5 checksum value of this templatefalse
      detailsTemplate details in key/value pairs.false
      domainidan optional domainId. If the account parameter is used, domainId must also be used.false
      isdynamicallyscalabletrue if template contains XS/VMWare tools inorder to support dynamic scaling of VM cpu/memoryfalse
      isextractabletrue if the template or its derivatives are extractable; default is falsefalse
      isfeaturedtrue if this template is a featured template, false otherwisefalse
      ispublictrue if the template is available to all accounts; default is truefalse
      isroutingtrue if the template type is routing i.e., if template is used to deploy routerfalse
      passwordenabledtrue if the template supports the password reset feature; default is falsefalse
      projectidRegister template for the projectfalse
      requireshvmtrue if this template requires HVMfalse
      sshkeyenabledtrue if the template supports the sshkey upload feature; default is falsefalse
      templatetagthe tag for this template.false

       

      A sample request and response would look below
      request params: 

      name=lxc1
      displayText=lxc1
      zoneid=-1
      format=TAR
      isextractable=false
      passwordEnabled=false
      isdynamicallyscalable=false
      osTypeId=1b510c30-3352-11e4-aaca-a5c7f57670d0
      hypervisor=LXC
      requireshvm=false


      response params: { "postURL":"https://ssvmpublicip/upload/key",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"}}

...



    1. key in the postURL would be generated using PSK initially shared between agent and Management Server.
  1. POST url to post the data on to SSVM. url: https://ssvmpublicip/upload/key params: params returned from previous call file: file to upload
    response: 200 OK on successful upload, 401 Authorization error, 500 internal server incase the file upload fails.

 

UI Changes

  1. A new register template and upload volume UI which should be able to accept "browse and upload" file. 

...