Commit 7315fa5a authored by Shuhei Matsumoto's avatar Shuhei Matsumoto Committed by Daniel Verkamp
Browse files

iscsi/rpc: Change the format of get_iscsi_globals about CHAP params



For the CHAP setting of iSCSI targets, JSON-RPC handles the
value of parameters directly and dump of iSCSI targets can be
used to construct directly.

For the CHAP setting of iSCSI discovery session, the same manner
will be applied.

Change-Id: I8731af4273cc89ee5c4ea2f97955e56e3bff202d
Signed-off-by: default avatarShuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/401076


Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
Tested-by: default avatarSPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: default avatarDaniel Verkamp <daniel.verkamp@intel.com>
parent 9004ca4a
Loading
Loading
Loading
Loading
+8 −10
Original line number Diff line number Diff line
@@ -1230,16 +1230,14 @@ spdk_rpc_get_iscsi_global_params(struct spdk_jsonrpc_request *request,
	spdk_json_write_name(w, "nop_in_interval");
	spdk_json_write_int32(w, g_spdk_iscsi.nopininterval);

	spdk_json_write_name(w, "discovery_auth_method");
	if (g_spdk_iscsi.no_discovery_auth) {
		spdk_json_write_string(w, "none");
	} else if (!g_spdk_iscsi.req_discovery_auth) {
		spdk_json_write_string(w, "auto");
	} else if (g_spdk_iscsi.req_discovery_auth_mutual) {
		spdk_json_write_string(w, "chap mutual");
	} else {
		spdk_json_write_string(w, "chap");
	}
	spdk_json_write_name(w, "no_discovery_auth");
	spdk_json_write_bool(w, g_spdk_iscsi.no_discovery_auth);

	spdk_json_write_name(w, "req_discovery_auth");
	spdk_json_write_bool(w, g_spdk_iscsi.req_discovery_auth);

	spdk_json_write_name(w, "req_discovery_auth_mutual");
	spdk_json_write_bool(w, g_spdk_iscsi.req_discovery_auth_mutual);

	spdk_json_write_name(w, "discovery_auth_group");
	spdk_json_write_int32(w, g_spdk_iscsi.discovery_auth_group);