RPC: rename get_log_flags to log_get_flags

Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: Ic960543ca82c02b677e0059367ee1e63c4ca8611
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/468731
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
This commit is contained in:
Maciej Wawryk 2019-09-18 14:39:32 +02:00 committed by Jim Harris
parent a25f9bf94a
commit 416310d543
5 changed files with 18 additions and 18 deletions

View File

@ -247,7 +247,7 @@ Example response:
"nbd_get_disks",
"nbd_stop_disk",
"nbd_start_disk",
"get_log_flags",
"log_get_flags",
"log_clear_flag",
"log_set_flag",
"log_get_level",

View File

@ -311,7 +311,7 @@ SPDK_RPC_REGISTER("log_clear_flag", spdk_rpc_log_clear_flag,
SPDK_RPC_REGISTER_ALIAS_DEPRECATED(log_clear_flag, clear_log_flag)
static void
spdk_rpc_get_log_flags(struct spdk_jsonrpc_request *request,
spdk_rpc_log_get_flags(struct spdk_jsonrpc_request *request,
const struct spdk_json_val *params)
{
struct spdk_json_write_ctx *w;
@ -319,7 +319,7 @@ spdk_rpc_get_log_flags(struct spdk_jsonrpc_request *request,
if (params != NULL) {
spdk_jsonrpc_send_error_response(request, SPDK_JSONRPC_ERROR_INVALID_PARAMS,
"get_log_flags requires no parameters");
"log_get_flags requires no parameters");
return;
}
@ -334,5 +334,5 @@ spdk_rpc_get_log_flags(struct spdk_jsonrpc_request *request,
spdk_json_write_object_end(w);
spdk_jsonrpc_end_result(request, w);
}
SPDK_RPC_REGISTER("get_log_flags", spdk_rpc_get_log_flags, SPDK_RPC_STARTUP | SPDK_RPC_RUNTIME)
SPDK_RPC_REGISTER_ALIAS_DEPRECATED(get_log_flags, get_trace_flags)
SPDK_RPC_REGISTER("log_get_flags", spdk_rpc_log_get_flags, SPDK_RPC_STARTUP | SPDK_RPC_RUNTIME)
SPDK_RPC_REGISTER_ALIAS_DEPRECATED(log_get_flags, get_log_flags)

View File

@ -1159,11 +1159,11 @@ Format: 'user:u1 secret:s1 muser:mu1 msecret:ms1,user:u2 secret:s2 muser:mu2 mse
'flag', help='log flag we want to clear. (for example "nvme").')
p.set_defaults(func=log_clear_flag)
def get_log_flags(args):
print_dict(rpc.log.get_log_flags(args.client))
def log_get_flags(args):
print_dict(rpc.log.log_get_flags(args.client))
p = subparsers.add_parser('get_log_flags', help='get log flags', aliases=['get_trace_flags'])
p.set_defaults(func=get_log_flags)
p = subparsers.add_parser('log_get_flags', help='get log flags', aliases=['get_log_flags'])
p.set_defaults(func=log_get_flags)
def log_set_level(args):
rpc.log.log_set_level(args.client, level=args.level)

View File

@ -23,14 +23,14 @@ def log_clear_flag(client, flag):
return client.call('log_clear_flag', params)
@deprecated_alias('get_trace_flags')
def get_log_flags(client):
@deprecated_alias('get_log_flags')
def log_get_flags(client):
"""Get log flags
Returns:
List of log flags
"""
return client.call('get_log_flags')
return client.call('log_get_flags')
@deprecated_alias('set_log_level')

View File

@ -76,20 +76,20 @@ def verify(expr, retcode, msg):
def verify_log_flag_rpc_methods(rpc_py, rpc_param):
rpc = spdk_rpc(rpc_py)
output = rpc.get_log_flags()
output = rpc.log_get_flags()
jsonvalue = json.loads(output)
verify(not jsonvalue[rpc_param['log_flag']], 1,
"get_log_flags returned {}, expected false".format(jsonvalue))
"log_get_flags returned {}, expected false".format(jsonvalue))
rpc.log_set_flag(rpc_param['log_flag'])
output = rpc.get_log_flags()
output = rpc.log_get_flags()
jsonvalue = json.loads(output)
verify(jsonvalue[rpc_param['log_flag']], 1,
"get_log_flags returned {}, expected true".format(jsonvalue))
"log_get_flags returned {}, expected true".format(jsonvalue))
rpc.log_clear_flag(rpc_param['log_flag'])
output = rpc.get_log_flags()
output = rpc.log_get_flags()
jsonvalue = json.loads(output)
verify(not jsonvalue[rpc_param['log_flag']], 1,
"get_log_flags returned {}, expected false".format(jsonvalue))
"log_get_flags returned {}, expected false".format(jsonvalue))
print("verify_log_flag_rpc_methods passed")