|
|
|
@ -144,20 +144,20 @@ def parse_lv(data):
|
|
|
|
|
name = None
|
|
|
|
|
|
|
|
|
|
for line in data.splitlines():
|
|
|
|
|
match = re.search("LOGICAL VOLUME:\s+(\w+)\s+VOLUME GROUP:\s+(\w+)", line)
|
|
|
|
|
match = re.search(r"LOGICAL VOLUME:\s+(\w+)\s+VOLUME GROUP:\s+(\w+)", line)
|
|
|
|
|
if match is not None:
|
|
|
|
|
name = match.group(1)
|
|
|
|
|
vg = match.group(2)
|
|
|
|
|
continue
|
|
|
|
|
match = re.search("LPs:\s+(\d+).*PPs", line)
|
|
|
|
|
match = re.search(r"LPs:\s+(\d+).*PPs", line)
|
|
|
|
|
if match is not None:
|
|
|
|
|
lps = int(match.group(1))
|
|
|
|
|
continue
|
|
|
|
|
match = re.search("PP SIZE:\s+(\d+)", line)
|
|
|
|
|
match = re.search(r"PP SIZE:\s+(\d+)", line)
|
|
|
|
|
if match is not None:
|
|
|
|
|
pp_size = int(match.group(1))
|
|
|
|
|
continue
|
|
|
|
|
match = re.search("INTER-POLICY:\s+(\w+)", line)
|
|
|
|
|
match = re.search(r"INTER-POLICY:\s+(\w+)", line)
|
|
|
|
|
if match is not None:
|
|
|
|
|
policy = match.group(1)
|
|
|
|
|
continue
|
|
|
|
@ -174,22 +174,22 @@ def parse_vg(data):
|
|
|
|
|
|
|
|
|
|
for line in data.splitlines():
|
|
|
|
|
|
|
|
|
|
match = re.search("VOLUME GROUP:\s+(\w+)", line)
|
|
|
|
|
match = re.search(r"VOLUME GROUP:\s+(\w+)", line)
|
|
|
|
|
if match is not None:
|
|
|
|
|
name = match.group(1)
|
|
|
|
|
continue
|
|
|
|
|
|
|
|
|
|
match = re.search("TOTAL PP.*\((\d+)", line)
|
|
|
|
|
match = re.search(r"TOTAL PP.*\((\d+)", line)
|
|
|
|
|
if match is not None:
|
|
|
|
|
size = int(match.group(1))
|
|
|
|
|
continue
|
|
|
|
|
|
|
|
|
|
match = re.search("PP SIZE:\s+(\d+)", line)
|
|
|
|
|
match = re.search(r"PP SIZE:\s+(\d+)", line)
|
|
|
|
|
if match is not None:
|
|
|
|
|
pp_size = int(match.group(1))
|
|
|
|
|
continue
|
|
|
|
|
|
|
|
|
|
match = re.search("FREE PP.*\((\d+)", line)
|
|
|
|
|
match = re.search(r"FREE PP.*\((\d+)", line)
|
|
|
|
|
if match is not None:
|
|
|
|
|
free = int(match.group(1))
|
|
|
|
|
continue
|
|
|
|
|