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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/401076
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
This commit is contained in:
Shuhei Matsumoto 2018-03-12 18:37:45 +09:00 committed by Daniel Verkamp
parent 9004ca4a63
commit 7315fa5ab6

View File

@ -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);