refs #1101 add ogMcastReceiverPartition()
parent
3ca8cb6dfe
commit
f232fb8bdf
|
@ -10,6 +10,7 @@ import ImageLib
|
||||||
import FileSystemLib
|
import FileSystemLib
|
||||||
import StringLib
|
import StringLib
|
||||||
import NetLib
|
import NetLib
|
||||||
|
import DiskLib
|
||||||
|
|
||||||
#/**
|
#/**
|
||||||
#@file ProtocolLib.py
|
#@file ProtocolLib.py
|
||||||
|
@ -405,7 +406,7 @@ def ogMcastSendPartition (disk, par, sess, tool, compressor):
|
||||||
if not PART: return
|
if not PART: return
|
||||||
|
|
||||||
FileSystemLib.ogUnmount (disk, par)
|
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
|
if not cmd: return None
|
||||||
print (f'cmd ({cmd})')
|
print (f'cmd ({cmd})')
|
||||||
try:
|
try:
|
||||||
|
@ -425,6 +426,20 @@ def ogMcastSendPartition (disk, par, sess, tool, compressor):
|
||||||
#@return
|
#@return
|
||||||
#@exception $OG_ERR_FORMAT
|
#@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
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#/**
|
#/**
|
||||||
|
|
Loading…
Reference in New Issue