This topic describes how to query tenant parameters using obshell-sdk-python, including exact query and fuzzy query.
Note
We recommend that you first read through the 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.get_tenant_parameter("t1", "max_partition_num")
Fuzzy query for tenant parameters
Considerations
Ensure that obshell is running normally.
Ensure the tenant exists and its status is NORMAL.
The node corresponding to the requesting client must be in an 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("****"))
parameters = client.v1.get_tenant_parameters("t1", "max_partition%")
References
-
For more information about the API for querying specific tenant parameters, see Query tenant parameters.
For more information about the API for fuzzy querying tenant parameters, see Fuzzy query for tenant parameters.
For more information about requesting API methods using obshell-sdk-go, see Query tenant parameters.
