
}
}
If
deviceIps
or
deviceIpRanges
are not in numeric order, they are reordered in the response
and in subsequent
GET
calls of the configuration.
Adding a device to a region using curl
This
POST
command adds a device with the specified IP address to the region with the specified
UID and propagates the modifications to each controller in the team. A
deviceIp
query parameter
must be specified. You can only add one IP address at a time in order to know which device IP
address is involved when an error condition is encountered. The new device IP address will be
added to the
deviceIps
list, unless it already appeared in the
deviceIps
list or was
encompassed by one of the ranges listed among the
deviceIpRanges
, in which case no change
will be made. All controllers configured for the team must be available for such a configuration
change to be permitted.
In this example, for region UID
713def9a-4f96-485f-990c-8924bc06c8d8
, device
192.168.1.103
is added to the region.
Example command
curl --noproxy
teamIp
--header "X-Auth-Token:
token
"
-ksS
--request
POST
--url
https://
teamIp
:8443/sdn/v2.0/owners/
region_uid
/devices?deviceIp=192.168.1.103
Example output
{"result":"Device IP address 192.168.1.103 now exists in the region with UID
'713def9a-4f96-485f-990c-8924bc06c8d8'"}
To check if your device was added to the region, check the Team screen in the controller UI or
see
“Getting the configuration of a specific region using curl” (page 194)
.
Getting the configuration of all regions using curl
This
GET
command retrieves the configuration of all regions. The regions configuration may have
been modified since controller startup to reflect the dynamic addition or removal of regions or
devices within specific regions.
In this example, there were no changes since controller startup and the configuration is the same
is in
“Adding a region using curl” (page 192)
Example command
curl --noproxy
teamIp
--header "X-Auth-Token:
token
"
-ksS
--request
GET
--url
https://
teamIp
:8443/sdn/v2.0/owners
Example output
{
"regions":[
{
"uid":"713def9a-4f96-485f-990c-8924bc06c8d8",
"name":"Region-Red",
"prioritizedControllerIps":[
"172.17.6.70",
"172.17.6.71",
"172.17.6.72"
],
"deviceIps":[
"192.168.1.101",
"192.168.1.102"
],
"deviceIpRanges":[
"192.168.1.103-105"
]
}
]
}
Team configuration using curl commands
193