| <!DOCTYPE html> |
| <html lang="en"> |
| <head> |
| <meta charset="utf-8"> |
| <title>CIMI Resource Collections - Machine</title> |
| <!-- Le HTML5 shim, for IE6-8 support of HTML elements --> |
| <!--[if lt IE 9]> |
| <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script> |
| <![endif]--> |
| |
| <!-- Le JavaScript --> |
| <script src="/assets/js/jquery-1.7.1.min.js" type="text/javascript"></script> |
| <script src="/assets/js/bootstrap-dropdown.js" type="text/javascript"></script> |
| <script src="/assets/js/jquery.tweet.js" type="text/javascript"></script> |
| <script src="/assets/js/application.js" type="text/javascript"></script> |
| <script src="/assets/js/bootstrap-transition.js"></script> |
| <script src="/assets/js/bootstrap-alert.js"></script> |
| <script src="/assets/js/bootstrap-modal.js"></script> |
| <script src="/assets/js/bootstrap-scrollspy.js"></script> |
| <script src="/assets/js/bootstrap-tab.js"></script> |
| <script src="/assets/js/bootstrap-tooltip.js"></script> |
| <script src="/assets/js/bootstrap-popover.js"></script> |
| <script src="/assets/js/bootstrap-button.js"></script> |
| <script src="/assets/js/bootstrap-collapse.js"></script> |
| <script src="/assets/js/bootstrap-carousel.js"></script> |
| <script src="/assets/js/bootstrap-typeahead.js"></script> |
| |
| <!-- Le styles --> |
| <link href="/assets/css/bootstrap.css" rel="stylesheet"> |
| <link href="/assets/css/application.css" rel="stylesheet"> |
| <link rel="shortcut icon" href="/assets/img/favicon.ico"> |
| </head> |
| |
| <body> |
| |
| <div class="navbar navbar-fixed-top"> |
| <div class="navbar-inner"> |
| <div class="container"> |
| <a class="brand" href="/"><img src="/assets/img/logo.png" width="152" |
| alt="Deltacloud API"/></a> |
| <ul class="nav top-nav"> |
| <li><a href="/">Home</a></li> |
| <li class="dropdown"> |
| <a href="#" class="dropdown-toggle" data-toggle="dropdown">About<b class="caret"></b></a> |
| <ul class="dropdown-menu"> |
| <li><a href="/about.html">What is Deltacloud?</a></li> |
| <li><a href="/supported-providers.html">Supported Providers</a></li> |
| </ul> |
| </li> |
| <li><a href="/download.html">Download</a></li> |
| <li class="dropdown"> |
| <a href="#" class="dropdown-toggle" data-toggle="dropdown">Installation<b class="caret"></b></a> |
| <ul class="dropdown-menu"> |
| <li><a href="/install-deltacloud.html">Install Deltacloud</a></li> |
| <li><a href="/run-deltacloud-server.html">Run the Deltacloud Server</a></li> |
| </ul> |
| </li> |
| <li class="dropdown"> |
| <a href="/usage.html" class="dropdown-toggle" data-toggle="dropdown">Usage<b class="caret"></b></a> |
| <ul class="dropdown-menu"> |
| <li><a href="/usage.html#usingapi">Using API</a></li> |
| <li><a href="/usage.html#clients">Client Libraries</a></li> |
| <li><a href="/command-tools.html">Command Line Tools</a></li> |
| </ul> |
| </li> |
| <li class="dropdown"> |
| <a href="#" class="dropdown-toggle" data-toggle="dropdown">Contribute<b class="caret"></b></a> |
| <ul class="dropdown-menu"> |
| <li><a href="/getting-sources.html">Getting Sources</a></li> |
| <li><a href="/how-to-contribute.html">How Can I Contribute?</a></li> |
| </ul> |
| </li> |
| <li class="dropdown"> |
| <a href="#" class="dropdown-toggle" data-toggle="dropdown">API<b class="caret"></b></a> |
| <ul class="dropdown-menu"> |
| <li><a href="/rest-api.html">REST API</a></li> |
| <li><a href="/drivers.html">Drivers API</a></li> |
| </ul> |
| </li> |
| <li class="dropdown"> |
| <a href="#" class="dropdown-toggle" data-toggle="dropdown">CIMI<b class="caret"></b></a> |
| <ul class="dropdown-menu"> |
| <li><a href="/cimi-rest.html">CIMI REST API</a></li> |
| <li><a href="/cimi-curl.html">CIMI cURL Examples</a></li> |
| </ul> |
| </li> |
| <li><a href="/contact.html">Contact</a></li> |
| </ul> |
| |
| </div> |
| </div> |
| |
| </div> |
| |
| <div class="container content"> |
| |
| <p><br></p> |
| |
| <div class="row"> |
| <div class="span9"> |
| |
| <h3 id="cimi-entry-point">CIMI Resources and Collections</h3> |
| |
| <p> We are continually improving CIMI support in Deltacloud. If you come across any inconsistencies or errors in the Deltacloud CIMI implementation we'll be very glad to <a href="contact.html">hear about them</a>.</p> |
| |
| <p> |
| In the following sections, the textual definitions following the title of each resource (e.g. "Machine") that are rendered in bold and italic type are taken from the CIMI 1.0.1 specification, available from the DMTF <a href="http://dmtf.org/cloud">Cloud Management Initiative</a> (DSP0263). |
| </p> |
| |
| <hr> |
| <h3 id="cimi-machine">Machine</h3> |
| <p> |
| <strong><em> |
| An instantiated compute resource that encapsulates both CPU and Memory. |
| A Machine Collection resource represents the collection of Machine resources within a Provider |
| </em></strong> |
| </p> |
| |
| </div> |
| |
| <div class="span3"> |
| |
| <ul class="nav nav-list well"> |
| <li class="nav-header"> |
| CIMI REST API |
| </li> |
| <li><a href="cimi-rest.html">Introduction</a></li> |
| <li><a href="cimi-rest-entry-point.html">Cloud Entry Point</a></li> |
| <li><a href="cimi-rest-collections.html">CIMI Resources</a></li> |
| <ul class="nav nav-list"> |
| <li class="active"><a href="cimi-rest-collections.html">Machine</a></li> |
| <li><a href="cimi-rest-machine-images.html">MachineImage</a></li> |
| </ul> |
| </ul> |
| </div> |
| |
| </div> |
| |
| <ul class="nav nav-pills"> |
| <li class="active"><a href="#tab1" data-toggle="tab">Retrieve the Machine Collection</a></li> |
| <li><a href="#single-machine" data-toggle="tab">Retrieve a single Machine</a></li> |
| <li><a href="#create-machine" data-toggle="tab">Create a new Machine</a></li> |
| <li><a href="#machine-action" data-toggle="tab">Perform a Machine Operation</a></li> |
| </ul><hr><div class="tab-content"> |
| <div class="tab-pane active" id="tab1"> |
| |
| <h4>Retrieve the Machine Collection</h4> |
| |
| Note the 'add' URI of the Machine Collection resource in the example response below. This is the URI that is used for creating a new Machine (adding to the Machine Collection). |
| <br><br><p>Example request:</p> |
| |
| <pre> |
| GET /cimi/machines HTTP/1.1 |
| Authorization: Basic bW9ja3VzZXI6bW9ja3Bhc3N3b3Jk |
| User-Agent: curl/7.24.0 (i686-redhat-linux-gnu) |
| Host: localhost:3001 |
| Accept: application/xml |
| </pre> |
| |
| <p>Server response:</p> |
| |
| <pre> |
| HTTP/1.1 200 OK |
| Content-Type: application/xml |
| CIMI-Specification-Version: 1.0.1 |
| Content-Length: 2293 |
| ETag: 5c6dc8cfbceeb1f3c610765a4aa600dd |
| Cache-Control: max-age=0, private, must-revalidate |
| Date: Fri, 28 Dec 2012 11:08:27 GMT |
| Connection: keep-alive |
| Server: thin 1.5.0 codename Knife |
| |
| <Collection xmlns="http://schemas.dmtf.org/cimi/1" |
| resourceURI="http://schemas.dmtf.org/cimi/1/MachineCollection"> |
| <id>http://localhost:3001/cimi/machines</id> |
| <count>2</count> |
| <Machine> |
| <id>http://localhost:3001/cimi/machines/inst0</id> |
| <name>Mock Instance With Profile Change</name> |
| <description>No description set for Machine Mock Instance With Profile Change</description> |
| <created>2012-12-28T13:08:27+02:00</created> |
| <property key="machine_image">http://localhost:3001/cimi/machine_images/img1</property> |
| <property key="credential">http://localhost:3001/cimi/credentials</property> |
| <state>STARTED</state> |
| <cpu>1</cpu> |
| <memory>12582912</memory> |
| <disks href="http://localhost:3001/cimi/machines/inst0/disks" /> |
| <volumes href="http://localhost:3001/cimi/machines/inst0/volumes" /> |
| <operation rel="http://schemas.dmtf.org/cimi/1/action/restart" |
| href="http://localhost:3001/cimi/machines/inst0/restart" /> |
| <operation rel="http://schemas.dmtf.org/cimi/1/action/stop" |
| href="http://localhost:3001/cimi/machines/inst0/stop" /> |
| <operation rel="http://schemas.dmtf.org/cimi/1/action/capture" |
| href="http://localhost:3001/cimi/machine_images" /> |
| </Machine> |
| <Machine> |
| <id>http://localhost:3001/cimi/machines/inst1</id> |
| <name>MockUserInstance</name> |
| <description>No description set for Machine MockUserInstance</description> |
| <created>2012-12-28T13:08:27+02:00</created> |
| <property key="machine_image">http://localhost:3001/cimi/machine_images/img3</property> |
| <property key="credential">http://localhost:3001/cimi/credentials</property> |
| <state>STARTED</state> |
| <cpu>1</cpu> |
| <memory>1782579</memory> |
| <disks href="http://localhost:3001/cimi/machines/inst1/disks" /> |
| <volumes href="http://localhost:3001/cimi/machines/inst1/volumes" /> |
| <operation rel="http://schemas.dmtf.org/cimi/1/action/restart" |
| href="http://localhost:3001/cimi/machines/inst1/restart" /> |
| <operation rel="http://schemas.dmtf.org/cimi/1/action/stop" |
| href="http://localhost:3001/cimi/machines/inst1/stop" /> |
| <operation rel="http://schemas.dmtf.org/cimi/1/action/capture" |
| href="http://localhost:3001/cimi/machine_images" /> |
| </Machine> |
| <operation rel="add" href="http://localhost:3001/cimi/machines" /> |
| </Collection> |
| |
| |
| </pre> |
| |
| </div> |
| <div class="tab-pane" id="single-machine"> |
| |
| <h4>Retrieve a single Machine</h4> |
| |
| <p>Example request:</p> |
| |
| <pre> |
| GET /cimi/machines/inst0 HTTP/1.1 |
| Authorization: Basic bW9ja3VzZXI6bW9ja3Bhc3N3b3Jk |
| User-Agent: curl/7.24.0 (i686-redhat-linux-gnu) |
| Host: localhost:3001 |
| Accept: application/xml |
| </pre> |
| |
| <p>Server response:</p> |
| |
| <pre> |
| HTTP/1.1 200 OK |
| Content-Type: application/xml |
| CIMI-Specification-Version: 1.0.1 |
| Content-Length: 1092 |
| ETag: 2d57aa01f1a50b2d13c04f0c51f08ab9 |
| Cache-Control: max-age=0, private, must-revalidate |
| Date: Fri, 28 Dec 2012 11:20:28 GMT |
| Connection: keep-alive |
| Server: thin 1.5.0 codename Knife |
| |
| <Machine xmlns="http://schemas.dmtf.org/cimi/1" |
| resourceURI="http://schemas.dmtf.org/cimi/1/Machine"> |
| <id>http://localhost:3001/cimi/machines/inst0</id> |
| <name>Mock Instance With Profile Change</name> |
| <description>No description set for Machine Mock Instance With Profile Change</description> |
| <created>2012-12-28T13:20:28+02:00</created> |
| <property key="machine_image">http://localhost:3001/cimi/machine_images/img1</property> |
| <property key="credential">http://localhost:3001/cimi/credentials</property> |
| <state>STARTED</state> |
| <cpu>1</cpu> |
| <memory>12582912</memory> |
| <disks href="http://localhost:3001/cimi/machines/inst0/disks" /> |
| <volumes href="http://localhost:3001/cimi/machines/inst0/volumes" /> |
| <operation rel="http://schemas.dmtf.org/cimi/1/action/restart" |
| href="http://localhost:3001/cimi/machines/inst0/restart" /> |
| <operation rel="http://schemas.dmtf.org/cimi/1/action/stop" |
| href="http://localhost:3001/cimi/machines/inst0/stop" /> |
| <operation rel="http://schemas.dmtf.org/cimi/1/action/capture" |
| href="http://localhost:3001/cimi/machine_images" /> |
| </Machine> |
| |
| |
| </pre> |
| |
| </div> |
| |
| <div class="tab-pane" id="create-machine"> |
| |
| <h4>Create a new Machine</h4> |
| |
| <p> |
| The 'add' URI of the Machine Collection is used to create a new Machine. This is returned when retrieving the Machine Collection resource. |
| </p> |
| |
| <p>Example request:</p> |
| |
| <pre> |
| POST /cimi/machines HTTP/1.1 |
| Authorization: Basic bW9ja3VzZXI6bW9ja3Bhc3N3b3Jk |
| User-Agent: curl/7.24.0 (i686-redhat-linux-gnu) |
| Host: localhost:3001 |
| Content-Type: application/xml |
| Accept: application/xml |
| Content-Length: 370 |
| |
| <MachineCreate xmlns="http://schemas.dmtf.org/cimi/1"> |
| <name> myMachine1 </name> |
| <description> my machine description </description> |
| <machineTemplate> |
| <machineConfig href="http://localhost:3001/cimi/machine_configurations/m1-small"> |
| </machineConfig> |
| <machineImage href="http://localhost:3001/cimi/machine_images/img1"> |
| </machineImage> |
| </machineTemplate> |
| </MachineCreate> |
| |
| </pre> |
| |
| <p>Server response:</p> |
| |
| <pre> |
| HTTP/1.1 201 Created |
| Content-Type: application/xml |
| Location: http://localhost:3001/cimi/machines/inst3 |
| CIMI-Specification-Version: 1.0.1 |
| Content-Length: 1030 |
| ETag: 360992481f1450f9d475f439e5105f9d |
| Cache-Control: max-age=0, private, must-revalidate |
| Date: Fri, 28 Dec 2012 11:47:58 GMT |
| Connection: keep-alive |
| Server: thin 1.5.0 codename Knife |
| |
| <Machine xmlns="http://schemas.dmtf.org/cimi/1" resourceURI="http://schemas.dmtf.org/cimi/1/Machine"> |
| <id>http://localhost:3001/cimi/machines/inst3</id> |
| <name> myMachine1 </name> |
| <description> my machine description </description> |
| <created>2012-12-28T13:47:58+02:00</created> |
| <property key="machine_image">http://localhost:3001/cimi/machine_images/img1</property> |
| <property key="credential">http://localhost:3001/cimi/credentials</property> |
| <state>STARTED</state> |
| <cpu>1</cpu> |
| <memory>1782579</memory> |
| <disks href="http://localhost:3001/cimi/machines/inst3/disks" /> |
| <volumes href="http://localhost:3001/cimi/machines/inst3/volumes" /> |
| <operation rel="http://schemas.dmtf.org/cimi/1/action/restart" |
| href="http://localhost:3001/cimi/machines/inst3/restart" /> |
| <operation rel="http://schemas.dmtf.org/cimi/1/action/stop" |
| href="http://localhost:3001/cimi/machines/inst3/stop" /> |
| <operation rel="http://schemas.dmtf.org/cimi/1/action/capture" |
| href="http://localhost:3001/cimi/machine_images" /> |
| </Machine> |
| |
| |
| </pre> |
| |
| |
| </div> |
| |
| |
| <div class="tab-pane" id="machine-action"> |
| |
| <h4>Perform a Machine Operation</h4> |
| |
| <p> |
| The list of Machine operations is returned when the URI of a specific Machine resource is dereferenced. Examples of operations are 'stop', 'restart' and 'capture'. An 'Action' resource is used in the POST message body corresponding to the operation to be executed. The example below shows the 'stop' action. |
| </p> |
| |
| <p>Example request:</p> |
| <pre> |
| POST /cimi/machines/inst3/stop HTTP/1.1 |
| Authorization: Basic bW9ja3VzZXI6bW9ja3Bhc3N3b3Jk |
| User-Agent: curl/7.24.0 (i686-redhat-linux-gnu) |
| Host: localhost:3001 |
| Content-Type: application/xml |
| Accept: application/xml |
| Content-Length: 125 |
| |
| <Action xmlns="http://schemas.dmtf.org/cimi/1"> |
| <action> http://http://schemas.dmtf.org/cimi/1/action/stop </action> |
| </Action> |
| </pre> |
| |
| <p>Server response:</p> |
| <pre> |
| HTTP/1.1 202 Accepted |
| CIMI-Specification-Version: 1.0.1 |
| Content-Length: 0 |
| Date: Fri, 28 Dec 2012 14:01:43 GMT |
| Connection: keep-alive |
| Server: thin 1.5.0 codename Knife |
| </pre> |
| |
| |
| </div> |
| |
| |
| </div> |
| |
| <footer class="footer"> |
| <p class="pull-right"><span class='icon-circle-arrow-up'> </span><a href="#">Back to top</a></p> |
| <div class='row'> |
| <div class='span3'> |
| <img src="/assets/img/asf.png" alt="Apache Software Foundation"/> |
| </div> |
| <div class='span9'> |
| <strong>Apache Deltacloud</strong> is a top-level project at the <a |
| href="http://www.apache.org">Apache Software Foundation</a>, |
| having graduated from the ASF Incubator in October |
| 2011. Through a collaborative and meritocratic development process, Apache |
| projects deliver enterprise-grade, freely available software products that |
| attract large communities of users. |
| </div> |
| </div> |
| </footer> |
| |
| </div> <!-- /container --> |
| |
| <!-- Piwik --> |
| <script type="text/javascript"> |
| var pkBaseURL = (("https:" == document.location.protocol) ? "https://stats.salasaga.org/aeolus/piwik/" : "http://stats.salasaga.org/aeolus/piwik/"); |
| document.write(unescape("%3Cscript src='" + pkBaseURL + "piwik.js' type='text/javascript'%3E%3C/script%3E")); |
| </script><script type="text/javascript"> |
| try { |
| var piwikTracker = Piwik.getTracker(pkBaseURL + "piwik.php", 2); |
| piwikTracker.trackPageView(); |
| piwikTracker.enableLinkTracking(); |
| } catch( err ) {} |
| </script><noscript><p><img src="http://stats.salasaga.org/aeolus/piwik/piwik.php?idsite=2" style="border:0" alt="" /></p></noscript> |
| <!-- End Piwik Tracking Code --> |
| |
| </body> |
| </html> |