summaryrefslogtreecommitdiffstats
path: root/nova/compute
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2013-02-07 19:32:47 +0000
committerGerrit Code Review <review@openstack.org>2013-02-07 19:32:47 +0000
commitf8518387c01e1395ff1aae2e896e7fd9ebaf5e4a (patch)
treeaf517389cbc3f6d8d01d3fdc72b27d07bc540b21 /nova/compute
parent4853996036717989542ef988deefab4b67322c55 (diff)
parenta019a9007d09d190ebd3005b4c13ba78e1ec0536 (diff)
Merge "Cells: Add cells support to hypervisors extension"
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)