forked from docs/doc-exports
Reviewed-by: Muller, Martin <martin.muller@t-systems.com> Co-authored-by: lizaoxu <lizaoxu@huawei.com> Co-committed-by: lizaoxu <lizaoxu@huawei.com>
34 lines
4.2 KiB
HTML
34 lines
4.2 KiB
HTML
<a name="sfs_02_0015"></a><a name="sfs_02_0015"></a>
|
|
|
|
<h1 class="topictitle1">Getting Started (SFS Turbo)</h1>
|
|
<div id="body1559727310968"><p id="sfs_02_0015__p65031240175112">This section describes how to use APIs by calling an API to create an SFS Turbo file system.</p>
|
|
<div class="note" id="sfs_02_0015__note954974119286"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="sfs_02_0015__p954984111284">The token obtained from IAM is valid for only 24 hours. If you want to use one token for authentication, you can cache it to avoid frequently calling.</p>
|
|
</div></div>
|
|
<div class="section" id="sfs_02_0015__section17616103371"><h4 class="sectiontitle">Involved APIs</h4><p id="sfs_02_0015__p7881209153012">If you use a token for authentication, you must obtain the token and add <strong id="sfs_02_0015__a30f5ab3fed6442ae8652ac00a2dffc7e">X-Auth-Token</strong> to the request header of the API when making a call. The following APIs are involved in the request for creating an SFS Turbo file system:</p>
|
|
<ul id="sfs_02_0015__ul1688118911309"><li id="sfs_02_0015__li10881139103017">IAM API used to obtain a token</li><li id="sfs_02_0015__li788118903015">API for creating SFS Turbo file systems.</li></ul>
|
|
</div>
|
|
<div class="section" id="sfs_02_0015__section8823194612355"><h4 class="sectiontitle">Procedure</h4><ol id="sfs_02_0015__ol12128172414430"><li id="sfs_02_0015__li1712852410430"><span>Obtain the token by following instructions in <a href="sfs_02_0011.html">Authentication</a>.</span></li><li id="sfs_02_0015__li1012810247438"><span>Add <strong id="sfs_02_0015__b9793185310511">X-Auth-Token</strong> to the request header.</span></li><li id="sfs_02_0015__li11128152413438"><span>Specify the following parameters in the request body:</span><p><pre class="screen" id="sfs_02_0015__screen12128132410438">{
|
|
"share": {
|
|
"name": "sfs-turbo-test",
|
|
"share_proto": "NFS",
|
|
"share_type": "STANDARD",
|
|
"size": 100,
|
|
"availability_zone": "az1",
|
|
"vpc_id": "d651ea2b-2b20-4c6d-8bbf-2adcec18dac9",
|
|
"subnet_id": "b8884abe-f47b-4917-9f6c-f64825c365db",
|
|
"security_group_id": "8c4ebbd0-6edf-4aae-8353-81ce6d06e1f4"
|
|
}
|
|
}</pre>
|
|
</p></li><li id="sfs_02_0015__li191280242438"><span>Send the request <strong id="sfs_02_0015__b1096116917285">POST https://<em id="sfs_02_0015__i83561237142811">Endpoint of SFS Turbo</em>/v1/{project_id}/sfs-turbo/shares</strong>.</span></li><li id="sfs_02_0015__li18128824194312"><span>After the request is successfully responded, the ID and name of the SFS Turbo file system are returned.</span><p><p id="sfs_02_0015__p1412812454310">If the request fails, an error code and error information are returned. For details about the error codes, see the abnormal return values of the corresponding API.</p>
|
|
<p id="sfs_02_0015__p27681118164315">Query SFS Turbo file system details based on the returned file system ID.</p>
|
|
<p id="sfs_02_0015__p14690115164315">If the returned status of the file system is <strong id="sfs_02_0015__b1452895632318">200</strong>, the SFS Turbo file system is successfully created. For details about the return values of request exceptions, see the abnormal return values of the corresponding API. For other statuses, see <a href="sfs_02_0085.html">SFS Turbo File System Statuses</a>.</p>
|
|
<p id="sfs_02_0015__p1655014964316">You can query and delete an SFS Turbo file system based on the file system ID.</p>
|
|
</p></li></ol>
|
|
</div>
|
|
<div class="section" id="sfs_02_0015__section64721751185"><h4 class="sectiontitle">Configuration Example</h4><p id="sfs_02_0015__p1346204819474">If the token has been obtained, you can run the following <strong id="sfs_02_0015__b49091258545">curl</strong> command to create an SFS Turbo file system:</p>
|
|
<pre class="screen" id="sfs_02_0015__screen335462519499">curl -k -i -X POST -H "X-Auth-Token: token_value" -H "Content-Type: application/json" -d '{"share": {"name": "sfs-turbo-test", "share_proto": "NFS", "share_type": "STANDARD", "size": 100, "availability_zone": "az1", "vpc_id": "d651ea2b-2b20-4c6d-8bbf-2adcec18dac9", "subnet_id": "b8884abe-f47b-4917-9f6c-f64825c365db", "security_group_id": "8c4ebbd0-6edf-4aae-8353-81ce6d06e1f4"}}' "https://127.0.0.1:8979/v1/xxxbxbex5cfx41f0a08ay915fd79240d/sfs-turbo/shares"</pre>
|
|
</div>
|
|
</div>
|
|
<div></div>
|
|
|