incubator-deltacloud-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michal Fojtik <mfoj...@redhat.com>
Subject Re: [PATCH core] Instance credentials managment (rev 2)
Date Tue, 03 Aug 2010 08:59:50 GMT
On 02/08/10 17:55 -0700, David Lutterkort wrote:
>On Fri, 2010-07-30 at 14:28 +0200, mfojtik@redhat.com wrote:
>> ---
>>  server/deltacloud.rb                               |    1 +
>>  server/lib/deltacloud/base_driver/base_driver.rb   |   10 ++++
>>  server/lib/deltacloud/base_driver/features.rb      |    7 +++
>>  server/lib/deltacloud/drivers/ec2/ec2_driver.rb    |   48 ++++++++++++++++++
>>  .../lib/deltacloud/drivers/gogrid/gogrid_driver.rb |   25 +++++++++-
>>  .../lib/deltacloud/helpers/application_helper.rb   |    6 ++
>>  .../lib/deltacloud/models/instance_credential.rb   |   27 ++++++++++
>>  server/server.rb                                   |   52 +++++++++++++++++++-
>>  server/views/instance_credentials/index.html.haml  |   26 ++++++++++
>>  server/views/instance_credentials/index.xml.haml   |    4 ++
>>  server/views/instance_credentials/new.html.haml    |    8 +++
>>  server/views/instance_credentials/show.html.haml   |   22 ++++++++
>>  server/views/instance_credentials/show.xml.haml    |   22 ++++++++
>>  13 files changed, 256 insertions(+), 2 deletions(-)
>>  create mode 100644 server/lib/deltacloud/models/instance_credential.rb
>>  create mode 100644 server/views/instance_credentials/index.html.haml
>>  create mode 100644 server/views/instance_credentials/index.xml.haml
>>  create mode 100644 server/views/instance_credentials/new.html.haml
>>  create mode 100644 server/views/instance_credentials/show.html.haml
>>  create mode 100644 server/views/instance_credentials/show.xml.haml
>
>ACK. Two small things:
>
>      * could we call these things just credentials rather than
>        intsance_credentials ?

Well, there is one small problem with this. We use 'credentials' in almost
every driver class method to pass driver credentials.
So to avoid conflict with this variable and don't mess the code with
duplicated names, I choose this name. (But I agree, that 'credentials'
would be much better)

>      * there's a small typo in views/instance_credentials/show.xml.haml
>
>> diff --git a/server/views/instance_credentials/show.xml.haml b/server/views/instance_credentials/show.xml.haml
>> new file mode 100644
>> index 0000000..fde3daa
>> --- /dev/null
>> +++ b/server/views/instance_credentials/show.xml.haml
>> @@ -0,0 +1,22 @@
>> +- unless defined?(partial)
>> +  !!! XML
>> +%instance_credential{ :href => instance_credential_url(@instance_credential.id),
:id => @instance_credential.id }
>> +  %actions
>> +    - if @instance_credential.respond_to?(:destroy_instance_credential)
>> +    %link{ :rel => "destroy", :method => "delete", :href => destroy_instance_credential_url(@instance_credential.id)}
>
>The %link needs to be indented, otherwise HAML gives a syntax error.

Thanks! It's fixed in my repo right now.

Before I push this live I want to do some Cucumber features for this stuff.

  -- Michal

-- 
--------------------------------------------------------
Michal Fojtik, mfojtik@redhat.com, +420 532 294 4307
Ruby / Ruby On Rails Developer
Deltacloud API: http://deltacloud.org
--------------------------------------------------------

Mime
View raw message