HP VAN SDN Controller Administrator Guide

63
operation in which the master role is restored to the configured master as defined in the region
definition.
The next section provides details about the various REST operations that can be used to create,
update, and delete region configurations.
Note
Examples of cURL commands in this guide use the "--noproxy" option, which is
appropriate where execution of cURL commands does not need a proxy to access
controllers. If your network is set up such that a proxy is needed to access controllers, use
the "--proxy" option. For details on cURL proxy options, visit
http://curl.haxx.se/docs/manpage.html .
Create a Region
A region should have a minimum of two controllers. This example illustrates the cURL command to
use for creating a new region definition with the following controllers and devices:
Master Controller
Slave Controllers
OpenFlow
Switches
IP Address
Name
IP Addresses
Names
15.146.194.80
Controller_1
15.146.194.103
15.146.194.38
Controller_2
Controller_3
10.250.100.20
10.250.100.21
Note
In this example, assume the following token has been acquired:
"X-Auth-Token:54a6f80a9ae243db89bfa05de4ced51d"
To acquire the authentication token for a controller, see "REST Authentication" on page 47.
curl --noproxy 15.146.194.80 --header "X-Auth-Token:54a6f80a9ae243db89bfa05de4ced51d"
--header "Content-Type:application/json" --fail -ksS --request POST --url
"https://15.146.194.80:8443/sdn/v2.0/regions/ --data-binary "{
\"region\": {
\"master\": {
\"ip\": \"15.146.194.80\",
\"name\": \"Controller_1\"
},
\"slaves\": [
{
\"ip\": \"15.146.194.103\",
\"name\": \"Controller_2\"
},
{
\"ip\": \"15.146.194.38\",
\"name\": \"Controller_3\"