Skip to content
Snippets Groups Projects
Commit b7e97625 authored by Federico Fornari's avatar Federico Fornari
Browse files

Update device regex in ceph-standalone-deploy.py

parent d5fe10fa
No related branches found
No related tags found
No related merge requests found
......@@ -50,13 +50,13 @@ if pattern.match(args.wal) and pattern.match(args.db) and pattern.match(args.dat
sed_string=""
for i in range(0,len(lines),3):
res_dev = re.search(r"/sys/block/\wd[a-z]",lines[i])
res_dev = re.search(r"/sys/block/\wd[a-z]+",lines[i])
res_bayid = re.search(r"BayID: \d+", lines[i])
res_sn = re.search(r"Serial number: \w+",lines[i])
res_vnd = re.search(r"Vendor: \w+", lines[i])
res_prd = re.search(r"Product: \w+", lines[i])
dev = str(re.search(r"\wd[a-z]",res_dev.group()).group())
dev = str(re.search(r"\wd[a-z]+",res_dev.group()).group())
bayid = int(re.search(r"\d+",res_bayid.group()).group())
sn = str(re.search(r" \w+",res_sn.group()).group()).strip()
vnd = str(re.search(r" \w+",res_vnd.group()).group()).strip()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment