You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cloudstack.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2015/10/14 06:30:05 UTC

[jira] [Commented] (CLOUDSTACK-8950) Hypervisor Parameter check is not performed for registerTemplate and getUploadParamsForTemplate API's.

    [ https://issues.apache.org/jira/browse/CLOUDSTACK-8950?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14956236#comment-14956236 ] 

ASF GitHub Bot commented on CLOUDSTACK-8950:
--------------------------------------------

GitHub user karuturi opened a pull request:

    https://github.com/apache/cloudstack/pull/928

    [4.7] CLOUDSTACK-8950 Hypervisor Parameter check is not performed for registerTemplate and getUploadParamsForTemplate API's

    Any string is allowed as hypervisor type from the api.
    HypervisorType.getType() tries to validates with the enums and if nothing
    matches sets the type as None.
    
    Added a check to not allow None hypervisor type when registering.
    
    will update test results and testing done later.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/karuturi/cloudstack CLOUDSTACK-8950

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/cloudstack/pull/928.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #928
    
----
commit fed3b1f909b2acb17e48e1e5fd013e751593addc
Author: Rajani Karuturi <ra...@citrix.com>
Date:   2015-10-06T11:26:50Z

    CLOUDSTACK-8950 Hypervisor Parameter check is not performed for
    registerTemplate and getUploadParamsForTemplate API's
    
    Any string is allowed as hypervisor type from the api.
    Hypervisor.getType() tries to validate with the enums and if nothing
    matches set the type as None.
    
    Added a check to not allow None hypervisor type when registering.

----


> Hypervisor Parameter check is not performed  for registerTemplate and getUploadParamsForTemplate API's.
> -------------------------------------------------------------------------------------------------------
>
>                 Key: CLOUDSTACK-8950
>                 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-8950
>             Project: CloudStack
>          Issue Type: Bug
>      Security Level: Public(Anyone can view this level - this is the default.) 
>            Reporter: Rajani Karuturi
>            Assignee: Rajani Karuturi
>             Fix For: 4.7.0
>
>
> Register Template : 
> http://10.220.135.31:8096/client/api?command=registerTemplate&displaytext=urlapi&format=VHD&hypervisor=ABC&name=urlapi1&ostypeid=6c590b5c-fde9-11e4-b65a-a20b7b72c771&url=http://10.147.28.7/templates/rajani-thin-volume.vhd&zoneid=1e7bbab9-02cd-4067-99f9-3f8b115304df
> getUploadParamsForTemplate : 
> http://10.81.29.49:8096/client/api?command=getUploadParamsForTemplate&type=template&response=json&name=nossvm&displayText=nossvmnossvm&zoneid=ca8adf51-539d-45eb-b205-792a58503d14&format=VHD&isextractable=false&passwordEnabled=false&isdynamicallyscalable=false&osTypeId=ce099056-ee53-11e4-a8ad-d242118f6f9b&hypervisor=XEN&requireshvm=false&apiKey=_cMgYFGzeE0QEMmqN5OWC5QpOm33UqGpVbAXUntbR_ESNoKX-N9TMNhCcl-lUbyYhT90k53gCkvSP0ZO3CWtxg&account=admin&domainid=cddff412-ee53-11e4-a8ad-d242118f6f9b
> In the above API calls have given the hypervisor types as ABC and XEN respectively. No error is thrown and templates are sucessfully registerd and Uploaded . But they do not list in the Templates section as DB entry for the above shows HYpervisor as NONE . 
> Expected Result : 
> Hypervisor parameter should only accept values which the cloudstack currently supports and API should fail if we give any other values . Templates should not be uploaded for NONE type .



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)