incubator-cloudstack-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rohit Yadav" <bhais...@apache.org>
Subject Re: Review Request: fix bug 1237 and 1240 : Register Template fails with "Cannot find template adapter for XenServer"
Date Wed, 13 Feb 2013 11:27:34 GMT


> On Feb. 13, 2013, 9:56 a.m., Rohit Yadav wrote:
> > 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.
> 
> Hongtu Zang wrote:
>     Yes, I haven't note about baremetal.
>     It should use "BareMetalTemplateAdapter" instead of "BareMetalAdapter".
>     But I cannot test it now. can you test it?
>     I will update the patch.

Thanks, but changing the string won't be correct fix. Say there is another class implementation
of TemplateAdapter which is of HypervisorAdapter type but has a different impl, in that case
that class may have a different class name but we want that the getName() used in BaseAdapter
to get the name returns one of these template types, i.e. name which is static var in TemplateAdapter.

I've already fixed this issue on master and 4.1 in this way. You may resend a patch if there
is another better way, or submit the review to close it. Thanks.


- Rohit


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/9420/#review16509
-----------------------------------------------------------


On Feb. 13, 2013, 10:57 a.m., Hongtu Zang wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/9420/
> -----------------------------------------------------------
> 
> (Updated Feb. 13, 2013, 10:57 a.m.)
> 
> 
> Review request for cloudstack, mice xia, anthony xu, and SrikanteswaraRao Talluri.
> 
> 
> Description
> -------
> 
> In TemplateManagerImpl.java, function getAdapter(), TemplateAdapterType.Hypervisor.getName()
returns "HyervisorAdapter", while it should returns "HyervisorTemplateAdapter". So, in AdapterBase.java
function getAdapterByName() returns null.
> 
> 
> This addresses bugs CLOUDSTACK-1237 and CLOUDSTACK-1240.
> 
> 
> Diffs
> -----
> 
>   server/src/com/cloud/template/TemplateAdapter.java 19cfef0 
> 
> Diff: https://reviews.apache.org/r/9420/diff/
> 
> 
> Testing
> -------
> 
> register a template and start a vm.
> success.
> 
> 
> Thanks,
> 
> Hongtu Zang
> 
>


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