08-Jul-2022 11:56
I have VIP on partition /DevOps. I’m trying to create a REST call to assign an iRule to an existing VIP that are not in /Common. When I use a call like the following, it gets an HTTP 404 not found because it defaults to thinking the VIP is in the /Common partition:
curl -k -X PUT -H Content-Type: application/json -H X-F5-Auth-Token: **** -d {"rules":["/Common/_sys_https_redirect"]} https://****.****.com/mgmt/tm/ltm/virtual/gary-dev.yrcw.com_vs
But, when I revise it as follows, it returns HTTP 400 “Found unexpected URI”:
curl -k -X PUT -H Content-Type: application/json -H X-F5-Auth-Token: **** -d {"rules":["/Common/_sys_https_redirect"]} https://****.****.com/mgmt/tm/ltm/virtual/DevOps/gary-dev.yrcw.com_vs
What is the proper way to direct it to my VIP in the /DevOps partition?
If I must use TMSH then please provide a working example and I’ll script it that way.
Thanks in advance for your assistance.
Solved! Go to Solution.
09-Jul-2022 00:40
Hello Gary
Just try this instead
https://****.****.com/mgmt/tm/ltm/virtual/~DevOps~gary-dev.yrcw.com_vs
11-Jul-2022 13:20
09-Jul-2022 00:40
Hello Gary
Just try this instead
https://****.****.com/mgmt/tm/ltm/virtual/~DevOps~gary-dev.yrcw.com_vs
11-Jul-2022 05:58
Thanks. That works.
11-Jul-2022 12:49
Now that I've got it coded that way:
curl -k -X PUT -H Content-Type: application/json -H X-F5-Auth-Token: **** -d {"rules":["/Common/_sys_https_redirect"]} https://****.****.com/mgmt/tm/ltm/virtual/~DevOps~gary-dev.yrcw.com-redir_vs
I get an HTTP 400 with:
The source (::) and destination (*.*.148.61) addresses for virtual server (/DevOps/gary-dev.yrcw.com-redir_vs) must be be the same type (IPv4 or IPv6).
So I guess the question is why does it think the source is blank when the HTTP and HTTPS VIP both have the same IP?
11-Jul-2022 13:20
Hello Gary,
Use PATCH method instead of PUT.
11-Jul-2022 13:28
Okay, got it. Now it's working. Thanks much.