This topic describes how to use obshell-sdk-python to modify system variables of a tenant. You can modify multiple system variables at a time.
Note
We recommend that you first read Quick Start for obshell-sdk-python to learn how to use 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 be in an initialized cluster.
Sample code
The following example shows how to synchronize a task:
from obshell import ClientSet
from obshell.auth import PasswordAuth
# Create a client instance. The node address is '10.10.10.1' and the port is 2886.
client = ClientSet("10.10.10.1", 2886, PassswordAuth("****"))
client.v1.set_tenant_variables("t1", {
"max_connections": 1000,
"recyclebin": True
})
References
For more information about the API for modifying tenant system variables, see Modify tenant system variables.
For more information about how to use obshell-sdk-go to request API methods, see Modify tenant system variables.