Return-Path: X-Original-To: apmail-cloudstack-issues-archive@www.apache.org Delivered-To: apmail-cloudstack-issues-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 7E56210B24 for ; Fri, 24 Jan 2014 06:02:46 +0000 (UTC) Received: (qmail 39040 invoked by uid 500); 24 Jan 2014 06:02:45 -0000 Delivered-To: apmail-cloudstack-issues-archive@cloudstack.apache.org Received: (qmail 38825 invoked by uid 500); 24 Jan 2014 06:02:45 -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 38802 invoked by uid 500); 24 Jan 2014 06:02:39 -0000 Delivered-To: apmail-incubator-cloudstack-issues@incubator.apache.org Received: (qmail 38795 invoked by uid 99); 24 Jan 2014 06:02:39 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 24 Jan 2014 06:02:39 +0000 Date: Fri, 24 Jan 2014 06:02:39 +0000 (UTC) From: "Srikanteswararao Talluri (JIRA)" To: cloudstack-issues@incubator.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Resolved] (CLOUDSTACK-5113) [Automation] "get_template" function in command should return default templates MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CLOUDSTACK-5113?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Srikanteswararao Talluri resolved CLOUDSTACK-5113. -------------------------------------------------- Resolution: Fixed > [Automation] "get_template" function in command should return default templates > -------------------------------------------------------------------------------- > > Key: CLOUDSTACK-5113 > URL: https://issues.apache.org/jira/browse/CLOUDSTACK-5113 > Project: CloudStack > Issue Type: Test > Security Level: Public(Anyone can view this level - this is the default.) > Components: marvin > Affects Versions: 4.2.1 > Environment: Automation > Reporter: Rayees Namathponnan > Assignee: Srikanteswararao Talluri > Fix For: 4.3.0 > > > I observed couple of vm deployment failures during automation runs; test cases trying to deploy with vm with template which already deleted by other account > In below code in common.py we are getting template "apiclient.listTemplates(cmd)", eg : > 1) testcase1 trying to deploy a new VM > 2) Same time testcase 2 register a template (temp2) > 3) apiclient.listTemplates(cmd) will returns template ID (temp2) > 4) testcase1 deploy vm wilt template temp2, same time (testcase 2) may delete its account, then obviously temp2 also gets deleted > 5) test case 1 deployment fails since temp2 no available > Solution > get_template() should return only default template; there is no property API to list only default template; so we should find with starting name of template ie "CentOS" and in test case we should not register template with name "CentOS 5.5" > def get_template(apiclient, zoneid, ostype, services=None): > "Returns a template" > cmd = listOsTypes.listOsTypesCmd() > cmd.description = ostype > ostypes = apiclient.listOsTypes(cmd) > if isinstance(ostypes, list): > ostypeid = ostypes[0].id > else: > raise Exception( > "Failed to find OS type with description: %s" % ostype) > cmd = listTemplates.listTemplatesCmd() > cmd.templatefilter = 'featured' > cmd.zoneid = zoneid > if services: > if "template" in services: > cmd.id = services["template"] > list_templates = apiclient.listTemplates(cmd) -- This message was sent by Atlassian JIRA (v6.1.5#6160)