16.2. Listing the Public Attributes of a Resource
The
dir()
method returns a list of public variables, modules, and functions of a resource. The private attribute names start with an underscore character. To get a list of all the public attributes of a resource, use the following code snippet:
for name in (e for e in dir(api) if not e.startswith('_')): print name

Figure 16.1. Object Hierarchy

Figure 16.2. Relationship between a brick and a host

Figure 16.3. Relationship between a host and a cluster
22632%2C+Console+Developer+Guide-322-09-2014+17%3A11%3A35Report a bug