nics
sub-collection represents a host's physical network interfaces. Each host_nic
element in the representation acts as a network interface and contains the following elements:
Element | Type | Description | Properties |
---|---|---|---|
name
| string |
The name of the host network interface, e.g. eth0
|
![]() ![]() |
link rel="statistics"
| relationship |
A link to the statistics sub-collection for a host's network interface statistics.
|
![]() |
link rel="master"
| relationship | A reference to the master bonded interface, if this is a slave interface. |
![]() |
host id=
| GUID | A reference to the host. |
![]() |
network id=
| GUID | A reference to the network, if any, that the interface is attached. |
![]() |
mac address=
| string | The MAC address of the interface. |
![]() |
ip address= netmask= gateway=
| complex | The IP level configuration of the interface. | |
boot_protocol
| enumerated |
The protocol for IP address assignment when the host is booting. A list of enumerated values is available in capabilities . See Section 6.1.18, “Boot Protocols”.
| |
speed
| integer | The network interface speed in bits per second. |
![]() |
status
| enumerated |
The link status for the network interface. These states are listed in host_nic_states under capabilities (See Section 6.1.21, “Resource Status States”).
|
![]() |
vlan id
| integer | The VLAN which this interface represents. |
![]() |
bonding
| complex |
A list of options and slave NICs for bonded interfaces.
|
![]() ![]() |
[a]
Only required when adding bonded interfaces. Other interfaces are read-only and cannot be added.
[b]
Only required when adding bonded interfaces. Other interfaces are read-only and cannot be added.
[c]
Only required when adding bonded interfaces. Other interfaces are read-only and cannot be added.
|
<host_nic id="e8f02fdf-3d7b-4135-86e1-1bf185570cd8" href="/api/hosts/2ab5e1da-b726-4274-bbf7-0a42b16a0fc3/nics/ e8f02fdf-3d7b-4135-86e1-1bf185570cd8"> <name>bond0</name> <link rel="statistics" href="/api/hosts/2ab5e1da-b726-4274-bbf7-0a42b16a0fc3/nics/ e8f02fdf-3d7b-4135-86e1-1bf185570cd8/statistics"/> <host id="2ab5e1da-b726-4274-bbf7-0a42b16a0fc3" href="/api/hosts/2ab5e1da-b726-4274-bbf7-0a42b16a0fc3"/> <network id="e657d631-657d-42bb-a536-73501a085d85" href="/api/networks/e657d631-657d-42bb-a536-73501a085d85"/> <mac address="D6:76:F1:3A:AF:74"/> <ip address="192.168.0.128" netmask="255.255.255.0" gateway="192.168.0.1"/> <boot_protocol>dhcp</boot_protocol> <speed>1000000000</speed> <status> <state>up</state> </status> <bonding> <options> ... </options> <slaves> <host_nic id="eb14e154-5e73-4f7f-bf6b-7f52609d94ec"/> <host_nic id="6aede5ca-4c54-4b37-a81b-c0d6b53558ea"/> </slaves> </bonding> <actions> <link rel="attach" href="/api/hosts/2ab5e1da-b726-4274-bbf7-0a42b16a0fc3/nics/ e8f02fdf-3d7b-4135-86e1-1bf185570cd8/attach"/> <link rel="detach" href="/api/hosts/2ab5e1da-b726-4274-bbf7-0a42b16a0fc3/nics/ e8f02fdf-3d7b-4135-86e1-1bf185570cd8/detach"/> </actions> </host_nic>
network
, ip
and boot_protocol
elements using a PUT
request.
name
and network
elements are required. Identify the network
element with the id
attribute or name
element.
PUT
request.
PUT /api/hosts/2ab5e1da-b726-4274-bbf7-0a42b16a0fc3/nics/ e8f02fdf-3d7b-4135-86e1-1bf185570cd8 HTTP/1.1 Accept: application/xml Content-type: application/xml <nic> <ip address="192.168.0.129" netmask="255.255.255.0" gateway="192.168.0.1"/> </nic>
DELETE
request.
DELETE /api/hosts/2ab5e1da-b726-4274-bbf7-0a42b16a0fc3/nics/ e8f02fdf-3d7b-4135-86e1-1bf185570cd8 HTTP/1.1 HTTP/1.1 204 No Content
host_nic
resource containing a bonding
element.
Element | Type | Description | Properties |
---|---|---|---|
options
| complex |
A list of option elements for a bonded interface. Each option contains property name and value attributes.
|
![]() ![]() |
slaves
| complex |
A list of slave host_nic id= elements for a bonded interface.
|
![]() ![]() |
[a]
Only required when adding bonded interfaces. Other interfaces are read-only and cannot be added.
[b]
Only required when adding bonded interfaces. Other interfaces are read-only and cannot be added.
|
POST
ing to a host_nic
with bonding options and slave interfaces. The name
, network
and bonded
elements are required when creating a new bonded interface. Either the id
or name
elements identify the network
and slave host_nic
s.
POST /api/hosts/2ab5e1da-b726-4274-bbf7-0a42b16a0fc3/nics HTTP/1.1 Accept: application/xml Content-Type: application/xml <host_nic> <name>bond4</name> <network id="e657d631-657d-42bb-a536-73501a085d85"/> <bonding> <options> ... </options> <slaves> <host_nic id="eb14e154-5e73-4f7f-bf6b-7f52609d94ec"/> <host_nic id="6aede5ca-4c54-4b37-a81b-c0d6b53558ea"/> </slaves> </bonding> </host_nic>
bond0
, bond1
, bond2
, bond3
and bond4
are the only valid names for a bonded interface.
DELETE
request to a bonded interface URI deletes it.