def zfs_snapshot_list(self, target):
cmd = '/sbin/zfs get -r -H -o value name -t snapshot {target}'.format(target=target)
logger.debug("Executing {}".format(cmd))
result = local(cmd, capture=True)
if result.return_code != 0:
raise SnapshotException('Failed to list snapshots')
return result.split('\n')
评论列表
文章目录