On 09/02/11 15:27 -0800, David Lutterkort wrote:
On Wed, 2011-02-09 at 14:30 +0100, [email protected] wrote:
From: Michal Fojtik <[email protected]>

---
 server/lib/deltacloud/base_driver/features.rb      |    7 +++++
 .../lib/deltacloud/drivers/gogrid/gogrid_driver.rb |   24 ++++++++++---------
 server/views/instances/new.html.haml               |    5 ++++
 3 files changed, 25 insertions(+), 11 deletions(-)

ACK, with two comments: (1) how do we test this ? (2) minor nit below:

I'll remove (sandbox) string from images, it was used just for testing.
I agree that we can add some element or attribute to image which will
indicate that it's sandbox instance.

Testing: Let's check this attribute. So basically we can create a new
instance using sandbox param and then check if this instance has sandbox
attribute.

  -- Michal


diff --git a/server/lib/deltacloud/drivers/gogrid/gogrid_driver.rb 
b/server/lib/deltacloud/drivers/gogrid/gogrid_driver.rb
index 909fade..e17cbe9 100644
--- a/server/lib/deltacloud/drivers/gogrid/gogrid_driver.rb
+++ b/server/lib/deltacloud/drivers/gogrid/gogrid_driver.rb

@@ -425,7 +425,9 @@ class GogridDriver < Deltacloud::BaseDriver
         opts[:hwp_memory] = (mem.to_i * 1024).to_s
       end
     end
+
     prof = InstanceProfile.new("server", opts)
+    instance_name = "#{instance['name']} (sandbox)" if instance['isSandbox']

We shouldn't modify the name of the instance - if users are using these
names to identify instances, it would be very bad if we change them
behind their backs.

It's more work internally, but if we need to indicate that an instance
is sandboxed, we should do that with a separate element in the instance
XML.

David



--
--------------------------------------------------------
Michal Fojtik, [email protected]
Deltacloud API: http://deltacloud.org
--------------------------------------------------------

Reply via email to