refs #1101 add ogUcastSendPartition()
parent
646090da3c
commit
1e5a2b79f7
|
@ -74,7 +74,7 @@ def ogUcastSyntax (op, sess, file=None, device=None, tool=None, level=None):
|
||||||
SystemLib.ogRaiseError ([], ogGlobals.OG_ERR_FORMAT, f'McastSession portbase {portbase}') ## || PERROR=3
|
SystemLib.ogRaiseError ([], ogGlobals.OG_ERR_FORMAT, f'McastSession portbase {portbase}') ## || PERROR=3
|
||||||
return
|
return
|
||||||
|
|
||||||
if 'SERVER' == mode:
|
if 'server' == mode:
|
||||||
address = ''
|
address = ''
|
||||||
for i in range (1, len (session)):
|
for i in range (1, len (session)):
|
||||||
address += f' -O {session[i]}:{portbase}'
|
address += f' -O {session[i]}:{portbase}'
|
||||||
|
@ -121,6 +121,22 @@ def ogUcastSyntax (op, sess, file=None, device=None, tool=None, level=None):
|
||||||
#@todo: ogIsLocked siempre devuelve 1
|
#@todo: ogIsLocked siempre devuelve 1
|
||||||
#*/ ##
|
#*/ ##
|
||||||
|
|
||||||
|
def ogUcastSendPartition (disk, par, sess, tool, level):
|
||||||
|
PART = DiskLib.ogDiskToDev (disk, par)
|
||||||
|
if not PART: return None
|
||||||
|
|
||||||
|
FileSystemLib.ogUnmount (disk, par)
|
||||||
|
|
||||||
|
cmd = ogUcastSyntax ('SENDPARTITION', sess, device=PART, tool=tool, level=level)
|
||||||
|
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_UCASTSENDPARTITION, ' ')
|
||||||
|
return None
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#/**
|
#/**
|
||||||
# ogUcastReceiverPartition
|
# ogUcastReceiverPartition
|
||||||
|
|
Loading…
Reference in New Issue