]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw/notification: assigning the value of zonegroup to awsRegion 42504/head
authorArjun Sharma <arjsharm@redhat.com>
Tue, 27 Jul 2021 09:34:06 +0000 (15:04 +0530)
committerArjun Sharma <arjsharm@redhat.com>
Mon, 8 Nov 2021 14:17:38 +0000 (19:47 +0530)
Signed-off-by: Arjun Sharma <arjsharm@redhat.com>
src/rgw/rgw_notify.cc
src/test/rgw/bucket_notification/test_bn.py

index 428c7174c01c7b1f9c1e86d93c3d27fb3720c816..65b7a84d9feccbdc72eeadd50d2ecb399ea85b61 100644 (file)
@@ -689,6 +689,7 @@ void populate_event_from_request(const reservation_t& res,
   event.object_size = size;
   event.object_etag = etag;
   event.object_versionId = version;
+  event.awsRegion = res.store->get_zone()->get_zonegroup().api_name;
   // use timestamp as per key sequence id (hex encoded)
   const utime_t ts(real_clock::now());
   boost::algorithm::hex((const char*)&ts, (const char*)&ts + sizeof(utime_t), 
index ec6b74d661714d8c453038754e13f439bb37397d..7d420aa064ae9000d71f6179c3a8b0eb4c467a56 100644 (file)
@@ -827,6 +827,7 @@ def test_ps_s3_notification_filter_on_master():
     for event in receiver.get_and_reset_events():
         notif_id = event['Records'][0]['s3']['configurationId']
         key_name = event['Records'][0]['s3']['object']['key']
+        awsRegion = event['Records'][0]['awsRegion']
         if notif_id == notification_name+'_1':
             found_in1.append(key_name)
         elif notif_id == notification_name+'_2':
@@ -841,6 +842,7 @@ def test_ps_s3_notification_filter_on_master():
     assert_equal(set(found_in1), set(expected_in1))
     assert_equal(set(found_in2), set(expected_in2))
     assert_equal(set(found_in3), set(expected_in3))
+    assert_equal(awsRegion, zonegroup)
     if not skip_notif4:
         assert_equal(set(found_in4), set(expected_in4))