doc-exports/docs/ecs/api-ref/en-us_topic_0065962597.html
Artem Goncharov 3196b64bfc
move doc sources to other location (#3)
move doc sources to other location

Reviewed-by: OpenTelekomCloud Bot <None>
2022-04-27 16:24:25 +00:00

190 lines
16 KiB
HTML

<a name="EN-US_TOPIC_0065962597"></a><a name="EN-US_TOPIC_0065962597"></a>
<h1 class="topictitle1">Registering an FPGA Image</h1>
<div id="body1499692511539"><div class="section" id="EN-US_TOPIC_0065962597__section6847204211311"><h4 class="sectiontitle">Function</h4><p class="msobodytextfirstindent" id="EN-US_TOPIC_0065962597__p30233035211311">This API is used to register an FPGA image.</p>
</div>
<p id="EN-US_TOPIC_0065962597__p6161394820918">An FPGA image, which is also called accelerated engine image (AEI), is a logic FPGA file developed by a user. During FPGA image registration, the logic file must be stored in the Object Storage Service (OBS) bucket of the user.</p>
<div class="section" id="EN-US_TOPIC_0065962597__section62251638211311"><h4 class="sectiontitle">URI</h4><p id="EN-US_TOPIC_0065962597__p53736847103512">POST /v1/{project_id}/cloudservers/fpga_image</p>
<p id="EN-US_TOPIC_0065962597__p133957121216"><a href="#EN-US_TOPIC_0065962597__table10080802211311">Table 1</a> describes the parameters in the URI.</p>
<div class="tablenoborder"><a name="EN-US_TOPIC_0065962597__table10080802211311"></a><a name="table10080802211311"></a><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0065962597__table10080802211311" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Parameter description</caption><thead align="left"><tr id="EN-US_TOPIC_0065962597__row23258692211311"><th align="left" class="cellrowborder" valign="top" width="16.97%" id="mcps1.3.3.4.2.4.1.1"><p id="EN-US_TOPIC_0065962597__p7707213">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="17.28%" id="mcps1.3.3.4.2.4.1.2"><p id="EN-US_TOPIC_0065962597__p20304554">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="65.75%" id="mcps1.3.3.4.2.4.1.3"><p id="EN-US_TOPIC_0065962597__p34056167">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="EN-US_TOPIC_0065962597__row37402583211311"><td class="cellrowborder" valign="top" width="16.97%" headers="mcps1.3.3.4.2.4.1.1 "><p id="EN-US_TOPIC_0065962597__p54826436211311">project_id</p>
</td>
<td class="cellrowborder" valign="top" width="17.28%" headers="mcps1.3.3.4.2.4.1.2 "><p id="EN-US_TOPIC_0065962597__p54905009211311">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="65.75%" headers="mcps1.3.3.4.2.4.1.3 "><p id="EN-US_TOPIC_0065962597__p37593705">Specifies the project ID.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="EN-US_TOPIC_0065962597__section20272402211311"><h4 class="sectiontitle">Request</h4><p id="EN-US_TOPIC_0065962597__p19183350161210"><a href="#EN-US_TOPIC_0065962597__table5698154011375">Table 2</a> describes the request parameters.</p>
<div class="tablenoborder"><a name="EN-US_TOPIC_0065962597__table5698154011375"></a><a name="table5698154011375"></a><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0065962597__table5698154011375" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Request parameters</caption><thead align="left"><tr id="EN-US_TOPIC_0065962597__row18698940103719"><th align="left" class="cellrowborder" valign="top" width="16.848315168483154%" id="mcps1.3.4.3.2.5.1.1"><p id="EN-US_TOPIC_0065962597__p1569884093712">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="13.138686131386859%" id="mcps1.3.4.3.2.5.1.2"><p id="EN-US_TOPIC_0065962597__p9699184073710">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="17.358264173582644%" id="mcps1.3.4.3.2.5.1.3"><p id="EN-US_TOPIC_0065962597__p1769974053715">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="52.654734526547344%" id="mcps1.3.4.3.2.5.1.4"><p id="EN-US_TOPIC_0065962597__p469974003711">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="EN-US_TOPIC_0065962597__row769974019371"><td class="cellrowborder" valign="top" width="16.848315168483154%" headers="mcps1.3.4.3.2.5.1.1 "><p id="EN-US_TOPIC_0065962597__p1378615433718">fpga_image</p>
</td>
<td class="cellrowborder" valign="top" width="13.138686131386859%" headers="mcps1.3.4.3.2.5.1.2 "><p id="EN-US_TOPIC_0065962597__p769911401374">Object</p>
</td>
<td class="cellrowborder" valign="top" width="17.358264173582644%" headers="mcps1.3.4.3.2.5.1.3 "><p id="EN-US_TOPIC_0065962597__p18699104011370">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="52.654734526547344%" headers="mcps1.3.4.3.2.5.1.4 "><p id="EN-US_TOPIC_0065962597__p19699134073719">Indicates details about an FPGA image.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0065962597__table36632723211311" frame="border" border="1" rules="all"><caption><b>Table 3 </b><strong id="EN-US_TOPIC_0065962597__b16222105016443">fpga_image</strong> field description</caption><thead align="left"><tr id="EN-US_TOPIC_0065962597__row6485675211311"><th align="left" class="cellrowborder" valign="top" width="16.91%" id="mcps1.3.4.4.2.5.1.1"><p id="EN-US_TOPIC_0065962597__p22916806211311">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="13.16%" id="mcps1.3.4.4.2.5.1.2"><p id="EN-US_TOPIC_0065962597__p58378163211311">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="17.29%" id="mcps1.3.4.4.2.5.1.3"><p id="EN-US_TOPIC_0065962597__p36640154211311">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="52.64%" id="mcps1.3.4.4.2.5.1.4"><p id="EN-US_TOPIC_0065962597__p58095138211311">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="EN-US_TOPIC_0065962597__row55081076211311"><td class="cellrowborder" valign="top" width="16.91%" headers="mcps1.3.4.4.2.5.1.1 "><p id="EN-US_TOPIC_0065962597__p30311735211311">location</p>
</td>
<td class="cellrowborder" valign="top" width="13.16%" headers="mcps1.3.4.4.2.5.1.2 "><p id="EN-US_TOPIC_0065962597__p25396884211311">String</p>
</td>
<td class="cellrowborder" valign="top" width="17.29%" headers="mcps1.3.4.4.2.5.1.3 "><p id="EN-US_TOPIC_0065962597__p65343538211311">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="52.64%" headers="mcps1.3.4.4.2.5.1.4 "><p id="EN-US_TOPIC_0065962597__p161527536573">Specifies the OBS bucket path in which the logic FPGA file is stored. The format of the path is "Bucket name:File name", for example, "obs-fpga:fpga.bin".</p>
<p id="EN-US_TOPIC_0065962597__p1315225312576">Bucket naming rules comply with the following OBS requirements:</p>
<ul id="EN-US_TOPIC_0065962597__ul43426540194839"><li id="EN-US_TOPIC_0065962597__li11169243194845">Consists of lowercase letters, digits, and special characters <span class="parmvalue" id="EN-US_TOPIC_0065962597__parmvalue492036462113233"><b>.</b></span> and <span class="parmvalue" id="EN-US_TOPIC_0065962597__parmvalue282040979113233"><b>-</b></span>.</li><li id="EN-US_TOPIC_0065962597__li54819649194857">Must start and end with a digit or letter.</li><li id="EN-US_TOPIC_0065962597__li9773509194916">Contains 3 to 63 characters.</li><li id="EN-US_TOPIC_0065962597__li64118320194921">Cannot be an IP address.</li><li id="EN-US_TOPIC_0065962597__li59272493194839">Cannot contain <span class="parmvalue" id="EN-US_TOPIC_0065962597__parmvalue634589654113359"><b>..</b></span>, <span class="parmvalue" id="EN-US_TOPIC_0065962597__parmvalue449462891113359"><b>.-</b></span>, or <span class="parmvalue" id="EN-US_TOPIC_0065962597__parmvalue229886553113359"><b>-.</b></span>.</li></ul>
<p id="EN-US_TOPIC_0065962597__p13624699194711">A file name must conform to the following rules:</p>
<ul id="EN-US_TOPIC_0065962597__ul40992670194757"><li id="EN-US_TOPIC_0065962597__li51547496194757">Consists of uppercase and lowercase letters, digits, hyphens (-), underscores (_), slashes (/), and periods (.).</li><li id="EN-US_TOPIC_0065962597__li41559365194757">Must end with <span class="parmvalue" id="EN-US_TOPIC_0065962597__parmvalue47163054611124"><b>.bin</b></span> or <span class="parmvalue" id="EN-US_TOPIC_0065962597__parmvalue153878766711127"><b>xclbin</b></span>.</li><li id="EN-US_TOPIC_0065962597__li2057838194757">Contains 4 to 64 characters.</li></ul>
</td>
</tr>
<tr id="EN-US_TOPIC_0065962597__row43174483211311"><td class="cellrowborder" valign="top" width="16.91%" headers="mcps1.3.4.4.2.5.1.1 "><p id="EN-US_TOPIC_0065962597__p11983269211311">name</p>
</td>
<td class="cellrowborder" valign="top" width="13.16%" headers="mcps1.3.4.4.2.5.1.2 "><p id="EN-US_TOPIC_0065962597__p1310425211311">String</p>
</td>
<td class="cellrowborder" valign="top" width="17.29%" headers="mcps1.3.4.4.2.5.1.3 "><p id="EN-US_TOPIC_0065962597__p7009559211311">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="52.64%" headers="mcps1.3.4.4.2.5.1.4 "><p id="EN-US_TOPIC_0065962597__p5607686211311">Specifies the name of the FPGA image.</p>
<p id="EN-US_TOPIC_0065962597__p52669702211311">Value range:</p>
<ul id="EN-US_TOPIC_0065962597__ul64450334162249"><li id="EN-US_TOPIC_0065962597__li52742423162252">Contains only letters, digits, underscores, and hyphens.</li><li id="EN-US_TOPIC_0065962597__li63449340162249">Contains 1 to 64 characters.</li></ul>
</td>
</tr>
<tr id="EN-US_TOPIC_0065962597__row49437453114111"><td class="cellrowborder" valign="top" width="16.91%" headers="mcps1.3.4.4.2.5.1.1 "><p id="EN-US_TOPIC_0065962597__p32309183114120">metadata</p>
</td>
<td class="cellrowborder" valign="top" width="13.16%" headers="mcps1.3.4.4.2.5.1.2 "><p id="EN-US_TOPIC_0065962597__p45454409114125">Object</p>
</td>
<td class="cellrowborder" valign="top" width="17.29%" headers="mcps1.3.4.4.2.5.1.3 "><p id="EN-US_TOPIC_0065962597__p36703951114111">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="52.64%" headers="mcps1.3.4.4.2.5.1.4 "><p id="EN-US_TOPIC_0065962597__p37045433589">Specifies the FPGA image metadata, which must be a valid JavaScript Object Notation (JSON) object.</p>
<p id="EN-US_TOPIC_0065962597__p770494355817">The number of characters in metadata after JSON serialization cannot exceed 1024.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0065962597__row21013490211311"><td class="cellrowborder" valign="top" width="16.91%" headers="mcps1.3.4.4.2.5.1.1 "><p id="EN-US_TOPIC_0065962597__p63941444211311">description</p>
</td>
<td class="cellrowborder" valign="top" width="13.16%" headers="mcps1.3.4.4.2.5.1.2 "><p id="EN-US_TOPIC_0065962597__p9176036211311">String</p>
</td>
<td class="cellrowborder" valign="top" width="17.29%" headers="mcps1.3.4.4.2.5.1.3 "><p id="EN-US_TOPIC_0065962597__p53464121211311">No</p>
</td>
<td class="cellrowborder" valign="top" width="52.64%" headers="mcps1.3.4.4.2.5.1.4 "><p id="EN-US_TOPIC_0065962597__p28403755211311">Describes an FPGA image. The value consists of uppercase and lowercase letters, digits, hyphens (-), underscores (_), periods (.), commas, and spaces. The value consists of 0 to 255 characters.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="EN-US_TOPIC_0065962597__section55994659211311"><h4 class="sectiontitle">Response</h4><p id="EN-US_TOPIC_0065962597__p1125313104147"><a href="#EN-US_TOPIC_0065962597__table551653634018">Table 4</a> describes the response parameters.</p>
<div class="tablenoborder"><a name="EN-US_TOPIC_0065962597__table551653634018"></a><a name="table551653634018"></a><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0065962597__table551653634018" frame="border" border="1" rules="all"><caption><b>Table 4 </b>Response parameters</caption><thead align="left"><tr id="EN-US_TOPIC_0065962597__row17516036104012"><th align="left" class="cellrowborder" valign="top" width="17.03%" id="mcps1.3.5.3.2.4.1.1"><p id="EN-US_TOPIC_0065962597__p75161336124015">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="13.100000000000001%" id="mcps1.3.5.3.2.4.1.2"><p id="EN-US_TOPIC_0065962597__p14517136124013">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="69.87%" id="mcps1.3.5.3.2.4.1.3"><p id="EN-US_TOPIC_0065962597__p751711364402">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="EN-US_TOPIC_0065962597__row1551763664016"><td class="cellrowborder" valign="top" width="17.03%" headers="mcps1.3.5.3.2.4.1.1 "><p id="EN-US_TOPIC_0065962597__p8517103634019">fpga_image</p>
</td>
<td class="cellrowborder" valign="top" width="13.100000000000001%" headers="mcps1.3.5.3.2.4.1.2 "><p id="EN-US_TOPIC_0065962597__p6517173604019">Object</p>
</td>
<td class="cellrowborder" valign="top" width="69.87%" headers="mcps1.3.5.3.2.4.1.3 "><p id="EN-US_TOPIC_0065962597__p1451793612400">Indicates details about an FPGA image.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0065962597__table8648200211311" frame="border" border="1" rules="all"><caption><b>Table 5 </b><strong id="EN-US_TOPIC_0065962597__b1049871854516">fpga_image</strong> field description</caption><thead align="left"><tr id="EN-US_TOPIC_0065962597__row47349056211311"><th align="left" class="cellrowborder" valign="top" width="16.919999999999998%" id="mcps1.3.5.4.2.4.1.1"><p id="EN-US_TOPIC_0065962597__p15806308">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="13.16%" id="mcps1.3.5.4.2.4.1.2"><p id="EN-US_TOPIC_0065962597__p21995508">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="69.92%" id="mcps1.3.5.4.2.4.1.3"><p id="EN-US_TOPIC_0065962597__p36805753">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="EN-US_TOPIC_0065962597__row64340933211311"><td class="cellrowborder" valign="top" width="16.919999999999998%" headers="mcps1.3.5.4.2.4.1.1 "><p id="EN-US_TOPIC_0065962597__p32671333211311">id</p>
</td>
<td class="cellrowborder" valign="top" width="13.16%" headers="mcps1.3.5.4.2.4.1.2 "><p id="EN-US_TOPIC_0065962597__p30640904211311">String</p>
</td>
<td class="cellrowborder" valign="top" width="69.92%" headers="mcps1.3.5.4.2.4.1.3 "><p id="EN-US_TOPIC_0065962597__p51329136211311">ID of an FPGA image</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0065962597__row1620851211311"><td class="cellrowborder" valign="top" width="16.919999999999998%" headers="mcps1.3.5.4.2.4.1.1 "><p id="EN-US_TOPIC_0065962597__p26004605211311">status</p>
</td>
<td class="cellrowborder" valign="top" width="13.16%" headers="mcps1.3.5.4.2.4.1.2 "><p id="EN-US_TOPIC_0065962597__p64423181211311">String</p>
</td>
<td class="cellrowborder" valign="top" width="69.92%" headers="mcps1.3.5.4.2.4.1.3 "><p id="EN-US_TOPIC_0065962597__p63235550211311">Specifies the FPGA image status. Options:</p>
<ul id="EN-US_TOPIC_0065962597__ul10437195973916"><li id="EN-US_TOPIC_0065962597__li63161214013"><strong>saving</strong>: indicates that the FPGA image file is being uploaded to the backend storage.</li><li id="EN-US_TOPIC_0065962597__li1733419141408"><strong id="EN-US_TOPIC_0065962597__b84235270615561">deleting</strong>: indicates that the FPGA image is being deleted.</li><li id="EN-US_TOPIC_0065962597__li06821520174012"><strong id="EN-US_TOPIC_0065962597__b842352706155622">error</strong>: indicates that creating the FPGA image failed.</li><li id="EN-US_TOPIC_0065962597__li59525134010"><strong>active</strong>: indicates that the FPGA image is available for use.</li></ul>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="EN-US_TOPIC_0065962597__section11362753211311"><h4 class="sectiontitle">Example Request</h4><pre class="screen" id="EN-US_TOPIC_0065962597__screen1524384914361">POST https://{endpoint}/v1/{project_id}/cloudservers/fpga_image</pre>
<pre class="screen" id="EN-US_TOPIC_0065962597__screen12847425427">{
"fpga_image": {
"location": "obs-fpga:fpga.bin",
"name": "fpga-image-test",
"description": "fpga description",
"metadata": {
"shell_type": "OCL",
"shell_version": "1.0"
}
}
}</pre>
</div>
<div class="section" id="EN-US_TOPIC_0065962597__section7937164492610"><h4 class="sectiontitle">Example Response</h4><pre class="screen" id="EN-US_TOPIC_0065962597__screen794324412615">{
"fpga_image": {
"status": "saving",
"id": "4010a32c5c62bad9015c62dc2290002b"
}
}</pre>
</div>
<div class="section" id="EN-US_TOPIC_0065962597__section3477250491225"><h4 class="sectiontitle">Returned Values</h4><p id="EN-US_TOPIC_0065962597__p6510945291225">See <a href="en-us_topic_0022067716.html">Returned Values for General Requests</a>.</p>
</div>
<div class="section" id="EN-US_TOPIC_0065962597__section85821649202813"><h4 class="sectiontitle">Error Codes</h4><p id="EN-US_TOPIC_0065962597__p7233105282813">See <a href="en-us_topic_0022067717.html">Error Codes</a>.</p>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="en-us_topic_0065962596.html">FPGA Logical File Management</a></div>
</div>
</div>