incubator-cloudstack-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rohit Yadav <bhais...@apache.org>
Subject Duplicate BareMetalTemplateAdapter classes
Date Wed, 13 Feb 2013 10:01:26 GMT
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 <bhaisaab@apache.org> 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 <https://reviews.apache.org/r/9420/diff/>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message