Sophie

Sophie

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

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>
<head>
  <title>convert_srv_to_instance (Deltacloud::Drivers::RimuHosting::RimuHostingDriver)</title>
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
  <link rel="stylesheet" href="../../../../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
  <pre><span class="ruby-comment cmt"># File lib/deltacloud/drivers/rimuhosting/rimuhosting_driver.rb, line 123</span>
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">convert_srv_to_instance</span>( <span class="ruby-identifier">inst</span> )
    <span class="ruby-constant">Instance</span>.<span class="ruby-identifier">new</span>({
            <span class="ruby-identifier">:id</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">inst</span>[<span class="ruby-value str">&quot;order_oid&quot;</span>].<span class="ruby-identifier">to_s</span>,
            <span class="ruby-identifier">:name</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">inst</span>[<span class="ruby-value str">&quot;domain_name&quot;</span>],
            <span class="ruby-identifier">:image_id</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">&quot;lenny&quot;</span>,
            <span class="ruby-identifier">:state</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">&quot;RUNNING&quot;</span>,
            <span class="ruby-identifier">:name</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">inst</span>[<span class="ruby-value str">&quot;domain_name&quot;</span>],
            <span class="ruby-identifier">:realm_id</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">&quot;RH&quot;</span>,
            <span class="ruby-identifier">:owner_id</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">&quot;root&quot;</span>,
            <span class="ruby-identifier">:instance_profile</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-constant">InstanceProfile</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value str">&quot;none&quot;</span>),
            <span class="ruby-identifier">:actions</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">instance_actions_for</span>(<span class="ruby-value str">&quot;RUNNING&quot;</span>),
            <span class="ruby-identifier">:public_addresses</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">inst</span>[<span class="ruby-value str">&quot;allocated_ips&quot;</span>][<span class="ruby-value str">&quot;primary_ip&quot;</span>],
            <span class="ruby-identifier">:launch_time</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">inst</span>[<span class="ruby-value str">&quot;billing_info&quot;</span>][<span class="ruby-value str">&quot;order_date&quot;</span>][<span class="ruby-value str">&quot;iso_format&quot;</span>]
    })
  <span class="ruby-keyword kw">end</span></pre>
</body>
</html>