You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@deltacloud.apache.org by lu...@apache.org on 2010/07/09 01:17:43 UTC
svn commit: r962024 -
/incubator/deltacloud/trunk/drivers/mock/lib/mock_driver.rb
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? )