rpc: Rename set_iscsi_discovery_auth to iscsi_set_discovery_auth
Change-Id: I00fe7f8229a470ad127ca084a27a2d8492c3c641 Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com> Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/468352 Tested-by: SPDK CI Jenkins <sys_sgci@intel.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
7545e8c829
commit
a05efe0a43
@ -2653,7 +2653,7 @@ Example response:
|
||||
}
|
||||
}
|
||||
~~~
|
||||
## set_iscsi_discovery_auth method {#rpc_set_iscsi_discovery_auth}
|
||||
## iscsi_set_discovery_auth method {#rpc_iscsi_set_discovery_auth}
|
||||
|
||||
Set CHAP authentication for sessions dynamically.
|
||||
|
||||
@ -2681,7 +2681,7 @@ request:
|
||||
"mutual_chap": true
|
||||
},
|
||||
"jsonrpc": "2.0",
|
||||
"method": "set_iscsi_discovery_auth",
|
||||
"method": "iscsi_set_discovery_auth",
|
||||
"id": 1
|
||||
}
|
||||
~~~
|
||||
|
@ -1121,7 +1121,7 @@ static const struct spdk_json_object_decoder rpc_discovery_auth_decoders[] = {
|
||||
};
|
||||
|
||||
static void
|
||||
spdk_rpc_set_iscsi_discovery_auth(struct spdk_jsonrpc_request *request,
|
||||
spdk_rpc_iscsi_set_discovery_auth(struct spdk_jsonrpc_request *request,
|
||||
const struct spdk_json_val *params)
|
||||
{
|
||||
struct rpc_discovery_auth req = {};
|
||||
@ -1148,8 +1148,8 @@ spdk_rpc_set_iscsi_discovery_auth(struct spdk_jsonrpc_request *request,
|
||||
spdk_json_write_bool(w, true);
|
||||
spdk_jsonrpc_end_result(request, w);
|
||||
}
|
||||
SPDK_RPC_REGISTER("set_iscsi_discovery_auth", spdk_rpc_set_iscsi_discovery_auth, SPDK_RPC_RUNTIME)
|
||||
|
||||
SPDK_RPC_REGISTER("iscsi_set_discovery_auth", spdk_rpc_iscsi_set_discovery_auth, SPDK_RPC_RUNTIME)
|
||||
SPDK_RPC_REGISTER_ALIAS_DEPRECATED(iscsi_set_discovery_auth, set_iscsi_discovery_auth)
|
||||
|
||||
#define MAX_AUTH_SECRETS 64
|
||||
|
||||
|
@ -730,15 +730,16 @@ if __name__ == "__main__":
|
||||
p.add_argument('-p', '--allow-duplicated-isid', help='Allow duplicated initiator session ID.', action='store_true')
|
||||
p.set_defaults(func=iscsi_set_options)
|
||||
|
||||
def set_iscsi_discovery_auth(args):
|
||||
rpc.iscsi.set_iscsi_discovery_auth(
|
||||
def iscsi_set_discovery_auth(args):
|
||||
rpc.iscsi.iscsi_set_discovery_auth(
|
||||
args.client,
|
||||
disable_chap=args.disable_chap,
|
||||
require_chap=args.require_chap,
|
||||
mutual_chap=args.mutual_chap,
|
||||
chap_group=args.chap_group)
|
||||
|
||||
p = subparsers.add_parser('set_iscsi_discovery_auth', help="""Set CHAP authentication for discovery session.""")
|
||||
p = subparsers.add_parser('iscsi_set_discovery_auth', aliases=['set_iscsi_discovery_auth'],
|
||||
help="""Set CHAP authentication for discovery session.""")
|
||||
p.add_argument('-d', '--disable-chap', help="""CHAP for discovery session should be disabled.
|
||||
*** Mutually exclusive with --require-chap""", action='store_true')
|
||||
p.add_argument('-r', '--require-chap', help="""CHAP for discovery session should be required.
|
||||
@ -746,7 +747,7 @@ if __name__ == "__main__":
|
||||
p.add_argument('-m', '--mutual-chap', help='CHAP for discovery session should be mutual', action='store_true')
|
||||
p.add_argument('-g', '--chap-group', help="""Authentication group ID for discovery session.
|
||||
*** Authentication group must be precreated ***""", type=int)
|
||||
p.set_defaults(func=set_iscsi_discovery_auth)
|
||||
p.set_defaults(func=iscsi_set_discovery_auth)
|
||||
|
||||
def add_iscsi_auth_group(args):
|
||||
secrets = None
|
||||
|
@ -85,7 +85,8 @@ def iscsi_set_options(
|
||||
return client.call('iscsi_set_options', params)
|
||||
|
||||
|
||||
def set_iscsi_discovery_auth(
|
||||
@deprecated_alias('set_iscsi_discovery_auth')
|
||||
def iscsi_set_discovery_auth(
|
||||
client,
|
||||
disable_chap=None,
|
||||
require_chap=None,
|
||||
@ -113,7 +114,7 @@ def set_iscsi_discovery_auth(
|
||||
if chap_group:
|
||||
params['chap_group'] = chap_group
|
||||
|
||||
return client.call('set_iscsi_discovery_auth', params)
|
||||
return client.call('iscsi_set_discovery_auth', params)
|
||||
|
||||
|
||||
def get_iscsi_auth_groups(client):
|
||||
|
@ -44,7 +44,7 @@ class UIISCSIGlobalParams(UINode):
|
||||
disable_chap = self.ui_eval_param(d, "bool", None)
|
||||
require_chap = self.ui_eval_param(r, "bool", None)
|
||||
mutual_chap = self.ui_eval_param(m, "bool", None)
|
||||
self.get_root().set_iscsi_discovery_auth(
|
||||
self.get_root().iscsi_set_discovery_auth(
|
||||
chap_group=chap_group, disable_chap=disable_chap,
|
||||
require_chap=require_chap, mutual_chap=mutual_chap)
|
||||
|
||||
|
@ -473,8 +473,8 @@ class UIRoot(UINode):
|
||||
rpc.iscsi.iscsi_target_node_add_lun(self.client, **kwargs)
|
||||
|
||||
@verbose
|
||||
def set_iscsi_discovery_auth(self, **kwargs):
|
||||
rpc.iscsi.set_iscsi_discovery_auth(self.client, **kwargs)
|
||||
def iscsi_set_discovery_auth(self, **kwargs):
|
||||
rpc.iscsi.iscsi_set_discovery_auth(self.client, **kwargs)
|
||||
|
||||
@verbose
|
||||
@is_method_available
|
||||
|
@ -44,7 +44,7 @@ echo "iscsi_tgt is listening. Running tests..."
|
||||
timing_exit start_iscsi_tgt
|
||||
|
||||
$rpc_py add_iscsi_auth_group 1 -c 'user:root secret:tester'
|
||||
$rpc_py set_iscsi_discovery_auth -g 1
|
||||
$rpc_py iscsi_set_discovery_auth -g 1
|
||||
$rpc_py iscsi_create_portal_group $PORTAL_TAG $TARGET_IP:$ISCSI_PORT
|
||||
$rpc_py add_initiator_group $INITIATOR_TAG $INITIATOR_NAME $NETMASK
|
||||
$rpc_py bdev_malloc_create -b MyBdev $MALLOC_BDEV_SIZE $MALLOC_BLOCK_SIZE
|
||||
|
Loading…
Reference in New Issue
Block a user