From: Jason Dillaman Date: Fri, 6 Feb 2015 07:36:48 +0000 (-0500) Subject: librados_test_stub: added new blacklist_add method X-Git-Tag: v0.93~54^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=86fd8c367a3eb35dc9d5c4573c7d77e150b7a698;p=ceph.git librados_test_stub: added new blacklist_add method The new librados API method is used by RBD so it needs to be added to the test stub. Signed-off-by: Jason Dillaman --- diff --git a/src/test/librados_test_stub/LibradosTestStub.cc b/src/test/librados_test_stub/LibradosTestStub.cc index 4f83f6ee8cff..fc8b80cf9ac7 100644 --- a/src/test/librados_test_stub/LibradosTestStub.cc +++ b/src/test/librados_test_stub/LibradosTestStub.cc @@ -678,6 +678,12 @@ AioCompletion *Rados::aio_create_completion(void *cb_arg, return new AioCompletion(c); } +int Rados::blacklist_add(const std::string& client_address, + uint32_t expire_seconds) { + TestRadosClient *impl = reinterpret_cast(client); + return impl->blacklist_add(client_address, expire_seconds); +} + int Rados::conf_parse_env(const char *env) const { return rados_conf_parse_env(reinterpret_cast(client), env); } @@ -760,7 +766,7 @@ int Rados::pool_list(std::list& v) { return 0; } -int librados::Rados::pool_list2(std::list >& v) +int Rados::pool_list2(std::list >& v) { TestRadosClient *impl = reinterpret_cast(client); return impl->pool_list(v); @@ -785,6 +791,9 @@ void Rados::shutdown() { client = NULL; } +void Rados::test_blacklist_self(bool set) { +} + int Rados::wait_for_latest_osdmap() { TestRadosClient *impl = reinterpret_cast(client); return impl->wait_for_latest_osdmap(); diff --git a/src/test/librados_test_stub/TestMemRadosClient.cc b/src/test/librados_test_stub/TestMemRadosClient.cc index 8abfa263e051..73abfa9a0898 100644 --- a/src/test/librados_test_stub/TestMemRadosClient.cc +++ b/src/test/librados_test_stub/TestMemRadosClient.cc @@ -119,4 +119,9 @@ int TestMemRadosClient::watch_flush() { return 0; } +int TestMemRadosClient::blacklist_add(const std::string& client_address, + uint32_t expire_seconds) { + return 0; +} + } // namespace librados diff --git a/src/test/librados_test_stub/TestMemRadosClient.h b/src/test/librados_test_stub/TestMemRadosClient.h index df4eb18a72a6..a6fb3bdb1d5f 100644 --- a/src/test/librados_test_stub/TestMemRadosClient.h +++ b/src/test/librados_test_stub/TestMemRadosClient.h @@ -79,6 +79,9 @@ public: virtual int pool_reverse_lookup(int64_t id, std::string *name); virtual int watch_flush(); + + virtual int blacklist_add(const std::string& client_address, + uint32_t expire_seconds); protected: ~TestMemRadosClient(); diff --git a/src/test/librados_test_stub/TestRadosClient.h b/src/test/librados_test_stub/TestRadosClient.h index 22b1fee8eb32..9bb5b1c90c21 100644 --- a/src/test/librados_test_stub/TestRadosClient.h +++ b/src/test/librados_test_stub/TestRadosClient.h @@ -65,6 +65,9 @@ public: virtual int watch_flush() = 0; + virtual int blacklist_add(const std::string& client_address, + uint32_t expire_seconds) = 0; + TestWatchNotify &get_watch_notify() { return m_watch_notify; }