This topic describes how to modify tenant parameters of the obshell-sdk-python package in batches.
Note
We recommend that you first read through the Quick Start section of obshell-sdk-python to learn how to use it.
Considerations
Ensure that obshell is running normally.
Ensure the tenant already exists and its status is NORMAL.
The node corresponding to the requesting client must be in the initialized cluster.
Sample code
from obshell import ClientSet
from obshell.auth import PasswordAuth
# Create a client instance with the node address '10.10.10.1' and port 2886.
client = ClientSet("10.10.10.1", 2886, PasswordAuth("****"))
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 the API methods of obshell-sdk-go, see Modify tenant parameters.
