Replaces PR#21887
Rename function check_id to osd_id_exists in util/prepare.py
Fix boolean analysis of osd_id_exists when --osd-id is provided on command line
Signed-off-by: Ron Allred <rallred@itrefined.com>
'-i', '-',
'osd', 'new', fsid
]
- if check_id(osd_id):
+ if osd_id is not None and not osd_id_exists(osd_id):
cmd.append(osd_id)
stdout, stderr, returncode = process.call(
cmd,
return ' '.join(stdout).strip()
-def check_id(osd_id):
+def osd_id_exists(osd_id):
"""
Checks to see if an osd ID exists or not. Returns True
if it does exist, False if it doesn't.