����JFIF��x�x����'
Server IP : 78.140.185.180 / Your IP : 216.73.216.45 Web Server : LiteSpeed System : Linux cpanel13.v.fozzy.com 4.18.0-513.11.1.lve.el8.x86_64 #1 SMP Thu Jan 18 16:21:02 UTC 2024 x86_64 User : builderbox ( 1072) PHP Version : 7.3.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/builderbox/www/vendor/rackspace/php-opencloud/doc/_build/html/services/image/ |
Upload File : |
<!DOCTYPE html> <!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]--> <!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]--> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Sharing images — php-opencloud 1.12.1 documentation</title> <link href='https://fonts.googleapis.com/css?family=Lato:400,700|Roboto+Slab:400,700|Inconsolata:400,700' rel='stylesheet' type='text/css'> <link rel="stylesheet" href="../../_static/css/theme.css" type="text/css" /> <link rel="top" title="php-opencloud 1.12.1 documentation" href="../../index.html"/> <link rel="up" title="Images v1" href="index.html"/> <link rel="next" title="Image tags" href="tags.html"/> <link rel="prev" title="JSON schemas" href="schemas.html"/> <script src="https://cdnjs.cloudflare.com/ajax/libs/modernizr/2.6.2/modernizr.min.js"></script> </head> <body class="wy-body-for-nav" role="document"> <div class="wy-grid-for-nav"> <nav data-toggle="wy-nav-shift" class="wy-nav-side"> <div class="wy-side-nav-search"> <a href="../../index.html" class="fa fa-home"> php-opencloud</a> <div role="search"> <form id ="rtd-search-form" class="wy-form" action="../../search.html" method="get"> <input type="text" name="q" placeholder="Search docs" /> <input type="hidden" name="check_keywords" value="yes" /> <input type="hidden" name="area" value="default" /> </form> </div> </div> <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation"> <ul class="current"> <li class="toctree-l1"><a class="reference internal" href="../autoscale/index.html">Auto Scale v2</a><ul> <li class="toctree-l2"><a class="reference internal" href="../autoscale/index.html#setup">Setup</a></li> <li class="toctree-l2"><a class="reference internal" href="../autoscale/index.html#operations">Operations</a></li> <li class="toctree-l2"><a class="reference internal" href="../autoscale/index.html#glossary">Glossary</a></li> <li class="toctree-l2"><a class="reference internal" href="../autoscale/index.html#further-links">Further Links</a></li> </ul> </li> <li class="toctree-l1"><a class="reference internal" href="../compute/index.html">Compute v2</a><ul> <li class="toctree-l2"><a class="reference internal" href="../compute/index.html#setup">Setup</a></li> <li class="toctree-l2"><a class="reference internal" href="../compute/index.html#operations">Operations</a></li> <li class="toctree-l2"><a class="reference internal" href="../compute/index.html#glossary">Glossary</a></li> <li class="toctree-l2"><a class="reference internal" href="../compute/index.html#further-links">Further Links</a></li> </ul> </li> <li class="toctree-l1"><a class="reference internal" href="../database/index.html">Databases v1</a><ul> <li class="toctree-l2"><a class="reference internal" href="../database/index.html#setup">Setup</a></li> <li class="toctree-l2"><a class="reference internal" href="../database/index.html#operations">Operations</a></li> <li class="toctree-l2"><a class="reference internal" href="../database/index.html#glossary">Glossary</a></li> <li class="toctree-l2"><a class="reference internal" href="../database/index.html#further-links">Further Links</a></li> </ul> </li> <li class="toctree-l1"><a class="reference internal" href="../dns/index.html">DNS v1</a><ul> <li class="toctree-l2"><a class="reference internal" href="../dns/index.html#setup">Setup</a></li> <li class="toctree-l2"><a class="reference internal" href="../dns/index.html#operations">Operations</a></li> <li class="toctree-l2"><a class="reference internal" href="../dns/index.html#glossary">Glossary</a></li> <li class="toctree-l2"><a class="reference internal" href="../dns/index.html#further-links">Further Links</a></li> </ul> </li> <li class="toctree-l1"><a class="reference internal" href="../identity/index.html">Identity v2</a><ul> <li class="toctree-l2"><a class="reference internal" href="../identity/index.html#setup">Setup</a></li> <li class="toctree-l2"><a class="reference internal" href="../identity/index.html#operations">Operations</a></li> <li class="toctree-l2"><a class="reference internal" href="../identity/index.html#glossary">Glossary</a></li> <li class="toctree-l2"><a class="reference internal" href="../identity/index.html#further-links">Further Links</a></li> </ul> </li> <li class="toctree-l1 current"><a class="reference internal" href="index.html">Images v1</a><ul class="current"> <li class="toctree-l2"><a class="reference internal" href="index.html#setup">Setup</a></li> <li class="toctree-l2 current"><a class="reference internal" href="index.html#operations">Operations</a></li> <li class="toctree-l2"><a class="reference internal" href="index.html#glossary">Glossary</a></li> <li class="toctree-l2"><a class="reference internal" href="index.html#further-links">Further Links</a></li> </ul> </li> <li class="toctree-l1"><a class="reference internal" href="../load-balancer/index.html">Load Balancer v1</a><ul> <li class="toctree-l2"><a class="reference internal" href="../load-balancer/index.html#setup">Setup</a></li> <li class="toctree-l2"><a class="reference internal" href="../load-balancer/index.html#operations">Operations</a></li> <li class="toctree-l2"><a class="reference internal" href="../load-balancer/index.html#glossary">Glossary</a></li> <li class="toctree-l2"><a class="reference internal" href="../load-balancer/index.html#further-links">Further Links</a></li> </ul> </li> <li class="toctree-l1"><a class="reference internal" href="../monitoring/index.html">Monitoring v1</a><ul> <li class="toctree-l2"><a class="reference internal" href="../monitoring/index.html#setup">Setup</a></li> <li class="toctree-l2"><a class="reference internal" href="../monitoring/index.html#operations">Operations</a></li> <li class="toctree-l2"><a class="reference internal" href="../monitoring/index.html#glossary">Glossary</a></li> <li class="toctree-l2"><a class="reference internal" href="../monitoring/index.html#further-links">Further links</a></li> </ul> </li> <li class="toctree-l1"><a class="reference internal" href="../networking/index.html">Networking v2</a><ul> <li class="toctree-l2"><a class="reference internal" href="../networking/index.html#setup">Setup</a></li> <li class="toctree-l2"><a class="reference internal" href="../networking/index.html#operations">Operations</a></li> <li class="toctree-l2"><a class="reference internal" href="../networking/index.html#glossary">Glossary</a></li> <li class="toctree-l2"><a class="reference internal" href="../networking/index.html#further-links">Further links</a></li> </ul> </li> <li class="toctree-l1"><a class="reference internal" href="../object-store/index.html">Object Store v1</a><ul> <li class="toctree-l2"><a class="reference internal" href="../object-store/index.html#setup">Setup</a></li> <li class="toctree-l2"><a class="reference internal" href="../object-store/index.html#operations">Operations</a></li> <li class="toctree-l2"><a class="reference internal" href="../object-store/index.html#glossary">Glossary</a></li> <li class="toctree-l2"><a class="reference internal" href="../object-store/index.html#further-links">Further links</a></li> </ul> </li> <li class="toctree-l1"><a class="reference internal" href="../orchestration/index.html">Orchestration v1</a><ul> <li class="toctree-l2"><a class="reference internal" href="../orchestration/index.html#setup">Setup</a></li> <li class="toctree-l2"><a class="reference internal" href="../orchestration/index.html#operations">Operations</a></li> <li class="toctree-l2"><a class="reference internal" href="../orchestration/index.html#glossary">Glossary</a></li> <li class="toctree-l2"><a class="reference internal" href="../orchestration/index.html#further-links">Further links</a></li> </ul> </li> <li class="toctree-l1"><a class="reference internal" href="../queues/index.html">Queues v1</a><ul> <li class="toctree-l2"><a class="reference internal" href="../queues/index.html#setup">Setup</a></li> <li class="toctree-l2"><a class="reference internal" href="../queues/index.html#operations">Operations</a></li> <li class="toctree-l2"><a class="reference internal" href="../queues/index.html#glossary">Glossary</a></li> <li class="toctree-l2"><a class="reference internal" href="../queues/index.html#further-links">Further links</a></li> </ul> </li> <li class="toctree-l1"><a class="reference internal" href="../volume/index.html">Volumes v1</a><ul> <li class="toctree-l2"><a class="reference internal" href="../volume/index.html#setup">Setup</a></li> <li class="toctree-l2"><a class="reference internal" href="../volume/index.html#operations">Operations</a></li> <li class="toctree-l2"><a class="reference internal" href="../volume/index.html#glossary">Glossary</a></li> <li class="toctree-l2"><a class="reference internal" href="../volume/index.html#further-links">Further links</a></li> </ul> </li> </ul> <ul> <li class="toctree-l1"><a class="reference internal" href="../../debugging.html">Debugging</a><ul> <li class="toctree-l2"><a class="reference internal" href="../../debugging.html#strategy-1-meaningful-exception-handling">Strategy 1: Meaningful exception handling</a></li> <li class="toctree-l2"><a class="reference internal" href="../../debugging.html#strategy-2-wire-logging">Strategy 2: Wire logging</a></li> </ul> </li> <li class="toctree-l1"><a class="reference internal" href="../../caching-creds.html">Caching credentials</a><ul> <li class="toctree-l2"><a class="reference internal" href="../../caching-creds.html#filesystem-example">Filesystem example</a></li> </ul> </li> <li class="toctree-l1"><a class="reference internal" href="../../iterators.html">Iterators</a><ul> <li class="toctree-l2"><a class="reference internal" href="../../iterators.html#common-behaviour">Common behaviour</a></li> <li class="toctree-l2"><a class="reference internal" href="../../iterators.html#very-important-note">Very important note</a></li> <li class="toctree-l2"><a class="reference internal" href="../../iterators.html#using-paginated-collections">Using paginated collections</a></li> <li class="toctree-l2"><a class="reference internal" href="../../iterators.html#setting-up-a-paginatediterator">Setting up a PaginatedIterator</a></li> </ul> </li> <li class="toctree-l1"><a class="reference internal" href="../../regions.html">Rackspace regions</a></li> <li class="toctree-l1"><a class="reference internal" href="../../url-types.html">URL types</a><ul> <li class="toctree-l2"><a class="reference internal" href="../../url-types.html#internalurl">internalURL</a></li> <li class="toctree-l2"><a class="reference internal" href="../../url-types.html#publicurl">publicURL</a></li> </ul> </li> <li class="toctree-l1"><a class="reference internal" href="../../logging.html">Logging</a><ul> <li class="toctree-l2"><a class="reference internal" href="../../logging.html#logger-injection">Logger injection</a></li> </ul> </li> <li class="toctree-l1"><a class="reference internal" href="../../http-clients.html">HTTP Clients</a><ul> <li class="toctree-l2"><a class="reference internal" href="../../http-clients.html#default-http-headers">Default HTTP headers</a></li> <li class="toctree-l2"><a class="reference internal" href="../../http-clients.html#user-agents">User agents</a></li> <li class="toctree-l2"><a class="reference internal" href="../../http-clients.html#other-functionality">Other functionality</a></li> </ul> </li> <li class="toctree-l1"><a class="reference internal" href="../../auth.html">Authentication</a><ul> <li class="toctree-l2"><a class="reference internal" href="../../auth.html#service-catalog">Service Catalog</a></li> </ul> </li> </ul> </div> </nav> <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"> <nav class="wy-nav-top" role="navigation" aria-label="top navigation"> <i data-toggle="wy-nav-top" class="fa fa-bars"></i> <a href="../../index.html">php-opencloud</a> </nav> <div class="wy-nav-content"> <div class="rst-content"> <div role="navigation" aria-label="breadcrumbs navigation"> <ul class="wy-breadcrumbs"> <li><a href="../../index.html">Docs</a> »</li> <li><a href="index.html">Images v1</a> »</li> <li>Sharing images</li> <li class="wy-breadcrumbs-aside"> <a href="../../_sources/services/image/sharing.txt" rel="nofollow"> View page source</a> </li> </ul> <hr/> </div> <div role="main"> <div class="section" id="sharing-images"> <h1>Sharing images<a class="headerlink" href="#sharing-images" title="Permalink to this headline">¶</a></h1> <p>Images can be created and deleted by image producers, updated by image consumers, and listed by both image producers and image consumers:</p> <table border="1" class="docutils"> <colgroup> <col width="28%" /> <col width="36%" /> <col width="36%" /> </colgroup> <thead valign="bottom"> <tr class="row-odd"><th class="head">Operation</th> <th class="head">Producer can?</th> <th class="head">Consumer can?</th> </tr> </thead> <tbody valign="top"> <tr class="row-even"><td>Created</td> <td>Yes</td> <td>No</td> </tr> <tr class="row-odd"><td>Deleted</td> <td>Yes</td> <td>No</td> </tr> <tr class="row-even"><td>Updated</td> <td>No</td> <td>Yes</td> </tr> <tr class="row-odd"><td>Listed</td> <td>Yes</td> <td>Yes</td> </tr> </tbody> </table> <p>The producer shares an image with the consumer by making the consumer a <em>member</em> of that image. The consumer then accepts or rejects the image by changing the member status. Once accepted, the image appears in the consumer’s image list.</p> <div class="section" id="typical-workflow"> <h2>Typical workflow<a class="headerlink" href="#typical-workflow" title="Permalink to this headline">¶</a></h2> <ol class="arabic simple"> <li>The producer posts the availability of specific images on a public website.</li> <li>A potential consumer provides the producer with his/her tenant ID and email address.</li> <li>The producer <a href="#id1"><span class="problematic" id="id2">`creates a new Image Member <>`__</span></a> with the consumer’s details</li> <li>The producer notifies the consumer via email that the image has been shared and provides the image’s ID.</li> <li>If the consumer wishes the image to appear in his/her image list, the consumer <a href="#id1"><span class="problematic" id="id3">`updates their own Member status <>`__</span></a> to <tt class="docutils literal"><span class="pre">ACCEPTED</span></tt>.</li> </ol> <div class="section" id="additional-notes"> <h3>Additional notes<a class="headerlink" href="#additional-notes" title="Permalink to this headline">¶</a></h3> <ul class="simple"> <li>If the consumer subsequently wishes to hide the image, the consumer can change their Member status to <tt class="docutils literal"><span class="pre">REJECTED</span></tt>.</li> <li>If the consumer wishes to hide the image, but is open to the possibility of being reminded by the producer that the image is available, the consumer can change their Member status to <tt class="docutils literal"><span class="pre">PENDING</span></tt>.</li> <li>Image producers add or remove image members, but may not modify the member status of an image member.</li> <li>Image consumers change their own member status, but may not add or remove themselves as an image member.</li> <li>Image consumers can boot from any image shared by the image producer, regardless of the member status, as long as the image consumer knows the image ID.</li> </ul> </div> </div> <div class="section" id="setup"> <h2>Setup<a class="headerlink" href="#setup" title="Permalink to this headline">¶</a></h2> <p>All member operations are executed against an <a class="reference external" href="images">Image</a>, so you will need to set one up first:</p> <div class="highlight-php"><div class="highlight"><pre><span class="nv">$image</span> <span class="o">=</span> <span class="nv">$service</span><span class="o">-></span><span class="na">getImage</span><span class="p">(</span><span class="s1">'{imageId}'</span><span class="p">);</span> </pre></div> </div> </div> <div class="section" id="list-image-members"> <h2>List image members<a class="headerlink" href="#list-image-members" title="Permalink to this headline">¶</a></h2> <p>This operation is available for both producers and consumers.</p> <div class="highlight-php"><div class="highlight"><pre><span class="nv">$members</span> <span class="o">=</span> <span class="nv">$image</span><span class="o">-></span><span class="na">listMembers</span><span class="p">();</span> <span class="k">foreach</span> <span class="p">(</span><span class="nv">$members</span> <span class="k">as</span> <span class="nv">$member</span><span class="p">)</span> <span class="p">{</span> <span class="sd">/** @param $member OpenCloud\Image\Resource\Member */</span> <span class="p">}</span> </pre></div> </div> </div> <div class="section" id="create-image-member"> <h2>Create image member<a class="headerlink" href="#create-image-member" title="Permalink to this headline">¶</a></h2> <p>This operation is only available for producers.</p> <div class="highlight-php"><div class="highlight"><pre><span class="sd">/** @param $response Guzzle\Http\Message\Response */</span> <span class="nv">$response</span> <span class="o">=</span> <span class="nv">$image</span><span class="o">-></span><span class="na">createMember</span><span class="p">(</span><span class="s1">'{tenantId}'</span><span class="p">);</span> </pre></div> </div> </div> <div class="section" id="delete-image-member"> <h2>Delete image member<a class="headerlink" href="#delete-image-member" title="Permalink to this headline">¶</a></h2> <p>This operation is only available for producers.</p> <div class="highlight-php"><div class="highlight"><pre><span class="sd">/** @param $member OpenCloud\Image\Resource\Member */</span> <span class="nv">$member</span> <span class="o">=</span> <span class="nv">$image</span><span class="o">-></span><span class="na">getMember</span><span class="p">(</span><span class="s1">'{tenantId}'</span><span class="p">);</span> <span class="nv">$member</span><span class="o">-></span><span class="na">delete</span><span class="p">();</span> </pre></div> </div> </div> <div class="section" id="update-image-member-status"> <h2>Update image member status<a class="headerlink" href="#update-image-member-status" title="Permalink to this headline">¶</a></h2> <p>This operation is only available for consumers.</p> <div class="highlight-php"><div class="highlight"><pre><span class="k">use</span> <span class="nx">OpenCloud\Images\Enum\MemberStatus</span><span class="p">;</span> <span class="sd">/** @param $member OpenCloud\Image\Resource\Member */</span> <span class="nv">$member</span> <span class="o">=</span> <span class="nv">$image</span><span class="o">-></span><span class="na">getMember</span><span class="p">(</span><span class="s1">'{tenantId}'</span><span class="p">);</span> <span class="nv">$member</span><span class="o">-></span><span class="na">updateStatus</span><span class="p">(</span><span class="nx">MemberStatus</span><span class="o">::</span><span class="na">ACCEPTED</span><span class="p">);</span> </pre></div> </div> <p>The acceptable states you may pass in are made available to you through the constants defined in the <tt class="docutils literal"><span class="pre">OpenCloud\Images\Enum\MemberStatus</span></tt> class.</p> </div> </div> </div> <footer> <div class="rst-footer-buttons" role="navigation" aria-label="footer navigation"> <a href="tags.html" class="btn btn-neutral float-right" title="Image tags"/>Next <span class="fa fa-arrow-circle-right"></span></a> <a href="schemas.html" class="btn btn-neutral" title="JSON schemas"><span class="fa fa-arrow-circle-left"></span> Previous</a> </div> <hr/> <div role="contentinfo"> <p> © Copyright 2015, Jamie Hannaford, Shaunak Kashyap. </p> </div> <a href="https://github.com/snide/sphinx_rtd_theme">Sphinx theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a> </footer> </div> </div> </section> </div> <script type="text/javascript"> var DOCUMENTATION_OPTIONS = { URL_ROOT:'../../', VERSION:'1.12.1', COLLAPSE_INDEX:false, FILE_SUFFIX:'.html', HAS_SOURCE: true }; </script> <script type="text/javascript" src="../../_static/jquery.js"></script> <script type="text/javascript" src="../../_static/underscore.js"></script> <script type="text/javascript" src="../../_static/doctools.js"></script> <script type="text/javascript" src="../../_static/js/theme.js"></script> <script type="text/javascript"> jQuery(function () { SphinxRtdTheme.StickyNav.enable(); }); </script> </body> </html>