rpc: Rename get_iscsi_global_params to iscsi_get_options
Change-Id: Id0567077dc01c5c259a239c3faa99bdde9e89ae3 Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com> Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/468096 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
7eedb271a7
commit
61f4433c20
@ -254,7 +254,7 @@ Example response:
|
||||
"log_set_level",
|
||||
"log_get_print_level",
|
||||
"log_set_print_level",
|
||||
"get_iscsi_global_params",
|
||||
"iscsi_get_options",
|
||||
"iscsi_target_node_add_lun",
|
||||
"iscsi_get_connections",
|
||||
"iscsi_delete_portal_group",
|
||||
@ -2605,7 +2605,7 @@ Example response:
|
||||
}
|
||||
~~~
|
||||
|
||||
## get_iscsi_global_params method {#rpc_get_iscsi_global_params}
|
||||
## iscsi_get_options method {#rpc_iscsi_get_options}
|
||||
|
||||
Show global parameters of iSCSI targets.
|
||||
|
||||
@ -2621,7 +2621,7 @@ Example request:
|
||||
request:
|
||||
{
|
||||
"jsonrpc": "2.0",
|
||||
"method": "get_iscsi_global_params",
|
||||
"method": "iscsi_get_options",
|
||||
"id": 1
|
||||
}
|
||||
~~~
|
||||
|
@ -1092,14 +1092,14 @@ SPDK_RPC_REGISTER("iscsi_target_node_set_auth", spdk_rpc_iscsi_target_node_set_a
|
||||
SPDK_RPC_REGISTER_ALIAS_DEPRECATED(iscsi_target_node_set_auth, set_iscsi_target_node_auth)
|
||||
|
||||
static void
|
||||
spdk_rpc_get_iscsi_global_params(struct spdk_jsonrpc_request *request,
|
||||
const struct spdk_json_val *params)
|
||||
spdk_rpc_iscsi_get_options(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_global_params requires no parameters");
|
||||
"iscsi_get_options requires no parameters");
|
||||
return;
|
||||
}
|
||||
|
||||
@ -1108,7 +1108,8 @@ spdk_rpc_get_iscsi_global_params(struct spdk_jsonrpc_request *request,
|
||||
|
||||
spdk_jsonrpc_end_result(request, w);
|
||||
}
|
||||
SPDK_RPC_REGISTER("get_iscsi_global_params", spdk_rpc_get_iscsi_global_params, SPDK_RPC_RUNTIME)
|
||||
SPDK_RPC_REGISTER("iscsi_get_options", spdk_rpc_iscsi_get_options, SPDK_RPC_RUNTIME)
|
||||
SPDK_RPC_REGISTER_ALIAS_DEPRECATED(iscsi_get_options, get_iscsi_global_params)
|
||||
|
||||
struct rpc_discovery_auth {
|
||||
bool disable_chap;
|
||||
|
@ -1103,11 +1103,12 @@ Format: 'user:u1 secret:s1 muser:mu1 msecret:ms1,user:u2 secret:s2 muser:mu2 mse
|
||||
help='Display iSCSI connections')
|
||||
p.set_defaults(func=iscsi_get_connections)
|
||||
|
||||
def get_iscsi_global_params(args):
|
||||
print_dict(rpc.iscsi.get_iscsi_global_params(args.client))
|
||||
def iscsi_get_options(args):
|
||||
print_dict(rpc.iscsi.iscsi_get_options(args.client))
|
||||
|
||||
p = subparsers.add_parser('get_iscsi_global_params', help='Display iSCSI global parameters')
|
||||
p.set_defaults(func=get_iscsi_global_params)
|
||||
p = subparsers.add_parser('iscsi_get_options', aliases=['get_iscsi_global_params'],
|
||||
help='Display iSCSI global parameters')
|
||||
p.set_defaults(func=iscsi_get_options)
|
||||
|
||||
def get_scsi_devices(args):
|
||||
print_dict(rpc.iscsi.get_scsi_devices(args.client))
|
||||
|
@ -502,13 +502,14 @@ def iscsi_get_connections(client):
|
||||
return client.call('iscsi_get_connections')
|
||||
|
||||
|
||||
def get_iscsi_global_params(client):
|
||||
@deprecated_alias('get_iscsi_global_params')
|
||||
def iscsi_get_options(client):
|
||||
"""Display iSCSI global parameters.
|
||||
|
||||
Returns:
|
||||
List of iSCSI global parameter.
|
||||
"""
|
||||
return client.call('get_iscsi_global_params')
|
||||
return client.call('iscsi_get_options')
|
||||
|
||||
|
||||
def get_scsi_devices(client):
|
||||
|
@ -25,7 +25,7 @@ class UIISCSIGlobalParams(UINode):
|
||||
|
||||
def refresh(self):
|
||||
self._children = set([])
|
||||
iscsi_global_params = self.get_root().get_iscsi_global_params()
|
||||
iscsi_global_params = self.get_root().iscsi_get_options()
|
||||
if not iscsi_global_params:
|
||||
return
|
||||
for param, val in iscsi_global_params.items():
|
||||
|
@ -478,8 +478,8 @@ class UIRoot(UINode):
|
||||
|
||||
@verbose
|
||||
@is_method_available
|
||||
def get_iscsi_global_params(self, **kwargs):
|
||||
return rpc.iscsi.get_iscsi_global_params(self.client, **kwargs)
|
||||
def iscsi_get_options(self, **kwargs):
|
||||
return rpc.iscsi.iscsi_get_options(self.client, **kwargs)
|
||||
|
||||
def has_subsystem(self, subsystem):
|
||||
for system in rpc.subsystem.get_subsystems(self.client):
|
||||
|
@ -154,7 +154,7 @@ def verify_scsi_devices_rpc_methods(rpc_py):
|
||||
check_output('iscsiadm -m discovery -t st -p {}'.format(rpc_param['target_ip']), shell=True)
|
||||
check_output('iscsiadm -m node --login', shell=True)
|
||||
name = json.loads(rpc.iscsi_get_target_nodes())[0]['name']
|
||||
output = rpc.get_iscsi_global_params()
|
||||
output = rpc.iscsi_get_options()
|
||||
jsonvalues = json.loads(output)
|
||||
nodebase = jsonvalues['node_base']
|
||||
output = rpc.get_scsi_devices()
|
||||
@ -324,7 +324,7 @@ def verify_initiator_groups_rpc_methods(rpc_py, rpc_param):
|
||||
|
||||
def verify_target_nodes_rpc_methods(rpc_py, rpc_param):
|
||||
rpc = spdk_rpc(rpc_py)
|
||||
output = rpc.get_iscsi_global_params()
|
||||
output = rpc.iscsi_get_options()
|
||||
jsonvalues = json.loads(output)
|
||||
nodebase = jsonvalues['node_base']
|
||||
output = rpc.iscsi_get_target_nodes()
|
||||
|
Loading…
Reference in New Issue
Block a user