incubator-deltacloud-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mfoj...@apache.org
Subject svn commit: r1003045 [7/24] - in /incubator/deltacloud/trunk: server/ site/api-docs/ site/api-docs/CloudClient/ site/api-docs/Deltacloud/ site/api-docs/Deltacloud/BaseDriver/ site/api-docs/Deltacloud/Drivers/ site/api-docs/Deltacloud/Drivers/Azure/ sit...
Date Thu, 30 Sep 2010 12:48:04 GMT
Added: incubator/deltacloud/trunk/site/api-docs/Deltacloud/Drivers/Mock/MockDriver.html
URL: http://svn.apache.org/viewvc/incubator/deltacloud/trunk/site/api-docs/Deltacloud/Drivers/Mock/MockDriver.html?rev=1003045&view=auto
==============================================================================
--- incubator/deltacloud/trunk/site/api-docs/Deltacloud/Drivers/Mock/MockDriver.html (added)
+++ incubator/deltacloud/trunk/site/api-docs/Deltacloud/Drivers/Mock/MockDriver.html Thu Sep 30 12:48:00 2010
@@ -0,0 +1,1102 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+  <head>
+    <meta name="Content-Type" content="text/html; charset=utf8" />
+<title>Class: Deltacloud::Drivers::Mock::MockDriver</title>
+<link rel="stylesheet" href="../../../css/style.css" type="text/css" media="screen" charset="utf-8" />
+<link rel="stylesheet" href="../../../css/common.css" type="text/css" media="screen" charset="utf-8" />
+
+<script type="text/javascript" charset="utf-8">
+  relpath = '../../..';
+  if (relpath != '') relpath += '/';
+</script>
+<script type="text/javascript" charset="utf-8" src="../../../js/jquery.js"></script>
+<script type="text/javascript" charset="utf-8" src="../../../js/app.js"></script>
+
+  </head>
+  <body>
+    <script type="text/javascript" charset="utf-8">
+      if (window.top.frames.main) document.body.className = 'frames';
+    </script>
+    
+    <div id="header">
+      <div id="menu">
+  
+    <a href="../../../_index.html">Index (M)</a> &raquo; 
+    <span class='title'><span class='object_link'><a href="../../../Deltacloud.html" title="Deltacloud (module)">Deltacloud</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../../Drivers.html" title="Deltacloud::Drivers (module)">Drivers</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../Mock.html" title="Deltacloud::Drivers::Mock (module)">Mock</a></span></span>
+     &raquo; 
+    <span class="title">MockDriver</span>
+  
+  
+  <div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
+</div>
+
+      <div id="search">
+  <a id="class_list_link" href="#">Class List</a>
+  <a id="method_list_link" href="#">Method List</a>
+  <a id ="file_list_link" href="#">File List</a>
+</div>
+
+      <div class="clear"></div>
+    </div>
+    
+    <iframe id="search_frame"></iframe>
+    
+    <div id="content"><h1>Class: Deltacloud::Drivers::Mock::MockDriver
+  
+  
+  
+</h1>
+
+<dl class="box">
+  
+    <dt class="r1">Inherits:</dt>
+    <dd class="r1">
+      <span class="inheritName"><span class='object_link'><a href="../../BaseDriver.html" title="Deltacloud::BaseDriver (class)">BaseDriver</a></span></span>
+      
+        <ul class="fullTree">
+          <li>Object</li>
+          
+            <li class="next"><span class='object_link'><a href="../../BaseDriver.html" title="Deltacloud::BaseDriver (class)">BaseDriver</a></span></li>
+          
+            <li class="next">Deltacloud::Drivers::Mock::MockDriver</li>
+          
+        </ul>
+        <a href="#" class="inheritanceTree">show all</a>
+      
+      </dd>
+    
+  
+  
+    
+  
+    
+  
+  
+  
+    <dt class="r2 last">Defined in:</dt>
+    <dd class="r2 last">lib/deltacloud/drivers/mock/mock_driver.rb</dd>
+  
+</dl>
+<div class="clear"></div>
+
+
+
+  
+  
+  
+  
+
+  
+    <h2>
+      Instance Method Summary
+      <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
+    </h2>
+
+    <ul class="summary">
+      
+        <li class="public ">
+  <span class="summary_signature">
+    
+      <a href="#create_instance-instance_method" title="#create_instance (instance method)">- (Object) <strong>create_instance</strong>(credentials, image_id, opts) </a>
+    
+
+    
+  </span>
+  
+  
+  
+  
+  
+  
+
+  
+    <span class="summary_desc"><div class='inline'></div></span>
+  
+</li>
+
+      
+        <li class="public ">
+  <span class="summary_signature">
+    
+      <a href="#destroy_instance-instance_method" title="#destroy_instance (instance method)">- (Object) <strong>destroy_instance</strong>(credentials, id) </a>
+    
+
+    
+  </span>
+  
+  
+  
+  
+  
+  
+
+  
+    <span class="summary_desc"><div class='inline'></div></span>
+  
+</li>
+
+      
+        <li class="public ">
+  <span class="summary_signature">
+    
+      <a href="#images-instance_method" title="#images (instance method)">- (Object) <strong>images</strong>(credentials, opts = nil) </a>
+    
+
+    
+  </span>
+  
+  
+  
+  
+  
+  
+
+  
+    <span class="summary_desc"><div class='inline'><p>
+Images.
+</p>
+</div></span>
+  
+</li>
+
+      
+        <li class="public ">
+  <span class="summary_signature">
+    
+      <a href="#initialize-instance_method" title="#initialize (instance method)">- (MockDriver) <strong>initialize</strong> </a>
+    
+
+    
+  </span>
+  
+    <span class="note title constructor">constructor</span>
+  
+  
+  
+  
+  
+  
+
+  
+    <span class="summary_desc"><div class='inline'><p>
+A new instance of MockDriver.
+</p>
+</div></span>
+  
+</li>
+
+      
+        <li class="public ">
+  <span class="summary_signature">
+    
+      <a href="#instances-instance_method" title="#instances (instance method)">- (Object) <strong>instances</strong>(credentials, opts = nil) </a>
+    
+
+    
+  </span>
+  
+  
+  
+  
+  
+  
+
+  
+    <span class="summary_desc"><div class='inline'><p>
+Instances.
+</p>
+</div></span>
+  
+</li>
+
+      
+        <li class="public ">
+  <span class="summary_signature">
+    
+      <a href="#realms-instance_method" title="#realms (instance method)">- (Object) <strong>realms</strong>(credentials, opts = nil) </a>
+    
+
+    
+  </span>
+  
+  
+  
+  
+  
+  
+
+  
+    <span class="summary_desc"><div class='inline'></div></span>
+  
+</li>
+
+      
+        <li class="public ">
+  <span class="summary_signature">
+    
+      <a href="#reboot_instance-instance_method" title="#reboot_instance (instance method)">- (Object) <strong>reboot_instance</strong>(credentials, id) </a>
+    
+
+    
+  </span>
+  
+  
+  
+  
+  
+  
+
+  
+    <span class="summary_desc"><div class='inline'></div></span>
+  
+</li>
+
+      
+        <li class="public ">
+  <span class="summary_signature">
+    
+      <a href="#start_instance-instance_method" title="#start_instance (instance method)">- (Object) <strong>start_instance</strong>(credentials, id) </a>
+    
+
+    
+  </span>
+  
+  
+  
+  
+  
+  
+
+  
+    <span class="summary_desc"><div class='inline'></div></span>
+  
+</li>
+
+      
+        <li class="public ">
+  <span class="summary_signature">
+    
+      <a href="#stop_instance-instance_method" title="#stop_instance (instance method)">- (Object) <strong>stop_instance</strong>(credentials, id) </a>
+    
+
+    
+  </span>
+  
+  
+  
+  
+  
+  
+
+  
+    <span class="summary_desc"><div class='inline'></div></span>
+  
+</li>
+
+      
+        <li class="public ">
+  <span class="summary_signature">
+    
+      <a href="#storage_snapshots-instance_method" title="#storage_snapshots (instance method)">- (Object) <strong>storage_snapshots</strong>(credentials, opts = nil) </a>
+    
+
+    
+  </span>
+  
+  
+  
+  
+  
+  
+
+  
+    <span class="summary_desc"><div class='inline'><p>
+Storage Snapshots.
+</p>
+</div></span>
+  
+</li>
+
+      
+        <li class="public ">
+  <span class="summary_signature">
+    
+      <a href="#storage_volumes-instance_method" title="#storage_volumes (instance method)">- (Object) <strong>storage_volumes</strong>(credentials, opts = nil) </a>
+    
+
+    
+  </span>
+  
+  
+  
+  
+  
+  
+
+  
+    <span class="summary_desc"><div class='inline'><p>
+Storage Volumes.
+</p>
+</div></span>
+  
+</li>
+
+      
+        <li class="public ">
+  <span class="summary_signature">
+    
+      <a href="#update_instance_state-instance_method" title="#update_instance_state (instance method)">- (Object) <strong>update_instance_state</strong>(credentials, id, state) </a>
+    
+
+    
+  </span>
+  
+  
+  
+  
+  
+  
+
+  
+    <span class="summary_desc"><div class='inline'></div></span>
+  
+</li>
+
+      
+        <li class="public ">
+  <span class="summary_signature">
+    
+      <a href="#valid_credentials%3F-instance_method" title="#valid_credentials? (instance method)">- (Boolean) <strong>valid_credentials?</strong>(credentials) </a>
+    
+
+    
+  </span>
+  
+  
+  
+  
+  
+  
+
+  
+    <span class="summary_desc"><div class='inline'></div></span>
+  
+</li>
+
+      
+    </ul>
+  
+
+
+  
+  
+  
+  
+  
+  
+  
+  <h3 class="inherited">Methods inherited from <span class='object_link'><a href="../../BaseDriver.html" title="Deltacloud::BaseDriver (class)">BaseDriver</a></span></h3>
+  <p class="inherited"><span class='object_link'><a href="../../BaseDriver.html#blob-instance_method" title="Deltacloud::BaseDriver#blob (method)">#blob</a></span>, <span class='object_link'><a href="../../BaseDriver.html#blob_data-instance_method" title="Deltacloud::BaseDriver#blob_data (method)">#blob_data</a></span>, <span class='object_link'><a href="../../BaseDriver.html#blobs-instance_method" title="Deltacloud::BaseDriver#blobs (method)">#blobs</a></span>, <span class='object_link'><a href="../../BaseDriver.html#bucket-instance_method" title="Deltacloud::BaseDriver#bucket (method)">#bucket</a></span>, <span class='object_link'><a href="../../BaseDriver.html#buckets-instance_method" title="Deltacloud::BaseDriver#buckets (method)">#buckets</a></span>, <span class='object_link'><a href="../../BaseDriver.html#catched_exceptions_list-instance_method" title="Deltacloud::BaseDriver#catched_exceptions_list (method)">#catched_exceptions_list</a></span>, <span class='object_link
 '><a href="../../BaseDriver.html#create_bucket-instance_method" title="Deltacloud::BaseDriver#create_bucket (method)">#create_bucket</a></span>, <span class='object_link'><a href="../../BaseDriver.html#declare_feature-class_method" title="Deltacloud::BaseDriver.declare_feature (method)">declare_feature</a></span>, <span class='object_link'><a href="../../BaseDriver.html#define_hardware_profile-class_method" title="Deltacloud::BaseDriver.define_hardware_profile (method)">define_hardware_profile</a></span>, <span class='object_link'><a href="../../BaseDriver.html#define_instance_states-class_method" title="Deltacloud::BaseDriver.define_instance_states (method)">define_instance_states</a></span>, <span class='object_link'><a href="../../BaseDriver.html#delete_bucket-instance_method" title="Deltacloud::BaseDriver#delete_bucket (method)">#delete_bucket</a></span>, <span class='object_link'><a href="../../BaseDriver.html#feature-class_method" title="Deltacloud::BaseDriver.feature 
 (method)">feature</a></span>, <span class='object_link'><a href="../../BaseDriver.html#feature_decl_for-class_method" title="Deltacloud::BaseDriver.feature_decl_for (method)">feature_decl_for</a></span>, <span class='object_link'><a href="../../BaseDriver.html#feature_decls-class_method" title="Deltacloud::BaseDriver.feature_decls (method)">feature_decls</a></span>, <span class='object_link'><a href="../../BaseDriver.html#features-instance_method" title="Deltacloud::BaseDriver#features (method)">#features</a></span>, <span class='object_link'><a href="../../BaseDriver.html#features-class_method" title="Deltacloud::BaseDriver.features (method)">features</a></span>, <span class='object_link'><a href="../../BaseDriver.html#filter_hardware_profiles-instance_method" title="Deltacloud::BaseDriver#filter_hardware_profiles (method)">#filter_hardware_profiles</a></span>, <span class='object_link'><a href="../../BaseDriver.html#filter_on-instance_method" title="Deltacloud::BaseDriver#
 filter_on (method)">#filter_on</a></span>, <span class='object_link'><a href="../../BaseDriver.html#find_hardware_profile-instance_method" title="Deltacloud::BaseDriver#find_hardware_profile (method)">#find_hardware_profile</a></span>, <span class='object_link'><a href="../../BaseDriver.html#hardware_profile-instance_method" title="Deltacloud::BaseDriver#hardware_profile (method)">#hardware_profile</a></span>, <span class='object_link'><a href="../../BaseDriver.html#hardware_profiles-class_method" title="Deltacloud::BaseDriver.hardware_profiles (method)">hardware_profiles</a></span>, <span class='object_link'><a href="../../BaseDriver.html#hardware_profiles-instance_method" title="Deltacloud::BaseDriver#hardware_profiles (method)">#hardware_profiles</a></span>, <span class='object_link'><a href="../../BaseDriver.html#has_collection%3F-instance_method" title="Deltacloud::BaseDriver#has_collection? (method)">#has_collection?</a></span>, <span class='object_link'><a href="../..
 /BaseDriver.html#image-instance_method" title="Deltacloud::BaseDriver#image (method)">#image</a></span>, <span class='object_link'><a href="../../BaseDriver.html#instance-instance_method" title="Deltacloud::BaseDriver#instance (method)">#instance</a></span>, <span class='object_link'><a href="../../BaseDriver.html#instance_actions_for-instance_method" title="Deltacloud::BaseDriver#instance_actions_for (method)">#instance_actions_for</a></span>, <span class='object_link'><a href="../../BaseDriver.html#instance_state_machine-class_method" title="Deltacloud::BaseDriver.instance_state_machine (method)">instance_state_machine</a></span>, <span class='object_link'><a href="../../BaseDriver.html#instance_state_machine-instance_method" title="Deltacloud::BaseDriver#instance_state_machine (method)">#instance_state_machine</a></span>, <span class='object_link'><a href="../../BaseDriver.html#realm-instance_method" title="Deltacloud::BaseDriver#realm (method)">#realm</a></span>, <span c
 lass='object_link'><a href="../../BaseDriver.html#safely-instance_method" title="Deltacloud::BaseDriver#safely (method)">#safely</a></span>, <span class='object_link'><a href="../../BaseDriver.html#storage_snapshot-instance_method" title="Deltacloud::BaseDriver#storage_snapshot (method)">#storage_snapshot</a></span>, <span class='object_link'><a href="../../BaseDriver.html#storage_volume-instance_method" title="Deltacloud::BaseDriver#storage_volume (method)">#storage_volume</a></span>, <span class='object_link'><a href="../../BaseDriver.html#supported_collections-instance_method" title="Deltacloud::BaseDriver#supported_collections (method)">#supported_collections</a></span></p>
+<div id="constructor_details" class="method_details_list">
+  <h2>Constructor Details</h2>
+  
+    <div class="method_details first">
+  <p class="signature first" id="initialize-instance_method">
+  
+    - (<tt><span class='object_link'><a href="" title="Deltacloud::Drivers::Mock::MockDriver (class)">MockDriver</a></span></tt>) <strong>initialize</strong> 
+  
+
+  
+</p><div class="docstring">
+  <div class="discussion">
+    <p>
+A new instance of MockDriver
+</p>
+
+
+  </div>
+</div>
+<div class="tags">
+  
+</div><table class="source_code">
+  <tr>
+    <td>
+      <pre class="lines">
+
+
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95</pre>
+    </td>
+    <td>
+      <pre class="code"><span class="info file"># File 'lib/deltacloud/drivers/mock/mock_driver.rb', line 81</span>
+
+<span class='def def kw'>def</span> <span class='initialize identifier id'>initialize</span>
+  <span class='if if kw'>if</span> <span class='ENV constant id'>ENV</span><span class='lbrack token'>[</span><span class='string val'>&quot;DELTACLOUD_MOCK_STORAGE&quot;</span><span class='rbrack token'>]</span>
+    <span class='@storage_root ivar id'>@storage_root</span> <span class='assign token'>=</span> <span class='ENV constant id'>ENV</span><span class='lbrack token'>[</span><span class='string val'>&quot;DELTACLOUD_MOCK_STORAGE&quot;</span><span class='rbrack token'>]</span>
+  <span class='elsif elsif kw'>elsif</span> <span class='ENV constant id'>ENV</span><span class='lbrack token'>[</span><span class='string val'>&quot;USER&quot;</span><span class='rbrack token'>]</span>
+    <span class='@storage_root ivar id'>@storage_root</span> <span class='assign token'>=</span> <span class='File constant id'>File</span><span class='colon2 op'>::</span><span class='join identifier id'>join</span><span class='lparen token'>(</span><span class='string val'>&quot;/var/tmp&quot;</span><span class='comma token'>,</span> <span class='dstring node'>&quot;deltacloud-mock-#{ENV[&quot;USER&quot;]}&quot;</span><span class='rparen token'>)</span>
+  <span class='else else kw'>else</span>
+    <span class='raise identifier id'>raise</span> <span class='string val'>&quot;Please set either the DELTACLOUD_MOCK_STORAGE or USER environment variable&quot;</span>
+  <span class='end end kw'>end</span>
+  <span class='if if kw'>if</span> <span class='notop op'>!</span> <span class='File constant id'>File</span><span class='colon2 op'>::</span><span class='directory? fid id'>directory?</span><span class='lparen token'>(</span><span class='@storage_root ivar id'>@storage_root</span><span class='rparen token'>)</span>
+    <span class='FileUtils constant id'>FileUtils</span><span class='colon2 op'>::</span><span class='rm_rf identifier id'>rm_rf</span><span class='lparen token'>(</span><span class='@storage_root ivar id'>@storage_root</span><span class='rparen token'>)</span>
+    <span class='FileUtils constant id'>FileUtils</span><span class='colon2 op'>::</span><span class='mkdir_p identifier id'>mkdir_p</span><span class='lparen token'>(</span><span class='@storage_root ivar id'>@storage_root</span><span class='rparen token'>)</span>
+    <span class='data identifier id'>data</span> <span class='assign token'>=</span> <span class='Dir constant id'>Dir</span><span class='colon2 op'>::</span><span class='glob identifier id'>glob</span><span class='lparen token'>(</span><span class='File constant id'>File</span><span class='colon2 op'>::</span><span class='join identifier id'>join</span><span class='lparen token'>(</span><span class='File constant id'>File</span><span class='colon2 op'>::</span><span class='dirname identifier id'>dirname</span><span class='lparen token'>(</span><span class='__FILE__ __file__ kw'>__FILE__</span><span class='rparen token'>)</span><span class='comma token'>,</span> <span class='string val'>&quot;data&quot;</span><span class='comma token'>,</span> <span class='string val'>&quot;*&quot;</span><span class='rparen token'>)</span><span class='rparen token'>)</span>
+    <span class='FileUtils constant id'>FileUtils</span><span class='colon2 op'>::</span><span class='cp_r identifier id'>cp_r</span><span class='lparen token'>(</span><span class='data identifier id'>data</span><span class='comma token'>,</span> <span class='@storage_root ivar id'>@storage_root</span><span class='rparen token'>)</span>
+  <span class='end end kw'>end</span>
+<span class='end end kw'>end</span>
+</pre>
+    </td>
+  </tr>
+</table>
+</div>
+  
+</div>
+
+
+  <div id="instance_method_details" class="method_details_list">
+    <h2>Instance Method Details</h2>
+    
+    
+      <div class="method_details first">
+  <p class="signature first" id="create_instance-instance_method">
+  
+    - (<tt>Object</tt>) <strong>create_instance</strong>(credentials, image_id, opts) 
+  
+
+  
+</p><table class="source_code">
+  <tr>
+    <td>
+      <pre class="lines">
+
+
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186</pre>
+    </td>
+    <td>
+      <pre class="code"><span class="info file"># File 'lib/deltacloud/drivers/mock/mock_driver.rb', line 147</span>
+
+<span class='def def kw'>def</span> <span class='create_instance identifier id'>create_instance</span><span class='lparen token'>(</span><span class='credentials identifier id'>credentials</span><span class='comma token'>,</span> <span class='image_id identifier id'>image_id</span><span class='comma token'>,</span> <span class='opts identifier id'>opts</span><span class='rparen token'>)</span>
+  <span class='check_credentials identifier id'>check_credentials</span><span class='lparen token'>(</span> <span class='credentials identifier id'>credentials</span> <span class='rparen token'>)</span>
+  <span class='ids identifier id'>ids</span> <span class='assign token'>=</span> <span class='Dir constant id'>Dir</span><span class='lbrack token'>[</span> <span class='dstring node'>&quot;#{@storage_root}/instances/*.yml&quot;</span> <span class='rbrack token'>]</span><span class='dot token'>.</span><span class='collect identifier id'>collect</span><span class='lbrace token'>{</span><span class='bitor op'>|</span><span class='e identifier id'>e</span><span class='bitor op'>|</span> <span class='File constant id'>File</span><span class='dot token'>.</span><span class='basename identifier id'>basename</span><span class='lparen token'>(</span> <span class='e identifier id'>e</span><span class='comma token'>,</span> <span class='string val'>&quot;.yml&quot;</span> <span class='rparen token'>)</span><span class='rbrace token'>}</span>
+
+  <span class='count identifier id'>count</span> <span class='assign token'>=</span> <span class='integer val'>0</span>
+  <span class='while while kw'>while</span> <span class='true true kw'>true</span>
+    <span class='next_id identifier id'>next_id</span> <span class='assign token'>=</span> <span class='string val'>&quot;inst&quot;</span> <span class='plus op'>+</span> <span class='count identifier id'>count</span><span class='dot token'>.</span><span class='to_s identifier id'>to_s</span>
+    <span class='if if kw'>if</span> <span class='not not kw'>not</span> <span class='ids identifier id'>ids</span><span class='dot token'>.</span><span class='include? fid id'>include?</span><span class='lparen token'>(</span><span class='next_id identifier id'>next_id</span><span class='rparen token'>)</span>
+      <span class='break break kw'>break</span>
+    <span class='end end kw'>end</span>
+    <span class='count identifier id'>count</span> <span class='assign token'>=</span> <span class='count identifier id'>count</span> <span class='plus op'>+</span> <span class='integer val'>1</span>
+  <span class='end end kw'>end</span>
+
+  <span class='realm_id identifier id'>realm_id</span> <span class='assign token'>=</span> <span class='opts identifier id'>opts</span><span class='lbrack token'>[</span><span class='symbol val'>:realm_id</span><span class='rbrack token'>]</span>
+  <span class='if if kw'>if</span> <span class='lparen token'>(</span> <span class='realm_id identifier id'>realm_id</span><span class='dot token'>.</span><span class='nil? fid id'>nil?</span> <span class='rparen token'>)</span>
+    <span class='realm identifier id'>realm</span> <span class='assign token'>=</span> <span class='realms identifier id'>realms</span><span class='lparen token'>(</span><span class='credentials identifier id'>credentials</span><span class='rparen token'>)</span><span class='dot token'>.</span><span class='first identifier id'>first</span>
+    <span class='lparen token'>(</span> <span class='realm_id identifier id'>realm_id</span> <span class='assign token'>=</span> <span class='realm identifier id'>realm</span><span class='dot token'>.</span><span class='id identifier id'>id</span> <span class='rparen token'>)</span> <span class='if if_mod kw'>if</span> <span class='realm identifier id'>realm</span>
+  <span class='end end kw'>end</span>
+
+  <span class='hwp identifier id'>hwp</span> <span class='assign token'>=</span> <span class='find_hardware_profile identifier id'>find_hardware_profile</span><span class='lparen token'>(</span><span class='credentials identifier id'>credentials</span><span class='comma token'>,</span> <span class='opts identifier id'>opts</span><span class='lbrack token'>[</span><span class='symbol val'>:hwp_id</span><span class='rbrack token'>]</span><span class='comma token'>,</span> <span class='image_id identifier id'>image_id</span><span class='rparen token'>)</span>
+
+  <span class='name identifier id'>name</span> <span class='assign token'>=</span> <span class='opts identifier id'>opts</span><span class='lbrack token'>[</span><span class='symbol val'>:name</span><span class='rbrack token'>]</span> <span class='orop op'>||</span> <span class='dstring node'>&quot;i-#{Time.now.to_i}&quot;</span>
+
+  <span class='instance identifier id'>instance</span> <span class='assign token'>=</span> <span class='lbrace token'>{</span>
+    <span class='symbol val'>:name=</span><span class='gt op'>&gt;</span><span class='name identifier id'>name</span><span class='comma token'>,</span>
+    <span class='symbol val'>:state=</span><span class='gt op'>&gt;</span><span class='string val'>'RUNNING'</span><span class='comma token'>,</span>
+    <span class='symbol val'>:image_id=</span><span class='gt op'>&gt;</span><span class='image_id identifier id'>image_id</span><span class='comma token'>,</span>
+    <span class='symbol val'>:owner_id=</span><span class='gt op'>&gt;</span><span class='credentials identifier id'>credentials</span><span class='dot token'>.</span><span class='user identifier id'>user</span><span class='comma token'>,</span>
+    <span class='symbol val'>:public_addresses=</span><span class='gt op'>&gt;</span><span class='lbrack token'>[</span><span class='dstring node'>&quot;#{image_id}.#{next_id}.public.com&quot;</span><span class='rbrack token'>]</span><span class='comma token'>,</span>
+    <span class='symbol val'>:private_addresses=</span><span class='gt op'>&gt;</span><span class='lbrack token'>[</span><span class='dstring node'>&quot;#{image_id}.#{next_id}.private.com&quot;</span><span class='rbrack token'>]</span><span class='comma token'>,</span>
+    <span class='symbol val'>:instance_profile</span> <span class='assign token'>=</span><span class='gt op'>&gt;</span> <span class='InstanceProfile constant id'>InstanceProfile</span><span class='dot token'>.</span><span class='new identifier id'>new</span><span class='lparen token'>(</span><span class='hwp identifier id'>hwp</span><span class='dot token'>.</span><span class='name identifier id'>name</span><span class='comma token'>,</span> <span class='opts identifier id'>opts</span><span class='rparen token'>)</span><span class='comma token'>,</span>
+    <span class='symbol val'>:realm_id=</span><span class='gt op'>&gt;</span><span class='realm_id identifier id'>realm_id</span><span class='comma token'>,</span>
+    <span class='symbol val'>:actions=</span><span class='gt op'>&gt;</span><span class='instance_actions_for identifier id'>instance_actions_for</span><span class='lparen token'>(</span> <span class='string val'>'RUNNING'</span> <span class='rparen token'>)</span>
+  <span class='rbrace token'>}</span>
+  <span class='File constant id'>File</span><span class='dot token'>.</span><span class='open identifier id'>open</span><span class='lparen token'>(</span> <span class='dstring node'>&quot;#{@storage_root}/instances/#{next_id}.yml&quot;</span><span class='comma token'>,</span> <span class='string val'>'w'</span> <span class='rparen token'>)</span> <span class='lbrace token'>{</span><span class='bitor op'>|</span><span class='f identifier id'>f</span><span class='bitor op'>|</span>
+    <span class='YAML constant id'>YAML</span><span class='dot token'>.</span><span class='dump identifier id'>dump</span><span class='lparen token'>(</span> <span class='instance identifier id'>instance</span><span class='comma token'>,</span> <span class='f identifier id'>f</span> <span class='rparen token'>)</span>
+  <span class='rbrace token'>}</span>
+  <span class='instance identifier id'>instance</span><span class='lbrack token'>[</span><span class='symbol val'>:id</span><span class='rbrack token'>]</span> <span class='assign token'>=</span> <span class='next_id identifier id'>next_id</span>
+  <span class='Instance constant id'>Instance</span><span class='dot token'>.</span><span class='new identifier id'>new</span><span class='lparen token'>(</span> <span class='instance identifier id'>instance</span> <span class='rparen token'>)</span>
+<span class='end end kw'>end</span>
+</pre>
+    </td>
+  </tr>
+</table>
+</div>
+    
+      <div class="method_details ">
+  <p class="signature " id="destroy_instance-instance_method">
+  
+    - (<tt>Object</tt>) <strong>destroy_instance</strong>(credentials, id) 
+  
+
+  
+</p><table class="source_code">
+  <tr>
+    <td>
+      <pre class="lines">
+
+
+213
+214
+215
+216</pre>
+    </td>
+    <td>
+      <pre class="code"><span class="info file"># File 'lib/deltacloud/drivers/mock/mock_driver.rb', line 213</span>
+
+<span class='def def kw'>def</span> <span class='destroy_instance identifier id'>destroy_instance</span><span class='lparen token'>(</span><span class='credentials identifier id'>credentials</span><span class='comma token'>,</span> <span class='id identifier id'>id</span><span class='rparen token'>)</span>
+  <span class='check_credentials identifier id'>check_credentials</span><span class='lparen token'>(</span> <span class='credentials identifier id'>credentials</span> <span class='rparen token'>)</span>
+  <span class='FileUtils constant id'>FileUtils</span><span class='dot token'>.</span><span class='rm identifier id'>rm</span><span class='lparen token'>(</span> <span class='dstring node'>&quot;#{@storage_root}/instances/#{id}.yml&quot;</span> <span class='rparen token'>)</span>
+<span class='end end kw'>end</span>
+</pre>
+    </td>
+  </tr>
+</table>
+</div>
+    
+      <div class="method_details ">
+  <p class="signature " id="images-instance_method">
+  
+    - (<tt>Object</tt>) <strong>images</strong>(credentials, opts = nil) 
+  
+
+  
+</p><div class="docstring">
+  <div class="discussion">
+    <p>
+Images
+</p>
+
+
+  </div>
+</div>
+<div class="tags">
+  
+</div><table class="source_code">
+  <tr>
+    <td>
+      <pre class="lines">
+
+
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125</pre>
+    </td>
+    <td>
+      <pre class="code"><span class="info file"># File 'lib/deltacloud/drivers/mock/mock_driver.rb', line 108</span>
+
+<span class='def def kw'>def</span> <span class='images identifier id'>images</span><span class='lparen token'>(</span><span class='credentials identifier id'>credentials</span><span class='comma token'>,</span> <span class='opts identifier id'>opts</span><span class='assign token'>=</span><span class='nil nil kw'>nil</span> <span class='rparen token'>)</span>
+  <span class='check_credentials identifier id'>check_credentials</span><span class='lparen token'>(</span> <span class='credentials identifier id'>credentials</span> <span class='rparen token'>)</span>
+  <span class='images identifier id'>images</span> <span class='assign token'>=</span> <span class='lbrack token'>[</span><span class='rbrack token'>]</span>
+  <span class='Dir constant id'>Dir</span><span class='lbrack token'>[</span> <span class='dstring node'>&quot;#{@storage_root}/images/*.yml&quot;</span> <span class='rbrack token'>]</span><span class='dot token'>.</span><span class='each identifier id'>each</span> <span class='do do kw'>do</span> <span class='bitor op'>|</span><span class='image_file identifier id'>image_file</span><span class='bitor op'>|</span>
+    <span class='image identifier id'>image</span> <span class='assign token'>=</span> <span class='YAML constant id'>YAML</span><span class='dot token'>.</span><span class='load identifier id'>load</span><span class='lparen token'>(</span> <span class='File constant id'>File</span><span class='dot token'>.</span><span class='read identifier id'>read</span><span class='lparen token'>(</span> <span class='image_file identifier id'>image_file</span> <span class='rparen token'>)</span> <span class='rparen token'>)</span>
+    <span class='image identifier id'>image</span><span class='lbrack token'>[</span><span class='symbol val'>:id</span><span class='rbrack token'>]</span> <span class='assign token'>=</span> <span class='File constant id'>File</span><span class='dot token'>.</span><span class='basename identifier id'>basename</span><span class='lparen token'>(</span> <span class='image_file identifier id'>image_file</span><span class='comma token'>,</span> <span class='string val'>&quot;.yml&quot;</span> <span class='rparen token'>)</span>
+    <span class='image identifier id'>image</span><span class='lbrack token'>[</span><span class='symbol val'>:name</span><span class='rbrack token'>]</span> <span class='assign token'>=</span> <span class='image identifier id'>image</span><span class='lbrack token'>[</span><span class='symbol val'>:description</span><span class='rbrack token'>]</span>
+    <span class='images identifier id'>images</span> <span class='lshft op'>&lt;&lt;</span> <span class='Image constant id'>Image</span><span class='dot token'>.</span><span class='new identifier id'>new</span><span class='lparen token'>(</span> <span class='image identifier id'>image</span> <span class='rparen token'>)</span>
+  <span class='end end kw'>end</span>
+  <span class='images identifier id'>images</span> <span class='assign token'>=</span> <span class='filter_on identifier id'>filter_on</span><span class='lparen token'>(</span> <span class='images identifier id'>images</span><span class='comma token'>,</span> <span class='symbol val'>:id</span><span class='comma token'>,</span> <span class='opts identifier id'>opts</span> <span class='rparen token'>)</span>
+  <span class='images identifier id'>images</span> <span class='assign token'>=</span> <span class='filter_on identifier id'>filter_on</span><span class='lparen token'>(</span> <span class='images identifier id'>images</span><span class='comma token'>,</span> <span class='symbol val'>:architecture</span><span class='comma token'>,</span> <span class='opts identifier id'>opts</span> <span class='rparen token'>)</span>
+  <span class='if if kw'>if</span> <span class='lparen token'>(</span> <span class='opts identifier id'>opts</span> <span class='andop op'>&amp;&amp;</span> <span class='opts identifier id'>opts</span><span class='lbrack token'>[</span><span class='symbol val'>:owner_id</span><span class='rbrack token'>]</span> <span class='eq op'>==</span> <span class='string val'>'self'</span> <span class='rparen token'>)</span>
+    <span class='images identifier id'>images</span> <span class='assign token'>=</span> <span class='images identifier id'>images</span><span class='dot token'>.</span><span class='select identifier id'>select</span><span class='lbrace token'>{</span><span class='bitor op'>|</span><span class='e identifier id'>e</span><span class='bitor op'>|</span> <span class='e identifier id'>e</span><span class='dot token'>.</span><span class='owner_id identifier id'>owner_id</span> <span class='eq op'>==</span> <span class='credentials identifier id'>credentials</span><span class='dot token'>.</span><span class='user identifier id'>user</span> <span class='rbrace token'>}</span>
+  <span class='else else kw'>else</span>
+    <span class='images identifier id'>images</span> <span class='assign token'>=</span> <span class='filter_on identifier id'>filter_on</span><span class='lparen token'>(</span> <span class='images identifier id'>images</span><span class='comma token'>,</span> <span class='symbol val'>:owner_id</span><span class='comma token'>,</span> <span class='opts identifier id'>opts</span> <span class='rparen token'>)</span>
+  <span class='end end kw'>end</span>
+  <span class='images identifier id'>images</span><span class='dot token'>.</span><span class='sort_by identifier id'>sort_by</span><span class='lbrace token'>{</span><span class='bitor op'>|</span><span class='e identifier id'>e</span><span class='bitor op'>|</span> <span class='lbrack token'>[</span><span class='e identifier id'>e</span><span class='dot token'>.</span><span class='owner_id identifier id'>owner_id</span><span class='comma token'>,</span><span class='e identifier id'>e</span><span class='dot token'>.</span><span class='description identifier id'>description</span><span class='rbrack token'>]</span><span class='rbrace token'>}</span>
+<span class='end end kw'>end</span>
+</pre>
+    </td>
+  </tr>
+</table>
+</div>
+    
+      <div class="method_details ">
+  <p class="signature " id="instances-instance_method">
+  
+    - (<tt>Object</tt>) <strong>instances</strong>(credentials, opts = nil) 
+  
+
+  
+</p><div class="docstring">
+  <div class="discussion">
+    <p>
+Instances
+</p>
+
+
+  </div>
+</div>
+<div class="tags">
+  
+</div><table class="source_code">
+  <tr>
+    <td>
+      <pre class="lines">
+
+
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145</pre>
+    </td>
+    <td>
+      <pre class="code"><span class="info file"># File 'lib/deltacloud/drivers/mock/mock_driver.rb', line 131</span>
+
+<span class='def def kw'>def</span> <span class='instances identifier id'>instances</span><span class='lparen token'>(</span><span class='credentials identifier id'>credentials</span><span class='comma token'>,</span> <span class='opts identifier id'>opts</span><span class='assign token'>=</span><span class='nil nil kw'>nil</span><span class='rparen token'>)</span>
+  <span class='check_credentials identifier id'>check_credentials</span><span class='lparen token'>(</span> <span class='credentials identifier id'>credentials</span> <span class='rparen token'>)</span>
+  <span class='instances identifier id'>instances</span> <span class='assign token'>=</span> <span class='lbrack token'>[</span><span class='rbrack token'>]</span>
+  <span class='Dir constant id'>Dir</span><span class='lbrack token'>[</span> <span class='dstring node'>&quot;#{@storage_root}/instances/*.yml&quot;</span> <span class='rbrack token'>]</span><span class='dot token'>.</span><span class='each identifier id'>each</span> <span class='do do kw'>do</span> <span class='bitor op'>|</span><span class='instance_file identifier id'>instance_file</span><span class='bitor op'>|</span>
+    <span class='instance identifier id'>instance</span> <span class='assign token'>=</span> <span class='YAML constant id'>YAML</span><span class='dot token'>.</span><span class='load identifier id'>load</span><span class='lparen token'>(</span> <span class='File constant id'>File</span><span class='dot token'>.</span><span class='read identifier id'>read</span><span class='lparen token'>(</span> <span class='instance_file identifier id'>instance_file</span> <span class='rparen token'>)</span> <span class='rparen token'>)</span>
+    <span class='if if kw'>if</span> <span class='lparen token'>(</span> <span class='instance identifier id'>instance</span><span class='lbrack token'>[</span><span class='symbol val'>:owner_id</span><span class='rbrack token'>]</span> <span class='eq op'>==</span> <span class='credentials identifier id'>credentials</span><span class='dot token'>.</span><span class='user identifier id'>user</span> <span class='rparen token'>)</span>
+      <span class='instance identifier id'>instance</span><span class='lbrack token'>[</span><span class='symbol val'>:id</span><span class='rbrack token'>]</span> <span class='assign token'>=</span> <span class='File constant id'>File</span><span class='dot token'>.</span><span class='basename identifier id'>basename</span><span class='lparen token'>(</span> <span class='instance_file identifier id'>instance_file</span><span class='comma token'>,</span> <span class='string val'>&quot;.yml&quot;</span> <span class='rparen token'>)</span>
+      <span class='instance identifier id'>instance</span><span class='lbrack token'>[</span><span class='symbol val'>:actions</span><span class='rbrack token'>]</span> <span class='assign token'>=</span> <span class='instance_actions_for identifier id'>instance_actions_for</span><span class='lparen token'>(</span> <span class='instance identifier id'>instance</span><span class='lbrack token'>[</span><span class='symbol val'>:state</span><span class='rbrack token'>]</span> <span class='rparen token'>)</span>
+      <span class='instances identifier id'>instances</span> <span class='lshft op'>&lt;&lt;</span> <span class='Instance constant id'>Instance</span><span class='dot token'>.</span><span class='new identifier id'>new</span><span class='lparen token'>(</span> <span class='instance identifier id'>instance</span> <span class='rparen token'>)</span>
+    <span class='end end kw'>end</span>
+  <span class='end end kw'>end</span>
+  <span class='instances identifier id'>instances</span> <span class='assign token'>=</span> <span class='filter_on identifier id'>filter_on</span><span class='lparen token'>(</span> <span class='instances identifier id'>instances</span><span class='comma token'>,</span> <span class='symbol val'>:id</span><span class='comma token'>,</span> <span class='opts identifier id'>opts</span> <span class='rparen token'>)</span>
+  <span class='instances identifier id'>instances</span> <span class='assign token'>=</span> <span class='filter_on identifier id'>filter_on</span><span class='lparen token'>(</span> <span class='instances identifier id'>instances</span><span class='comma token'>,</span> <span class='symbol val'>:state</span><span class='comma token'>,</span> <span class='opts identifier id'>opts</span> <span class='rparen token'>)</span>
+  <span class='instances identifier id'>instances</span>
+<span class='end end kw'>end</span>
+</pre>
+    </td>
+  </tr>
+</table>
+</div>
+    
+      <div class="method_details ">
+  <p class="signature " id="realms-instance_method">
+  
+    - (<tt>Object</tt>) <strong>realms</strong>(credentials, opts = nil) 
+  
+
+  
+</p><table class="source_code">
+  <tr>
+    <td>
+      <pre class="lines">
+
+
+97
+98
+99
+100
+101
+102</pre>
+    </td>
+    <td>
+      <pre class="code"><span class="info file"># File 'lib/deltacloud/drivers/mock/mock_driver.rb', line 97</span>
+
+<span class='def def kw'>def</span> <span class='realms identifier id'>realms</span><span class='lparen token'>(</span><span class='credentials identifier id'>credentials</span><span class='comma token'>,</span> <span class='opts identifier id'>opts</span><span class='assign token'>=</span><span class='nil nil kw'>nil</span><span class='rparen token'>)</span>
+  <span class='return return kw'>return</span> <span class='REALMS constant id'>REALMS</span> <span class='if if_mod kw'>if</span> <span class='lparen token'>(</span> <span class='opts identifier id'>opts</span><span class='dot token'>.</span><span class='nil? fid id'>nil?</span> <span class='rparen token'>)</span>
+  <span class='results identifier id'>results</span> <span class='assign token'>=</span> <span class='REALMS constant id'>REALMS</span>
+  <span class='results identifier id'>results</span> <span class='assign token'>=</span> <span class='filter_on identifier id'>filter_on</span><span class='lparen token'>(</span> <span class='results identifier id'>results</span><span class='comma token'>,</span> <span class='symbol val'>:id</span><span class='comma token'>,</span> <span class='opts identifier id'>opts</span> <span class='rparen token'>)</span>
+  <span class='results identifier id'>results</span>
+<span class='end end kw'>end</span>
+</pre>
+    </td>
+  </tr>
+</table>
+</div>
+    
+      <div class="method_details ">
+  <p class="signature " id="reboot_instance-instance_method">
+  
+    - (<tt>Object</tt>) <strong>reboot_instance</strong>(credentials, id) 
+  
+
+  
+</p><table class="source_code">
+  <tr>
+    <td>
+      <pre class="lines">
+
+
+204
+205
+206</pre>
+    </td>
+    <td>
+      <pre class="code"><span class="info file"># File 'lib/deltacloud/drivers/mock/mock_driver.rb', line 204</span>
+
+<span class='def def kw'>def</span> <span class='reboot_instance identifier id'>reboot_instance</span><span class='lparen token'>(</span><span class='credentials identifier id'>credentials</span><span class='comma token'>,</span> <span class='id identifier id'>id</span><span class='rparen token'>)</span>
+  <span class='update_instance_state identifier id'>update_instance_state</span><span class='lparen token'>(</span><span class='credentials identifier id'>credentials</span><span class='comma token'>,</span> <span class='id identifier id'>id</span><span class='comma token'>,</span> <span class='string val'>'RUNNING'</span><span class='rparen token'>)</span>
+<span class='end end kw'>end</span>
+</pre>
+    </td>
+  </tr>
+</table>
+</div>
+    
+      <div class="method_details ">
+  <p class="signature " id="start_instance-instance_method">
+  
+    - (<tt>Object</tt>) <strong>start_instance</strong>(credentials, id) 
+  
+
+  
+</p><table class="source_code">
+  <tr>
+    <td>
+      <pre class="lines">
+
+
+200
+201
+202</pre>
+    </td>
+    <td>
+      <pre class="code"><span class="info file"># File 'lib/deltacloud/drivers/mock/mock_driver.rb', line 200</span>
+
+<span class='def def kw'>def</span> <span class='start_instance identifier id'>start_instance</span><span class='lparen token'>(</span><span class='credentials identifier id'>credentials</span><span class='comma token'>,</span> <span class='id identifier id'>id</span><span class='rparen token'>)</span>
+  <span class='update_instance_state identifier id'>update_instance_state</span><span class='lparen token'>(</span><span class='credentials identifier id'>credentials</span><span class='comma token'>,</span> <span class='id identifier id'>id</span><span class='comma token'>,</span> <span class='string val'>'RUNNING'</span><span class='rparen token'>)</span>
+<span class='end end kw'>end</span>
+</pre>
+    </td>
+  </tr>
+</table>
+</div>
+    
+      <div class="method_details ">
+  <p class="signature " id="stop_instance-instance_method">
+  
+    - (<tt>Object</tt>) <strong>stop_instance</strong>(credentials, id) 
+  
+
+  
+</p><table class="source_code">
+  <tr>
+    <td>
+      <pre class="lines">
+
+
+208
+209
+210</pre>
+    </td>
+    <td>
+      <pre class="code"><span class="info file"># File 'lib/deltacloud/drivers/mock/mock_driver.rb', line 208</span>
+
+<span class='def def kw'>def</span> <span class='stop_instance identifier id'>stop_instance</span><span class='lparen token'>(</span><span class='credentials identifier id'>credentials</span><span class='comma token'>,</span> <span class='id identifier id'>id</span><span class='rparen token'>)</span>
+  <span class='update_instance_state identifier id'>update_instance_state</span><span class='lparen token'>(</span><span class='credentials identifier id'>credentials</span><span class='comma token'>,</span> <span class='id identifier id'>id</span><span class='comma token'>,</span> <span class='string val'>'STOPPED'</span><span class='rparen token'>)</span>
+<span class='end end kw'>end</span>
+</pre>
+    </td>
+  </tr>
+</table>
+</div>
+    
+      <div class="method_details ">
+  <p class="signature " id="storage_snapshots-instance_method">
+  
+    - (<tt>Object</tt>) <strong>storage_snapshots</strong>(credentials, opts = nil) 
+  
+
+  
+</p><div class="docstring">
+  <div class="discussion">
+    <p>
+Storage Snapshots
+</p>
+
+
+  </div>
+</div>
+<div class="tags">
+  
+</div><table class="source_code">
+  <tr>
+    <td>
+      <pre class="lines">
+
+
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252</pre>
+    </td>
+    <td>
+      <pre class="code"><span class="info file"># File 'lib/deltacloud/drivers/mock/mock_driver.rb', line 240</span>
+
+<span class='def def kw'>def</span> <span class='storage_snapshots identifier id'>storage_snapshots</span><span class='lparen token'>(</span><span class='credentials identifier id'>credentials</span><span class='comma token'>,</span> <span class='opts identifier id'>opts</span><span class='assign token'>=</span><span class='nil nil kw'>nil</span><span class='rparen token'>)</span>
+  <span class='check_credentials identifier id'>check_credentials</span><span class='lparen token'>(</span> <span class='credentials identifier id'>credentials</span> <span class='rparen token'>)</span>
+  <span class='snapshots identifier id'>snapshots</span> <span class='assign token'>=</span> <span class='lbrack token'>[</span><span class='rbrack token'>]</span>
+  <span class='Dir constant id'>Dir</span><span class='lbrack token'>[</span> <span class='dstring node'>&quot;#{@storage_root}/storage_snapshots/*.yml&quot;</span> <span class='rbrack token'>]</span><span class='dot token'>.</span><span class='each identifier id'>each</span> <span class='do do kw'>do</span> <span class='bitor op'>|</span><span class='storage_snapshot_file identifier id'>storage_snapshot_file</span><span class='bitor op'>|</span>
+    <span class='storage_snapshot identifier id'>storage_snapshot</span> <span class='assign token'>=</span> <span class='YAML constant id'>YAML</span><span class='dot token'>.</span><span class='load identifier id'>load</span><span class='lparen token'>(</span> <span class='File constant id'>File</span><span class='dot token'>.</span><span class='read identifier id'>read</span><span class='lparen token'>(</span> <span class='storage_snapshot_file identifier id'>storage_snapshot_file</span> <span class='rparen token'>)</span> <span class='rparen token'>)</span>
+    <span class='if if kw'>if</span> <span class='lparen token'>(</span> <span class='storage_snapshot identifier id'>storage_snapshot</span><span class='lbrack token'>[</span><span class='symbol val'>:owner_id</span><span class='rbrack token'>]</span> <span class='eq op'>==</span> <span class='credentials identifier id'>credentials</span><span class='dot token'>.</span><span class='user identifier id'>user</span> <span class='rparen token'>)</span>
+      <span class='storage_snapshot identifier id'>storage_snapshot</span><span class='lbrack token'>[</span><span class='symbol val'>:id</span><span class='rbrack token'>]</span> <span class='assign token'>=</span> <span class='File constant id'>File</span><span class='dot token'>.</span><span class='basename identifier id'>basename</span><span class='lparen token'>(</span> <span class='storage_snapshot_file identifier id'>storage_snapshot_file</span><span class='comma token'>,</span> <span class='string val'>&quot;.yml&quot;</span> <span class='rparen token'>)</span>
+      <span class='snapshots identifier id'>snapshots</span> <span class='lshft op'>&lt;&lt;</span> <span class='StorageSnapshot constant id'>StorageSnapshot</span><span class='dot token'>.</span><span class='new identifier id'>new</span><span class='lparen token'>(</span> <span class='storage_snapshot identifier id'>storage_snapshot</span> <span class='rparen token'>)</span>
+    <span class='end end kw'>end</span>
+  <span class='end end kw'>end</span>
+  <span class='snapshots identifier id'>snapshots</span> <span class='assign token'>=</span> <span class='filter_on identifier id'>filter_on</span><span class='lparen token'>(</span> <span class='snapshots identifier id'>snapshots</span><span class='comma token'>,</span> <span class='symbol val'>:id</span><span class='comma token'>,</span> <span class='opts identifier id'>opts</span> <span class='rparen token'>)</span>
+  <span class='snapshots identifier id'>snapshots</span>
+<span class='end end kw'>end</span>
+</pre>
+    </td>
+  </tr>
+</table>
+</div>
+    
+      <div class="method_details ">
+  <p class="signature " id="storage_volumes-instance_method">
+  
+    - (<tt>Object</tt>) <strong>storage_volumes</strong>(credentials, opts = nil) 
+  
+
+  
+</p><div class="docstring">
+  <div class="discussion">
+    <p>
+Storage Volumes
+</p>
+
+
+  </div>
+</div>
+<div class="tags">
+  
+</div><table class="source_code">
+  <tr>
+    <td>
+      <pre class="lines">
+
+
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234</pre>
+    </td>
+    <td>
+      <pre class="code"><span class="info file"># File 'lib/deltacloud/drivers/mock/mock_driver.rb', line 222</span>
+
+<span class='def def kw'>def</span> <span class='storage_volumes identifier id'>storage_volumes</span><span class='lparen token'>(</span><span class='credentials identifier id'>credentials</span><span class='comma token'>,</span> <span class='opts identifier id'>opts</span><span class='assign token'>=</span><span class='nil nil kw'>nil</span><span class='rparen token'>)</span>
+  <span class='check_credentials identifier id'>check_credentials</span><span class='lparen token'>(</span> <span class='credentials identifier id'>credentials</span> <span class='rparen token'>)</span>
+  <span class='volumes identifier id'>volumes</span> <span class='assign token'>=</span> <span class='lbrack token'>[</span><span class='rbrack token'>]</span>
+  <span class='Dir constant id'>Dir</span><span class='lbrack token'>[</span> <span class='dstring node'>&quot;#{@storage_root}/storage_volumes/*.yml&quot;</span> <span class='rbrack token'>]</span><span class='dot token'>.</span><span class='each identifier id'>each</span> <span class='do do kw'>do</span> <span class='bitor op'>|</span><span class='storage_volume_file identifier id'>storage_volume_file</span><span class='bitor op'>|</span>
+    <span class='storage_volume identifier id'>storage_volume</span> <span class='assign token'>=</span> <span class='YAML constant id'>YAML</span><span class='dot token'>.</span><span class='load identifier id'>load</span><span class='lparen token'>(</span> <span class='File constant id'>File</span><span class='dot token'>.</span><span class='read identifier id'>read</span><span class='lparen token'>(</span> <span class='storage_volume_file identifier id'>storage_volume_file</span> <span class='rparen token'>)</span> <span class='rparen token'>)</span>
+    <span class='if if kw'>if</span> <span class='lparen token'>(</span> <span class='storage_volume identifier id'>storage_volume</span><span class='lbrack token'>[</span><span class='symbol val'>:owner_id</span><span class='rbrack token'>]</span> <span class='eq op'>==</span> <span class='credentials identifier id'>credentials</span><span class='dot token'>.</span><span class='user identifier id'>user</span> <span class='rparen token'>)</span>
+      <span class='storage_volume identifier id'>storage_volume</span><span class='lbrack token'>[</span><span class='symbol val'>:id</span><span class='rbrack token'>]</span> <span class='assign token'>=</span> <span class='File constant id'>File</span><span class='dot token'>.</span><span class='basename identifier id'>basename</span><span class='lparen token'>(</span> <span class='storage_volume_file identifier id'>storage_volume_file</span><span class='comma token'>,</span> <span class='string val'>&quot;.yml&quot;</span> <span class='rparen token'>)</span>
+      <span class='volumes identifier id'>volumes</span> <span class='lshft op'>&lt;&lt;</span> <span class='StorageVolume constant id'>StorageVolume</span><span class='dot token'>.</span><span class='new identifier id'>new</span><span class='lparen token'>(</span> <span class='storage_volume identifier id'>storage_volume</span> <span class='rparen token'>)</span>
+    <span class='end end kw'>end</span>
+  <span class='end end kw'>end</span>
+  <span class='volumes identifier id'>volumes</span> <span class='assign token'>=</span> <span class='filter_on identifier id'>filter_on</span><span class='lparen token'>(</span> <span class='volumes identifier id'>volumes</span><span class='comma token'>,</span> <span class='symbol val'>:id</span><span class='comma token'>,</span> <span class='opts identifier id'>opts</span> <span class='rparen token'>)</span>
+  <span class='volumes identifier id'>volumes</span>
+<span class='end end kw'>end</span>
+</pre>
+    </td>
+  </tr>
+</table>
+</div>
+    
+      <div class="method_details ">
+  <p class="signature " id="update_instance_state-instance_method">
+  
+    - (<tt>Object</tt>) <strong>update_instance_state</strong>(credentials, id, state) 
+  
+
+  
+</p><table class="source_code">
+  <tr>
+    <td>
+      <pre class="lines">
+
+
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198</pre>
+    </td>
+    <td>
+      <pre class="code"><span class="info file"># File 'lib/deltacloud/drivers/mock/mock_driver.rb', line 188</span>
+
+<span class='def def kw'>def</span> <span class='update_instance_state identifier id'>update_instance_state</span><span class='lparen token'>(</span><span class='credentials identifier id'>credentials</span><span class='comma token'>,</span> <span class='id identifier id'>id</span><span class='comma token'>,</span> <span class='state identifier id'>state</span><span class='rparen token'>)</span>
+  <span class='instance_file identifier id'>instance_file</span> <span class='assign token'>=</span> <span class='dstring node'>&quot;#{@storage_root}/instances/#{id}.yml&quot;</span>
+  <span class='instance_yml identifier id'>instance_yml</span>  <span class='assign token'>=</span> <span class='YAML constant id'>YAML</span><span class='dot token'>.</span><span class='load identifier id'>load</span><span class='lparen token'>(</span> <span class='File constant id'>File</span><span class='dot token'>.</span><span class='read identifier id'>read</span><span class='lparen token'>(</span> <span class='instance_file identifier id'>instance_file</span> <span class='rparen token'>)</span> <span class='rparen token'>)</span>
+  <span class='instance_yml identifier id'>instance_yml</span><span class='lbrack token'>[</span><span class='symbol val'>:id</span><span class='rbrack token'>]</span> <span class='assign token'>=</span> <span class='id identifier id'>id</span>
+  <span class='instance_yml identifier id'>instance_yml</span><span class='lbrack token'>[</span><span class='symbol val'>:state</span><span class='rbrack token'>]</span> <span class='assign token'>=</span> <span class='state identifier id'>state</span>
+  <span class='instance_yml identifier id'>instance_yml</span><span class='lbrack token'>[</span><span class='symbol val'>:actions</span><span class='rbrack token'>]</span> <span class='assign token'>=</span> <span class='instance_actions_for identifier id'>instance_actions_for</span><span class='lparen token'>(</span> <span class='instance_yml identifier id'>instance_yml</span><span class='lbrack token'>[</span><span class='symbol val'>:state</span><span class='rbrack token'>]</span> <span class='rparen token'>)</span>
+  <span class='File constant id'>File</span><span class='dot token'>.</span><span class='open identifier id'>open</span><span class='lparen token'>(</span> <span class='instance_file identifier id'>instance_file</span><span class='comma token'>,</span> <span class='string val'>'w'</span> <span class='rparen token'>)</span> <span class='do do kw'>do</span> <span class='bitor op'>|</span><span class='f identifier id'>f</span><span class='bitor op'>|</span>
+    <span class='f identifier id'>f</span> <span class='lshft op'>&lt;&lt;</span> <span class='YAML constant id'>YAML</span><span class='dot token'>.</span><span class='dump identifier id'>dump</span><span class='lparen token'>(</span> <span class='instance_yml identifier id'>instance_yml</span> <span class='rparen token'>)</span>
+  <span class='end end kw'>end</span>
+  <span class='Instance constant id'>Instance</span><span class='dot token'>.</span><span class='new identifier id'>new</span><span class='lparen token'>(</span> <span class='instance_yml identifier id'>instance_yml</span> <span class='rparen token'>)</span>
+<span class='end end kw'>end</span>
+</pre>
+    </td>
+  </tr>
+</table>
+</div>
+    
+      <div class="method_details ">
+  <p class="signature " id="valid_credentials?-instance_method">
+  
+    - (<tt>Boolean</tt>) <strong>valid_credentials?</strong>(credentials) 
+  
+
+  
+</p><div class="docstring">
+  <div class="discussion">
+    
+
+  </div>
+</div>
+<div class="tags">
+  <h3>Returns:</h3>
+<ul class="return">
+  
+    <li>
+      
+        <span class='type'>(<tt>Boolean</tt>)</span>
+      
+      
+      
+      
+    </li>
+  
+</ul>
+
+</div><table class="source_code">
+  <tr>
+    <td>
+      <pre class="lines">
+
+
+254
+255
+256
+257
+258
+259
+260
+261</pre>
+    </td>
+    <td>
+      <pre class="code"><span class="info file"># File 'lib/deltacloud/drivers/mock/mock_driver.rb', line 254</span>
+
+<span class='def def kw'>def</span> <span class='valid_credentials? fid id'>valid_credentials?</span><span class='lparen token'>(</span><span class='credentials identifier id'>credentials</span><span class='rparen token'>)</span>
+  <span class='begin begin kw'>begin</span>
+    <span class='check_credentials identifier id'>check_credentials</span><span class='lparen token'>(</span><span class='credentials identifier id'>credentials</span><span class='rparen token'>)</span>
+    <span class='return return kw'>return</span> <span class='true true kw'>true</span>
+  <span class='rescue rescue kw'>rescue</span> <span class='Deltacloud constant id'>Deltacloud</span><span class='colon2 op'>::</span><span class='AuthException constant id'>AuthException</span>
+  <span class='end end kw'>end</span>
+  <span class='return return kw'>return</span> <span class='false false kw'>false</span>
+<span class='end end kw'>end</span>
+</pre>
+    </td>
+  </tr>
+</table>
+</div>
+    
+  </div>
+
+</div>
+    
+    <div id="footer">
+  Generated on Thu Sep 30 14:43:51 2010 by 
+  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
+  0.6.1 (ruby-1.8.6).
+</div>
+
+  </body>
+</html>
\ No newline at end of file

Added: incubator/deltacloud/trunk/site/api-docs/Deltacloud/Drivers/Opennebula.html
URL: http://svn.apache.org/viewvc/incubator/deltacloud/trunk/site/api-docs/Deltacloud/Drivers/Opennebula.html?rev=1003045&view=auto
==============================================================================
--- incubator/deltacloud/trunk/site/api-docs/Deltacloud/Drivers/Opennebula.html (added)
+++ incubator/deltacloud/trunk/site/api-docs/Deltacloud/Drivers/Opennebula.html Thu Sep 30 12:48:00 2010
@@ -0,0 +1,91 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+  <head>
+    <meta name="Content-Type" content="text/html; charset=utf8" />
+<title>Module: Deltacloud::Drivers::Opennebula</title>
+<link rel="stylesheet" href="../../css/style.css" type="text/css" media="screen" charset="utf-8" />
+<link rel="stylesheet" href="../../css/common.css" type="text/css" media="screen" charset="utf-8" />
+
+<script type="text/javascript" charset="utf-8">
+  relpath = '../..';
+  if (relpath != '') relpath += '/';
+</script>
+<script type="text/javascript" charset="utf-8" src="../../js/jquery.js"></script>
+<script type="text/javascript" charset="utf-8" src="../../js/app.js"></script>
+
+  </head>
+  <body>
+    <script type="text/javascript" charset="utf-8">
+      if (window.top.frames.main) document.body.className = 'frames';
+    </script>
+    
+    <div id="header">
+      <div id="menu">
+  
+    <a href="../../_index.html">Index (O)</a> &raquo; 
+    <span class='title'><span class='object_link'><a href="../../Deltacloud.html" title="Deltacloud (module)">Deltacloud</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../Drivers.html" title="Deltacloud::Drivers (module)">Drivers</a></span></span>
+     &raquo; 
+    <span class="title">Opennebula</span>
+  
+  
+  <div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
+</div>
+
+      <div id="search">
+  <a id="class_list_link" href="#">Class List</a>
+  <a id="method_list_link" href="#">Method List</a>
+  <a id ="file_list_link" href="#">File List</a>
+</div>
+
+      <div class="clear"></div>
+    </div>
+    
+    <iframe id="search_frame"></iframe>
+    
+    <div id="content"><h1>Module: Deltacloud::Drivers::Opennebula
+  
+  
+  
+</h1>
+
+<dl class="box">
+  
+  
+    
+  
+    
+  
+  
+  
+    <dt class="r1 last">Defined in:</dt>
+    <dd class="r1 last">lib/deltacloud/drivers/opennebula/opennebula_driver.rb</dd>
+  
+</dl>
+<div class="clear"></div>
+
+<h2>Defined Under Namespace</h2>
+<p class="children">
+   
+    
+   
+    
+      <strong class="classes">Classes:</strong> <span class='object_link'><a href="Opennebula/OpennebulaDriver.html" title="Deltacloud::Drivers::Opennebula::OpennebulaDriver (class)">OpennebulaDriver</a></span>
+    
+  
+</p>
+
+
+
+
+
+</div>
+    
+    <div id="footer">
+  Generated on Thu Sep 30 14:43:52 2010 by 
+  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
+  0.6.1 (ruby-1.8.6).
+</div>
+
+  </body>
+</html>
\ No newline at end of file



Mime
View raw message