From 405be3b794f941c7a59b361e82b13a0d82e8fc67 Mon Sep 17 00:00:00 2001 From: wanghailiangx Date: Mon, 23 May 2022 04:47:01 -0400 Subject: [PATCH] notify module: remove support for deprecated RPC names These were deprecated in 2019, it's time to remove support for them now. Change-Id: I477da05a42ca607fbad4d178aa541726197d7c83 Signed-off-by: wanghailiangx Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/12775 Reviewed-by: Changpeng Liu Reviewed-by: Tomasz Zawadzki Reviewed-by: Jim Harris Community-CI: Broadcom CI Community-CI: Mellanox Build Bot Tested-by: SPDK CI Jenkins --- lib/notify/notify_rpc.c | 2 -- python/spdk/rpc/notify.py | 2 -- scripts/rpc.py | 6 ++---- 3 files changed, 2 insertions(+), 8 deletions(-) diff --git a/lib/notify/notify_rpc.c b/lib/notify/notify_rpc.c index ac538ee1a..678fae24f 100644 --- a/lib/notify/notify_rpc.c +++ b/lib/notify/notify_rpc.c @@ -67,7 +67,6 @@ rpc_notify_get_types(struct spdk_jsonrpc_request *request, spdk_jsonrpc_end_result(request, w); } SPDK_RPC_REGISTER("notify_get_types", rpc_notify_get_types, SPDK_RPC_RUNTIME) -SPDK_RPC_REGISTER_ALIAS_DEPRECATED(notify_get_types, get_notification_types) struct rpc_notify_get_notifications { uint64_t id; @@ -121,6 +120,5 @@ rpc_notify_get_notifications(struct spdk_jsonrpc_request *request, spdk_jsonrpc_end_result(request, req.w); } SPDK_RPC_REGISTER("notify_get_notifications", rpc_notify_get_notifications, SPDK_RPC_RUNTIME) -SPDK_RPC_REGISTER_ALIAS_DEPRECATED(notify_get_notifications, get_notifications) SPDK_LOG_REGISTER_COMPONENT(notify_rpc) diff --git a/python/spdk/rpc/notify.py b/python/spdk/rpc/notify.py index 4907447c0..3e648f19f 100644 --- a/python/spdk/rpc/notify.py +++ b/python/spdk/rpc/notify.py @@ -1,12 +1,10 @@ from .helpers import deprecated_alias -@deprecated_alias('get_notification_types') def notify_get_types(client): return client.call("notify_get_types") -@deprecated_alias('get_notifications') def notify_get_notifications(client, id=None, max=None): diff --git a/scripts/rpc.py b/scripts/rpc.py index 4d425d19b..32bb447da 100755 --- a/scripts/rpc.py +++ b/scripts/rpc.py @@ -2688,8 +2688,7 @@ Format: 'user:u1 secret:s1 muser:mu1 msecret:ms1,user:u2 secret:s2 muser:mu2 mse def notify_get_types(args): print_dict(rpc.notify.notify_get_types(args.client)) - p = subparsers.add_parser('notify_get_types', aliases=['get_notification_types'], - help='List available notifications that user can subscribe to.') + p = subparsers.add_parser('notify_get_types', help='List available notifications that user can subscribe to.') p.set_defaults(func=notify_get_types) def notify_get_notifications(args): @@ -2698,8 +2697,7 @@ Format: 'user:u1 secret:s1 muser:mu1 msecret:ms1,user:u2 secret:s2 muser:mu2 mse max=args.max) print_dict(ret) - p = subparsers.add_parser('notify_get_notifications', aliases=['get_notifications'], - help='Get notifications') + p = subparsers.add_parser('notify_get_notifications', help='Get notifications') p.add_argument('-i', '--id', help="""First ID to start fetching from""", type=int) p.add_argument('-n', '--max', help="""Maximum number of notifications to return in response""", type=int) p.set_defaults(func=notify_get_notifications)