cloudstack-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Boris Schrijver <bo...@pcextreme.nl>
Subject Re: Zone in RegisterTemplateCmd API
Date Fri, 25 Sep 2015 20:04:55 GMT
Hi Patrick,

We're using S3 and are facing the same issues.

This would indeed be a very good idea. Though I think it will also remove a kind
of safety check by making it optional.

The solution would be to make zoneId optional and add a optional boolean
variable crossZones.

If zoneId is empty and crossZones is not set, or not set to true, then fail.
If zoneId is empty and crossZones is set to true then succeed and add -1 in the
background (for now, maybe add a boolean crossZones to the template as well.)
If zoneId is set and crossZones is not set, or not set to true, then succeed.
If zoneId is set and crossZones is set to true, then fail

Even add a check if zoneId is set to -1 and crossZones is set to true, then
still succeed. And the other way around.

This way it doesn't alter the default behavior.

Any opinions?  

Best regards,

Boris Schrijver

TEL: +31633784542
MAIL: boris@pcextreme.nl

> 
>     On September 25, 2015 at 9:32 PM Patrick Dube <patrickdube91@gmail.com>
> wrote:
> 
> 
>     Hey guys/gals,
> 
>     I am using Swift as secondary storage, which is cross zones. To register
>     templates, there is a mandatory zoneid field. I have found that if i put
>     zoneid=-1, it will work (mark the templates as cross zones), but it is
> very
>     unintuitive. This also causes problems using a tool like Terraform, which
>     expects the zoneid in the response (since it is a required field). What do
>     you think about rendering the zone field optional (defaulting to -1 on the
>     server)? This would simplify the API and make region wide templates more
>     intuitive.
> 
>     Thank you,
> 
>     Patrick
> 
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message