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 CF091EFFC for ; Wed, 13 Feb 2013 18:35:39 +0000 (UTC) Received: (qmail 85825 invoked by uid 500); 13 Feb 2013 18:35:39 -0000 Delivered-To: apmail-incubator-cloudstack-dev-archive@incubator.apache.org Received: (qmail 85780 invoked by uid 500); 13 Feb 2013 18:35:39 -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 85771 invoked by uid 99); 13 Feb 2013 18:35:39 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 13 Feb 2013 18:35:39 +0000 X-ASF-Spam-Status: No, hits=-2.8 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of Frank.Zhang@citrix.com designates 66.165.176.89 as permitted sender) Received: from [66.165.176.89] (HELO SMTP.CITRIX.COM) (66.165.176.89) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 13 Feb 2013 18:35:31 +0000 X-IronPort-AV: E=Sophos;i="4.84,658,1355097600"; d="scan'208,217";a="7379581" Received: from sjcpmailmx02.citrite.net ([10.216.14.75]) by FTLPIPO01.CITRIX.COM with ESMTP/TLS/RC4-MD5; 13 Feb 2013 18:35:09 +0000 Received: from SJCPMAILBOX01.citrite.net ([10.216.4.73]) by SJCPMAILMX02.citrite.net ([10.216.14.75]) with mapi; Wed, 13 Feb 2013 10:35:09 -0800 From: Frank Zhang To: 'Rohit Yadav' CC: cloudstack Date: Wed, 13 Feb 2013 10:35:08 -0800 Subject: RE: Duplicate BareMetalTemplateAdapter classes Thread-Topic: Duplicate BareMetalTemplateAdapter classes Thread-Index: Ac4J0SSo+sl/hl4ZSe6lKCzjZmX58gARzJdw Message-ID: <93099572B72EB341B81A644E134F240B012F747FE679@SJCPMAILBOX01.citrite.net> References: In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US Content-Type: multipart/alternative; boundary="_000_93099572B72EB341B81A644E134F240B012F747FE679SJCPMAILBOX_" MIME-Version: 1.0 X-Virus-Checked: Checked by ClamAV on apache.org --_000_93099572B72EB341B81A644E134F240B012F747FE679SJCPMAILBOX_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Thanks for filing this bug. I am working on it recently, because new baremetal which is as a single plu= gin haven't been checked in when javelin refactoring. So there are some old= code which is not working still stay in source, I am cleaning up/testing i= n my local source, will close these bug when fixes are checked in From: rohityadav89@gmail.com [mailto:rohityadav89@gmail.com] On Behalf Of R= ohit Yadav Sent: Wednesday, February 13, 2013 2:01 AM To: Frank Zhang Cc: cloudstack Subject: Duplicate BareMetalTemplateAdapter classes Hi Frank, Can you check why we have two BareMetalTemplateAdapter; ./plugins/hypervisors/baremetal/src/com/cloud/baremetal/manager/BareMetalTe= mplateAdapter.java (Found no usage across codebase, removable?) ./server/src/com/cloud/baremetal/BareMetalTemplateAdapter.java (only this o= ne is used, as spring would instantiate only this one with @Component annot= ation) 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 baremet= al... 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 t= emplate 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 T= alluri. By Hongtu Zang. Updated Feb. 13, 2013, 5:07 a.m. Description In TemplateManagerImpl.java, function getAdapter(), TemplateAdapterType.Hyp= ervisor.getName() returns "HyervisorAdapter", while it should returns "Hyer= visorTemplateAdapter". 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 --_000_93099572B72EB341B81A644E134F240B012F747FE679SJCPMAILBOX_--