From 5ee157c428b09b102906a7ec6834985557369b20 Mon Sep 17 00:00:00 2001 From: Dan Smith Date: Fri, 4 Jan 2013 12:47:45 -0800 Subject: Add ping to conductor This adds a ping() method to conductor, which takes a single argument and returns it back to the caller. It also returns the name of the current service, which is always 'conductor' in this case. I did this because I think that a generic ping method should do this in order to facilitate blind or broadcast pings. Related to bp/no-db-compute-manager Change-Id: I83105060945fa6a793d884c9e06ff154bc98e715 --- nova/tests/conductor/test_conductor.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'nova/tests') diff --git a/nova/tests/conductor/test_conductor.py b/nova/tests/conductor/test_conductor.py index f919b0465..86f47a79c 100644 --- a/nova/tests/conductor/test_conductor.py +++ b/nova/tests/conductor/test_conductor.py @@ -339,6 +339,10 @@ class _BaseTestCase(object): {'uuid': 'fake-id'}, 'fake-refr', 'fake-bool') + def test_ping(self): + result = self.conductor.ping(self.context, 'foo') + self.assertEqual(result, {'service': 'conductor', 'arg': 'foo'}) + class ConductorTestCase(_BaseTestCase, test.TestCase): """Conductor Manager Tests""" -- cgit