Host network mapping
Use the REST APIs to create, read, and update Shared Ethernet Adapter network mappings for PowerVC. This REST API does not affect Single Root I/O Virtualization (SR-IOV) or Open vSwitch (OVS) networks.
- Network mapping API options
- Create network mapping
- View details of existing network mapping
- Update existing network mapping
- View details of existing network mapping of a specific host
Network mapping API options
| Method | URI | Description |
|---|---|---|
|
POST |
|
Creates the network mapping for a set of hosts on the tenant ID that is provided. |
|
GET |
|
Lists network mapping for all hosts. |
|
PUT |
|
Edits the network mapping for a set of hosts on the tenant ID that is provided. |
|
GET |
|
Lists the network mapping for the host that is provided. |
Create network mapping
force=true URL parameter.
The API returns the following warning messages on a Conflict (409)
response: - A Shared Ethernet Adapter is being removed from the default adapter status, and this action results in network downtime.
- There are multiple networks on the same VLAN. Changing a network results in a change to the other networks.
200 OK with
a blank body.The following example contain a request to create
the network mappings for two hosts for the tenant e9a2464cf00f4bc98eb2d02c534f47b7.
The body of the request contains the information to set for the network
mappings. As the data is valid, the API returns a response 200
OK with a blank body.
- Normal Response Code: 200
- Error Response Codes:
- Bad Request (400)
- Unauthorized (401)
- Not Found (404)
- Conflict (409)
| Name | In | Type | Description |
|---|---|---|---|
|
|
body |
String |
Name of the host that is used by OpenStack configuration. The host name is not the same as the host name of a networking concept that is used for Domain Name Service. |
|
|
body |
String |
The ID for the network that is used by OpenStack configuration. |
|
|
body |
String |
The primary Shared Ethernet Adapter that traffic flows through for the specified host and the specified network. |
|
|
body |
Integer |
The ID for the Virtual I/O Server logical partition that owns the specified Shared Ethernet Adapter. The ID is typically a positive integer. |
|
|
body |
String |
The name of the Shared Ethernet Adapter. |
|
|
query |
Boolean |
Optional. Valid values are |
POST
/v2.1/{tenant_id}/host-network-mapping
Content-Type: application/json
Accept: application/json
{
"host-network-mapping": [
{
"host_name": "host1",
"networks": [
{
"network_id": "ade3c5e807ff479c9ed1ad43",
"primary_sea": {
"lpar_id": 1,
"name": "ent10"
}
}
]
},
{
"host_name": "host2",
"networks": [
{
"network_id": "bde3c5e807ff479c9ed1ad44",
"primary_sea": "not-applicable"
}
]
}
]
}Response JSON:
200 (OK)
View details of existing network mapping
The following is an example of
a GET operation, which is a request to get the details of network
mappings without specifying the host or a network ID. The HTTP request
gets all network mappings for a tenant. The response body contains
network mapping details of two hosts. host1 has a
network with the ID ade3c5e807ff479c9ed1ad43. The
network has a list of Shared Ethernet Adapters, and the list contains
a single Shared Ethernet Adapter named ent10. The
VIOS for host1 is not configured for high availability
so the HA attributes of the Shared Ethernet Adapter are null. The
VIOS LPAR ID is available as a property of the SEA. host2 with
a second network is also returned. The Shared Ethernet Adapters list
for the second host is set to not-applicable as host2 does
not have a mapping for network1. host2 is
still a viable host, but when PowerVC places
a virtual machine on the host, a default value is selected. The response
data has a host that contains a set of networks that contains a set
of Shared Ethernet Adapters.
- Normal Response Code: 200
- Error Response Codes:
- Bad Request (400)
- Unauthorized (401)
- Not Found (404)
| Name | In | Type | Description |
|---|---|---|---|
|
|
query |
String |
Optional. The ID for the network that is
used by OpenStack configuration.
To filter the returned list by a network ID, specify |
GET
/v2.1/{tenant_id}/host-network-mapping
Content-Type: application/json
Accept: application/json
Response JSON:
| Name | In | Type | Description |
|---|---|---|---|
|
|
body |
String |
Name of the host that is used by OpenStack configuration. The host name is not the same as the host name of a networking concept that is used for Domain Name Service. |
|
|
body |
String |
The ID for the network that is used by OpenStack configuration. |
|
|
body |
String |
The primary Shared Ethernet Adapter that traffic flows through for the specified host and the specified network. |
|
|
body |
Integer |
The ID for the Virtual I/O Server logical partition that owns the specified Shared Ethernet Adapter. The ID is typically a positive integer. |
|
|
body |
String |
The name of the Shared Ethernet Adapter. |
200 (OK)
Content-Type: application/json
{
"host-network-mapping": [
{
"host_name": "host1",
"networks": [
{
"network_id": "ade3c5e807ff479c9ed1ad43",
"primary_sea": {
"lpar_id": 1,
"name": "ent10"
}
}
]
},
{
"host_name": "host2",
"networks": [
{
"network_id": "bde3c5e807ff479c9ed1ad44",
"primary_sea": "not-applicable"
}
]
}
]
}Update existing network mapping
The following example is a request
to update the network mappings for host1 for the
tenant e9a2464cf00f4bc98eb2d02c534f47b7. The body
of the request contains the information to set for the network mapping.
If the data is valid, the response is 200 OK with
a blank body.
| Name | In | Type | Description |
|---|---|---|---|
|
|
body |
String |
Name of the host that is used by OpenStack configuration. The host name is not the same as the host name of a networking concept that is used for Domain Name Service. |
|
|
body |
String |
The ID for the network that is used by OpenStack configuration. |
|
|
body |
String |
The primary Shared Ethernet Adapter that traffic flows through for the specified host and the specified network. |
|
|
body |
Integer |
The ID for the Virtual I/O Server logical partition that owns the specified Shared Ethernet Adapter. The ID is typically a positive integer. |
|
|
body |
String |
The name of the Shared Ethernet Adapter. |
|
|
query |
Boolean |
Optional. Valid values are |
PUT
/v2.1/{tenant_id}/host-network-mapping
Content-Type: application/json
Accept: application/json
{
"host-network-mapping": [
{
"host_name": "host1",
"networks": [
{
"network_id": " ade3c5e807ff479c9ed1ad43",
"primary_sea": {
"lpar_id": 1,
"name": "ent10"
}
}
]
}
]
}Response JSON:
200 (OK)View details of existing network mapping of a specific host
The following
is an example of a GET operation, which is a request to get the details
of network mappings for a host. In the example, the request is for
a specific host c45cfd902403492f8c1c417, and only
the network mapping for the host is included in the response.
- Normal Response Code: 200
- Error Response Codes:
- Bad Request (400)
- Unauthorized (401)
- Not Found (404)
| Name | In | Type | Description |
|---|---|---|---|
|
|
query |
String |
Optional. The ID for the network that is
used by OpenStack configuration.
To filter the returned list by a network ID, specify |
GET
/v2.1/{tenant_id}/host-network-mapping/{host_name}
Content-Type: application/json
Accept: application/json
Response JSON:
| Name | In | Type | Description |
|---|---|---|---|
|
|
body |
String |
Name of the host that is used by OpenStack configuration. The host name is not the same as the host name of a networking concept that is used for Domain Name Service. |
|
|
body |
String |
The ID for the network that is used by OpenStack configuration. |
|
|
body |
String |
The primary Shared Ethernet Adapter that traffic flows through for the specified host and the specified network. |
|
|
body |
Integer |
The ID for the Virtual I/O Server logical partition that owns the specified Shared Ethernet Adapter. The ID is typically a positive integer. |
|
|
body |
String |
The name of the Shared Ethernet Adapter. |
200 (OK)
Content-Type: application/json
{
"host-network-mapping": [
{
"host_name": "host1",
"networks": [
{
"network_id": "ade3c5e807ff479c9ed1ad43",
"primary_sea": {
"lpar_id": 1,
"name": "ent10"
}
}
]
}
]
}