Forum Discussion
Hey Guys, I need help here. We need to have a script to permantly change the default pool. So that we are able to switch the default pool for a number of Virtual Servers. Therefore I wrote a script to use the curl command which is: curl -sk -u 'admin:admin' -H "Content-Type: application/json" -X PUT -d '{"pool":"sVirtual-2"}'
But for some reason I receive the following error message:
{"code":400,"message":"0107028c:3: The source (::) and destination (123.123.123.123) addresses for virtual server (/Common/VS1) must be be the same type (IPv4 or IPv6).","errorStack":[]}
So I checked the config of the virtual server and the Source IP is IPv4 "0.0.0.0/0"
Any input here?
Or is the curl command maybe wrong?
- Dave_Gibbs_1948Aug 30, 2016Nimbostratus
In v12 we have had to change our PUT method to a PATCH which resolved this issue.
- Philipp_AeschliOct 11, 2016Nimbostratus
Many Thanks to Dave Gibs, this is exaclty the solution to the error msg explained by adavidjan (in case you upgraded to v12)
Best Philipp
- adavidjan_27668Jun 20, 2017Nimbostratus
The PATCH method for updating the default pool of a Virtual works fine so far. Now we want to create a user which is allowed to change the default pool only for a couple of Virtual Servers. Therefore we created a role over REST API and granted Restmethod "PATCH" for those Virtual servers. But the user is not allowed to change the default pool and we receive a 401 message saying "Authorization failed" when trying to PATCH the default pool attribute. Using a admin user works fine.
- adavidjan_27668Jun 26, 2017Nimbostratus
Is the above mentioned task for changing the default pool only possible via "admin"-user? Thanks.