rpc: Rename get_iscsi_auth_groups to iscsi_get_auth_groups

Change-Id: I4247c1314cdb2d2886fce7a54d121a2c7d2d5902
Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/468360
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:
Pawel Kaminski 2019-09-13 09:55:55 -04:00 committed by Ben Walker
parent bcab0b3b53
commit c1f6def98a
6 changed files with 16 additions and 14 deletions

View File

@ -2784,7 +2784,7 @@ Example response:
}
~~~
## get_iscsi_auth_groups {#rpc_get_iscsi_auth_groups}
## iscsi_get_auth_groups {#rpc_iscsi_get_auth_groups}
Show information about all existing authentication group for CHAP authentication.
@ -2808,7 +2808,7 @@ Example request:
~~~
{
"jsonrpc": "2.0",
"method": "get_iscsi_auth_groups",
"method": "iscsi_get_auth_groups",
"id": 1
}
~~~

View File

@ -1480,14 +1480,14 @@ SPDK_RPC_REGISTER("delete_secret_from_iscsi_auth_group",
spdk_rpc_delete_secret_from_iscsi_auth_group, SPDK_RPC_RUNTIME)
static void
spdk_rpc_get_iscsi_auth_groups(struct spdk_jsonrpc_request *request,
spdk_rpc_iscsi_get_auth_groups(struct spdk_jsonrpc_request *request,
const struct spdk_json_val *params)
{
struct spdk_json_write_ctx *w;
if (params != NULL) {
spdk_jsonrpc_send_error_response(request, SPDK_JSONRPC_ERROR_INVALID_PARAMS,
"get_iscsi_auth_groups requires no parameters");
"iscsi_get_auth_groups requires no parameters");
return;
}
@ -1498,7 +1498,8 @@ spdk_rpc_get_iscsi_auth_groups(struct spdk_jsonrpc_request *request,
spdk_jsonrpc_end_result(request, w);
}
SPDK_RPC_REGISTER("get_iscsi_auth_groups", spdk_rpc_get_iscsi_auth_groups, SPDK_RPC_RUNTIME)
SPDK_RPC_REGISTER("iscsi_get_auth_groups", spdk_rpc_iscsi_get_auth_groups, SPDK_RPC_RUNTIME)
SPDK_RPC_REGISTER_ALIAS_DEPRECATED(iscsi_get_auth_groups, get_iscsi_auth_groups)
static const struct spdk_json_object_decoder rpc_set_iscsi_opts_decoders[] = {
{"auth_file", offsetof(struct spdk_iscsi_opts, authfile), spdk_json_decode_string, true},

View File

@ -798,12 +798,12 @@ Format: 'user:u1 secret:s1 muser:mu1 msecret:ms1,user:u2 secret:s2 muser:mu2 mse
p.add_argument('-u', '--user', help='User name for one-way CHAP authentication', required=True)
p.set_defaults(func=delete_secret_from_iscsi_auth_group)
def get_iscsi_auth_groups(args):
print_dict(rpc.iscsi.get_iscsi_auth_groups(args.client))
def iscsi_get_auth_groups(args):
print_dict(rpc.iscsi.iscsi_get_auth_groups(args.client))
p = subparsers.add_parser('get_iscsi_auth_groups',
p = subparsers.add_parser('iscsi_get_auth_groups', aliases=['get_iscsi_auth_groups'],
help='Display current authentication group configuration')
p.set_defaults(func=get_iscsi_auth_groups)
p.set_defaults(func=iscsi_get_auth_groups)
def iscsi_get_portal_groups(args):
print_dict(rpc.iscsi.iscsi_get_portal_groups(args.client))

View File

@ -117,13 +117,14 @@ def iscsi_set_discovery_auth(
return client.call('iscsi_set_discovery_auth', params)
def get_iscsi_auth_groups(client):
@deprecated_alias('get_iscsi_auth_groups')
def iscsi_get_auth_groups(client):
"""Display current authentication group configuration.
Returns:
List of current authentication group configuration.
"""
return client.call('get_iscsi_auth_groups')
return client.call('iscsi_get_auth_groups')
@deprecated_alias('get_portal_groups')

View File

@ -516,7 +516,7 @@ class UIISCSIAuthGroups(UINode):
def refresh(self):
self._children = set([])
self.iscsi_auth_groups = list(self.get_root().get_iscsi_auth_groups())
self.iscsi_auth_groups = list(self.get_root().iscsi_get_auth_groups())
if self.iscsi_auth_groups is None:
self.iscsi_auth_groups = []
for ag in self.iscsi_auth_groups:

View File

@ -453,8 +453,8 @@ class UIRoot(UINode):
@verbose
@is_method_available
def get_iscsi_auth_groups(self, **kwargs):
return rpc.iscsi.get_iscsi_auth_groups(self.client, **kwargs)
def iscsi_get_auth_groups(self, **kwargs):
return rpc.iscsi.iscsi_get_auth_groups(self.client, **kwargs)
@verbose
def iscsi_create_auth_group(self, **kwargs):