Commit 76705725 by Antti Rasinen

Fix zfs property parsing

Current property parser breaks when values contain spaces. Since
zfs get -H returns tab separated lines,  it is better to explicitly
split on tabs than on whitespace.
parent fa963547
......@@ -316,9 +316,9 @@ class Zfs(object):
cmd.append('get -H all')
cmd.append(self.name)
rc, out, err = self.module.run_command(' '.join(cmd))
properties=dict()
properties = dict()
for l in out.splitlines():
p, v = l.split()[1:3]
p, v = l.split('\t')[1:3]
properties[p] = v
return properties
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment