diff options
| author | Russell Bryant <rbryant@redhat.com> | 2012-05-30 14:57:03 -0400 |
|---|---|---|
| committer | Russell Bryant <rbryant@redhat.com> | 2012-06-01 14:05:51 -0400 |
| commit | cf2b87347cd801112f89552a78efabb92a63bac6 (patch) | |
| tree | 35bcaa64760c89737c8992e46730e6a9f6f0b70f /nova/compute | |
| parent | b7744f8f7e345928df016a04b6d8a5935470b254 (diff) | |
Add shared_storage_test methods to compute rpcapi.
Part of bug 1006467.
This patch adds 3 methods used to check if shared storage works between
two compute hosts to the compute rpcapi. These methods are used by the
scheduler.
This also cuts down on some duplicated code in test_scheduler.
Change-Id: If0bf7f7fdd2beb0e5280ae52daf049372f8bc9e2
Diffstat (limited to 'nova/compute')
| -rw-r--r-- | nova/compute/rpcapi.py | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/nova/compute/rpcapi.py b/nova/compute/rpcapi.py index 155c23abf..8c25906c9 100644 --- a/nova/compute/rpcapi.py +++ b/nova/compute/rpcapi.py @@ -84,6 +84,16 @@ class ComputeAPI(nova.rpc.proxy.RpcProxy): mountpoint=mountpoint), topic=self._compute_topic(ctxt, None, instance)) + def check_shared_storage_test_file(self, ctxt, filename, host): + return self.call(ctxt, self.make_msg('check_shared_storage_test_file', + filename=filename), + topic=self._compute_topic(ctxt, host, None)) + + def cleanup_shared_storage_test_file(self, ctxt, filename, host): + self.cast(ctxt, self.make_msg('cleanup_shared_storage_test_file', + filename=filename), + topic=self._compute_topic(ctxt, host, None)) + def compare_cpu(self, ctxt, cpu_info, host): return self.call(ctxt, self.make_msg('compare_cpu', cpu_info=cpu_info), topic=self._compute_topic(ctxt, host, None)) @@ -95,6 +105,11 @@ class ComputeAPI(nova.rpc.proxy.RpcProxy): instance_uuid=instance['uuid'], migration_id=migration_id), topic=self._compute_topic(ctxt, host, instance)) + def create_shared_storage_test_file(self, ctxt, host): + return self.call(ctxt, + self.make_msg('create_shared_storage_test_file'), + topic=self._compute_topic(ctxt, host, None)) + def detach_volume(self, ctxt, instance, volume_id): self.cast(ctxt, self.make_msg('detach_volume', instance_uuid=instance['uuid'], volume_id=volume_id), |
