forked from docs/doc-exports
Reviewed-by: Pristromskaia, Margarita <margarita.pristromskaia@t-systems.com> Co-authored-by: guoyanyan <guoyanyan3@huawei.com> Co-committed-by: guoyanyan <guoyanyan3@huawei.com>
155 lines
14 KiB
HTML
155 lines
14 KiB
HTML
<a name="EN-US_TOPIC_0131703289"></a><a name="EN-US_TOPIC_0131703289"></a>
|
|
|
|
<h1 class="topictitle1">Updating <span id="text269043134117">BMS</span><span id="text368174714413"></span> Metadata</h1>
|
|
<div id="body1537193025626"><div class="section" id="EN-US_TOPIC_0131703289__section61558535185333"><h4 class="sectiontitle">Function</h4><p id="EN-US_TOPIC_0131703289__p64215781155447">This API is used to update <span id="EN-US_TOPIC_0131703289__text10707145264115">BMS</span><span id="EN-US_TOPIC_0131703289__text1589125717415"></span> metadata.</p>
|
|
<ul id="EN-US_TOPIC_0131703289__ul64284563155458"><li id="EN-US_TOPIC_0131703289__li48990849155458">If the metadata does not contain the target field, the field is automatically added to the field.</li><li id="EN-US_TOPIC_0131703289__li44616756155458">If the metadata contains the target field, the field value is automatically updated.</li><li id="EN-US_TOPIC_0131703289__li29502109432">If the field in the metadata is not requested, the field value remains unchanged.</li></ul>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0131703289__section559147123915"><h4 class="sectiontitle">Constraints</h4><p id="EN-US_TOPIC_0131703289__p167381918395">The <span id="EN-US_TOPIC_0131703289__text148671749420">BMS</span><span id="EN-US_TOPIC_0131703289__text14526904215"></span> must be in active, stopped, or paused state. The state is indicated by the <strong id="EN-US_TOPIC_0131703289__b560314413111">OS-EXT-STS:vm_state</strong> parameter.</p>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0131703289__section47451206185333"><h4 class="sectiontitle">URI</h4><p id="EN-US_TOPIC_0131703289__p9343405185333">POST /v1/{project_id}/baremetalservers/{server_id}/metadata</p>
|
|
<div class="p" id="EN-US_TOPIC_0131703289__p1465530153818"><a href="#EN-US_TOPIC_0131703289__table18618337185333">Table 1</a> lists the parameters.
|
|
<div class="tablenoborder"><a name="EN-US_TOPIC_0131703289__table18618337185333"></a><a name="table18618337185333"></a><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0131703289__table18618337185333" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Parameter description</caption><thead align="left"><tr id="EN-US_TOPIC_0131703289__row17183202185333"><th align="left" class="cellrowborder" valign="top" width="19.99%" id="mcps1.3.3.3.2.2.4.1.1"><p id="EN-US_TOPIC_0131703289__p49662088185333">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="18.67%" id="mcps1.3.3.3.2.2.4.1.2"><p id="EN-US_TOPIC_0131703289__p63206191185333">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="61.339999999999996%" id="mcps1.3.3.3.2.2.4.1.3"><p id="EN-US_TOPIC_0131703289__p19427838185333">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="EN-US_TOPIC_0131703289__row30151070185333"><td class="cellrowborder" valign="top" width="19.99%" headers="mcps1.3.3.3.2.2.4.1.1 "><p id="EN-US_TOPIC_0131703289__p26317623185333">project_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="18.67%" headers="mcps1.3.3.3.2.2.4.1.2 "><p id="EN-US_TOPIC_0131703289__p51352688185333">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="61.339999999999996%" headers="mcps1.3.3.3.2.2.4.1.3 "><p id="EN-US_TOPIC_0131703289__p37593705">Specifies the project ID.</p>
|
|
<p id="EN-US_TOPIC_0131703289__p652825144113">For details about how to obtain the project ID, see <a href="en-us_topic_0171277624.html">Obtaining a Project ID</a>.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0131703289__row56472316185333"><td class="cellrowborder" valign="top" width="19.99%" headers="mcps1.3.3.3.2.2.4.1.1 "><p id="EN-US_TOPIC_0131703289__p10854909185333">server_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="18.67%" headers="mcps1.3.3.3.2.2.4.1.2 "><p id="EN-US_TOPIC_0131703289__p6832475185333">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="61.339999999999996%" headers="mcps1.3.3.3.2.2.4.1.3 "><p id="EN-US_TOPIC_0131703289__p16559613185333">Specifies the <span id="EN-US_TOPIC_0131703289__text1238838201119">BMS</span><span id="EN-US_TOPIC_0131703289__text538193813116"></span> ID.</p>
|
|
<p id="EN-US_TOPIC_0131703289__p29791113277">You can obtain the BMS ID from the <span id="EN-US_TOPIC_0131703289__en-us_topic_0113746489_text013014803615">BMS</span><span id="EN-US_TOPIC_0131703289__en-us_topic_0113746489_text10131448133612"></span> console or by calling the <a href="en-us_topic_0053158693.html">Querying BMSs (Native OpenStack API)</a>.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0131703289__section14818796185333"><h4 class="sectiontitle">Request</h4>
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0131703289__table1435414820581" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Request parameters</caption><thead align="left"><tr id="EN-US_TOPIC_0131703289__row835444811586"><th align="left" class="cellrowborder" valign="top" width="15.229999999999999%" id="mcps1.3.4.2.2.5.1.1"><p id="EN-US_TOPIC_0131703289__p1935419487583">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="17.29%" id="mcps1.3.4.2.2.5.1.2"><p id="EN-US_TOPIC_0131703289__p163542487580">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="16.74%" id="mcps1.3.4.2.2.5.1.3"><p id="EN-US_TOPIC_0131703289__p143544487583">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="50.739999999999995%" id="mcps1.3.4.2.2.5.1.4"><p id="EN-US_TOPIC_0131703289__p935410486583">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="EN-US_TOPIC_0131703289__row635464817583"><td class="cellrowborder" valign="top" width="15.229999999999999%" headers="mcps1.3.4.2.2.5.1.1 "><p id="EN-US_TOPIC_0131703289__p7354648175811">metadata</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="17.29%" headers="mcps1.3.4.2.2.5.1.2 "><p id="EN-US_TOPIC_0131703289__p2354948195818">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="16.74%" headers="mcps1.3.4.2.2.5.1.3 "><p id="EN-US_TOPIC_0131703289__p1035444820580">Object</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50.739999999999995%" headers="mcps1.3.4.2.2.5.1.4 "><p id="EN-US_TOPIC_0131703289__p735464865816">Specifies the user-defined metadata key-value pair.</p>
|
|
<p id="EN-US_TOPIC_0131703289__p8262254217">If you do not specify any key-value pair, metadata will not be updated.</p>
|
|
<p id="EN-US_TOPIC_0131703289__p107432571608"><strong id="EN-US_TOPIC_0131703289__b46981743201816">key</strong>:</p>
|
|
<p id="EN-US_TOPIC_0131703289__p1974335720010">It contains a maximum of 255 Unicode characters which can be letters, digits, hyphens (-), underscores (_), colons (:), and periods (.). <strong id="EN-US_TOPIC_0131703289__b10852457181712">key</strong> cannot be left blank.</p>
|
|
<p id="EN-US_TOPIC_0131703289__p524315313116"><strong id="EN-US_TOPIC_0131703289__b322015523188">value</strong>:</p>
|
|
<p id="EN-US_TOPIC_0131703289__p124313316112">It contains a maximum of 255 Unicode characters.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<ul id="EN-US_TOPIC_0131703289__ul59471791185333"><li id="EN-US_TOPIC_0131703289__li16360637104115">Example request<div class="codecoloring" codetype="Java" id="EN-US_TOPIC_0131703289__screen169110242557"><div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span></pre></div></td><td class="code"><div><pre><span></span><span class="n">POST</span><span class="w"> </span><span class="n">https</span><span class="p">:</span><span class="c1">//{BMS Endpoint}/v1/bbf1946d374b44a0a2a95533562ba954/baremetalservers/cf2a8b97-b5c6-47ef-9714-eb27adf26e5b/metadata</span>
|
|
</pre></div></td></tr></table></div>
|
|
|
|
</div>
|
|
<div class="codecoloring" codetype="Java" id="EN-US_TOPIC_0131703289__screen61671139194851"><div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span>
|
|
<span class="normal">2</span>
|
|
<span class="normal">3</span>
|
|
<span class="normal">4</span>
|
|
<span class="normal">5</span></pre></div></td><td class="code"><div><pre><span></span><span class="p">{</span>
|
|
<span class="w"> </span><span class="s">"metadata"</span><span class="p">:</span><span class="w"> </span><span class="p">{</span>
|
|
<span class="w"> </span><span class="s">"key"</span><span class="p">:</span><span class="w"> </span><span class="s">"value"</span>
|
|
<span class="w"> </span><span class="p">}</span>
|
|
<span class="p">}</span>
|
|
</pre></div></td></tr></table></div>
|
|
|
|
</div>
|
|
</li></ul>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0131703289__section22254218185333"><h4 class="sectiontitle">Response</h4>
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0131703289__table126505191447" frame="border" border="1" rules="all"><caption><b>Table 3 </b>Parameter description</caption><thead align="left"><tr id="EN-US_TOPIC_0131703289__row1165013196419"><th align="left" class="cellrowborder" valign="top" width="15.229999999999999%" id="mcps1.3.5.2.2.5.1.1"><p id="EN-US_TOPIC_0131703289__p1565041913412">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="17.29%" id="mcps1.3.5.2.2.5.1.2"><p id="EN-US_TOPIC_0131703289__p196504193412">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="16.74%" id="mcps1.3.5.2.2.5.1.3"><p id="EN-US_TOPIC_0131703289__p46501191042">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="50.739999999999995%" id="mcps1.3.5.2.2.5.1.4"><p id="EN-US_TOPIC_0131703289__p19650619244">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="EN-US_TOPIC_0131703289__row8650161918419"><td class="cellrowborder" valign="top" width="15.229999999999999%" headers="mcps1.3.5.2.2.5.1.1 "><p id="EN-US_TOPIC_0131703289__p156509192410">metadata</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="17.29%" headers="mcps1.3.5.2.2.5.1.2 "><p id="EN-US_TOPIC_0131703289__p765015197415">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="16.74%" headers="mcps1.3.5.2.2.5.1.3 "><p id="EN-US_TOPIC_0131703289__p1265016194411">Object</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50.739999999999995%" headers="mcps1.3.5.2.2.5.1.4 "><p id="EN-US_TOPIC_0131703289__p1265014196415">Specifies the user-defined metadata key-value pair.</p>
|
|
<p id="EN-US_TOPIC_0131703289__p265021920417">If you do not specify any key-value pair, metadata will not be updated.</p>
|
|
<p id="EN-US_TOPIC_0131703289__p136506191845"><strong id="EN-US_TOPIC_0131703289__b6989040292">key</strong>:</p>
|
|
<p id="EN-US_TOPIC_0131703289__p865020191346">It contains a maximum of 255 Unicode characters which can be letters, digits, hyphens (-), underscores (_), colons (:), and periods (.). <strong id="EN-US_TOPIC_0131703289__b2295124142919">key</strong> cannot be left blank.</p>
|
|
<p id="EN-US_TOPIC_0131703289__p165051918413"><strong id="EN-US_TOPIC_0131703289__b19536939102913">value</strong>:</p>
|
|
<p id="EN-US_TOPIC_0131703289__p1865015191417">It contains a maximum of 255 Unicode characters.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<ul id="EN-US_TOPIC_0131703289__ul57761257185333"><li id="EN-US_TOPIC_0131703289__li18618171818427">Example response<div class="codecoloring" codetype="Java" id="EN-US_TOPIC_0131703289__screen6174896919492"><div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span>
|
|
<span class="normal">2</span>
|
|
<span class="normal">3</span>
|
|
<span class="normal">4</span>
|
|
<span class="normal">5</span></pre></div></td><td class="code"><div><pre><span></span><span class="p">{</span>
|
|
<span class="w"> </span><span class="s">"metadata"</span><span class="p">:{</span>
|
|
<span class="w"> </span><span class="s">"key"</span><span class="p">:</span><span class="w"> </span><span class="s">"value"</span>
|
|
<span class="w"> </span><span class="p">}</span>
|
|
<span class="p">}</span><span class="w"> </span>
|
|
</pre></div></td></tr></table></div>
|
|
|
|
</div>
|
|
</li></ul>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0131703289__section868814916514"><h4 class="sectiontitle">Returned Values</h4><div class="p" id="EN-US_TOPIC_0131703289__en-us_topic_0106040941_p193201622141412">Normal values
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0131703289__en-us_topic_0106040941_table753804619176" frame="border" border="1" rules="all"><thead align="left"><tr id="EN-US_TOPIC_0131703289__en-us_topic_0106040941_row10735134615172"><th align="left" class="cellrowborder" valign="top" width="42.42%" id="mcps1.3.6.2.1.1.3.1.1"><p id="EN-US_TOPIC_0131703289__en-us_topic_0106040941_p19735204616177">Returned Values</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="57.58%" id="mcps1.3.6.2.1.1.3.1.2"><p id="EN-US_TOPIC_0131703289__en-us_topic_0106040941_p207355465176">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="EN-US_TOPIC_0131703289__en-us_topic_0106040941_row1473514621713"><td class="cellrowborder" valign="top" width="42.42%" headers="mcps1.3.6.2.1.1.3.1.1 "><p id="EN-US_TOPIC_0131703289__en-us_topic_0106040941_p13735144611178">200</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="57.58%" headers="mcps1.3.6.2.1.1.3.1.2 "><p id="EN-US_TOPIC_0131703289__en-us_topic_0106040941_p207351246161711">The request has been successfully processed.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<p id="EN-US_TOPIC_0131703289__en-us_topic_0106040941_p47633965">For details about other returned values, see <a href="en-us_topic_0053158690.html">Status Codes</a>.</p>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0131703289__section14752650154917"><h4 class="sectiontitle">Error Codes</h4><p id="EN-US_TOPIC_0131703289__en-us_topic_0106040941_p10243161417491">See <a href="en-us_topic_0107541808.html">Error Codes</a>.</p>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="en-us_topic_0131703308.html">BMS Metadata Management</a></div>
|
|
</div>
|
|
</div>
|
|
|