This topic describes how to use obshell-sdk-python to get information about all resource pools in a cluster.
Note
We recommend that you first check out the obshell-sdk-python quick start to learn how to use obshell-sdk-python.
Considerations
Make sure that obshell is running.
The node corresponding to the client must be in an initialized cluster.
Sample code
The sample code for synchronously executing a task is as follows:
from obshell import ClientSet
from obshell.auth import PasswordAuth
# Create a client instance with the node address set to '10.10.10.1' and the port set to 2886.
client = ClientSet("10.10.10.1", 2886, PassswordAuth("****"))
pools = client.v1.get_all_resource_pools()
References
For more information about the API for getting information about all resource pools, see Get information about all resource pools.
For more information about how to call the API method by using obshell-sdk-go, see Get information about all resource pools.