功能介紹
查詢 裸金屬服務(wù)器 的網(wǎng)卡信息,比如網(wǎng)卡的IP地址、MAC地址。
調(diào)試
您可以在API Explorer中調(diào)試該接口。
URI
GET /v1/{project_id}/baremetalservers/{server_id}/os-interface
|
參數(shù) |
是否必選 |
描述 |
|---|---|---|
|
project_id |
是 |
項(xiàng)目ID。 獲取方式請參見獲取項(xiàng)目ID。 |
|
server_id |
是 |
裸金屬服務(wù)器ID。 可以從裸金屬服務(wù)器控制臺查詢,或者通過調(diào)用查詢裸金屬服務(wù)器列表(OpenStack原生)API獲取。 |
請求參數(shù)
無
請求示例
GET https://{BMS Endpoint}/v1/c685484a8cc2416b97260938705deb65/baremetalservers/95bf2490-5428-432c-ad9b-5e3406f869dd/os-interface
|
響應(yīng)參數(shù)
|
參數(shù) |
參數(shù)類型 |
描述 |
|---|---|---|
|
interfaceAttachments |
Array of objects |
裸金屬服務(wù)器網(wǎng)卡信息列表,詳情請參見表2 interfaceAttachments字段數(shù)據(jù)結(jié)構(gòu)說明。 |
響應(yīng)示例
{ "interfaceAttachments": [ { "port_state": "ACTIVE", "fixed_ips": [ { "subnet_id": "a5052101-11e1-4f3d-a5fa-f6ba6791219c", "ip_address": "192.168.1.147" } ], "net_id": "ad0fadbf-4bc1-472c-a030-5310e53b3818", "port_id": "bb585b04-f2a2-4528-9064-fd0aeb4e15a9", "mac_addr": "fa:16:3e:3b:58:fc" } ] } |
錯誤碼
請參考錯誤碼。
