refs #1101 add ogMcastSendPartition()

code-review
Natalia Serrano 2024-11-12 19:05:14 +01:00
parent 6e30bc1bdd
commit 3ca8cb6dfe
1 changed files with 15 additions and 0 deletions

View File

@ -398,6 +398,21 @@ def ogMcastSyntax (op, sess, file=None, device=None, tool=None, level=None):
#@todo: ogIsLocked siempre devuelve 1. crear ticket
#*/ ##
#ogMcastSendPartition (disk, par, SessionMulticastSERVER, tools, compresor)
#ogMcastSendPartition (1, 1, '9000:full-duplex:239.194.37.31:50M:20:2', 'partclone', 'lzop')
def ogMcastSendPartition (disk, par, sess, tool, compressor):
PART = DiskLib.ogDiskToDev (disk, par)
if not PART: return
FileSystemLib.ogUnmount (disk, par)
cmd = ogMcastSyntax ('SENDPARTITION', sess, PART, tool, compressor)
if not cmd: return None
print (f'cmd ({cmd})')
try:
subprocess.run (cmd, shell=True, check=True)
except subprocess.CalledProcessError:
SystemLib.ogRaiseError ([], ogGlobals.OG_ERR_MCASTSENDPARTITION, ' ')
return None
#/**
# ogMcastReceiverPartition