Actions
Bug #48369
opennotification: get/delete of specific notification does not work
% Done:
0%
Source:
Development
Tags:
notification
Backport:
octopus, nautilus
Regression:
No
Severity:
4 - irritation
Reviewed:
Description
note that this is an extension to the AWS API, for the next steps to work, follow the instructions here:
https://github.com/ceph/ceph/tree/master/examples/boto3
to reproduce:
(1) start a vstart cluster
(2) create 2 topics:
aws --endpoint-url http://localhost:8000 sns create-topic --name fishtopic --attributes='{"push-endpoint": "amqp://127.0.0.1:5672", "amqp-exchange": "ex1", "amqp-ack-level": "broker"}'
(3) create a bucket:
aws --endpoint-url http://localhost:8000 s3 mb s3://fish
(4) create 2 notifications on that bucket:
aws --region=default --endpoint-url http://localhost:8000 s3api put-bucket-notification-configuration --bucket fish --notification-configuration='{"TopicConfigurations": [{"Id": "creation-notif", "TopicArn": "arn:aws:sns:default::fishtopic", "Events": ["s3:ObjectCreated:*"]}]}' aws --region=default --endpoint-url http://localhost:8000 s3api put-bucket-notification-configuration --bucket fish --notification-configuration='{"TopicConfigurations": [{"Id": "deletion-notif", "TopicArn": "arn:aws:sns:default::fishtopic", "Events": ["s3:ObjectRemoved:*"]}]}'
(5) try to get a specific notification:
aws --region=default --endpoint-url http://localhost:8000 s3api get-bucket-notification-configuration --bucket fish --notification "creation-notif"
expected result:
{ "TopicConfigurations": [ { "Id": "creation-notif", "TopicArn": "arn:aws:sns:default::fishtopic", "Events": ["s3:ObjectCreated:*"] } ] }
actual result:
{ "TopicConfigurations": [ { "Id": "creation-notif", "TopicArn": "arn:aws:sns:default::fishtopic", "Events": ["s3:ObjectCreated:*"] }, { "Id": "deletion-notif", "TopicArn": "arn:aws:sns:default::fishtopic", "Events": ["s3:ObjectRemoved:*"] } ] }
(6) try to delete a specific notification:
aws --region=default --endpoint-url http://localhost:8000 s3api delete-bucket-notification-configuration --bucket fish --notification "creation-notif"
(7) fetch notifications and expect to see only "deletion-notif"
actual results: both notifications are deleted
Actions