This topic describes how to use obshell-sdk-python to modify tenant parameters in batches.
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.
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, where 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_parameters("t1", {
"backup_data_file_size": "2G",
"arbitration_timeout": "10s"
})
References
For more information about the API for modifying tenant parameters, see Modify tenant parameters.
For more information about how to call the API method by using obshell-sdk-go, see Modify tenant parameters.