X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Fceph%2Fsrc%2Fcls%2Freplica_log%2Fcls_replica_log_ops.cc;fp=src%2Fceph%2Fsrc%2Fcls%2Freplica_log%2Fcls_replica_log_ops.cc;h=0000000000000000000000000000000000000000;hb=7da45d65be36d36b880cc55c5036e96c24b53f00;hp=7d653b64613d94728e3d10028bb07f970f180cdd;hpb=691462d09d0987b47e112d6ee8740375df3c51b2;p=stor4nfv.git diff --git a/src/ceph/src/cls/replica_log/cls_replica_log_ops.cc b/src/ceph/src/cls/replica_log/cls_replica_log_ops.cc deleted file mode 100644 index 7d653b6..0000000 --- a/src/ceph/src/cls/replica_log/cls_replica_log_ops.cc +++ /dev/null @@ -1,81 +0,0 @@ -/* - * Ceph - scalable distributed file system - * - * This is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License version 2.1, as published by the Free Software - * Foundation. See file COPYING. - * - */ - -#include "cls_replica_log_ops.h" -#include "common/Formatter.h" -#include "common/ceph_json.h" - -void cls_replica_log_delete_marker_op::dump(Formatter *f) const -{ - f->dump_string("entity_id", entity_id); -} - -void cls_replica_log_delete_marker_op:: -generate_test_instances(std::list& ls) -{ - ls.push_back(new cls_replica_log_delete_marker_op); - ls.push_back(new cls_replica_log_delete_marker_op); - ls.back()->entity_id = "test_entity_1"; -} - -void cls_replica_log_set_marker_op::dump(Formatter *f) const -{ - encode_json("marker", marker, f); -} - -void cls_replica_log_set_marker_op:: -generate_test_instances(std::list& ls) -{ - std::list samples; - cls_replica_log_progress_marker::generate_test_instances(samples); - std::list::iterator i; - for (i = samples.begin(); i != samples.end(); ++i) { - ls.push_back(new cls_replica_log_set_marker_op(*(*i))); - } -} - -void cls_replica_log_get_bounds_op::dump(Formatter *f) const -{ - f->dump_string("contents", "empty"); -} - -void cls_replica_log_get_bounds_op:: -generate_test_instances(std::list& ls) -{ - ls.push_back(new cls_replica_log_get_bounds_op); -} - -void cls_replica_log_get_bounds_ret::dump(Formatter *f) const -{ - f->dump_string("position_marker", position_marker); - oldest_time.gmtime(f->dump_stream("oldest_time")); - encode_json("entity_markers", markers, f); -} - -void cls_replica_log_get_bounds_ret:: -generate_test_instances(std::list& ls) -{ - std::list samples; - cls_replica_log_progress_marker::generate_test_instances(samples); - std::list samples_whole; - std::list::iterator i; - int count = 0; - for (i = samples.begin(); i != samples.end(); ++i) { - ls.push_back(new cls_replica_log_get_bounds_ret()); - ls.back()->markers.push_back(*(*i)); - ls.back()->oldest_time.set_from_double(1000*count); - ls.back()->position_marker = ls.back()->markers.front().position_marker; - samples_whole.push_back(*(*i)); - } - ls.push_back(new cls_replica_log_get_bounds_ret()); - ls.back()->markers = samples_whole; - ls.back()->oldest_time = samples_whole.back().position_time; - ls.back()->position_marker = samples_whole.back().position_marker; -}