From cf2b87347cd801112f89552a78efabb92a63bac6 Mon Sep 17 00:00:00 2001 From: Russell Bryant Date: Wed, 30 May 2012 14:57:03 -0400 Subject: 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 --- nova/compute/rpcapi.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'nova/compute') 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), -- cgit