diff options
author | Benjamin Drung <bdrung@debian.org> | 2023-06-10 08:55:33 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-06-10 09:21:49 +0000 |
commit | 88837172f69eabc408ae3945d82e0270b8e07440 (patch) | |
tree | d6b7fa06694f45d25f54f6ea9ded93c981e51f6f /utils/mk-discovery-conf.py | |
parent | Initial commit. (diff) | |
download | nvme-stas-88837172f69eabc408ae3945d82e0270b8e07440.tar.xz nvme-stas-88837172f69eabc408ae3945d82e0270b8e07440.zip |
Adding upstream version 2.2.1.upstream/2.2.1
Signed-off-by: Benjamin Drung <bdrung@debian.org>
Diffstat (limited to 'utils/mk-discovery-conf.py')
-rwxr-xr-x | utils/mk-discovery-conf.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/utils/mk-discovery-conf.py b/utils/mk-discovery-conf.py new file mode 100755 index 0000000..a13c48e --- /dev/null +++ b/utils/mk-discovery-conf.py @@ -0,0 +1,16 @@ +#!/usr/bin/env python3 + +# USAGE: stafctl ls | ./mk-discovery-conf.py + +import sys + +KEYS = [ + ('transport', None), + ('traddr', None), + ('subsysnqn', 'nqn'), + ('host-iface', None), + ('host-traddr', None), +] + +for ctrl in eval(sys.stdin.read()): + print(f"{' '.join([f'--{kout or kin}={ctrl[kin]}' for kin,kout in KEYS if ctrl[kin] != ''])}") |