doc-exports/docs/bms/api-ref/en-us_topic_0130145446.html
guoyanyan c311ecafe3 bms_api_0510
Reviewed-by: Pristromskaia, Margarita <margarita.pristromskaia@t-systems.com>
Co-authored-by: guoyanyan <guoyanyan3@huawei.com>
Co-committed-by: guoyanyan <guoyanyan3@huawei.com>
2023-10-11 08:28:11 +00:00

166 lines
14 KiB
HTML

<a name="EN-US_TOPIC_0130145446"></a><a name="EN-US_TOPIC_0130145446"></a>
<h1 class="topictitle1">Querying EVS Disks Attached to a BMS</h1>
<div id="body1536542394863"><div class="section" id="EN-US_TOPIC_0130145446__section469285831917"><h4 class="sectiontitle">Function</h4><p id="EN-US_TOPIC_0130145446__p2362032">This API is used to query EVS disks attached to a BMS.</p>
</div>
<div class="section" id="EN-US_TOPIC_0130145446__section96389274207"><h4 class="sectiontitle">URI</h4><p id="EN-US_TOPIC_0130145446__p8793907163032">GET /v1/{project_id}/baremetalservers/{server_id}/os-volume_attachments</p>
<div class="p" id="EN-US_TOPIC_0130145446__p14557195733518"><a href="#EN-US_TOPIC_0130145446__table35893824">Table 1</a> lists the parameters.
<div class="tablenoborder"><a name="EN-US_TOPIC_0130145446__table35893824"></a><a name="table35893824"></a><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0130145446__table35893824" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Parameter description</caption><thead align="left"><tr id="EN-US_TOPIC_0130145446__row23656219"><th align="left" class="cellrowborder" valign="top" width="26.38%" id="mcps1.3.2.3.2.2.4.1.1"><p id="EN-US_TOPIC_0130145446__p37105578">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="24.88%" id="mcps1.3.2.3.2.2.4.1.2"><p id="EN-US_TOPIC_0130145446__p52761866">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="48.74%" id="mcps1.3.2.3.2.2.4.1.3"><p id="EN-US_TOPIC_0130145446__p45852771">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="EN-US_TOPIC_0130145446__row23086940"><td class="cellrowborder" valign="top" width="26.38%" headers="mcps1.3.2.3.2.2.4.1.1 "><p id="EN-US_TOPIC_0130145446__p58102813">project_id</p>
</td>
<td class="cellrowborder" valign="top" width="24.88%" headers="mcps1.3.2.3.2.2.4.1.2 "><p id="EN-US_TOPIC_0130145446__p8707407">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="48.74%" headers="mcps1.3.2.3.2.2.4.1.3 "><p id="EN-US_TOPIC_0130145446__p37593705">Specifies the project ID.</p>
<p id="EN-US_TOPIC_0130145446__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_0130145446__row39466727"><td class="cellrowborder" valign="top" width="26.38%" headers="mcps1.3.2.3.2.2.4.1.1 "><p id="EN-US_TOPIC_0130145446__p42688329">server_id</p>
</td>
<td class="cellrowborder" valign="top" width="24.88%" headers="mcps1.3.2.3.2.2.4.1.2 "><p id="EN-US_TOPIC_0130145446__p35202648">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="48.74%" headers="mcps1.3.2.3.2.2.4.1.3 "><p id="EN-US_TOPIC_0130145446__p32842235">Specifies the BMS ID.</p>
<p id="EN-US_TOPIC_0130145446__p29791113277">You can obtain the BMS ID from the <span id="EN-US_TOPIC_0130145446__en-us_topic_0113746489_text013014803615">BMS</span><span id="EN-US_TOPIC_0130145446__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_0130145446__section1998234711234"><h4 class="sectiontitle">Request</h4><ul id="EN-US_TOPIC_0130145446__ul1498724255219"><li id="EN-US_TOPIC_0130145446__li1943116295439">Request parameters<p id="EN-US_TOPIC_0130145446__p16700033124316"><a name="EN-US_TOPIC_0130145446__li1943116295439"></a><a name="li1943116295439"></a>None</p>
</li><li id="EN-US_TOPIC_0130145446__li169871942155219">Example request<div class="codecoloring" codetype="Java" id="EN-US_TOPIC_0130145446__screen89251620537"><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">GET</span><span class="w"> </span><span class="n">https</span><span class="p">:</span><span class="c1">//{BMS Endpoint}/v1/bbf1946d374b44a0a2a95533562ba954/baremetalservers/4d8c3732-a248-40ed-bebc-539a6ffd25c0/os-volume_attachments</span>
</pre></div></td></tr></table></div>
</div>
</li></ul>
</div>
<div class="section" id="EN-US_TOPIC_0130145446__section8590124112416"><h4 class="sectiontitle">Response</h4><ul id="EN-US_TOPIC_0130145446__ul56326682"><li id="EN-US_TOPIC_0130145446__li58635765">Response parameters
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0130145446__table57959838" frame="border" border="1" rules="all"><thead align="left"><tr id="EN-US_TOPIC_0130145446__row39710134"><th align="left" class="cellrowborder" valign="top" width="26.25262526252625%" id="mcps1.3.4.2.1.1.1.4.1.1"><p id="EN-US_TOPIC_0130145446__p62404314">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="24.942494249424943%" id="mcps1.3.4.2.1.1.1.4.1.2"><p id="EN-US_TOPIC_0130145446__p3528183">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="48.8048804880488%" id="mcps1.3.4.2.1.1.1.4.1.3"><p id="EN-US_TOPIC_0130145446__p17347392">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="EN-US_TOPIC_0130145446__row62961510"><td class="cellrowborder" valign="top" width="26.25262526252625%" headers="mcps1.3.4.2.1.1.1.4.1.1 "><p id="EN-US_TOPIC_0130145446__p66717520">volumeAttachments</p>
</td>
<td class="cellrowborder" valign="top" width="24.942494249424943%" headers="mcps1.3.4.2.1.1.1.4.1.2 "><p id="EN-US_TOPIC_0130145446__p49639570">Array of objects</p>
</td>
<td class="cellrowborder" valign="top" width="48.8048804880488%" headers="mcps1.3.4.2.1.1.1.4.1.3 "><p id="EN-US_TOPIC_0130145446__p15568903">Specifies disks attached to a BMS. For details, see <a href="#EN-US_TOPIC_0130145446__table7886611">Table 2</a>.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="EN-US_TOPIC_0130145446__table7886611"></a><a name="table7886611"></a><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0130145446__table7886611" frame="border" border="1" rules="all"><caption><b>Table 2 </b><strong id="EN-US_TOPIC_0130145446__b021952516328">volumeAttachments</strong> field data structure description</caption><thead align="left"><tr id="EN-US_TOPIC_0130145446__row60727582"><th align="left" class="cellrowborder" valign="top" width="26.502650265026507%" id="mcps1.3.4.2.1.2.2.4.1.1"><p id="EN-US_TOPIC_0130145446__p19987085">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="24.81248124812481%" id="mcps1.3.4.2.1.2.2.4.1.2"><p id="EN-US_TOPIC_0130145446__p4546697">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="48.684868486848686%" id="mcps1.3.4.2.1.2.2.4.1.3"><p id="EN-US_TOPIC_0130145446__p32738149">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="EN-US_TOPIC_0130145446__row34544438"><td class="cellrowborder" valign="top" width="26.502650265026507%" headers="mcps1.3.4.2.1.2.2.4.1.1 "><p id="EN-US_TOPIC_0130145446__p46636132">device</p>
</td>
<td class="cellrowborder" valign="top" width="24.81248124812481%" headers="mcps1.3.4.2.1.2.2.4.1.2 "><p id="EN-US_TOPIC_0130145446__p30355189">String</p>
</td>
<td class="cellrowborder" valign="top" width="48.684868486848686%" headers="mcps1.3.4.2.1.2.2.4.1.3 "><p id="EN-US_TOPIC_0130145446__p50116845">Specifies the mount directory, for example, <strong id="EN-US_TOPIC_0130145446__b39098179364">dev/sdd</strong>.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0130145446__row48398424"><td class="cellrowborder" valign="top" width="26.502650265026507%" headers="mcps1.3.4.2.1.2.2.4.1.1 "><p id="EN-US_TOPIC_0130145446__p27958252">id</p>
</td>
<td class="cellrowborder" valign="top" width="24.81248124812481%" headers="mcps1.3.4.2.1.2.2.4.1.2 "><p id="EN-US_TOPIC_0130145446__p25568738">String</p>
</td>
<td class="cellrowborder" valign="top" width="48.684868486848686%" headers="mcps1.3.4.2.1.2.2.4.1.3 "><p id="EN-US_TOPIC_0130145446__p50454834">Specifies the ID of the attached resource.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0130145446__row51440330"><td class="cellrowborder" valign="top" width="26.502650265026507%" headers="mcps1.3.4.2.1.2.2.4.1.1 "><p id="EN-US_TOPIC_0130145446__p5917164">serverId</p>
</td>
<td class="cellrowborder" valign="top" width="24.81248124812481%" headers="mcps1.3.4.2.1.2.2.4.1.2 "><p id="EN-US_TOPIC_0130145446__p33594135">String</p>
</td>
<td class="cellrowborder" valign="top" width="48.684868486848686%" headers="mcps1.3.4.2.1.2.2.4.1.3 "><p id="EN-US_TOPIC_0130145446__p62498284">Specifies the ID of the BMS to which the disk is attached.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0130145446__row25613652"><td class="cellrowborder" valign="top" width="26.502650265026507%" headers="mcps1.3.4.2.1.2.2.4.1.1 "><p id="EN-US_TOPIC_0130145446__p61439917">volumeId</p>
</td>
<td class="cellrowborder" valign="top" width="24.81248124812481%" headers="mcps1.3.4.2.1.2.2.4.1.2 "><p id="EN-US_TOPIC_0130145446__p51461341">String</p>
</td>
<td class="cellrowborder" valign="top" width="48.684868486848686%" headers="mcps1.3.4.2.1.2.2.4.1.3 "><p id="EN-US_TOPIC_0130145446__p1462819">Specifies the ID of the disk attached to the BMS.</p>
</td>
</tr>
</tbody>
</table>
</div>
</li><li id="EN-US_TOPIC_0130145446__li1082575016368">Example response<div class="codecoloring" codetype="Java" id="EN-US_TOPIC_0130145446__screen34284862202756"><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>
<span class="normal">10</span>
<span class="normal">11</span>
<span class="normal">12</span>
<span class="normal">13</span>
<span class="normal">14</span>
<span class="normal">15</span>
<span class="normal">16</span></pre></div></td><td class="code"><div><pre><span></span><span class="p">{</span>
<span class="w"> </span><span class="s">&quot;volumeAttachments&quot;</span><span class="p">:</span><span class="w"> </span><span class="o">[</span>
<span class="w"> </span><span class="p">{</span>
<span class="w"> </span><span class="s">&quot;device&quot;</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;/dev/sdd&quot;</span><span class="p">,</span>
<span class="w"> </span><span class="s">&quot;id&quot;</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;a26887c6-c47b-4654-abb5-dfadf7d3f803&quot;</span><span class="p">,</span>
<span class="w"> </span><span class="s">&quot;serverId&quot;</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;4d8c3732-a248-40ed-bebc-539a6ffd25c0&quot;</span><span class="p">,</span>
<span class="w"> </span><span class="s">&quot;volumeId&quot;</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;a26887c6-c47b-4654-abb5-dfadf7d3f803&quot;</span>
<span class="w"> </span><span class="p">},</span>
<span class="w"> </span><span class="p">{</span>
<span class="w"> </span><span class="s">&quot;device&quot;</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;/dev/sdc&quot;</span><span class="p">,</span>
<span class="w"> </span><span class="s">&quot;id&quot;</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;a26887c6-c47b-4654-abb5-dfadf7d3f804&quot;</span><span class="p">,</span>
<span class="w"> </span><span class="s">&quot;serverId&quot;</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;4d8c3732-a248-40ed-bebc-539a6ffd25c0&quot;</span><span class="p">,</span>
<span class="w"> </span><span class="s">&quot;volumeId&quot;</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;a26887c6-c47b-4654-abb5-dfadf7d3f804&quot;</span>
<span class="w"> </span><span class="p">}</span>
<span class="w"> </span><span class="o">]</span>
<span class="p">}</span>
</pre></div></td></tr></table></div>
</div>
</li></ul>
</div>
<div class="section" id="EN-US_TOPIC_0130145446__section868814916514"><h4 class="sectiontitle">Returned Values</h4><div class="p" id="EN-US_TOPIC_0130145446__en-us_topic_0106040941_p193201622141412">Normal values
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0130145446__en-us_topic_0106040941_table753804619176" frame="border" border="1" rules="all"><thead align="left"><tr id="EN-US_TOPIC_0130145446__en-us_topic_0106040941_row10735134615172"><th align="left" class="cellrowborder" valign="top" width="42.42%" id="mcps1.3.5.2.1.1.3.1.1"><p id="EN-US_TOPIC_0130145446__en-us_topic_0106040941_p19735204616177">Returned Values</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="57.58%" id="mcps1.3.5.2.1.1.3.1.2"><p id="EN-US_TOPIC_0130145446__en-us_topic_0106040941_p207355465176">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="EN-US_TOPIC_0130145446__en-us_topic_0106040941_row1473514621713"><td class="cellrowborder" valign="top" width="42.42%" headers="mcps1.3.5.2.1.1.3.1.1 "><p id="EN-US_TOPIC_0130145446__en-us_topic_0106040941_p13735144611178">200</p>
</td>
<td class="cellrowborder" valign="top" width="57.58%" headers="mcps1.3.5.2.1.1.3.1.2 "><p id="EN-US_TOPIC_0130145446__en-us_topic_0106040941_p207351246161711">The request has been successfully processed.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<p id="EN-US_TOPIC_0130145446__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_0130145446__section14752650154917"><h4 class="sectiontitle">Error Codes</h4><p id="EN-US_TOPIC_0130145446__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_0113746491.html">BMS Disk Management</a></div>
</div>
</div>