On 04/05/2013 06:41 PM, [email protected] wrote:
ACK, one minor suggestion below.
From: Dies Koper <[email protected]>
---
server/lib/cimi/service/system.rb | 2 +-
server/lib/deltacloud/drivers/fgcp/fgcp_driver_cimi_methods.rb | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/server/lib/cimi/service/system.rb
b/server/lib/cimi/service/system.rb
index 9324783..dac9174 100644
--- a/server/lib/cimi/service/system.rb
+++ b/server/lib/cimi/service/system.rb
@@ -39,7 +39,7 @@ class CIMI::Service::System < CIMI::Service::Base
end
def self.delete!(id, context)
- context.driver.destroy_system(context.credentials, {:id=>id})
+ context.driver.destroy_system(context.credentials, id)
end
diff --git a/server/lib/deltacloud/drivers/fgcp/fgcp_driver_cimi_methods.rb
b/server/lib/deltacloud/drivers/fgcp/fgcp_driver_cimi_methods.rb
index 386cc11..352f9a7 100644
--- a/server/lib/deltacloud/drivers/fgcp/fgcp_driver_cimi_methods.rb
+++ b/server/lib/deltacloud/drivers/fgcp/fgcp_driver_cimi_methods.rb
@@ -92,8 +92,8 @@ module Deltacloud::Drivers::Fgcp
end
end
- def destroy_system(credentials, opts={})
- delete_firewall(credentials, {:id=>"#{opts[:id]}-S-0001"})
+ def destroy_system(credentials, id)
+ delete_firewall(credentials, {:id=>"#{id}-S-0001"})
FYI, in Ruby you don't need to use {} if the parameter is Hash:
delete_firewall(credentials, :id => "#{id}-S-0001"
but maybe this is just a subjective feeling ;-))
end
def start_system(credentials, opts={})
--
Michal Fojtik <[email protected]>
Deltacloud API, CloudForms