networks collection provides information about the logical networks in a Red Hat Enterprise Virtualization environment. An API user accesses this information through the rel="networks" link obtained from the entry point URI (see Chapter 4, Entry Point).
| Element | Type | Description | Properties |
|---|---|---|---|
name
| string |
A user-supplied human readable name for the network. The name is unique across all network resources.
|
|
description
| string | A free-form user-supplied human readable description of the network | |
data_center id
| complex | A reference to the data center of which this cluster is a member. See Chapter 9, Data Centers |
|
ip address= netmask= gateway=
| complex | Static IP configuration for the network | |
vlan id=
| GUID | A VLAN tag | |
stp
| boolean: true or false |
true if Spanning Tree Protocol is enabled on this network
| |
status
|
One of OPERATIONAL or NON_OPERATIONAL
| The status of the network |
|
display
| boolean: true or false |
true if this network is the display network
|
<network id="00000000-0000-0000-0000-000000000009"
href="/rhevm-api/networks/00000000-0000-0000-0000-000000000009">
<name>rhevm</name>
<description>Management Network</description>
<data_center id="01a45ff0-915a-11e0-8b87-5254004ac988"
href="/rhevm-api/datacenters/01a45ff0-915a-11e0-8b87-5254004ac988"/>
<stp>false</stp>
<status>OPERATIONAL</status>
<display>false</display>
</network>
name and datacenter are required. See Section 8.3.2, “ Creating a Resource ” for more information.
POST /rhevm-api/networks HTTP/1.1
Accept: application/xml
Content-type: application/xml
<network>
<name>network 1</name>
<data_center id="01a45ff0-915a-11e0-8b87-5254004ac988"/>
</network>
name, description, ip, vlan, stp and display elements are updatable post-creation. See Section 8.3.4, “ Updating a Resource ” for more information.
PUT /rhevm-api/networks/e6575a87-377c-4f67-9c1b-7b94eff76b17 HTTP/1.1
Accept: application/xml
Content-type: application/xml
<network>
<description>Network 1</description>
</network>