]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
cls_hello: alias write_return_data -> writes_dont_return_data
authorSage Weil <sage@redhat.com>
Wed, 22 Jan 2020 21:51:49 +0000 (15:51 -0600)
committerSage Weil <sage@redhat.com>
Thu, 23 Jan 2020 23:13:09 +0000 (17:13 -0600)
This allows pre-octopus tests to reach this (renamed) method via the old
method name.

Signed-off-by: Sage Weil <sage@redhat.com>
src/cls/hello/cls_hello.cc

index c301b96a301d54043eb0f68564bd956c2e439721..71546d6858b255f93c95c7b5a70e2671b71aa2f0 100644 (file)
@@ -183,7 +183,6 @@ static int write_too_much_return_data(cls_method_context_t hctx, bufferlist *in,
   return 42;
 }
 
-
 /**
  * replay - a "read" method to get a previously recorded hello
  *
@@ -317,6 +316,7 @@ CLS_INIT(hello)
   cls_method_handle_t h_record_hello;
   cls_method_handle_t h_replay;
   cls_method_handle_t h_write_return_data;
+  cls_method_handle_t h_writes_dont_return_data;
   cls_method_handle_t h_write_too_much_return_data;
   cls_method_handle_t h_turn_it_to_11;
   cls_method_handle_t h_bad_reader;
@@ -342,6 +342,10 @@ CLS_INIT(hello)
   cls_register_cxx_method(h_class, "write_return_data",
                          CLS_METHOD_WR,
                          write_return_data, &h_write_return_data);
+  // legacy alias for this method for pre-octopus clients
+  cls_register_cxx_method(h_class, "writes_dont_return_data",
+                         CLS_METHOD_WR,
+                         write_return_data, &h_write_return_data);
   cls_register_cxx_method(h_class, "write_too_much_return_data",
                          CLS_METHOD_WR,
                          write_too_much_return_data, &h_write_too_much_return_data);