diff --git a/client/lib/engine/bin/ProtocolLib.py b/client/lib/engine/bin/ProtocolLib.py index 5bc96b0..1d09bab 100644 --- a/client/lib/engine/bin/ProtocolLib.py +++ b/client/lib/engine/bin/ProtocolLib.py @@ -10,6 +10,7 @@ import ImageLib import FileSystemLib import StringLib import NetLib +import DiskLib #/** #@file ProtocolLib.py @@ -405,13 +406,13 @@ def ogMcastSendPartition (disk, par, sess, tool, compressor): if not PART: return FileSystemLib.ogUnmount (disk, par) - cmd = ogMcastSyntax ('SENDPARTITION', sess, PART, tool, compressor) + cmd = ogMcastSyntax ('SENDPARTITION', sess, device=PART, tool=tool, level=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, ' ') + SystemLib.ogRaiseError ([], ogGlobals.OG_ERR_MCASTSENDPARTITION, ' ') return None #/** @@ -425,6 +426,20 @@ def ogMcastSendPartition (disk, par, sess, tool, compressor): #@return #@exception $OG_ERR_FORMAT #*/ ## +def ogMcastReceiverPartition (disk, par, sess, tool, compressor): + PART = DiskLib.ogDiskToDev (disk, par) + if not PART: return + + FileSystemLib.ogUnmount (disk, par) + cmd = ogMcastSyntax ('RECEIVERPARTITION', sess, device=PART, tool=tool, level=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_MCASTRECEIVERPARTITION, ' ') ## original code has OG_ERR_MCASTSENDPARTITION + return None + #/**