Return-Path: X-Original-To: apmail-incubator-cloudstack-dev-archive@minotaur.apache.org Delivered-To: apmail-incubator-cloudstack-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 14C14E7DE for ; Wed, 13 Feb 2013 10:02:17 +0000 (UTC) Received: (qmail 34551 invoked by uid 500); 13 Feb 2013 10:02:16 -0000 Delivered-To: apmail-incubator-cloudstack-dev-archive@incubator.apache.org Received: (qmail 34443 invoked by uid 500); 13 Feb 2013 10:02:16 -0000 Mailing-List: contact cloudstack-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: cloudstack-dev@incubator.apache.org Delivered-To: mailing list cloudstack-dev@incubator.apache.org Received: (qmail 34075 invoked by uid 99); 13 Feb 2013 10:02:15 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 13 Feb 2013 10:02:15 +0000 X-ASF-Spam-Status: No, hits=1.7 required=5.0 tests=FREEMAIL_ENVFROM_END_DIGIT,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of rohityadav89@gmail.com designates 209.85.215.173 as permitted sender) Received: from [209.85.215.173] (HELO mail-ea0-f173.google.com) (209.85.215.173) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 13 Feb 2013 10:02:07 +0000 Received: by mail-ea0-f173.google.com with SMTP id i1so405628eaa.32 for ; Wed, 13 Feb 2013 02:01:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:mime-version:sender:from:date:x-google-sender-auth :message-id:subject:to:cc:content-type; bh=Xf3/ciZ72PeIFgeuFowyryuNaUaSVCPtdxGSMLvSCwk=; b=OnXZWlwXB99c03GbECUFXx2F2dSezr0HCbhPQAs0c94qLVHJLyZE9hSUnNQgfAIz9S +LO/REA659LiY1qU7OR8XCWte8SwCOEezxWPJkbPxLW3Bb8fNuRRWBn+nDeRcsJHZc5P nxoR5SzSzQFKGoEJoot7f2bKoQmzzW4HC35ojQrlcYKxBlna9Qj1H54+0Tut2wqRMoID YGXSRJmGEvz+ag5FYWqys2Th7ffr2FluOtf9wnqwnnmF5Zis087dI+6Tr4h8+kOdKAWZ 0Uh8LDkdtMx1uDo7TabW3HuY2HvnHpmaI3M1Imc0r0BDEBtAeRBIhenHY10YJy/moB7R JXKw== X-Received: by 10.14.173.67 with SMTP id u43mr3708439eel.22.1360749707016; Wed, 13 Feb 2013 02:01:47 -0800 (PST) MIME-Version: 1.0 Sender: rohityadav89@gmail.com Received: by 10.223.4.154 with HTTP; Wed, 13 Feb 2013 02:01:26 -0800 (PST) From: Rohit Yadav Date: Wed, 13 Feb 2013 15:31:26 +0530 X-Google-Sender-Auth: KpjxJnLSni3HUyFB7zXHR-Qtm_E Message-ID: Subject: Duplicate BareMetalTemplateAdapter classes To: Frank Zhang Cc: cloudstack Content-Type: multipart/alternative; boundary=047d7b621fbaea3a1a04d5983abf X-Virus-Checked: Checked by ClamAV on apache.org --047d7b621fbaea3a1a04d5983abf Content-Type: text/plain; charset=ISO-8859-1 Hi Frank, Can you check why we have two BareMetalTemplateAdapter; ./plugins/hypervisors/baremetal/src/com/cloud/baremetal/manager/BareMetalTemplateAdapter.java (Found no usage across codebase, removable?) ./server/src/com/cloud/baremetal/BareMetalTemplateAdapter.java (only this one is used, as spring would instantiate only this one with @Component annotation) And remove one which is redundant code? Found this while fixing CLOUDSTACK-1237. Regards. On Wed, Feb 13, 2013 at 3:26 PM, Rohit Yadav wrote: > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/9420/ > > This fix would have worked for Hypervisor but would have failed for baremetal... if we fix like this, there may be other template adapters whose class (simple) names. So, it was better to impl getName() for all implementing template adapters. > > Hongfu thank you for your patch, I was in middle of working and testing the patch and went ahead to commit the fix. > > > - Rohit > > On February 13th, 2013, 5:07 a.m., Hongtu Zang wrote: > Review request for cloudstack, mice xia, anthony xu, and > SrikanteswaraRao Talluri. > By Hongtu Zang. > > *Updated Feb. 13, 2013, 5:07 a.m.* > Description > > In TemplateManagerImpl.java, function getAdapter(), TemplateAdapterType.Hypervisor.getName() returns "HyervisorAdapter", while it should returns "HyervisorTemplateAdapter". So, in AdapterBase.java function getAdapterByName() returns null. > > Testing > > register a template and start a vm. > success. > > *Bugs: * CLOUDSTACK-1237, CLOUDSTACK-1240 > Diffs > > - server/src/com/cloud/template/TemplateAdapter.java (19cfef0) > > View Diff > --047d7b621fbaea3a1a04d5983abf--