forked from docs/doc-exports
Reviewed-by: Pristromskaia, Margarita <margarita.pristromskaia@t-systems.com> Co-authored-by: wanghuijuan738 <wanghuijuan738@huawei.com> Co-committed-by: wanghuijuan738 <wanghuijuan738@huawei.com>
301 lines
31 KiB
HTML
301 lines
31 KiB
HTML
<a name="EN-US_TOPIC_0126150310"></a><a name="EN-US_TOPIC_0126150310"></a>
|
|
|
|
<h1 class="topictitle1">Reinstalling a BMS OS</h1>
|
|
<div id="body1534248552749"><div class="section" id="EN-US_TOPIC_0126150310__section61372619"><h4 class="sectiontitle">Function</h4><p id="EN-US_TOPIC_0126150310__p133713011576">This API is used to reinstall the BMS OS. The OS of BMSs supporting quick provisioning can be reinstalled using the original image without any change to the data disks. Password and key pair injection are supported during OS reinstallation.</p>
|
|
<div class="note" id="EN-US_TOPIC_0126150310__note1877310477403"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="EN-US_TOPIC_0126150310__p15731147162719">To check whether a BMS is quickly provisioned, use the <a href="en-us_topic_0131326852.html">Querying Flavor Details and Extended Flavor Information</a> API.</p>
|
|
<p id="EN-US_TOPIC_0126150310__p19773747194014">This is an asynchronous API. Calling the API successfully indicates that the task is delivered successfully. To check whether the task is successful, use the <a href="en-us_topic_0118696596.html">Querying Task Statuses</a> API.</p>
|
|
</div></div>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0126150310__section14303616615"><h4 class="sectiontitle">Constraints</h4><ul id="EN-US_TOPIC_0126150310__ul1666113467"><li id="EN-US_TOPIC_0126150310__li6661213161">For BMSs created from private images, ensure that Cloud-Init (for Linux) or Cloudbase-Init (for Windows) has been installed for the image. If an image without Cloud-Init or Cloudbase-Init is used, this API cannot inject a key pair or password. Cloud-Init or Cloudbase-Init has been installed for public images by default.</li><li id="EN-US_TOPIC_0126150310__li10888132712620">You are not allowed to perform other operations when reinstalling the OS. Otherwise, reinstalling the OS will fail.</li><li id="EN-US_TOPIC_0126150310__li6243239363">You can reinstall the OS only on a BMS that is stopped or for which OS reinstallation has failed.</li><li id="EN-US_TOPIC_0126150310__li1033956238">An encrypted password will be used as the value of <strong id="EN-US_TOPIC_0126150310__b5620162639">user_data</strong> for Linux images.</li></ul>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0126150310__section15482662"><h4 class="sectiontitle">URI</h4><p id="EN-US_TOPIC_0126150310__p66228246145352">POST /v1/{project_id}/baremetalservers/{server_id}/reinstallos</p>
|
|
<div class="p" id="EN-US_TOPIC_0126150310__p1849613244341"><a href="#EN-US_TOPIC_0126150310__table55945983">Table 1</a> lists the parameters.
|
|
<div class="tablenoborder"><a name="EN-US_TOPIC_0126150310__table55945983"></a><a name="table55945983"></a><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0126150310__table55945983" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Parameter description</caption><thead align="left"><tr id="EN-US_TOPIC_0126150310__row11302482"><th align="left" class="cellrowborder" valign="top" width="33%" id="mcps1.3.3.3.2.2.4.1.1"><p id="EN-US_TOPIC_0126150310__p43085863">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="32%" id="mcps1.3.3.3.2.2.4.1.2"><p id="EN-US_TOPIC_0126150310__p294000">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="35%" id="mcps1.3.3.3.2.2.4.1.3"><p id="EN-US_TOPIC_0126150310__p23814038">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="EN-US_TOPIC_0126150310__row49888896"><td class="cellrowborder" valign="top" width="33%" headers="mcps1.3.3.3.2.2.4.1.1 "><p id="EN-US_TOPIC_0126150310__p14468758">project_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="32%" headers="mcps1.3.3.3.2.2.4.1.2 "><p id="EN-US_TOPIC_0126150310__p31118786">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="35%" headers="mcps1.3.3.3.2.2.4.1.3 "><p id="EN-US_TOPIC_0126150310__p7411459134810">Specifies the project ID.</p>
|
|
<p id="EN-US_TOPIC_0126150310__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_0126150310__row613736410235"><td class="cellrowborder" valign="top" width="33%" headers="mcps1.3.3.3.2.2.4.1.1 "><p id="EN-US_TOPIC_0126150310__p2736446410235">server_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="32%" headers="mcps1.3.3.3.2.2.4.1.2 "><p id="EN-US_TOPIC_0126150310__p192907210235">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="35%" headers="mcps1.3.3.3.2.2.4.1.3 "><p id="EN-US_TOPIC_0126150310__p2203711610235">Specifies the BMS ID.</p>
|
|
<p id="EN-US_TOPIC_0126150310__p29791113277">You can obtain the BMS ID from the <span id="EN-US_TOPIC_0126150310__en-us_topic_0113746489_text895314101319">BMS</span><span id="EN-US_TOPIC_0126150310__en-us_topic_0113746489_text1695320481317"></span> console or by calling the API <a href="en-us_topic_0000002340063012.html">Querying BMSs</a>.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0126150310__section5126234"><h4 class="sectiontitle">Request Parameters</h4>
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0126150310__table2840889" frame="border" border="1" rules="all"><thead align="left"><tr id="EN-US_TOPIC_0126150310__row19854472"><th align="left" class="cellrowborder" valign="top" width="17%" id="mcps1.3.4.2.1.5.1.1"><p id="EN-US_TOPIC_0126150310__p5212090120624">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="18%" id="mcps1.3.4.2.1.5.1.2"><p id="EN-US_TOPIC_0126150310__p5568008920626">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.2.1.5.1.3"><p id="EN-US_TOPIC_0126150310__p4189246820628">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="45%" id="mcps1.3.4.2.1.5.1.4"><p id="EN-US_TOPIC_0126150310__p2137802720629">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="EN-US_TOPIC_0126150310__row6277626"><td class="cellrowborder" valign="top" width="17%" headers="mcps1.3.4.2.1.5.1.1 "><p id="EN-US_TOPIC_0126150310__p38725660">os-reinstall</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="18%" headers="mcps1.3.4.2.1.5.1.2 "><p id="EN-US_TOPIC_0126150310__p49770771">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.1.5.1.3 "><p id="EN-US_TOPIC_0126150310__p4900679">Object</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="45%" headers="mcps1.3.4.2.1.5.1.4 "><p id="EN-US_TOPIC_0126150310__p61410719">Specifies the operation of reinstalling the BMS OS. For details, see <a href="#EN-US_TOPIC_0126150310__table32200631">Table 2</a>.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="tablenoborder"><a name="EN-US_TOPIC_0126150310__table32200631"></a><a name="table32200631"></a><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0126150310__table32200631" frame="border" border="1" rules="all"><caption><b>Table 2 </b><strong id="EN-US_TOPIC_0126150310__b468161014610">os-reinstall</strong> data structure</caption><thead align="left"><tr id="EN-US_TOPIC_0126150310__row47660253"><th align="left" class="cellrowborder" valign="top" width="17%" id="mcps1.3.4.3.2.5.1.1"><p id="EN-US_TOPIC_0126150310__p35275281">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="18%" id="mcps1.3.4.3.2.5.1.2"><p id="EN-US_TOPIC_0126150310__p38725542">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.3.2.5.1.3"><p id="EN-US_TOPIC_0126150310__p49761220">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="45%" id="mcps1.3.4.3.2.5.1.4"><p id="EN-US_TOPIC_0126150310__p4126994">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="EN-US_TOPIC_0126150310__row7705141195211"><td class="cellrowborder" valign="top" width="17%" headers="mcps1.3.4.3.2.5.1.1 "><p id="EN-US_TOPIC_0126150310__p147051911145213">adminpass</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="18%" headers="mcps1.3.4.3.2.5.1.2 "><p id="EN-US_TOPIC_0126150310__p4705161105215">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.5.1.3 "><p id="EN-US_TOPIC_0126150310__p5705181165212">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="45%" headers="mcps1.3.4.3.2.5.1.4 "><p id="EN-US_TOPIC_0126150310__p1170581118522">Specifies the initial login password of the BMS administrator account.</p>
|
|
<p id="EN-US_TOPIC_0126150310__p11477160205316">The Linux administrator is <strong id="EN-US_TOPIC_0126150310__b6132438144313">root</strong>, and the Windows administrator is <strong id="EN-US_TOPIC_0126150310__b191339381433">Administrator</strong>.</p>
|
|
<p id="EN-US_TOPIC_0126150310__p1691123415315">Recommended password complexity requirements are as follows:</p>
|
|
<ul id="EN-US_TOPIC_0126150310__ul52104519219"><li id="EN-US_TOPIC_0126150310__li1025452217">The password contains 8 to 26 characters.</li><li id="EN-US_TOPIC_0126150310__li142114510215">Contains at least three of the following character types: uppercase letters, lowercase letters, digits, and special characters !@$%^-_=+[{}]:,./?</li><li id="EN-US_TOPIC_0126150310__li15244511217">The password cannot contain the username or the username in reverse.</li></ul>
|
|
<div class="note" id="EN-US_TOPIC_0126150310__note65349643112129"><span class="notetitle"> NOTE: </span><div class="notebody"><ul id="EN-US_TOPIC_0126150310__ul58921915515"><li id="EN-US_TOPIC_0126150310__li08912198554">For Windows BMSs, the password cannot contain more than two consecutive characters in the username.</li><li id="EN-US_TOPIC_0126150310__li7922564420">For Linux BMSs, <strong id="EN-US_TOPIC_0126150310__b1299175652518">user_data</strong> can be used to inject a password. In this case, <strong id="EN-US_TOPIC_0126150310__b114911827132616">adminpass</strong> is invalid.</li><li id="EN-US_TOPIC_0126150310__li1799120208550">Either <strong id="EN-US_TOPIC_0126150310__b842352706172923">adminpass</strong> or <strong id="EN-US_TOPIC_0126150310__b842352706172927">keyname</strong> can be set.</li><li id="EN-US_TOPIC_0126150310__li17382941175511">If both <strong id="EN-US_TOPIC_0126150310__b2065282386172946">adminpass</strong> and <strong id="EN-US_TOPIC_0126150310__b255018880172946">keyname</strong> are empty, <strong id="EN-US_TOPIC_0126150310__b842352706173023">user_data</strong> in metadata must be set.</li></ul>
|
|
</div></div>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0126150310__row45934497"><td class="cellrowborder" valign="top" width="17%" headers="mcps1.3.4.3.2.5.1.1 "><p id="EN-US_TOPIC_0126150310__p29706771">keyname</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="18%" headers="mcps1.3.4.3.2.5.1.2 "><p id="EN-US_TOPIC_0126150310__p57438237">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.5.1.3 "><p id="EN-US_TOPIC_0126150310__p21985640">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="45%" headers="mcps1.3.4.3.2.5.1.4 "><p id="EN-US_TOPIC_0126150310__p36006428">Specifies the key pair name.</p>
|
|
<p id="EN-US_TOPIC_0126150310__p42357123474">You can create a key pair using the <a href="en-us_topic_0000002340222820.html">Creating or Importing an SSH Key Pair (Native OpenStack API)</a> API, or query existing key pairs using the <a href="en-us_topic_0000002374101041.html">Querying SSH Key Pairs (Native OpenStack API)</a> API.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0126150310__row2345411710289"><td class="cellrowborder" valign="top" width="17%" headers="mcps1.3.4.3.2.5.1.1 "><p id="EN-US_TOPIC_0126150310__p2073531110289">userid</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="18%" headers="mcps1.3.4.3.2.5.1.2 "><p id="EN-US_TOPIC_0126150310__p183865010289">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.5.1.3 "><p id="EN-US_TOPIC_0126150310__p1471297410289">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="45%" headers="mcps1.3.4.3.2.5.1.4 "><p id="EN-US_TOPIC_0126150310__p5090020910289">Specifies the user ID. You can obtain the user ID from <strong id="EN-US_TOPIC_0126150310__b183514432436">My Credential</strong> on the management console.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0126150310__row6144862102847"><td class="cellrowborder" valign="top" width="17%" headers="mcps1.3.4.3.2.5.1.1 "><p id="EN-US_TOPIC_0126150310__p27971812102847">metadata</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="18%" headers="mcps1.3.4.3.2.5.1.2 "><p id="EN-US_TOPIC_0126150310__p51124270102847">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.5.1.3 "><p id="EN-US_TOPIC_0126150310__p47425188102847">Object</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="45%" headers="mcps1.3.4.3.2.5.1.4 "><p id="EN-US_TOPIC_0126150310__p16235056102847">Specifies the BMS metadata. For details, see <a href="#EN-US_TOPIC_0126150310__table9120223">Table 3</a>.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="tablenoborder"><a name="EN-US_TOPIC_0126150310__table9120223"></a><a name="table9120223"></a><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0126150310__table9120223" frame="border" border="1" rules="all"><caption><b>Table 3 </b><strong id="EN-US_TOPIC_0126150310__b482512157468">metadata</strong> data structure</caption><thead align="left"><tr id="EN-US_TOPIC_0126150310__row45607220"><th align="left" class="cellrowborder" valign="top" width="17.171717171717173%" id="mcps1.3.4.4.2.5.1.1"><p id="EN-US_TOPIC_0126150310__p3197346">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="18.181818181818183%" id="mcps1.3.4.4.2.5.1.2"><p id="EN-US_TOPIC_0126150310__p57658513">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="19.191919191919194%" id="mcps1.3.4.4.2.5.1.3"><p id="EN-US_TOPIC_0126150310__p39828009">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="45.45454545454546%" id="mcps1.3.4.4.2.5.1.4"><p id="EN-US_TOPIC_0126150310__p4843281">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="EN-US_TOPIC_0126150310__row56761457"><td class="cellrowborder" valign="top" width="17.171717171717173%" headers="mcps1.3.4.4.2.5.1.1 "><p id="EN-US_TOPIC_0126150310__p36421405103024">BYOL</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="18.181818181818183%" headers="mcps1.3.4.4.2.5.1.2 "><p id="EN-US_TOPIC_0126150310__p24837051">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="19.191919191919194%" headers="mcps1.3.4.4.2.5.1.3 "><p id="EN-US_TOPIC_0126150310__p65644149">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="45.45454545454546%" headers="mcps1.3.4.4.2.5.1.4 "><p id="EN-US_TOPIC_0126150310__p13345152413333">Specifies whether a user has the license of an image.</p>
|
|
<ul id="EN-US_TOPIC_0126150310__ul7453134512326"><li id="EN-US_TOPIC_0126150310__li154538452325">If this parameter is set to <strong id="EN-US_TOPIC_0126150310__b842352706215655">true</strong>, the license file delivered with the image is used, indicating that BYOL is used.</li><li id="EN-US_TOPIC_0126150310__li1845354573212">If this parameter is set to a value other than <strong id="EN-US_TOPIC_0126150310__b1593034899215814">true</strong>, BYOL is not used, and the license file provided by the cloud platform must be used.</li></ul>
|
|
<p id="EN-US_TOPIC_0126150310__p1213811423217">The default value is not <strong id="EN-US_TOPIC_0126150310__b184625899215847">true</strong>, indicating that BYOL is not used.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0126150310__row11285618104313"><td class="cellrowborder" valign="top" width="17.171717171717173%" headers="mcps1.3.4.4.2.5.1.1 "><p id="EN-US_TOPIC_0126150310__p1737951110318">user_data</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="18.181818181818183%" headers="mcps1.3.4.4.2.5.1.2 "><p id="EN-US_TOPIC_0126150310__p39934810104313">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="19.191919191919194%" headers="mcps1.3.4.4.2.5.1.3 "><p id="EN-US_TOPIC_0126150310__p13494158104313">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="45.45454545454546%" headers="mcps1.3.4.4.2.5.1.4 "><p id="EN-US_TOPIC_0126150310__p4078366294136">Specifies the Linux image root password injected during the BMS OS reinstallation. It is a user-defined initial password.</p>
|
|
<p id="EN-US_TOPIC_0126150310__p715605752417">Note: The password change script must be encoded using Base64.</p>
|
|
<p id="EN-US_TOPIC_0126150310__p156126154810">Recommended password complexity requirements are as follows:</p>
|
|
<ul id="EN-US_TOPIC_0126150310__ul13612715685"><li id="EN-US_TOPIC_0126150310__en-us_topic_0106040941_li0612151512820">Contains 8 to 26 characters.</li><li id="EN-US_TOPIC_0126150310__en-us_topic_0106040941_li136124156810">Contains at least three of the following character types: uppercase letters, lowercase letters, digits, and special characters !@$%^-_=+[{}]:,./?</li></ul>
|
|
<div class="p" id="EN-US_TOPIC_0126150310__p561215151820">An example is as follows:<div class="codecoloring" codetype="Java" id="EN-US_TOPIC_0126150310__en-us_topic_0106040941_screen126121153810"><div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span>
|
|
<span class="normal">2</span></pre></div></td><td class="code"><div><pre><span></span><span class="err">#</span><span class="o">!/</span><span class="n">bin</span><span class="o">/</span><span class="n">bash</span><span class="w"> </span>
|
|
<span class="n">echo</span><span class="w"> </span><span class="err">'</span><span class="n">root</span><span class="p">:</span><span class="n">$6$V6azyeLwcD3CHlpY$BN3VVq18fmCkj66B4zdHLWevqcxlig</span><span class="o">/</span><span class="n">GpOkLcOhab9smJoLKYm</span><span class="o">/</span><span class="n">Tf9Hcwa6DpiPDhdHfGEAPajFmLZa0YDd910</span><span class="err">'</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="n">chpasswd</span><span class="w"> </span><span class="o">-</span><span class="n">e</span>
|
|
</pre></div></td></tr></table></div>
|
|
</div>
|
|
</div>
|
|
<ul id="EN-US_TOPIC_0126150310__ul15612615889"><li id="EN-US_TOPIC_0126150310__li045817524352">This script must be encoded using Base64.</li></ul>
|
|
<p id="EN-US_TOPIC_0126150310__p206121151288">where, <strong id="EN-US_TOPIC_0126150310__en-us_topic_0106040941_b2030011547116">$6$V6azyeLwcD3CHlpY$BN3VVq18fmCkj66B4zdHLWevqcxlig</strong> is the ciphertext password, which can be generated as follows:</p>
|
|
<ol id="EN-US_TOPIC_0126150310__ol186121815882"><li id="EN-US_TOPIC_0126150310__en-us_topic_0106040941_li1461312151784">Generate an encrypted salt value.<div class="codecoloring" codetype="Java" id="EN-US_TOPIC_0126150310__en-us_topic_0106040941_screen3613215481"><div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span>
|
|
<span class="normal">2</span></pre></div></td><td class="code"><div><pre><span></span><span class="o">[</span><span class="n">root</span><span class="nd">@test</span><span class="w"> </span><span class="n">linux</span><span class="o">]</span><span class="err">#</span><span class="w"> </span><span class="n">python</span><span class="w"> </span><span class="o">-</span><span class="n">c</span><span class="w"> </span><span class="s">"import crypt, getpass, pwd;print crypt.mksalt()"</span><span class="w"> </span>
|
|
<span class="n">$6$V6azyeLwcD3CHlpY</span>
|
|
</pre></div></td></tr></table></div>
|
|
</div>
|
|
</li><li id="EN-US_TOPIC_0126150310__en-us_topic_0106040941_li911475973910">Generate a ciphertext password based on the salt value.<div class="codecoloring" codetype="Java" id="EN-US_TOPIC_0126150310__en-us_topic_0106040941_screen99357473910"><div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span>
|
|
<span class="normal">2</span></pre></div></td><td class="code"><div><pre><span></span><span class="o">[</span><span class="n">root</span><span class="nd">@test</span><span class="w"> </span><span class="n">linux</span><span class="o">]</span><span class="err">#</span><span class="w"> </span><span class="n">python</span><span class="w"> </span><span class="o">-</span><span class="n">c</span><span class="w"> </span><span class="s">"import crypt, getpass, pwd;print crypt.crypt('Cloud.1234','\$6\$V6azyeLwcD3CHlpY')"</span><span class="w"> </span>
|
|
<span class="w"> </span><span class="n">$6$V6azyeLwcD3CHlpY$BN3VVq18fmCkj66B4zdHLWevqcxlig</span><span class="o">/</span><span class="n">GpOkLcOhab9smJoLKYm</span><span class="o">/</span><span class="n">Tf9Hcwa6DpiPDhdHfGEAPajFmLZa0YDd910</span>
|
|
</pre></div></td></tr></table></div>
|
|
</div>
|
|
</li><li id="EN-US_TOPIC_0126150310__li02957218349">After the ciphertext is generated, the password change script must be encoded using Base64.</li></ol>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0126150310__section161455399472"><h4 class="sectiontitle">Example Request</h4><div class="p" id="EN-US_TOPIC_0126150310__p891701195010">Reinstalling the OS of a BMS (ID: cf2a8b97-b5c6-47ef-9714-eb27adf26e5b; key name: KeyPair-350b; user ID: 7e25b1da389f4697a79df3a0e5bd494e)<div class="codecoloring" codetype="Java" id="EN-US_TOPIC_0126150310__screen14823135584916"><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/reinstallos</span>
|
|
</pre></div></td></tr></table></div>
|
|
</div>
|
|
<div class="codecoloring" codetype="Java" id="EN-US_TOPIC_0126150310__screen40301619143023"><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>
|
|
<span class="normal">6</span>
|
|
<span class="normal">7</span>
|
|
<span class="normal">8</span>
|
|
<span class="normal">9</span></pre></div></td><td class="code"><div><pre><span></span><span class="p">{</span>
|
|
<span class="w"> </span><span class="s">"os-reinstall"</span><span class="p">:</span><span class="w"> </span><span class="p">{</span>
|
|
<span class="w"> </span><span class="s">"keyname"</span><span class="p">:</span><span class="w"> </span><span class="s">"$key_name"</span><span class="p">,</span><span class="w"> </span>
|
|
<span class="w"> </span><span class="s">"userid"</span><span class="p">:</span><span class="w"> </span><span class="s">"7e25b1da389f4697a79df3a0e5bd494e"</span><span class="p">,</span><span class="w"> </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">"user_data"</span><span class="p">:</span><span class="w"> </span><span class="s">"$USER_DATA"</span>
|
|
<span class="w"> </span><span class="p">}</span>
|
|
<span class="w"> </span><span class="p">}</span>
|
|
<span class="p">}</span>
|
|
</pre></div></td></tr></table></div>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0126150310__section1365381616361"><h4 class="sectiontitle">Response Parameters</h4>
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0126150310__table582214482368" frame="border" border="1" rules="all"><caption><b>Table 4 </b>Normal response</caption><thead align="left"><tr id="EN-US_TOPIC_0126150310__row4823144814363"><th align="left" class="cellrowborder" valign="top" width="19.29192919291929%" id="mcps1.3.6.2.2.4.1.1"><p id="EN-US_TOPIC_0126150310__p1797835763616">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="19.28192819281928%" id="mcps1.3.6.2.2.4.1.2"><p id="EN-US_TOPIC_0126150310__p5978135720366">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="61.42614261426142%" id="mcps1.3.6.2.2.4.1.3"><p id="EN-US_TOPIC_0126150310__p1797835716364">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="EN-US_TOPIC_0126150310__row18824174817362"><td class="cellrowborder" valign="top" width="19.29192919291929%" headers="mcps1.3.6.2.2.4.1.1 "><p id="EN-US_TOPIC_0126150310__p297811573366">job_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="19.28192819281928%" headers="mcps1.3.6.2.2.4.1.2 "><p id="EN-US_TOPIC_0126150310__p149782575365">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="61.42614261426142%" headers="mcps1.3.6.2.2.4.1.3 "><p id="EN-US_TOPIC_0126150310__p3978145720368">Specifies the task ID returned after a task command is issued. The task ID can be used to query the execution status of the task.</p>
|
|
<p id="EN-US_TOPIC_0126150310__p9978185753617">For details about how to query the task execution status based on <strong id="EN-US_TOPIC_0126150310__b10955394612">job_id</strong>, see <a href="en-us_topic_0118696596.html">Querying Task Statuses</a>.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0126150310__table6467239411151" frame="border" border="1" rules="all"><caption><b>Table 5 </b>Abnormal response</caption><thead align="left"><tr id="EN-US_TOPIC_0126150310__row2581079811151"><th align="left" class="cellrowborder" valign="top" width="19.93%" id="mcps1.3.7.2.4.1.1"><p id="EN-US_TOPIC_0126150310__p1029990211151">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="23.69%" id="mcps1.3.7.2.4.1.2"><p id="EN-US_TOPIC_0126150310__p2898571411151">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="56.379999999999995%" id="mcps1.3.7.2.4.1.3"><p id="EN-US_TOPIC_0126150310__p6614149111151">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="EN-US_TOPIC_0126150310__row5586052011151"><td class="cellrowborder" valign="top" width="19.93%" headers="mcps1.3.7.2.4.1.1 "><p id="EN-US_TOPIC_0126150310__p2840824911151">error</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="23.69%" headers="mcps1.3.7.2.4.1.2 "><p id="EN-US_TOPIC_0126150310__p1936686411151">Dictionary data structure</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="56.379999999999995%" headers="mcps1.3.7.2.4.1.3 "><p id="EN-US_TOPIC_0126150310__p2558244011151">Specifies the error returned when a task submission encounters an exception. For details, see <a href="#EN-US_TOPIC_0126150310__table6409189311151">Table 6</a>.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="tablenoborder"><a name="EN-US_TOPIC_0126150310__table6409189311151"></a><a name="table6409189311151"></a><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0126150310__table6409189311151" frame="border" border="1" rules="all"><caption><b>Table 6 </b><strong id="EN-US_TOPIC_0126150310__b222314810588">error</strong> data structure</caption><thead align="left"><tr id="EN-US_TOPIC_0126150310__row2324327311151"><th align="left" class="cellrowborder" valign="top" width="20.169999999999998%" id="mcps1.3.8.2.4.1.1"><p id="EN-US_TOPIC_0126150310__p365693111151">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="23.369999999999997%" id="mcps1.3.8.2.4.1.2"><p id="EN-US_TOPIC_0126150310__p2777597711151">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="56.46%" id="mcps1.3.8.2.4.1.3"><p id="EN-US_TOPIC_0126150310__p3526170111151">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="EN-US_TOPIC_0126150310__row3762550011151"><td class="cellrowborder" valign="top" width="20.169999999999998%" headers="mcps1.3.8.2.4.1.1 "><p id="EN-US_TOPIC_0126150310__p2776668011151">message</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="23.369999999999997%" headers="mcps1.3.8.2.4.1.2 "><p id="EN-US_TOPIC_0126150310__p3450864111151">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="56.46%" headers="mcps1.3.8.2.4.1.3 "><p id="EN-US_TOPIC_0126150310__p4373654211151">Specifies the error message.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0126150310__row5808456411151"><td class="cellrowborder" valign="top" width="20.169999999999998%" headers="mcps1.3.8.2.4.1.1 "><p id="EN-US_TOPIC_0126150310__p722924311151">code</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="23.369999999999997%" headers="mcps1.3.8.2.4.1.2 "><p id="EN-US_TOPIC_0126150310__p4869780211151">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="56.46%" headers="mcps1.3.8.2.4.1.3 "><p id="EN-US_TOPIC_0126150310__p5220791411151">Specifies the error code.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0126150310__section8507192318382"><h4 class="sectiontitle">Example Response</h4><ul id="EN-US_TOPIC_0126150310__ul2017217485381"><li id="EN-US_TOPIC_0126150310__li2172164813381">Normal response</li></ul>
|
|
<pre class="screen" id="EN-US_TOPIC_0126150310__screen1238091143910">{
|
|
"job_id": "70a599e0-31e7-49b7-b260-868f441e862b"
|
|
} </pre>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0126150310__section868814916514"><h4 class="sectiontitle">Returned Values</h4><div class="p" id="EN-US_TOPIC_0126150310__en-us_topic_0106040941_p193201622141412">Normal values
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0126150310__en-us_topic_0106040941_table753804619176" frame="border" border="1" rules="all"><thead align="left"><tr id="EN-US_TOPIC_0126150310__en-us_topic_0106040941_row10735134615172"><th align="left" class="cellrowborder" valign="top" width="42.42%" id="mcps1.3.10.2.1.1.3.1.1"><p id="EN-US_TOPIC_0126150310__en-us_topic_0106040941_p19735204616177">Returned Values</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="57.58%" id="mcps1.3.10.2.1.1.3.1.2"><p id="EN-US_TOPIC_0126150310__en-us_topic_0106040941_p207355465176">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="EN-US_TOPIC_0126150310__en-us_topic_0106040941_row1473514621713"><td class="cellrowborder" valign="top" width="42.42%" headers="mcps1.3.10.2.1.1.3.1.1 "><p id="EN-US_TOPIC_0126150310__en-us_topic_0106040941_p13735144611178">200</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="57.58%" headers="mcps1.3.10.2.1.1.3.1.2 "><p id="EN-US_TOPIC_0126150310__en-us_topic_0106040941_p207351246161711">The request has been successfully processed.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<p id="EN-US_TOPIC_0126150310__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_0126150310__section14752650154917"><h4 class="sectiontitle">Error Codes</h4><p id="EN-US_TOPIC_0126150310__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_0113746490.html">BMS Status Management</a></div>
|
|
</div>
|
|
</div>
|
|
|