]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw_aws_module: lets call put object and see what happens
authorAbhishek Lekshmanan <abhishek@suse.com>
Thu, 23 Feb 2017 11:54:44 +0000 (12:54 +0100)
committerYehuda Sadeh <yehuda@redhat.com>
Tue, 10 Apr 2018 15:03:10 +0000 (08:03 -0700)
Signed-off-by: Abhishek Lekshmanan <abhishek@suse.com>
src/rgw/rgw_sync_module_aws.cc

index 8e7bda10083a0d0f240c12e7bf41d424d82cd541..96d1ebbd0c425291fdc516caaa33fc689bf35ad0 100644 (file)
@@ -74,11 +74,17 @@ public:
       if (retcode < 0) {
         return set_cr_error(retcode);
       }
-      ldout(sync_env->cct,0) << "abhi: download complete, printing object res:=" << res.c_str() << dendl;
-      //ldout(sync_env->cct, 0) << "abhi: list size" << res.size() << dendl;
-      // yield {
-      //   // implement me here should be the coroutine to send the stuff we received to aws
-
+      ldout(sync_env->cct,0) << "abhi: download complete, printing object"<< dendl;
+      yield {
+        string path=aws_object_name(bucket_info, key);
+        call(new RGWPutRawRESTResourceCR<int> (sync_env->cct, conf.conn,
+                                                        sync_env->http_manager,
+                                                        path, nullptr,
+                                                        res, nullptr));
+      }
+      if (retcode < 0) {
+        return set_cr_error(retcode);
+      }