forked from docs/doc-exports
Reviewed-by: Pristromskaia, Margarita <margarita.pristromskaia@t-systems.com> Co-authored-by: Zaoxu, Li <lizaoxu@huawei.com> Co-committed-by: Zaoxu, Li <lizaoxu@huawei.com>
224 lines
15 KiB
HTML
224 lines
15 KiB
HTML
<a name="EN-US_TOPIC_0031169828"></a><a name="EN-US_TOPIC_0031169828"></a>
|
|
|
|
<h1 class="topictitle1">Querying Networks</h1>
|
|
<div id="body1464591205179"><div class="section" id="EN-US_TOPIC_0031169828__section53922917165259"><h4 class="sectiontitle">Function</h4><p id="EN-US_TOPIC_0031169828__p5680132165259">This API is used to query the networks available to a tenant.</p>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0031169828__section64211377173223"><h4 class="sectiontitle">Constraints</h4><p id="EN-US_TOPIC_0031169828__p21448859173231">You can query only the network ID and label (network name). Other fields are all null.</p>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0031169828__section51121191165259"><h4 class="sectiontitle">URI</h4><p id="EN-US_TOPIC_0031169828__p429314224214">GET /v2.1/{project_id}/os-networks</p>
|
|
<p id="EN-US_TOPIC_0031169828__p6333954113314">GET /v2/{project_id}/os-networks</p>
|
|
<div class="p" id="EN-US_TOPIC_0031169828__p1232311216717"><a href="#EN-US_TOPIC_0031169828__table60562285165259">Table 1</a> describes the parameters in the URI.
|
|
<div class="tablenoborder"><a name="EN-US_TOPIC_0031169828__table60562285165259"></a><a name="table60562285165259"></a><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0031169828__table60562285165259" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Parameter description</caption><thead align="left"><tr id="EN-US_TOPIC_0031169828__row4861884165259"><th align="left" class="cellrowborder" valign="top" width="16.79%" id="mcps1.3.3.4.2.2.4.1.1"><p id="EN-US_TOPIC_0031169828__p5187119">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="17.18%" id="mcps1.3.3.4.2.2.4.1.2"><p id="EN-US_TOPIC_0031169828__p17503500">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="66.03%" id="mcps1.3.3.4.2.2.4.1.3"><p id="EN-US_TOPIC_0031169828__p8497414">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="EN-US_TOPIC_0031169828__row63809876165259"><td class="cellrowborder" valign="top" width="16.79%" headers="mcps1.3.3.4.2.2.4.1.1 "><p id="EN-US_TOPIC_0031169828__p1217433165259">project_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="17.18%" headers="mcps1.3.3.4.2.2.4.1.2 "><p id="EN-US_TOPIC_0031169828__p31503226165259">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="66.03%" headers="mcps1.3.3.4.2.2.4.1.3 "><p id="EN-US_TOPIC_0031169828__p37593705">Specifies the project ID.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0031169828__section8194118165259"><h4 class="sectiontitle">Request</h4><p id="EN-US_TOPIC_0031169828__p46604243143912">None</p>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0031169828__section58140617165259"><h4 class="sectiontitle">Response</h4>
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0031169828__table1092280145511" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Parameter description</caption><thead align="left"><tr id="EN-US_TOPIC_0031169828__row89221095516"><th align="left" class="cellrowborder" valign="top" width="11.42%" id="mcps1.3.5.2.2.5.1.1"><p id="EN-US_TOPIC_0031169828__p4503028171311">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="14.469999999999999%" id="mcps1.3.5.2.2.5.1.2"><p id="EN-US_TOPIC_0031169828__p107641620192214">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="11.03%" id="mcps1.3.5.2.2.5.1.3"><p id="EN-US_TOPIC_0031169828__p1150310281135">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="63.080000000000005%" id="mcps1.3.5.2.2.5.1.4"><p id="EN-US_TOPIC_0031169828__p205181728131313">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="EN-US_TOPIC_0031169828__row149237085519"><td class="cellrowborder" valign="top" width="11.42%" headers="mcps1.3.5.2.2.5.1.1 "><p id="EN-US_TOPIC_0031169828__p51536339143956">networks</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="14.469999999999999%" headers="mcps1.3.5.2.2.5.1.2 "><p id="EN-US_TOPIC_0031169828__p8764182011227">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="11.03%" headers="mcps1.3.5.2.2.5.1.3 "><p id="EN-US_TOPIC_0031169828__p13693953143956">Array of objects</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="63.080000000000005%" headers="mcps1.3.5.2.2.5.1.4 "><p id="EN-US_TOPIC_0031169828__p54366741143956">Specifies the network where the ECS accesses. For details, see <a href="#EN-US_TOPIC_0031169828__table50321718145545">Table 3</a>.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<div class="p" id="EN-US_TOPIC_0031169828__p199983583814">
|
|
<div class="tablenoborder"><a name="EN-US_TOPIC_0031169828__table50321718145545"></a><a name="table50321718145545"></a><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0031169828__table50321718145545" frame="border" border="1" rules="all"><caption><b>Table 3 </b>Response parameters</caption><thead align="left"><tr id="EN-US_TOPIC_0031169828__row4713958145545"><th align="left" class="cellrowborder" valign="top" width="18.5%" id="mcps1.3.5.3.1.2.5.1.1"><p id="EN-US_TOPIC_0031169828__p46286352145545">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="18.8%" id="mcps1.3.5.3.1.2.5.1.2"><p id="EN-US_TOPIC_0031169828__p1721837202111">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="18.94%" id="mcps1.3.5.3.1.2.5.1.3"><p id="EN-US_TOPIC_0031169828__p58207059145545">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="43.76%" id="mcps1.3.5.3.1.2.5.1.4"><p id="EN-US_TOPIC_0031169828__p47079489145545">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="EN-US_TOPIC_0031169828__row21062221145545"><td class="cellrowborder" valign="top" width="18.5%" headers="mcps1.3.5.3.1.2.5.1.1 "><p id="EN-US_TOPIC_0031169828__p28318377145545">id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="18.8%" headers="mcps1.3.5.3.1.2.5.1.2 "><p id="EN-US_TOPIC_0031169828__p921203715216">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="18.94%" headers="mcps1.3.5.3.1.2.5.1.3 "><p id="EN-US_TOPIC_0031169828__p12087168145545">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="43.76%" headers="mcps1.3.5.3.1.2.5.1.4 "><p id="EN-US_TOPIC_0031169828__p48345797145545">Specifies the network ID in UUID format.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0031169828__row32458994145545"><td class="cellrowborder" valign="top" width="18.5%" headers="mcps1.3.5.3.1.2.5.1.1 "><p id="EN-US_TOPIC_0031169828__p11932824145545">label</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="18.8%" headers="mcps1.3.5.3.1.2.5.1.2 "><p id="EN-US_TOPIC_0031169828__p1321337152117">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="18.94%" headers="mcps1.3.5.3.1.2.5.1.3 "><p id="EN-US_TOPIC_0031169828__p27034687145545">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="43.76%" headers="mcps1.3.5.3.1.2.5.1.4 "><p id="EN-US_TOPIC_0031169828__p5856430145545">Specifies the network name.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0031169828__row52707876145545"><td class="cellrowborder" valign="top" width="18.5%" headers="mcps1.3.5.3.1.2.5.1.1 "><p id="EN-US_TOPIC_0031169828__p41479552145545">broadcast</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="18.8%" headers="mcps1.3.5.3.1.2.5.1.2 "><p id="EN-US_TOPIC_0031169828__p421837132116">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="18.94%" headers="mcps1.3.5.3.1.2.5.1.3 "><p id="EN-US_TOPIC_0031169828__p4400512145545">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="43.76%" headers="mcps1.3.5.3.1.2.5.1.4 "><p id="EN-US_TOPIC_0031169828__p14948749145545">The value can only be null.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0031169828__row321021145545"><td class="cellrowborder" valign="top" width="18.5%" headers="mcps1.3.5.3.1.2.5.1.1 "><p id="EN-US_TOPIC_0031169828__p26002760145545">cidr</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="18.8%" headers="mcps1.3.5.3.1.2.5.1.2 "><p id="EN-US_TOPIC_0031169828__p182183792112">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="18.94%" headers="mcps1.3.5.3.1.2.5.1.3 "><p id="EN-US_TOPIC_0031169828__p25848828145545">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="43.76%" headers="mcps1.3.5.3.1.2.5.1.4 "><p id="EN-US_TOPIC_0031169828__p10061500145545">The value can only be null.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0031169828__row23444639145545"><td class="cellrowborder" valign="top" width="18.5%" headers="mcps1.3.5.3.1.2.5.1.1 "><p id="EN-US_TOPIC_0031169828__p19967587145545">cidr_v6</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="18.8%" headers="mcps1.3.5.3.1.2.5.1.2 "><p id="EN-US_TOPIC_0031169828__p9211337162114">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="18.94%" headers="mcps1.3.5.3.1.2.5.1.3 "><p id="EN-US_TOPIC_0031169828__p6761844145545">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="43.76%" headers="mcps1.3.5.3.1.2.5.1.4 "><p id="EN-US_TOPIC_0031169828__p5499802145545">The value can only be null.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0031169828__row49498225145545"><td class="cellrowborder" valign="top" width="18.5%" headers="mcps1.3.5.3.1.2.5.1.1 "><p id="EN-US_TOPIC_0031169828__p49933321145545">dns1</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="18.8%" headers="mcps1.3.5.3.1.2.5.1.2 "><p id="EN-US_TOPIC_0031169828__p162117374210">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="18.94%" headers="mcps1.3.5.3.1.2.5.1.3 "><p id="EN-US_TOPIC_0031169828__p18067185145545">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="43.76%" headers="mcps1.3.5.3.1.2.5.1.4 "><p id="EN-US_TOPIC_0031169828__p24548306145545">The value can only be null.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0031169828__row19608166145545"><td class="cellrowborder" valign="top" width="18.5%" headers="mcps1.3.5.3.1.2.5.1.1 "><p id="EN-US_TOPIC_0031169828__p44757627145545">dns2</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="18.8%" headers="mcps1.3.5.3.1.2.5.1.2 "><p id="EN-US_TOPIC_0031169828__p521153713218">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="18.94%" headers="mcps1.3.5.3.1.2.5.1.3 "><p id="EN-US_TOPIC_0031169828__p1489156145545">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="43.76%" headers="mcps1.3.5.3.1.2.5.1.4 "><p id="EN-US_TOPIC_0031169828__p39570324145545">The value can only be null.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0031169828__row20588598145545"><td class="cellrowborder" valign="top" width="18.5%" headers="mcps1.3.5.3.1.2.5.1.1 "><p id="EN-US_TOPIC_0031169828__p57063746145545">gateway</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="18.8%" headers="mcps1.3.5.3.1.2.5.1.2 "><p id="EN-US_TOPIC_0031169828__p1221203792116">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="18.94%" headers="mcps1.3.5.3.1.2.5.1.3 "><p id="EN-US_TOPIC_0031169828__p58760710145545">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="43.76%" headers="mcps1.3.5.3.1.2.5.1.4 "><p id="EN-US_TOPIC_0031169828__p55709145145545">The value can only be null.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0031169828__row31620258145545"><td class="cellrowborder" valign="top" width="18.5%" headers="mcps1.3.5.3.1.2.5.1.1 "><p id="EN-US_TOPIC_0031169828__p11104111145545">gateway_v6</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="18.8%" headers="mcps1.3.5.3.1.2.5.1.2 "><p id="EN-US_TOPIC_0031169828__p2211837112119">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="18.94%" headers="mcps1.3.5.3.1.2.5.1.3 "><p id="EN-US_TOPIC_0031169828__p27017817145545">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="43.76%" headers="mcps1.3.5.3.1.2.5.1.4 "><p id="EN-US_TOPIC_0031169828__p29389986145545">The value can only be null.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0031169828__row63183283145545"><td class="cellrowborder" valign="top" width="18.5%" headers="mcps1.3.5.3.1.2.5.1.1 "><p id="EN-US_TOPIC_0031169828__p17572316145545">netmask</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="18.8%" headers="mcps1.3.5.3.1.2.5.1.2 "><p id="EN-US_TOPIC_0031169828__p13215379215">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="18.94%" headers="mcps1.3.5.3.1.2.5.1.3 "><p id="EN-US_TOPIC_0031169828__p14071461145545">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="43.76%" headers="mcps1.3.5.3.1.2.5.1.4 "><p id="EN-US_TOPIC_0031169828__p48167736145545">The value can only be null.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0031169828__row30856442145545"><td class="cellrowborder" valign="top" width="18.5%" headers="mcps1.3.5.3.1.2.5.1.1 "><p id="EN-US_TOPIC_0031169828__p16343912145545">netmask_v6</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="18.8%" headers="mcps1.3.5.3.1.2.5.1.2 "><p id="EN-US_TOPIC_0031169828__p192143713217">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="18.94%" headers="mcps1.3.5.3.1.2.5.1.3 "><p id="EN-US_TOPIC_0031169828__p48788506145545">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="43.76%" headers="mcps1.3.5.3.1.2.5.1.4 "><p id="EN-US_TOPIC_0031169828__p59220588145545">The value can only be null.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0031169828__row63223249145545"><td class="cellrowborder" valign="top" width="18.5%" headers="mcps1.3.5.3.1.2.5.1.1 "><p id="EN-US_TOPIC_0031169828__p20809534145545">bridge</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="18.8%" headers="mcps1.3.5.3.1.2.5.1.2 "><p id="EN-US_TOPIC_0031169828__p1621237102117">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="18.94%" headers="mcps1.3.5.3.1.2.5.1.3 "><p id="EN-US_TOPIC_0031169828__p7850675145545">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="43.76%" headers="mcps1.3.5.3.1.2.5.1.4 "><p id="EN-US_TOPIC_0031169828__p35784407145545">The value is fixed to be null and is in UUID format.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0031169828__section187060519134"><h4 class="sectiontitle">Example Request</h4><p id="EN-US_TOPIC_0031169828__p645712311435">Query the networks available to a tenant.</p>
|
|
<pre class="screen" id="EN-US_TOPIC_0031169828__screen15455115615316">GET https://{endpoint}/v2/{project_id}/os-networks
|
|
GET https://{endpoint}/v2.1/{project_id}/os-networks</pre>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0031169828__section391213571394"><h4 class="sectiontitle">Example Response</h4><pre class="screen" id="EN-US_TOPIC_0031169828__screen9960165715917">{
|
|
"networks": [
|
|
{
|
|
"id": "04468f37-500a-4a80-88da-af823e7a1d6c",
|
|
"cidr_v6": null,
|
|
"gateway": null,
|
|
"label": "network_demo1",
|
|
"broadcast": null,
|
|
"netmask": null,
|
|
"cidr": null,
|
|
"dns2": null,
|
|
"gateway_v6": null,
|
|
"netmask_v6": null,
|
|
"dns1": null
|
|
},
|
|
{
|
|
"id": "1fcff959-21d0-4ba8-976a-974cb564c977",
|
|
"cidr_v6": null,
|
|
"gateway": null,
|
|
"label": "network_demo2",
|
|
"broadcast": null,
|
|
"netmask": null,
|
|
"cidr": null,
|
|
"dns2": null,
|
|
"gateway_v6": null,
|
|
"netmask_v6": null,
|
|
"dns1": null
|
|
}
|
|
]
|
|
}</pre>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0031169828__section38817202165259"><h4 class="sectiontitle">Returned Values</h4><p id="EN-US_TOPIC_0031169828__p57185677165259">See <a href="en-us_topic_0022067716.html">Returned Values for General Requests</a>.</p>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="en-us_topic_0031167513.html">Network Management</a></div>
|
|
</div>
|
|
</div>
|
|
|