incubator-deltacloud-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Lutterkort <lut...@redhat.com>
Subject Re: Small change to allow passing security groups through to ec2_driver on create_instance
Date Mon, 01 Nov 2010 23:27:47 GMT
On Mon, 2010-11-01 at 15:34 -0400, Tobias Crawley wrote:
> This lets the security group pass through from the client create_instance call as :security_group.
> 
> Tobias Crawley (1):
>   Allow setting of security group when creating an ec2 instance.
> 
>  server/lib/deltacloud/drivers/ec2/ec2_driver.rb |    3 ++-
>  1 files changed, 2 insertions(+), 1 deletions(-)

Hi Tobias,

at a minimum, this needs to be also advertised as a feature in the
top-level API XML (have a look at how the user-data parameter is
advertised there)

The reason to do that is so that applications do not have to contain
logic like

        driver = get_driver_from_dcloud_xml()
        if driver == 'ec2'
          yay .. we can use security_group
        else
          cry, no security groups
        end
        
since logic like the above makes users very brittle. Imagine an
implementation of the EC2 API that doesn't support security groups, or
that another API grows a feature equivalent to security groups; in
either of these cases, client code will become more and more complex to
determine if security groups can be used.

By advertising features, the API makes it possible for clients to ask
about very specific things, and adapt their behavior accordingly.

David





Mime
View raw message