INITIAL STATE:
--------------
13:46 $ curl -u "admin:admin" -X GET -H "Content-Type:application/json" http://$ODL:8181/auth/v1/domains | python -m json.tool
{
"domains": [
]
}
CREATE DOMAIN "OpenFlowSucks":
------------------------------
13:46 $ curl -u "admin:admin" -X POST -d '
{"description":"OpenFlow Is King","name":"OpenFlowSucks","enabled":"true"}' -H "Content-Type:application/json" http://$ODL:8181/auth/v1/domains/
{"domainid":"OpenFlowSucks","name":"OpenFlowSucks","description":"OpenFlow Is King","enabled":true}13:46 $ curl -u "admin:admin" -X GET -H "Content-Type:application/json" http://$ODL:8181/auth/v1/domains | python -m json.tool
{
"domains": [
,
{ "description": "OpenFlow Is King", "domainid": "OpenFlowSucks", "enabled": true, "name": "OpenFlowSucks" } ]
}
UPDATE DOMAIN NAME TO HAVE NAME "OpenFlowRocks":
------------------------------------------------
13:46 $ curl -u "admin:admin" -X PUT -d '
{"description":"OpenFlow Is King","name":"OpenFlowRocks","enabled":"true"}' -H "Content-Type:application/json" http://$ODL:8181/auth/v1/domains/OpenFlowSucks
{"domainid":"OpenFlowSucks","name":"OpenFlowRocks","description":"OpenFlow Is King","enabled":true}13:47 $ curl -u "admin:admin" -v -X GET -H "Content-Type:application/json" http://$ODL:8181/auth/v1/domains | python -m json.tool
- Server auth using Basic with user 'admin'
> GET /auth/v1/domains HTTP/1.1
> Host: 209.132.178.40:8181
> Authorization: Basic YWRtaW46YWRtaW4=
> User-Agent: curl/7.51.0
> Accept: /
> Content-Type:application/json
>
< HTTP/1.1 200 OK
< Set-Cookie: JSESSIONID=riqfpnfaqc3k8v43k9ham06k;Path=/auth
< Expires: Thu, 01 Jan 1970 00:00:00 GMT
< Set-Cookie: rememberMe=deleteMe; Path=/auth; Max-Age=0; Expires=Mon, 15-May-2017 20:47:13 GMT
< Content-Type: application/json
< Transfer-Encoding: chunked
< Server: Jetty(8.1.19.v20160209)
<
{ [210 bytes data] - Curl_http_done: called premature == 0
100 199 0 199 0 0 1695 0 -::- -::- -::- 1700 - Connection #0 to host 209.132.178.40 left intact
{
"domains": [
,
{ "description": "OpenFlow Is King", "domainid": "OpenFlowSucks", "enabled": true, "name": "OpenFlowSucks" } ]
}
As you can see above, the new name was not updated, although the PUT was accepted
and gave 200 response back.
the karaf log is tracking these same steps:
2017-05-16 20:46:50,013 | INFO | p1124141104-2109 | DomainHandler | 287 - org.opendaylight.aaa.idmlight - 0.5.0.SNAPSHOT | Post /domains
2017-05-16 20:46:51,741 | INFO | p1124141104-2109 | DomainHandler | 287 - org.opendaylight.aaa.idmlight - 0.5.0.SNAPSHOT | Get /domains
2017-05-16 20:47:09,808 | INFO | p1124141104-2189 | DomainHandler | 287 - org.opendaylight.aaa.idmlight - 0.5.0.SNAPSHOT | Put /domains/OpenFlowSucks
2017-05-16 20:47:09,842 | INFO | p1124141104-2189 | IdmLightProxy | 287 - org.opendaylight.aaa.idmlight - 0.5.0.SNAPSHOT | Clearing the claim cache
2017-05-16 20:47:13,041 | INFO | p1124141104-2189 | DomainHandler | 287 - org.opendaylight.aaa.idmlight - 0.5.0.SNAPSHOT | Get /domains