working on send pipe
This commit is contained in:
@ -557,20 +557,19 @@ class ZfsDataset:
|
||||
cmd.append(self.name)
|
||||
|
||||
# #add custom output pipes?
|
||||
# if output_pipes:
|
||||
# #local so do our own piping
|
||||
# if self.zfs_node.is_local():
|
||||
# output_pipe = self.zfs_node.run(cmd)
|
||||
# for pipe_cmd in output_pipes:
|
||||
# output_pipe=self.zfs_node.run(pipe_cmd, inp=output_pipe, )
|
||||
# return output_pipe
|
||||
# #remote, so add with actual | and let remote shell handle it
|
||||
# else:
|
||||
# for pipe_cmd in output_pipes:
|
||||
# cmd.append("|")
|
||||
# cmd.extend(pipe_cmd)
|
||||
#local so do our own piping
|
||||
if self.zfs_node.is_local():
|
||||
output_pipe = self.zfs_node.run(cmd, pipe=True, readonly=True)
|
||||
for pipe_cmd in output_pipes:
|
||||
output_pipe=self.zfs_node.run(pipe_cmd.split(" "), inp=output_pipe, pipe=True, readonly=False)
|
||||
#remote, so add with actual | and let remote shell handle it
|
||||
else:
|
||||
for pipe_cmd in output_pipes:
|
||||
cmd.append("|")
|
||||
cmd.extend(pipe_cmd.split(" "))
|
||||
output_pipe = self.zfs_node.run(cmd, pipe=True, readonly=True)
|
||||
|
||||
return self.zfs_node.run(cmd, pipe=True, readonly=True)
|
||||
return output_pipe
|
||||
|
||||
def recv_pipe(self, pipe, features, filter_properties=None, set_properties=None, ignore_exit_code=False):
|
||||
"""starts a zfs recv for this snapshot and uses pipe as input
|
||||
|
||||
Reference in New Issue
Block a user