RPC: rename clear_log_flag to log_clear_flag
Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com> Change-Id: I2cfcbe8e3ef912d4ec616ca1b48bf5f75cb3e98a Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/468726 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
This commit is contained in:
parent
8dc50d2d32
commit
b8fffdde90
@ -248,7 +248,7 @@ Example response:
|
||||
"nbd_stop_disk",
|
||||
"nbd_start_disk",
|
||||
"get_log_flags",
|
||||
"clear_log_flag",
|
||||
"log_clear_flag",
|
||||
"log_set_flag",
|
||||
"log_get_level",
|
||||
"log_set_level",
|
||||
|
@ -274,7 +274,7 @@ SPDK_RPC_REGISTER("log_set_flag", spdk_rpc_log_set_flag, SPDK_RPC_STARTUP | SPDK
|
||||
SPDK_RPC_REGISTER_ALIAS_DEPRECATED(log_set_flag, set_log_flag)
|
||||
|
||||
static void
|
||||
spdk_rpc_clear_log_flag(struct spdk_jsonrpc_request *request,
|
||||
spdk_rpc_log_clear_flag(struct spdk_jsonrpc_request *request,
|
||||
const struct spdk_json_val *params)
|
||||
{
|
||||
struct rpc_log_flag req = {};
|
||||
@ -306,9 +306,9 @@ spdk_rpc_clear_log_flag(struct spdk_jsonrpc_request *request,
|
||||
invalid:
|
||||
free_rpc_log_flag(&req);
|
||||
}
|
||||
SPDK_RPC_REGISTER("clear_log_flag", spdk_rpc_clear_log_flag,
|
||||
SPDK_RPC_REGISTER("log_clear_flag", spdk_rpc_log_clear_flag,
|
||||
SPDK_RPC_STARTUP | SPDK_RPC_RUNTIME)
|
||||
SPDK_RPC_REGISTER_ALIAS_DEPRECATED(clear_log_flag, clear_trace_flag)
|
||||
SPDK_RPC_REGISTER_ALIAS_DEPRECATED(log_clear_flag, clear_log_flag)
|
||||
|
||||
static void
|
||||
spdk_rpc_get_log_flags(struct spdk_jsonrpc_request *request,
|
||||
|
@ -1133,13 +1133,13 @@ Format: 'user:u1 secret:s1 muser:mu1 msecret:ms1,user:u2 secret:s2 muser:mu2 mse
|
||||
'flag', help='log flag we want to set. (for example "nvme").')
|
||||
p.set_defaults(func=log_set_flag)
|
||||
|
||||
def clear_log_flag(args):
|
||||
rpc.log.clear_log_flag(args.client, flag=args.flag)
|
||||
def log_clear_flag(args):
|
||||
rpc.log.log_clear_flag(args.client, flag=args.flag)
|
||||
|
||||
p = subparsers.add_parser('clear_log_flag', help='clear log flag', aliases=['clear_trace_flag'])
|
||||
p = subparsers.add_parser('log_clear_flag', help='clear log flag', aliases=['clear_log_flag'])
|
||||
p.add_argument(
|
||||
'flag', help='log flag we want to clear. (for example "nvme").')
|
||||
p.set_defaults(func=clear_log_flag)
|
||||
p.set_defaults(func=log_clear_flag)
|
||||
|
||||
def get_log_flags(args):
|
||||
print_dict(rpc.log.get_log_flags(args.client))
|
||||
|
@ -12,15 +12,15 @@ def log_set_flag(client, flag):
|
||||
return client.call('log_set_flag', params)
|
||||
|
||||
|
||||
@deprecated_alias('clear_trace_flag')
|
||||
def clear_log_flag(client, flag):
|
||||
@deprecated_alias('clear_log_flag')
|
||||
def log_clear_flag(client, flag):
|
||||
"""Clear log flag.
|
||||
|
||||
Args:
|
||||
flag: log flag we want to clear. (for example "nvme")
|
||||
"""
|
||||
params = {'flag': flag}
|
||||
return client.call('clear_log_flag', params)
|
||||
return client.call('log_clear_flag', params)
|
||||
|
||||
|
||||
@deprecated_alias('get_trace_flags')
|
||||
|
@ -85,7 +85,7 @@ def verify_log_flag_rpc_methods(rpc_py, rpc_param):
|
||||
jsonvalue = json.loads(output)
|
||||
verify(jsonvalue[rpc_param['log_flag']], 1,
|
||||
"get_log_flags returned {}, expected true".format(jsonvalue))
|
||||
rpc.clear_log_flag(rpc_param['log_flag'])
|
||||
rpc.log_clear_flag(rpc_param['log_flag'])
|
||||
output = rpc.get_log_flags()
|
||||
jsonvalue = json.loads(output)
|
||||
verify(not jsonvalue[rpc_param['log_flag']], 1,
|
||||
|
Loading…
x
Reference in New Issue
Block a user