This topic describes how to use obshell-sdk-python to get information about all tenants in the recycle bin.
Note
We recommend that you first read Get started with obshell-sdk-python to learn how to use obshell-sdk-python.
Considerations
Make sure that obshell is running.
The node corresponding to the client in the request must be in an initialized cluster.
Sample code
The following example shows how to execute a task synchronously:
from obshell import ClientSet
from obshell.auth import PasswordAuth
# Create a client instance with the IP address of the node as '10.10.10.1' and the port as 2886.
client = ClientSet("10.10.10.1", 2886, PassswordAuth("****"))
tenants = client.v1.get_all_recyclebin_tenants()
References
For more information about the API for getting information about all tenants in the recycle bin, see Get information about all tenants in the recycle bin.
For more information about how to request an API method by using obshell-sdk-go, see Get information about all tenants in the recycle bin.