forked from docs/doc-exports
Reviewed-by: Hasko, Vladimir <vladimir.hasko@t-systems.com> Co-authored-by: guoyanyan <guoyanyan3@huawei.com> Co-committed-by: guoyanyan <guoyanyan3@huawei.com>
75 lines
9.1 KiB
HTML
75 lines
9.1 KiB
HTML
<a name="EN-US_TOPIC_0109822367"></a><a name="EN-US_TOPIC_0109822367"></a>
|
|
|
|
<h1 class="topictitle1">Updating Image Information</h1>
|
|
<div id="body4139237"><div class="section" id="EN-US_TOPIC_0109822367__section663215"><h4 class="sectiontitle">Scenario</h4><p id="EN-US_TOPIC_0109822367__p375753944016">Image attributes can be modified to update image information.</p>
|
|
<div class="note" id="EN-US_TOPIC_0109822367__note46484253165"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><ul id="EN-US_TOPIC_0109822367__ul16617163214165"><li id="EN-US_TOPIC_0109822367__li66405588">Only the name and description of private images can be changed.</li><li id="EN-US_TOPIC_0109822367__li9147183901514">The token obtained from Identity and Access Management (IAM) is valid for only 24 hours. If you want to use a token for authentication, you can cache it to avoid frequently calling the IAM API.</li></ul>
|
|
</div></div>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0109822367__section53720453"><h4 class="sectiontitle">Involved APIs</h4><p class="litext" id="EN-US_TOPIC_0109822367__p23385131">If you use a token for authentication, you must obtain the token and add <strong id="EN-US_TOPIC_0109822367__en-us_topic_0109822381_b842352706134841">X-Auth-Token</strong> to the request header of the IMS API when making an API call.</p>
|
|
<ul id="EN-US_TOPIC_0109822367__ul1840113419200"><li id="EN-US_TOPIC_0109822367__li6754315">IAM API used to obtain the token<p id="EN-US_TOPIC_0109822367__en-us_topic_0109822381_p1833933634"><a name="EN-US_TOPIC_0109822367__li6754315"></a><a name="li6754315"></a>URI format: POST https://<em id="EN-US_TOPIC_0109822367__en-us_topic_0109822381_i15500165112426">IAM endpoint</em>/v3/auth/tokens</p>
|
|
</li><li id="EN-US_TOPIC_0109822367__li21736599">IMS API used to update image information (Native OpenStack API)<p id="EN-US_TOPIC_0109822367__p179232412319"><a name="EN-US_TOPIC_0109822367__li21736599"></a><a name="li21736599"></a>URI format: PATCH https://<em id="EN-US_TOPIC_0109822367__i11810560137">IMS endpoint</em>/v2/images/<em id="EN-US_TOPIC_0109822367__i15825618138">Image ID</em></p>
|
|
</li></ul>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0109822367__section13722030"><h4 class="sectiontitle">Procedure</h4><ol id="EN-US_TOPIC_0109822367__ol10336113224014"><li id="EN-US_TOPIC_0109822367__li1837051910476">Obtain the token.</li><li class="MsoNormal" id="EN-US_TOPIC_0109822367__li185241623104417">Send <strong id="EN-US_TOPIC_0109822367__b15398459181416">PATCH https://</strong><em id="EN-US_TOPIC_0109822367__i36811136101412">IMS endpoint</em><strong id="EN-US_TOPIC_0109822367__b1979115017142">/v2/cloudimages/</strong><em id="EN-US_TOPIC_0109822367__i77941645131416">Image ID</em>.</li><li class="MsoNormal" id="EN-US_TOPIC_0109822367__li12524623104415">Specify the following parameters in the request body:
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0109822367__table5563313" frame="border" border="1" rules="all"><thead align="left"><tr id="EN-US_TOPIC_0109822367__row1943767711030"><th align="left" class="cellrowborder" valign="top" width="16.78%" id="mcps1.3.3.2.3.1.1.5.1.1"><p id="EN-US_TOPIC_0109822367__p3094801411030"><strong id="EN-US_TOPIC_0109822367__b842352706184931">Parameter</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="19.12%" id="mcps1.3.3.2.3.1.1.5.1.2"><p id="EN-US_TOPIC_0109822367__p2376120711030">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="19.1%" id="mcps1.3.3.2.3.1.1.5.1.3"><p id="EN-US_TOPIC_0109822367__p4560964911030">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="45%" id="mcps1.3.3.2.3.1.1.5.1.4"><p id="EN-US_TOPIC_0109822367__p339411611030">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="EN-US_TOPIC_0109822367__row648795911030"><td class="cellrowborder" valign="top" width="16.78%" headers="mcps1.3.3.2.3.1.1.5.1.1 "><p id="EN-US_TOPIC_0109822367__p5576264211030">op</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="19.12%" headers="mcps1.3.3.2.3.1.1.5.1.2 "><p id="EN-US_TOPIC_0109822367__p2048015811030">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="19.1%" headers="mcps1.3.3.2.3.1.1.5.1.3 "><p id="EN-US_TOPIC_0109822367__p4828009811030">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="45%" headers="mcps1.3.3.2.3.1.1.5.1.4 "><p id="EN-US_TOPIC_0109822367__p1837389511030">Specifies the operation. The value can be <strong id="EN-US_TOPIC_0109822367__b1893911244154">add</strong>, <strong id="EN-US_TOPIC_0109822367__b129391824161519">replace</strong>, or <strong id="EN-US_TOPIC_0109822367__b16940132421512">remove</strong>.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0109822367__row3114733311030"><td class="cellrowborder" valign="top" width="16.78%" headers="mcps1.3.3.2.3.1.1.5.1.1 "><p id="EN-US_TOPIC_0109822367__p3990607811030">path</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="19.12%" headers="mcps1.3.3.2.3.1.1.5.1.2 "><p id="EN-US_TOPIC_0109822367__p1116689111030">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="19.1%" headers="mcps1.3.3.2.3.1.1.5.1.3 "><p id="EN-US_TOPIC_0109822367__p3210299711030">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="45%" headers="mcps1.3.3.2.3.1.1.5.1.4 "><p id="EN-US_TOPIC_0109822367__p6308567716410">Specifies the name of the attribute to be modified. A slash (/) needs to be added in front of it.</p>
|
|
<p id="EN-US_TOPIC_0109822367__p219111881645">You can modify the following attributes:</p>
|
|
<ul id="EN-US_TOPIC_0109822367__ul3977269316441"><li id="EN-US_TOPIC_0109822367__li689349916441"><strong id="EN-US_TOPIC_0109822367__b144393801620">name</strong>: image name</li><li id="EN-US_TOPIC_0109822367__li37931456147"><strong id="EN-US_TOPIC_0109822367__b055122216167">__description</strong>: image description</li><li id="EN-US_TOPIC_0109822367__li4942518121410"><strong id="EN-US_TOPIC_0109822367__b151261930181819">__support_xen</strong>: Xen is supported.</li><li id="EN-US_TOPIC_0109822367__li2778132131414"><strong id="EN-US_TOPIC_0109822367__b430293101817">__support_largememory</strong>: Ultra-large memory is supported.</li><li id="EN-US_TOPIC_0109822367__li15386524151419"><strong id="EN-US_TOPIC_0109822367__b0934173516182">__support_diskintensive</strong>: Intensive storage is supported.</li><li id="EN-US_TOPIC_0109822367__li885917266147"><strong id="EN-US_TOPIC_0109822367__b7275144110187">__support_highperformance</strong>: High-performance computing (HPC) is supported.</li><li id="EN-US_TOPIC_0109822367__li6451162941418"><strong id="EN-US_TOPIC_0109822367__b1646510461187">__support_xen_gpu_type</strong>: GPU-accelerated ECSs that use Xen for virtualization are supported.</li><li id="EN-US_TOPIC_0109822367__li6398168416441"><strong id="EN-US_TOPIC_0109822367__b20910145132013">__support_xen_hana</strong>: HANA ECSs that use Xen for virtualization are supported.</li><li id="EN-US_TOPIC_0109822367__li745121014613"><strong id="EN-US_TOPIC_0109822367__b889841152018">min_ram</strong>: minimum memory</li><li id="EN-US_TOPIC_0109822367__li4141727760"><strong id="EN-US_TOPIC_0109822367__b1662674517209">hw_vif_multiqueue_enabled</strong>: The NIC multi-queue feature is supported.</li><li id="EN-US_TOPIC_0109822367__li11576142233116"><strong id="EN-US_TOPIC_0109822367__b184532411406">hw_firmware_type</strong>: boot mode. The value can be <strong id="EN-US_TOPIC_0109822367__b1845112484018">bios</strong> or <strong id="EN-US_TOPIC_0109822367__b2461324194017">uefi</strong>.</li></ul>
|
|
<p id="EN-US_TOPIC_0109822367__p5020595511030">You can add or delete extended attributes.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0109822367__row4920041511030"><td class="cellrowborder" valign="top" width="16.78%" headers="mcps1.3.3.2.3.1.1.5.1.1 "><p id="EN-US_TOPIC_0109822367__p2581070311030">value</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="19.12%" headers="mcps1.3.3.2.3.1.1.5.1.2 "><p id="EN-US_TOPIC_0109822367__p1029221611030">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="19.1%" headers="mcps1.3.3.2.3.1.1.5.1.3 "><p id="EN-US_TOPIC_0109822367__p4031814520459">Determined by the attribute value</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="45%" headers="mcps1.3.3.2.3.1.1.5.1.4 "><p id="EN-US_TOPIC_0109822367__p1571272211030">Specifies the new value of the attribute.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<p class="MsoNormal" id="EN-US_TOPIC_0109822367__p13898779">Example request:</p>
|
|
<pre class="screen" id="EN-US_TOPIC_0109822367__screen18741151104517">[
|
|
{
|
|
"op": "replace",
|
|
"path": "/name",
|
|
"value": "ims_test"
|
|
}
|
|
]</pre>
|
|
</li><li class="MsoNormal" id="EN-US_TOPIC_0109822367__li7839453174511">Refer to "Updating Image Information" in the <em id="EN-US_TOPIC_0109822367__i1778834808184440">Image Management Service API Reference</em> for details about the request response parameters.<p id="EN-US_TOPIC_0109822367__p7849203403113">For details about status codes for request errors, see <a href="en-us_topic_0124290300.html">Status Codes</a>.</p>
|
|
</li></ol>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="en-us_topic_0219492328.html">Common Scenarios</a></div>
|
|
</div>
|
|
</div>
|
|
|