rpc: Rename disable_tpoint_group to trace_disable_tpoint_group

Change-Id: I3a41353ca8ff44163efcf1d0ee07a4332ba3ac85
Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/469137
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
Pawel Kaminski 2019-09-23 09:21:57 -04:00 committed by Jim Harris
parent dd29bd7e8d
commit ecca55c996
3 changed files with 12 additions and 9 deletions

View File

@ -88,8 +88,8 @@ SPDK_RPC_REGISTER("trace_enable_tpoint_group", spdk_rpc_trace_enable_tpoint_grou
SPDK_RPC_REGISTER_ALIAS_DEPRECATED(trace_enable_tpoint_group, enable_tpoint_group)
static void
spdk_rpc_disable_tpoint_group(struct spdk_jsonrpc_request *request,
const struct spdk_json_val *params)
spdk_rpc_trace_disable_tpoint_group(struct spdk_jsonrpc_request *request,
const struct spdk_json_val *params)
{
struct rpc_tpoint_group req = {};
struct spdk_json_write_ctx *w;
@ -120,8 +120,9 @@ invalid:
spdk_jsonrpc_send_error_response(request, SPDK_JSONRPC_ERROR_INVALID_PARAMS, "Invalid parameters");
free_rpc_tpoint_group(&req);
}
SPDK_RPC_REGISTER("disable_tpoint_group", spdk_rpc_disable_tpoint_group,
SPDK_RPC_REGISTER("trace_disable_tpoint_group", spdk_rpc_trace_disable_tpoint_group,
SPDK_RPC_STARTUP | SPDK_RPC_RUNTIME)
SPDK_RPC_REGISTER_ALIAS_DEPRECATED(trace_disable_tpoint_group, disable_tpoint_group)
static void
spdk_rpc_get_tpoint_group_mask(struct spdk_jsonrpc_request *request,

View File

@ -1157,14 +1157,15 @@ Format: 'user:u1 secret:s1 muser:mu1 msecret:ms1,user:u2 secret:s2 muser:mu2 mse
(for example "bdev" for bdev trace group, "all" for all trace groups).""")
p.set_defaults(func=trace_enable_tpoint_group)
def disable_tpoint_group(args):
rpc.trace.disable_tpoint_group(args.client, name=args.name)
def trace_disable_tpoint_group(args):
rpc.trace.trace_disable_tpoint_group(args.client, name=args.name)
p = subparsers.add_parser('disable_tpoint_group', help='disable trace on a specific tpoint group')
p = subparsers.add_parser('trace_disable_tpoint_group', aliases=['disable_tpoint_group'],
help='disable trace on a specific tpoint group')
p.add_argument(
'name', help="""trace group name we want to disable in tpoint_group_mask.
(for example "bdev" for bdev trace group, "all" for all trace groups).""")
p.set_defaults(func=disable_tpoint_group)
p.set_defaults(func=trace_disable_tpoint_group)
def get_tpoint_group_mask(args):
print_dict(rpc.trace.get_tpoint_group_mask(args.client))

View File

@ -12,14 +12,15 @@ def trace_enable_tpoint_group(client, name):
return client.call('trace_enable_tpoint_group', params)
def disable_tpoint_group(client, name):
@deprecated_alias('disable_tpoint_group')
def trace_disable_tpoint_group(client, name):
"""Disable trace on a specific tpoint group.
Args:
name: trace group name we want to disable in tpoint_group_mask. (for example "bdev").
"""
params = {'name': name}
return client.call('disable_tpoint_group', params)
return client.call('trace_disable_tpoint_group', params)
def get_tpoint_group_mask(client):