Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id A76B4200C1A for ; Mon, 13 Feb 2017 13:20:39 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id A46F0160B60; Mon, 13 Feb 2017 12:20:39 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id E7603160B72 for ; Mon, 13 Feb 2017 13:20:38 +0100 (CET) Received: (qmail 902 invoked by uid 500); 13 Feb 2017 12:19:24 -0000 Mailing-List: contact issues-help@cloudstack.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cloudstack.apache.org Delivered-To: mailing list issues@cloudstack.apache.org Received: (qmail 96982 invoked by uid 500); 13 Feb 2017 12:19:16 -0000 Delivered-To: apmail-incubator-cloudstack-issues@incubator.apache.org Received: (qmail 96202 invoked by uid 99); 13 Feb 2017 12:19:10 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 13 Feb 2017 12:19:10 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 13A39186135 for ; Mon, 13 Feb 2017 12:19:10 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -1.199 X-Spam-Level: X-Spam-Status: No, score=-1.199 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, KAM_LAZY_DOMAIN_SECURITY=1, RP_MATCHES_RCVD=-2.999] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id iVBlRXB5NxDa for ; Mon, 13 Feb 2017 12:19:08 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id 60ABD5F30F for ; Mon, 13 Feb 2017 12:19:07 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 0AE2BE0D57 for ; Mon, 13 Feb 2017 12:18:58 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 71009228A9 for ; Mon, 13 Feb 2017 12:00:46 +0000 (UTC) Date: Mon, 13 Feb 2017 12:00:46 +0000 (UTC) From: "ASF subversion and git services (JIRA)" To: cloudstack-issues@incubator.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CLOUDSTACK-8950) Hypervisor Parameter check is not performed for registerTemplate and getUploadParamsForTemplate API's. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Mon, 13 Feb 2017 12:20:39 -0000 [ https://issues.apache.org/jira/browse/CLOUDSTACK-8950?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15863543#comment-15863543 ] ASF subversion and git services commented on CLOUDSTACK-8950: ------------------------------------------------------------- Commit 3c28ce7f4d84c9fbb3b3d054a8cc8df619d5edae in cloudstack's branch refs/heads/master from [~rajanik] [ https://git-wip-us.apache.org/repos/asf?p=cloudstack.git;h=3c28ce7 ] Merge pull request #928 from karuturi/CLOUDSTACK-8950 CLOUDSTACK-8950 Hypervisor Parameter check is not performed for registerTemplate and getUploadParamsForTemplate API'sAny 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. * pr/928: CLOUDSTACK-8950 Hypervisor Parameter check is not performed for registerTemplate and getUploadParamsForTemplate API's Signed-off-by: Rajani Karuturi > 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.2, Future > > > 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.15#6346)