mgbailey_160800
Oct 08, 2014Nimbostratus
Manipulating GTM WideIP pools from iControl REST
I have been trying unsuccessfully to figure out how to manipulate the pools on a WideIP using iControl REST. To make things clearer, I am using curl for my experiments. First, here is a WideIP as viewed from the REST interface:
[/Users/mbailey/f5play]$ curl -k -u svcscsdev:xxxx -X GET https://cdc240003a-scs-test-gtm.acme.com/mgmt/tm/gtm/wideip/timtest99.cloud-int.acme.com | python -m json.tool
{
"enabled": true,
"fullPath": "timtest99.cloud-int.acme.com",
"generation": 1,
"ipv6NoErrorNegTtl": 0,
"ipv6NoErrorResponse": "disabled",
"kind": "tm:gtm:wideip:wideipstate",
"name": "timtest99.cloud-int.acme.com",
"persistCidrIpv4": 32,
"persistCidrIpv6": 128,
"persistence": "disabled",
"poolLbMode": "round-robin",
"pools": [
{
"name": "timtest99.acme.com_ned_pool",
"order": 0,
"partition": "Common",
"ratio": 1
}
],
"selfLink": "https://localhost/mgmt/tm/gtm/wideip/timtest99.cloud-int.acme.com?ver=11.5.1",
"ttlPersistence": 3600
}
`
Now if I just try to do something as simple as narrowing this down to the pools, I get an error:
`[/Users/mbailey/f5play]$ curl -k -u svcscsdev:xxxx -X GET https://cdc240003a-scs-test-gtm.acme.com/mgmt/tm/gtm/wideip/timtest99.cloud-int.acme.com/pools | python -m json.tool
{
"code": 403,
"errorStack": [],
"message": "Operation is not allowed on property /gtm/wideip/timtest99.cloud-int.acme.com/pools."
}
`
Trying something a little more complex, I get the same results if I try to add an existing GTM pool to the WideIP (using this payload: {"name":"user002rel21test2.acme.com_ned_pool"}):
`[/Users/mbailey/f5play]$ curl -k -u svcscsdev:xxxx -X POST "https://cdc240003a-scs-test-gtm.acme.com/mgmt/tm/gtm/wideip/timtest99.cloud-int.acme.com/pools" -d @gtmWIPPool.json -H "Content-Type:application/json" | python -m json.tool
{
"code": 403,
"errorStack": [],
"message": "Operation is not allowed on configuration item /gtm/wideip/timtest99.cloud-int.acme.com/pools/user002rel21test2.acme.com_ned_pool."
}
I also have the same results if I try ~Common~timtest99.cloud-int.acme.com instead of just timtest99.cloud-int.acme.com for these commands.
It appears that the uri I am using to access the pools within a WideIP (https://cdc240003a-scs-test-gtm.acme.com/mgmt/tm/gtm/wideip/timtest99.cloud-int.acme.com/pools) is not functional. Please help me determine the correct uri.