summaryrefslogtreecommitdiffstats
path: root/nova/compute
diff options
context:
space:
mode:
Diffstat (limited to 'nova/compute')
-rw-r--r--nova/compute/api.py14
-rw-r--r--nova/compute/cells_api.py16
2 files changed, 30 insertions, 0 deletions
diff --git a/nova/compute/api.py b/nova/compute/api.py
index f524a6705..0119f6602 100644
--- a/nova/compute/api.py
+++ b/nova/compute/api.py
@@ -2482,6 +2482,20 @@ class HostAPI(base.Base):
host=host,
state=state)
+ def compute_node_get(self, context, compute_id):
+ """Return compute node entry for particular integer ID."""
+ return self.db.compute_node_get(context, int(compute_id))
+
+ def compute_node_get_all(self, context):
+ return self.db.compute_node_get_all(context)
+
+ def compute_node_search_by_hypervisor(self, context, hypervisor_match):
+ return self.db.compute_node_search_by_hypervisor(context,
+ hypervisor_match)
+
+ def compute_node_statistics(self, context):
+ return self.db.compute_node_statistics(context)
+
class AggregateAPI(base.Base):
"""Sub-set of the Compute Manager API for managing host aggregates."""
diff --git a/nova/compute/cells_api.py b/nova/compute/cells_api.py
index 88ff70790..50449df04 100644
--- a/nova/compute/cells_api.py
+++ b/nova/compute/cells_api.py
@@ -649,3 +649,19 @@ class HostAPI(compute_api.HostAPI):
ending,
host=host,
state=state)
+
+ def compute_node_get(self, context, compute_id):
+ """Get a compute node from a particular cell by its integer ID.
+ compute_id should be in the format of 'path!to!cell@ID'.
+ """
+ return self.cells_rpcapi.compute_node_get(context, compute_id)
+
+ def compute_node_get_all(self, context):
+ return self.cells_rpcapi.compute_node_get_all(context)
+
+ def compute_node_search_by_hypervisor(self, context, hypervisor_match):
+ return self.cells_rpcapi.compute_node_get_all(context,
+ hypervisor_match=hypervisor_match)
+
+ def compute_node_statistics(self, context):
+ return self.cells_rpcapi.compute_node_stats(context)