You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jclouds.apache.org by "ssivikt@gmail.com" <ss...@gmail.com> on 2013/12/02 15:47:08 UTC
Template builder with no predefined hardware profiles
Hi all. The cloud compute provider I faced with (ProfitBricks) doesn't
have any predefined hardware profiles. Does it mean I need to have my
own /TemplateBuilder/ implementation since base /TemplateBuilderImpl/
will throw an exception if there is no hardware profiles to satisfy user
requirements?
The thing is that users can set any cpu/ram values for their node. Of
course, there are a certain limits on cpus and ram, but user can choose
any configuration in these bounds.
As for now I see the following solution - is to override
/org.jclouds.compute.domain.internal.TemplateBuilderImpl#build()/
method. I cannot just override
/org.jclouds.compute.domain.internal.TemplateBuilderImpl#/resolveHardware()
since build method expects not empty set of hardware profiles.
How do you think, is it ok ?
Re: Template builder with no predefined hardware profiles
Posted by "ssivikt@gmail.com" <ss...@gmail.com>.
Thank you Andrew, I went with defining my own TemplateBuilder. Sincerely
I jump between IRC and mailing list.
On 12/03/2013 12:24 PM, Andrew Phillips wrote:
>> Hi all. The cloud compute provider I faced with (ProfitBricks) doesn't
>> have any predefined hardware profiles. Does it mean I need to have my
>> own /TemplateBuilder/ implementation since base /TemplateBuilderImpl/
>> will throw an exception if there is no hardware profiles to satisfy
>> user requirements?
>
> You should be able to define your own TemplateBuilder for your
> provider - the "default" TemplateBuilderImpl is just for convenience.
> See e.g. EC2TemplateBuilderImpl [1].
>
> As long as you are able to adhere to the TemplateBuilder interface, it
> should not matter that the provide does not have a "predefined" set of
> templates..?
>
> For more details, you might want to jump on #jclouds at Freenode at
> ask there.
>
> Regards
>
> ap
>
> [1]
> https://github.com/jclouds/jclouds/blob/master/apis/ec2/src/main/java/org/jclouds/ec2/compute/internal/EC2TemplateBuilderImpl.java
Re: Template builder with no predefined hardware profiles
Posted by Andrew Phillips <ap...@qrmedia.com>.
> Hi all. The cloud compute provider I faced with (ProfitBricks) doesn't
> have any predefined hardware profiles. Does it mean I need to have my
> own /TemplateBuilder/ implementation since base /TemplateBuilderImpl/
> will throw an exception if there is no hardware profiles to satisfy
> user requirements?
You should be able to define your own TemplateBuilder for your
provider - the "default" TemplateBuilderImpl is just for convenience.
See e.g. EC2TemplateBuilderImpl [1].
As long as you are able to adhere to the TemplateBuilder interface, it
should not matter that the provide does not have a "predefined" set of
templates..?
For more details, you might want to jump on #jclouds at Freenode at ask there.
Regards
ap
[1]
https://github.com/jclouds/jclouds/blob/master/apis/ec2/src/main/java/org/jclouds/ec2/compute/internal/EC2TemplateBuilderImpl.java