]> www.infradead.org Git - users/sagi/nvme-cli.git/commitdiff
nvme-cli/fabrics: Added hostnqn parameter to connect command
authorRoy Shterman <roysh@mellanox.com>
Wed, 24 Aug 2016 06:53:06 +0000 (09:53 +0300)
committerKeith Busch <keith.busch@intel.com>
Wed, 24 Aug 2016 22:54:14 +0000 (18:54 -0400)
Added user-defined 'hostnqn' to 'connect' command
so users could use the allowed_hosts attribute on the target and still
connect to target with nvme-cli tool.

usage examples:
nvme connect -t <TRANSPORT> -a <ADDRESS> -s <SERVICE_ID> -n <NQN> -q <USER-DEFINED_HOSTNQN>

Signed-off-by: Roy Shterman <roysh@mellanox.com>
fabrics.c

index 26c4e2214a65b72f24537d3ac7b7554ecf2df33e..942e987b0de96ab6933314c26a057074bc60409a 100644 (file)
--- a/fabrics.c
+++ b/fabrics.c
@@ -711,6 +711,8 @@ int connect(const char *desc, int argc, char **argv)
                        "transport address" },
                {"trsvcid", 's', "LIST", CFG_STRING, &cfg.trsvcid, required_argument,
                        "transport service id (e.g. IP port)" },
+               {"hostnqn", 'q', "LIST", CFG_STRING, &cfg.hostnqn, required_argument,
+                       "user-defined hostnqn" },
                {0},
        };