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 <hailiangx.e.wang@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/12775
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
This commit is contained in:
wanghailiangx 2022-05-23 04:47:01 -04:00 committed by Jim Harris
parent 7aa92ad513
commit 405be3b794
3 changed files with 2 additions and 8 deletions

View File

@ -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)

View File

@ -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):

View File

@ -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)