Sophie

Sophie

distrib > Fedora > 15 > i386 > by-pkgid > 4b137326f38b5adf1f9ffd3dbbb48a7b > files > 506

deltacloud-core-doc-0.4.0-4.fc15.noarch.rpm

<?xml version="1.0" encoding="iso-8859-1"?>
<!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>
  <title>Module: Deltacloud::Drivers::VSphere::Helper</title>
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
  <meta http-equiv="Content-Script-Type" content="text/javascript" />
  <link rel="stylesheet" href="../../../.././rdoc-style.css" type="text/css" media="screen" />
  <script type="text/javascript">
  // <![CDATA[

  function popupCode( url ) {
    window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
  }

  function toggleCode( id ) {
    if ( document.getElementById )
      elem = document.getElementById( id );
    else if ( document.all )
      elem = eval( "document.all." + id );
    else
      return false;

    elemStyle = elem.style;
    
    if ( elemStyle.display != "block" ) {
      elemStyle.display = "block"
    } else {
      elemStyle.display = "none"
    }

    return true;
  }
  
  // Make codeblocks hidden by default
  document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
  
  // ]]>
  </script>

</head>
<body>



    <div id="classHeader">
        <table class="header-table">
        <tr class="top-aligned-row">
          <td><strong>Module</strong></td>
          <td class="class-name-in-header">Deltacloud::Drivers::VSphere::Helper</td>
        </tr>
        <tr class="top-aligned-row">
            <td><strong>In:</strong></td>
            <td>
                <a href="../../../../files/lib/deltacloud/drivers/vsphere/vsphere_client_rb.html">
                lib/deltacloud/drivers/vsphere/vsphere_client.rb
                </a>
        <br />
            </td>
        </tr>

        </table>
    </div>
  <!-- banner header -->

  <div id="bodyContent">



  <div id="contextContent">



   </div>

    <div id="method-list">
      <h3 class="section-bar">Methods</h3>

      <div class="name-list">
      <a href="#M000397">extract_architecture</a>&nbsp;&nbsp;
      <a href="#M000392">find_datastore</a>&nbsp;&nbsp;
      <a href="#M000391">find_resource_pool</a>&nbsp;&nbsp;
      <a href="#M000390">find_vm</a>&nbsp;&nbsp;
      <a href="#M000393">list_virtual_machines</a>&nbsp;&nbsp;
      <a href="#M000395">load_serialized_instance</a>&nbsp;&nbsp;
      <a href="#M000394">map_task_to_instance</a>&nbsp;&nbsp;
      <a href="#M000396">stored_tasks</a>&nbsp;&nbsp;
      </div>
    </div>

  </div>


    <!-- if includes -->

    <div id="section">





      


    <!-- if method_list -->
    <div id="methods">
      <h3 class="section-bar">Public Instance methods</h3>

      <div id="method-M000397" class="method-detail">
        <a name="M000397"></a>

        <div class="method-heading">
          <a href="Helper.src/M000397.html" target="Code" class="method-signature"
            onclick="popupCode('Helper.src/M000397.html');return false;">
          <span class="method-name">extract_architecture</span><span class="method-args">(text)</span>
          </a>
        </div>
      
        <div class="method-description">
        </div>
      </div>

      <div id="method-M000392" class="method-detail">
        <a name="M000392"></a>

        <div class="method-heading">
          <a href="Helper.src/M000392.html" target="Code" class="method-signature"
            onclick="popupCode('Helper.src/M000392.html');return false;">
          <span class="method-name">find_datastore</span><span class="method-args">(credentials, name)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
This helper will try to find a Datastore[1] object in all Datacenters.
Datastore is used to place instance on create to correct place
</p>
<dl>
<dt>1</dt><dd><a
href="http://www.vmware.com/support/developer/vc-sdk/visdk41pubs/ApiReference/vim.Datastore.html">www.vmware.com/support/developer/vc-sdk/visdk41pubs/ApiReference/vim.Datastore.html</a>

</dd>
</dl>
        </div>
      </div>

      <div id="method-M000391" class="method-detail">
        <a name="M000391"></a>

        <div class="method-heading">
          <a href="Helper.src/M000391.html" target="Code" class="method-signature"
            onclick="popupCode('Helper.src/M000391.html');return false;">
          <span class="method-name">find_resource_pool</span><span class="method-args">(credentials, name)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Find a ResourcePool[1] object associated by given Datastore ResourcePool is
defined for Datacenter and is used for launching a new instance
</p>
<dl>
<dt>1</dt><dd><a
href="http://www.vmware.com/support/developer/vc-sdk/visdk41pubs/ApiReference/vim.ResourcePool.html">www.vmware.com/support/developer/vc-sdk/visdk41pubs/ApiReference/vim.ResourcePool.html</a>

</dd>
</dl>
        </div>
      </div>

      <div id="method-M000390" class="method-detail">
        <a name="M000390"></a>

        <div class="method-heading">
          <a href="Helper.src/M000390.html" target="Code" class="method-signature"
            onclick="popupCode('Helper.src/M000390.html');return false;">
          <span class="method-name">find_vm</span><span class="method-args">(credentials, name)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Find a VirtualMachine traversing through all Datastores and Datacenters
</p>
<p>
This helper will return a <a href="../../../Hash.html">Hash</a>: {
:datastore =&gt; NAME_OF_DS, :instance =&gt; VM } Returning datastore is
necesarry for constructing a correct realm for an instance
</p>
        </div>
      </div>

      <div id="method-M000393" class="method-detail">
        <a name="M000393"></a>

        <div class="method-heading">
          <a href="Helper.src/M000393.html" target="Code" class="method-signature"
            onclick="popupCode('Helper.src/M000393.html');return false;">
          <span class="method-name">list_virtual_machines</span><span class="method-args">(credentials)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
This helper will traverse across all datacenters and datastores and gather
all virtual machines available on vSphere
</p>
        </div>
      </div>

      <div id="method-M000395" class="method-detail">
        <a name="M000395"></a>

        <div class="method-heading">
          <a href="Helper.src/M000395.html" target="Code" class="method-signature"
            onclick="popupCode('Helper.src/M000395.html');return false;">
          <span class="method-name">load_serialized_instance</span><span class="method-args">(datastore, task_key)</span>
          </a>
        </div>
      
        <div class="method-description">
        </div>
      </div>

      <div id="method-M000394" class="method-detail">
        <a name="M000394"></a>

        <div class="method-heading">
          <a href="Helper.src/M000394.html" target="Code" class="method-signature"
            onclick="popupCode('Helper.src/M000394.html');return false;">
          <span class="method-name">map_task_to_instance</span><span class="method-args">(datastore, task_key, new_instance)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Map given instance to task. Task name is used as a filename.
</p>
        </div>
      </div>

      <div id="method-M000396" class="method-detail">
        <a name="M000396"></a>

        <div class="method-heading">
          <a href="Helper.src/M000396.html" target="Code" class="method-signature"
            onclick="popupCode('Helper.src/M000396.html');return false;">
          <span class="method-name">stored_tasks</span><span class="method-args">(datastore, vsphere) {|task| ...}</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Yield all tasks if they are included in mapper storage directory.
</p>
        </div>
      </div>


    </div>


  </div>


<div id="validator-badges">
  <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
</div>

</body>
</html>