rpc: Fix example of initiator_list of the iscsi_create_initiator_group RPC

We provided list of IP addresses as the example of the list of the
initiator names of the iscsi_create_initiator_group and
iscsi_initiator_group_add_initiators RPCs.

However, they were very confusing and gave little hint about how
to use initiator name.

Fix them by providing IQNs instead.

Fixes issue #2209

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I8ce19c4ed0af54fd8a6f1ab2a74b2e6f865d3d1c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10236
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
This commit is contained in:
Shuhei Matsumoto 2021-11-16 00:07:10 +09:00 committed by Tomasz Zawadzki
parent 2f9c97a4f6
commit cf8a9bf286
2 changed files with 9 additions and 5 deletions

View File

@ -1375,7 +1375,7 @@ Format: 'user:u1 secret:s1 muser:mu1 msecret:ms1,user:u2 secret:s2 muser:mu2 mse
p.add_argument(
'tag', help='Initiator group tag (unique, integer > 0)', type=int)
p.add_argument('initiator_list', help="""Whitespace-separated list of initiator hostnames or IP addresses,
enclosed in quotes. Example: 'ANY' or '127.0.0.1 192.168.200.100'""")
enclosed in quotes. Example: 'ANY' or 'iqn.2016-06.io.spdk:host1 iqn.2016-06.io.spdk:host2'""")
p.add_argument('netmask_list', help="""Whitespace-separated list of initiator netmasks enclosed in quotes.
Example: '255.255.0.0 255.248.0.0' etc""")
p.set_defaults(func=iscsi_create_initiator_group)
@ -1403,7 +1403,8 @@ Format: 'user:u1 secret:s1 muser:mu1 msecret:ms1,user:u2 secret:s2 muser:mu2 mse
p.add_argument(
'tag', help='Initiator group tag (unique, integer > 0)', type=int)
p.add_argument('-n', dest='initiator_list', help="""Whitespace-separated list of initiator hostnames or IP addresses,
enclosed in quotes. This parameter can be omitted. Example: 'ANY' or '127.0.0.1 192.168.200.100'""", required=False)
enclosed in quotes. This parameter can be omitted. Example: 'ANY' or
'iqn.2016-06.io.spdk:host1 iqn.2016-06.io.spdk:host2'""", required=False)
p.add_argument('-m', dest='netmask_list', help="""Whitespace-separated list of initiator netmasks enclosed in quotes.
This parameter can be omitted. Example: '255.255.0.0 255.248.0.0' etc""", required=False)
p.set_defaults(func=iscsi_initiator_group_add_initiators)
@ -1431,7 +1432,8 @@ Format: 'user:u1 secret:s1 muser:mu1 msecret:ms1,user:u2 secret:s2 muser:mu2 mse
p.add_argument(
'tag', help='Initiator group tag (unique, integer > 0)', type=int)
p.add_argument('-n', dest='initiator_list', help="""Whitespace-separated list of initiator hostnames or IP addresses,
enclosed in quotes. This parameter can be omitted. Example: 'ANY' or '127.0.0.1 192.168.200.100'""", required=False)
enclosed in quotes. This parameter can be omitted. Example: 'ANY' or
'iqn.2016-06.io.spdk:host1 iqn.2016-06.io.spdk:host2'""", required=False)
p.add_argument('-m', dest='netmask_list', help="""Whitespace-separated list of initiator netmasks enclosed in quotes.
This parameter can be omitted. Example: '255.255.0.0 255.248.0.0' etc""", required=False)
p.set_defaults(func=iscsi_initiator_group_remove_initiators)

View File

@ -476,7 +476,8 @@ def iscsi_create_initiator_group(client, tag, initiators, netmasks):
Args:
tag: Initiator group tag (unique, integer > 0)
initiators: List of initiator hostnames or IP addresses, e.g. ["127.0.0.1","192.168.200.100"]
initiators: List of initiator hostnames or IP addresses, e.g.
["ANY"] or ["iqn.2016-06.io.spdk:host1","iqn.2016-06.io.spdk:host2"]
netmasks: List of initiator netmasks, e.g. ["255.255.0.0","255.248.0.0"]
Returns:
@ -496,7 +497,8 @@ def iscsi_initiator_group_add_initiators(
Args:
tag: Initiator group tag (unique, integer > 0)
initiators: List of initiator hostnames or IP addresses, e.g. ["127.0.0.1","192.168.200.100"]
initiators: List of initiator hostnames or IP addresses, e.g.
["ANY"] or ["iqn.2016-06.io.spdk:host1","iqn.2016-06.io.spdk:host2"]
netmasks: List of initiator netmasks, e.g. ["255.255.0.0","255.248.0.0"]
Returns: