Este contenido no está disponible en el idioma seleccionado.
14.7. Sub-Collections
14.7.1. Host Network Attachments Sub-Collection
network_attachments sub-collection represents the network configuration of the host. Each network_attachment element represents a network attached to the host and contains the following elements:
	| 
						Element
					 | 
						Type
					 | 
						Description
					 | 
						Properties
					 | 
|---|---|---|---|
| network id= | 
						GUID
					 | 
						A reference to the network to which the host is attached.
					 |     | 
| host_nic id= | 
						GUID
					 | 
						A reference to the host network interface to which the network is attached.
					 |   | 
| ip_address_assignments | 
						complex
					 | 
						The IP configuration of the network. Each  ip_address_assignmentcontainsassignment_methodandip address= netmask= gateway=sub-elements. | |
| properties | 
						complex
					 | 
						Defines custom property keys for the network. Each  propertycontainsnameandvaluesub-elements. See Section 14.7.2.3.2, “Network Attachment Custom Properties”. | |
| reported_configurations | 
						complex
					 | 
						A read-only list of configuration properties for the network attachment. The  in_syncboolean isfalsewhen the network attachment is out of sync with the logical network definition of the data center. Eachreported_configurationcontainsname,expected_value,actual_value, andin_syncsub-elements. |   | 
| host id= | 
						GUID
					 | 
						A reference to the host.
					 |   | 
Example 14.9. An XML representation of a network attachment on a host
network and host_nic elements are required, with either an id or a name. The host_nic ID can refer to either an unused network interface card or a bond.
	Example 14.10. Attach a network to a host
host_nic, ip_address_assignments, and properties elements are updatable post-creation. Changing the host_nic ID moves the network to a different network interface card.
	Example 14.11. Modifying a host network attachment
DELETE request on the network attachment.
	Example 14.12. Detach a network from a host
DELETE /api/hosts/00000000-0000-0000-0000-000000000000/nics/00000000-0000-0000-0000-000000000000/networkattachments/00000000-0000-0000-0000-000000000000 HTTP/1.1 Accept: application/xml Content-type: application/xml HTTP/1.1 204 No Content
DELETE /api/hosts/00000000-0000-0000-0000-000000000000/nics/00000000-0000-0000-0000-000000000000/networkattachments/00000000-0000-0000-0000-000000000000 HTTP/1.1
Accept: application/xml
Content-type: application/xml
HTTP/1.1 204 No ContentImportant
14.7.2. Host Network Interface Sub-Collection
14.7.2.1. Host Network Interface Sub-Collection
nics sub-collection represents a host's physical network interfaces. Additional information can be retrieved for GET requests using the All-Content: true header. 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. |  [a]   | 
| link rel="statistics" | relationship | A link to the statisticssub-collection for a host's network interface statistics. |   | 
| link rel="labels" | relationship | A link to the labelssub-collection for a host's network interface labels. |  | 
| link rel="networkattachments" | relationship | A link to the networkattachmentssub-collection for a host's network interface configuration. | |
| 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. |  [b] | 
| mac address= | string | The MAC address of the interface. |   | 
| ip address= netmask= gateway= mtu= | complex | The IP level configuration of the interface. | |
| mtu | complex | The maximum transmission unit for 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. | |
| status | enumerated | The link status for the network interface. These states are listed in host_nic_statesundercapabilities. |   | 
| vlan id | integer | The VLAN which this interface represents. |   | 
| bonding | complex | A list of optionsandslaveNICs for bonded interfaces. |  [c]   | 
| bridged | Boolean | Defines the bridged network status. Set to truefor a bridged network andfalsefor a bridgeless network. | |
| [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.
					 | |||
Example 14.13. An XML representation of a network interface on a host
network, ip and boot_protocol elements.
	PUT request.
	DELETE request.
	DELETE /api/hosts/00000000-0000-0000-0000-000000000000/nics/ 00000000-0000-0000-0000-000000000000 HTTP/1.1 HTTP/1.1 204 No Content
DELETE /api/hosts/00000000-0000-0000-0000-000000000000/nics/
00000000-0000-0000-0000-000000000000 HTTP/1.1
HTTP/1.1 204 No Content
14.7.2.2. Bonded Interfaces
host_nic resource containing a bonding element.
	| Element | Type | Description | Properties | 
|---|---|---|---|
| options | complex | A list of optionelements for a bonded interface. Eachoptioncontains propertynameandvalueattributes. |  [a]   | 
| slaves | complex | A list of slave host_nic id=elements for a bonded interface. |  [b]   | 
| [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.
					 | |||
host_nic (POST) or updating a host_nic (PUT). Use either the id or name elements to identify the slave host_nic elements. When adding a new network interface, the name and network elements are required. Identify the network element with the id attribute or name element.
	Example 14.14. Creating a bonded interface
Important
bond0, bond1, bond2, bond3 and bond4 are the only valid names for a bonded interface.
		Example 14.15. Removing a bonded interface
DELETE request. 
DELETE /api/hosts/00000000-0000-0000-0000-000000000000/nics/00000000-0000-0000-0000-000000000000 HTTP/1.1 HTTP/1.1 204 No Content
DELETE /api/hosts/00000000-0000-0000-0000-000000000000/nics/00000000-0000-0000-0000-000000000000 HTTP/1.1
HTTP/1.1 204 No ContentImportant
14.7.2.3. Network Interface Network Attachments
14.7.2.3.1. Network Interface Network Attachments
network_attachments sub-collection representing the network interface card's network attachments. Each network_attachment represents a network attached to the network interface and contains the following elements:
	| 
						Element
					 | 
						Type
					 | 
						Description
					 | 
						Properties
					 | 
|---|---|---|---|
| network id= | 
						GUID
					 | 
						A reference to the network to which the interface is attached.
					 |     | 
| host_nic id= | 
						GUID
					 | 
						A reference to the host network interface.
					 |   | 
| ip_address_assignments | 
						complex
					 | 
						The IP configuration of the network. Each  ip_address_assignmentcontainsassignment_methodandip address= netmask= gateway=sub-elements. | |
| properties | 
						complex
					 | 
						Defines custom property keys for the network. Each  propertycontainsnameandvaluesub-elements. | |
| reported_configurations | 
						complex
					 | 
						A read-only list of configuration properties for the network attachment. The  in_syncboolean isfalsewhen the network attachment contains uncommitted network configuration. Eachreported_configurationcontainsname,expected_value,actual_value, andin_syncsub-elements. |   | 
Example 14.16. An XML representation of a network attachment on a network interface card
network element is required, with either an id or a name.
	Example 14.17. Attach a network to a host network interface card
ip_address_assignments and properties elements are updatable post-creation.
	Example 14.18. Modifying a network attachment
DELETE request on the network attachment.
	Example 14.19. Detach a network from a host network interface card
DELETE /api/hosts/00000000-0000-0000-0000-000000000000/nics/00000000-0000-0000-0000-000000000000/networkattachments/00000000-0000-0000-0000-000000000000 HTTP/1.1 Accept: application/xml Content-type: application/xml HTTP/1.1 204 No Content
DELETE /api/hosts/00000000-0000-0000-0000-000000000000/nics/00000000-0000-0000-0000-000000000000/networkattachments/00000000-0000-0000-0000-000000000000 HTTP/1.1
Accept: application/xml
Content-type: application/xml
HTTP/1.1 204 No ContentImportant
14.7.2.3.2. Network Attachment Custom Properties
name and value sub-elements. To amend the custom properties, perform a PUT request on a network attachment, or a POST request with the setupnetworks action.
	| Element | Type | Description | 
|---|---|---|
| name | string | The unique identifier for the property. Bridge options have the set name of bridge_opts. | 
| value | string | The bridge options, represented by a valid key and value with the following syntax: [key]=[value]. Separate multiple entries with a whitespace character. The following keys are valid, with the values provided as examples: 
 | 
Example 14.20. An XML representation of a network attachment's properties sub-collection
14.7.2.4. Network Interface Labels
Example 14.21. Attaching a label to a network interface card
POST /api/hosts/00000000-0000-0000-0000-000000000000/nics/00000000-0000-0000-0000-000000000000/labels HTTP/1.1 Accept: application/xml Content-type: application/xml <label id="Label_001" />
POST /api/hosts/00000000-0000-0000-0000-000000000000/nics/00000000-0000-0000-0000-000000000000/labels HTTP/1.1
Accept: application/xml
Content-type: application/xml
<label id="Label_001" />DELETE request.
	Example 14.22. Removing a label from a network interface card
DELETE /api/hosts/00000000-0000-0000-0000-000000000000/nics/00000000-0000-0000-0000-000000000000/labels/00000000-0000-0000-0000-000000000000 HTTP/1.1 HTTP/1.1 204 No Content
DELETE /api/hosts/00000000-0000-0000-0000-000000000000/nics/00000000-0000-0000-0000-000000000000/labels/00000000-0000-0000-0000-000000000000 HTTP/1.1
HTTP/1.1 204 No Content14.7.2.5. Network Interface Statistics
statistics sub-collection for a host's network interface statistics. Each statistic contains the following elements:
	| Element | Type | Description | 
|---|---|---|
| name | string | The unique identifier for the statistic entry. | 
| description | string | A plain text description of the statistic. | 
| unit | string | The unit or rate to measure the statistical values. | 
| type | One of GAUGEorCOUNTER | The type of statistic measures. | 
| values type= | One of INTEGERorDECIMAL | The data type for the statistical values that follow. | 
| value | complex | A data set that contains datum. | 
| datum | see values type | An individual piece of data from a value. | 
| host_nic id= | relationship | A relationship to the containing host_nicresource. | 
| 
						Name
					 | 
						Description
					 | 
|---|---|
| data.current.rx | 
						The rate in bytes per second of data received.
					 | 
| data.current.tx | 
						The rate in bytes per second of data transmitted.
					 | 
| data.total.rx | 
						Total received data.
					 | 
| data.total.tx | 
						Total transmitted data.
					 | 
| errors.total.rx | 
						Total errors from receiving data.
					 | 
| errors.total.tx | 
						Total errors from transmitting data.
					 | 
Example 14.23. An XML representation of a host's network interface statistics sub-collection
Note
statistics sub-collection is read-only.
		14.7.3. Storage Sub-Collection
storage sub-collection provides a list of the iSCSI and FCP storage representations available on the host. This storage is used to create storage domains.
	storage representation in the sub-collection represents a SCSI LUN.
	Example 14.24. An XML representation of the storage sub-collection on a host
Note
host_storage collection is read-only.
		Important
14.7.4. Host NUMA Nodes Sub-Collection
14.7.4.1. NUMA Nodes Sub-Collection
numanodes sub-collection represents the host's NUMA topology. Each host_numa_node element in the sub-collection represents a NUMA node.
	Example 14.25. An XML representation of the numanodes sub-collection on a host
Note
host_numa_nodes sub-collection is read-only.
		14.7.4.2. NUMA Node Statistics
statistics sub-collection for NUMA node statistics. Each statistic contains the following elements:
	| Element | Type | Description | 
|---|---|---|
| name | string | The unique identifier for the statistic entry. | 
| description | string | A plain text description of the statistic. | 
| unit | string | The unit or rate to measure the statistical values. | 
| type | One of GAUGEorCOUNTER | The type of statistic measures. | 
| values type= | One of INTEGERorDECIMAL | The data type for the statistical values that follow. | 
| value | complex | A data set that contains datum. | 
| datum | see values type | An individual piece of data from a value. | 
| host_numa_node id= | relationship | A relationship to the containing numanoderesource. | 
| Name | Description | 
|---|---|
| memory.total | Total memory in bytes on the NUMA node. | 
| memory.used | Memory in bytes used on the NUMA node. | 
| memory.free | Memory in bytes free on the NUMA node. | 
| cpu.current.user | Percentage of CPU usage for users. | 
| cpu.current.system | Percentage of CPU usage for the system. | 
| cpu.current.idle | Percentage of idle CPU usage. | 
Example 14.26. An XML representation of the host NUMA node's statistics sub-collection
Note
statistics sub-collection is read-only.
		14.7.5. Host Statistics Sub-Collection
14.7.5.1. Host Statistics Sub-Collection
statistics sub-collection for host-specific statistics. Each statistic contains the following elements:
	| Element | Type | Description | 
|---|---|---|
| name | string | The unique identifier for the statistic entry. | 
| description | string | A plain text description of the statistic. | 
| unit | string | The unit or rate to measure the statistical values. | 
| type | One of GAUGEorCOUNTER | The type of statistic measures. | 
| values type= | One of INTEGERorDECIMAL | The data type for the statistical values that follow. | 
| value | complex | A data set that contains datum. | 
| datum | see values type | An individual piece of data from a value. | 
| host id= | relationship | A relationship to the containing hostresource. | 
| 
						Name
					 | 
						Description
					 | 
|---|---|
| memory.total | 
						Total memory in bytes on the host.
					 | 
| memory.used | 
						Memory in bytes used on the host.
					 | 
| memory.free | 
						Memory in bytes free on the host.
					 | 
| memory.shared | 
						Memory in bytes shared on the host.
					 | 
| memory.buffers | 
						I/O buffers in bytes.
					 | 
| memory.cached | 
						OS caches in bytes.
					 | 
| swap.total | 
						Total swap memory in bytes on the host.
					 | 
| swap.free | 
						Swap memory in bytes free on the host.
					 | 
| swap.used | 
						Swap memory in bytes used on the host.
					 | 
| swap.cached | 
						Swap memory in bytes also cached in host's memory.
					 | 
| ksm.cpu.current | 
						Percentage of CPU usage for Kernel SamePage Merging.
					 | 
| cpu.current.user | 
						Percentage of CPU usage for users.
					 | 
| cpu.current.system | 
						Percentage of CPU usage for system.
					 | 
| cpu.current.idle | 
						Percentage of idle CPU usage.
					 | 
| cpu.load.avg.5m | 
						CPU load average per five minutes.
					 | 
Example 14.27. An XML representation of the host's statistics sub-collection
Note
statistics sub-collection is read-only.