Lease Resource Hierarchy
Helper for managing hierarchy of lease resources.
-
class
bosdyn.client.lease_resource_hierarchy.
ResourceHierarchy
(resource_tree_proto)[source]
Bases: object
Helper for managing hierarchy of lease resources.
-
has_resource
(resource)[source]
Return a boolean indicating if the resource is in this hierarchy.
-
has_sub_resources
()[source]
Return a boolean indicating whether this hierarchy has sub-trees.
-
get_resource
()[source]
Get the root resource string for this hierarchy.
-
get_resource_tree
()[source]
Get the resource tree protobuf message corresponding with this hierarchy.
-
leaf_resources
()[source]
Get a set of all leaf resources in this tree.
-
get_hierarchy
(resource)[source]
Get the sub-tree corresponding to the specified resource.
- Parameters
resource (string) – The root resource for the hierarchy.
- Returns
The ResourceHierarchy object corresponding with this tree, or None
if the resource is not within this tree.