Technical Forum
Ask questions. Discover Answers.
cancel
Showing results for 
Search instead for 
Did you mean: 

how to specify partition in bigrest delete()?

rahvee
Altocumulus
Altocumulus

Hi, in bigrest, the delete() method doesn't seem to have any way to specify partition.
https://bigrest.readthedocs.io/bigiq_delete.html

I am following this example to delete & add an ssl client profile on a virtual server:
https://github.com/mshoaibshafi/nre-tools/blob/main/f5/toggle_serverssl_profile.py

I have a path, like this:
delete_path = '/mgmt/tm/ltm/virtual/virtual-server-name/profiles/profile-name'

When I try to delete it, I get RestAPIError:
"message": "01020036:3: The requested virtual server profile (/Common/virtual-server-name /Common/profile-name) was not found."

This makes sense, because my virtual server is not in the Common partition. So how do I delete a profile from a virtual server that's not in the Common partition?

1 ACCEPTED SOLUTION

rahvee
Altocumulus
Altocumulus

I found something here:
https://support.f5.com/csp/article/K78107437

The short version is, use "~" characters to specify the partition.
delete_path = '/mgmt/tm/ltm/virtual/~partition-name~virtual-server-name/profiles/profile-name'

View solution in original post

2 REPLIES 2

rahvee
Altocumulus
Altocumulus

I found something here:
https://support.f5.com/csp/article/K78107437

The short version is, use "~" characters to specify the partition.
delete_path = '/mgmt/tm/ltm/virtual/~partition-name~virtual-server-name/profiles/profile-name'

Hi @rahvee - it looks like you answered your own question, so I marked your reply as the Accepted Solution. If that isn't the case, please let me know and I'll do my best to get you the help you need!