This topic describes how to unlock a tenant by using obshell-sdk-python.
Note
For more information about obshell-sdk-python, see Get started with obshell-sdk-python.
Considerations
Make sure that obshell is running.
Make sure that the tenant exists and is in the NORMAL state.
The node corresponding to the client in the request must belong to an initialized cluster.
Sample code
The following code example shows how to execute a task synchronously:
from obshell import ClientSet
from obshell.auth import PasswordAuth
# Create a client instance, where the node address is '10.10.10.1' and the port is 2886.
client = ClientSet("10.10.10.1", 2886, PassswordAuth("****"))
client.v1.unlock_tenant("t1")
References
For more information about the API for unlocking a tenant, see Unlock a tenant.
For more information about how to request API methods by using obshell-sdk-go, see Unlock a tenant.