incubator-deltacloud-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lut...@apache.org
Subject svn commit: r962024 - /incubator/deltacloud/trunk/drivers/mock/lib/mock_driver.rb
Date Thu, 08 Jul 2010 23:17:43 GMT
Author: lutter
Date: Thu Jul  8 23:17:42 2010
New Revision: 962024

URL: http://svn.apache.org/viewvc?rev=962024&view=rev
Log:
Adjust driver to use data dir from framework.

Modified:
    incubator/deltacloud/trunk/drivers/mock/lib/mock_driver.rb

Modified: incubator/deltacloud/trunk/drivers/mock/lib/mock_driver.rb
URL: http://svn.apache.org/viewvc/incubator/deltacloud/trunk/drivers/mock/lib/mock_driver.rb?rev=962024&r1=962023&r2=962024&view=diff
==============================================================================
--- incubator/deltacloud/trunk/drivers/mock/lib/mock_driver.rb (original)
+++ incubator/deltacloud/trunk/drivers/mock/lib/mock_driver.rb Thu Jul  8 23:17:42 2010
@@ -3,13 +3,15 @@ require 'deltacloud/base_driver'
 
 class MockDriver < DeltaCloud::BaseDriver
 
-  STORAGE_ROOT = File.dirname(__FILE__) + '/../data'
+  ( STORAGE_ROOT = MOCK_STORAGE_ROOT ) unless defined?( STORAGE_ROOT )
+  puts "Storage Root #{STORAGE_ROOT}"
+  puts Dir[ "#{STORAGE_ROOT}/*" ].inspect
 
   # 
   # Flavors
   # 
 
-  FLAVORS = [ 
+  ( FLAVORS = [ 
     { 
       :id=>'m1-small',
       :memory=>1.7,
@@ -40,7 +42,7 @@ class MockDriver < DeltaCloud::BaseDrive
       :storage=>1690,
       :architecture=>'x86_64',
     },
-  ]
+  ] ) unless defined?( FLAVORS )
 
   def flavors(credentials, opts=nil)
     return FLAVORS if ( opts.nil? )



Mime
View raw message