GET /api/hosts/host368/interfaces 200 { "total": 3, "subtotal": 3, "page": 1, "per_page": 20, "search": null, "sort": { "by": null, "order": null }, "results": [ { "subnet_id": null, "subnet_name": null, "subnet6_id": null, "subnet6_name": null, "domain_id": null, "domain_name": null, "created_at": "2019-11-07 08:37:16 UTC", "updated_at": "2019-11-07 08:37:16 UTC", "managed": true, "identifier": null, "id": 53, "name": "host368", "ip": null, "ip6": null, "mac": null, "mtu": null, "fqdn": "host368", "primary": true, "provision": true, "type": "interface", "virtual": false }, { "subnet_id": null, "subnet_name": null, "subnet6_id": null, "subnet6_name": null, "domain_id": null, "domain_name": null, "created_at": "2019-11-07 08:37:16 UTC", "updated_at": "2019-11-07 08:37:16 UTC", "managed": true, "identifier": "eth184", "id": 54, "name": null, "ip": "0.0.0.38", "ip6": null, "mac": "00:33:45:ab:00:4e", "mtu": null, "fqdn": null, "primary": false, "provision": false, "type": "interface", "virtual": false }, { "subnet_id": null, "subnet_name": null, "subnet6_id": null, "subnet6_name": null, "domain_id": null, "domain_name": null, "created_at": "2019-11-07 08:37:16 UTC", "updated_at": "2019-11-07 08:37:16 UTC", "managed": true, "identifier": "eth185", "id": 55, "name": null, "ip": "0.0.0.39", "ip6": null, "mac": "00:33:45:ab:00:4f", "mtu": null, "fqdn": null, "primary": false, "provision": false, "type": "bond", "mode": "balance-rr", "attached_devices": "", "bond_options": "", "virtual": true } ] }
參數名字 | 描述 |
---|---|
location_id 選填 |
Set the current location context for the request Validations:
|
organization_id 選填 |
Set the current organization context for the request Validations:
|
host_id 必填 |
主機的 ID 或名稱 Validations:
|
domain_id 選填 |
區域的 ID 或名稱 Validations:
|
subnet_id 選填 |
子網路的 ID 或名稱 Validations:
|
page 選填 |
頁數,從 1 開始 Validations:
|
per_page 選填 |
每頁要傳回的結果數量 Validations:
|
GET /api/hosts/host369/interfaces/57 200 { "subnet_id": null, "subnet_name": null, "subnet6_id": null, "subnet6_name": null, "domain_id": null, "domain_name": null, "created_at": "2019-11-07 08:37:16 UTC", "updated_at": "2019-11-07 08:37:16 UTC", "managed": true, "identifier": "eth186", "id": 57, "name": null, "ip": "0.0.0.40", "ip6": null, "mac": "00:33:45:ab:00:50", "mtu": null, "fqdn": null, "primary": false, "provision": false, "type": "interface", "virtual": false }
參數名字 | 描述 |
---|---|
location_id 選填 |
Set the current location context for the request Validations:
|
organization_id 選填 |
Set the current organization context for the request Validations:
|
host_id 必填 |
主機的 ID 或名稱 Validations:
|
id 必填 |
介面卡的 ID 或名稱 Validations:
|
POST /api/hosts/26/interfaces { "interface": { "name": "谚喪駏篬庿濱麢鐨耼孞", "ip": "10.0.1.1", "mac": "AA:AA:AA:AA:AA:AA", "username": "foo", "password": "bar", "provider": "IPMI", "type": "bmc", "ip6": "2001:db8::1" } } 422 { "error": { "id": null, "errors": { "name": [ "hostname can contain only lowercase letters, numbers, dashes and dots according to RFC921, RFC952 and RFC1123" ] }, "full_messages": [ "Name hostname can contain only lowercase letters, numbers, dashes and dots according to RFC921, RFC952 and RFC1123" ] } }
參數名字 | 描述 |
---|---|
location_id 選填 |
Set the current location context for the request Validations:
|
organization_id 選填 |
Set the current organization context for the request Validations:
|
host_id 必填 |
主機的 ID 或名稱 Validations:
|
interface 必填 |
介面卡資訊 Validations:
|
interface[mac] 選填 , 允許空值 |
介面卡的 MAC 位址。在空機上的管理介面所需。 Validations:
|
interface[ip] 選填 , 允許空值 |
IPv4 address of interface Validations:
|
interface[ip6] 選填 , 允許空值 |
IPv6 address of interface Validations:
|
interface[type] 選填 , 允許空值 |
介面卡類型,例如 bmc。預設值為 interface Validations:
|
interface[name] 選填 , 允許空值 |
介面的 DNS 名稱 Validations:
|
interface[subnet_id] 選填 , 允許空值 |
Foreman subnet ID of IPv4 interface Validations:
|
interface[subnet6_id] 選填 , 允許空值 |
Foreman subnet ID of IPv6 interface Validations:
|
interface[domain_id] 選填 , 允許空值 |
介面卡的 Foreman 區域 ID。在受管理主機上的主介面所需。 Validations:
|
interface[identifier] 選填 , 允許空值 |
裝置辨識子,例如 eth0 或 eth1.1 Validations:
|
interface[managed] 選填 , 允許空值 |
這個介面卡是否應該透過 DHCP 和 DNS 智慧型代理伺服器管理,以及它是否應該在佈建時進行配置? Validations:
|
interface[primary] 選填 , 允許空值 |
這介面是否要用來建立主機的 FQDN?每個受管理的主機需要有一組主介面。 Validations:
|
interface[provision] 選填 , 允許空值 |
這介面是否要給 PXELinux 的 TFTP(或映像檔為主的 SSH)使用?每個受管理的主機需要有一個佈建介面。 Validations:
|
interface[username] 選填 , 允許空值 |
僅適用於 BMC 介面卡。 Validations:
|
interface[password] 選填 , 允許空值 |
僅適用於 BMC 介面卡。 Validations:
|
interface[provider] 選填 , 允許空值 |
介面卡供應者,例如 IPMI。僅適用於 BMC 介面卡。 Validations:
|
interface[virtual] 選填 , 允許空值 |
別名或 VLAN 裝置 Validations:
|
interface[tag] 選填 , 允許空值 |
VLAN 標籤,這個屬性擁有比子網路 VLAN ID 更高的優先權。僅適用於虛擬介面卡。 Validations:
|
interface[mtu] 選填 , 允許空值 |
MTU, this attribute has precedence over the subnet MTU. Validations:
|
interface[attached_to] 選填 , 允許空值 |
辨識此介面卡的辨識子,例如 eth1。僅適用於虛擬介面卡。 Validations:
|
interface[mode] 選填 , 允許空值 |
介面的綁定模式,例如 balance-rr。僅用於綁定介面。 Validations:
|
interface[attached_devices] 選填 , 允許空值 |
相關連介面的識別子,例如 Validations:
|
interface[bond_options] 選填 , 允許空值 |
以空格區隔開的選項,例如 miimon=100。僅適用於 bond 介面卡。 Validations:
|
interface[compute_attributes] 選填 , 允許空值 |
該介面的額外運算資源特定的屬性。 Validations:
|
PUT /api/hosts/host360/interfaces/30 { "interface": { "name": "test.foreman.com", "ip": "10.0.1.1", "mac": "AA:AA:AA:AA:AA:AA", "username": "foo", "password": "bar", "provider": "IPMI", "ip6": "2001:db8::1" } } 200 { "subnet_id": null, "subnet_name": null, "subnet6_id": null, "subnet6_name": null, "domain_id": null, "domain_name": null, "created_at": "2019-11-07 08:37:15 UTC", "updated_at": "2019-11-07 08:37:15 UTC", "managed": true, "identifier": "eth169", "id": 30, "name": "test.foreman.com", "ip": "10.0.1.1", "ip6": "2001:db8::1", "mac": "aa:aa:aa:aa:aa:aa", "mtu": null, "fqdn": "test.foreman.com", "primary": false, "provision": false, "type": "interface", "virtual": false }
參數名字 | 描述 |
---|---|
location_id 選填 |
Set the current location context for the request Validations:
|
organization_id 選填 |
Set the current organization context for the request Validations:
|
host_id 必填 |
主機的 ID 或名稱 Validations:
|
id 必填 |
介面卡的 ID Validations:
|
interface 必填 |
介面卡資訊 Validations:
|
interface[mac] 選填 , 允許空值 |
介面卡的 MAC 位址。在空機上的管理介面所需。 Validations:
|
interface[ip] 選填 , 允許空值 |
IPv4 address of interface Validations:
|
interface[ip6] 選填 , 允許空值 |
IPv6 address of interface Validations:
|
interface[type] 選填 , 允許空值 |
介面卡類型,例如 bmc。預設值為 interface Validations:
|
interface[name] 選填 , 允許空值 |
介面的 DNS 名稱 Validations:
|
interface[subnet_id] 選填 , 允許空值 |
Foreman subnet ID of IPv4 interface Validations:
|
interface[subnet6_id] 選填 , 允許空值 |
Foreman subnet ID of IPv6 interface Validations:
|
interface[domain_id] 選填 , 允許空值 |
介面卡的 Foreman 區域 ID。在受管理主機上的主介面所需。 Validations:
|
interface[identifier] 選填 , 允許空值 |
裝置辨識子,例如 eth0 或 eth1.1 Validations:
|
interface[managed] 選填 , 允許空值 |
這個介面卡是否應該透過 DHCP 和 DNS 智慧型代理伺服器管理,以及它是否應該在佈建時進行配置? Validations:
|
interface[primary] 選填 , 允許空值 |
這介面是否要用來建立主機的 FQDN?每個受管理的主機需要有一組主介面。 Validations:
|
interface[provision] 選填 , 允許空值 |
這介面是否要給 PXELinux 的 TFTP(或映像檔為主的 SSH)使用?每個受管理的主機需要有一個佈建介面。 Validations:
|
interface[username] 選填 , 允許空值 |
僅適用於 BMC 介面卡。 Validations:
|
interface[password] 選填 , 允許空值 |
僅適用於 BMC 介面卡。 Validations:
|
interface[provider] 選填 , 允許空值 |
介面卡供應者,例如 IPMI。僅適用於 BMC 介面卡。 Validations:
|
interface[virtual] 選填 , 允許空值 |
別名或 VLAN 裝置 Validations:
|
interface[tag] 選填 , 允許空值 |
VLAN 標籤,這個屬性擁有比子網路 VLAN ID 更高的優先權。僅適用於虛擬介面卡。 Validations:
|
interface[mtu] 選填 , 允許空值 |
MTU, this attribute has precedence over the subnet MTU. Validations:
|
interface[attached_to] 選填 , 允許空值 |
辨識此介面卡的辨識子,例如 eth1。僅適用於虛擬介面卡。 Validations:
|
interface[mode] 選填 , 允許空值 |
介面的綁定模式,例如 balance-rr。僅用於綁定介面。 Validations:
|
interface[attached_devices] 選填 , 允許空值 |
相關連介面的識別子,例如 Validations:
|
interface[bond_options] 選填 , 允許空值 |
以空格區隔開的選項,例如 miimon=100。僅適用於 bond 介面卡。 Validations:
|
interface[compute_attributes] 選填 , 允許空值 |
該介面的額外運算資源特定的屬性。 Validations:
|
DELETE /api/hosts/32/interfaces/45 { "interface": {} } 422 { "error": { "id": 45, "errors": { "primary": [ "can't delete primary interface of managed host" ], "provision": [ "can't delete provision interface of managed host" ] }, "full_messages": [ "Primary can't delete primary interface of managed host", "Provision can't delete provision interface of managed host" ] } }
參數名字 | 描述 |
---|---|
location_id 選填 |
Set the current location context for the request Validations:
|
organization_id 選填 |
Set the current organization context for the request Validations:
|
host_id 必填 |
主機的 ID 或名稱 Validations:
|
id 必填 |
介面卡的 ID Validations:
|