]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
librados_test_stub: added new blacklist_add method 3704/head
authorJason Dillaman <dillaman@redhat.com>
Fri, 6 Feb 2015 07:36:48 +0000 (02:36 -0500)
committerJason Dillaman <dillaman@redhat.com>
Fri, 6 Feb 2015 12:27:53 +0000 (07:27 -0500)
The new librados API method is used by RBD so it needs to be
added to the test stub.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
src/test/librados_test_stub/LibradosTestStub.cc
src/test/librados_test_stub/TestMemRadosClient.cc
src/test/librados_test_stub/TestMemRadosClient.h
src/test/librados_test_stub/TestRadosClient.h

index 4f83f6ee8cff6d195446cd578c78ec0fe8a3a34a..fc8b80cf9ac76780ec3372e890fbae74cd5d5380 100644 (file)
@@ -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<TestRadosClient*>(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<rados_t>(client), env);
 }
@@ -760,7 +766,7 @@ int Rados::pool_list(std::list<std::string>& v) {
   return 0;
 }
 
-int librados::Rados::pool_list2(std::list<std::pair<int64_t, std::string> >& v)
+int Rados::pool_list2(std::list<std::pair<int64_t, std::string> >& v)
 {
   TestRadosClient *impl = reinterpret_cast<TestRadosClient*>(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<TestRadosClient*>(client);
   return impl->wait_for_latest_osdmap();
index 8abfa263e051aa440e788f6ed12d9a3697d9db83..73abfa9a08980ea8a2a7a154de569a3dc1910bd9 100644 (file)
@@ -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
index df4eb18a72a6e0106d5827fbcb004773840b4499..a6fb3bdb1d5fee1a3190b54c3422239f50c04322 100644 (file)
@@ -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();
 
index 22b1fee8eb327fefd672f1aefcb9091c1eaaa589..9bb5b1c90c21ba7672394c63c320c41e6e8e18b6 100644 (file)
@@ -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;
   }