Я мог бы решить эту проблему, используя следующий код:
import pexpect
try :
command = "cmsso-util domain-repoint -m execute --src-emb-admin " + 'sourceVcAdmin' + " --replication-partner-fqdn " + 'destVc' + " --replication-partner-admin " + 'destVcAdmin' + " --dest-domain-name " + 'destDomain'
print("Running command : " + command)
child = pexpect.spawn(command, timeout=3000,maxread=12000)
child.expect (['Enter Source embedded vCenter Server Admin Password :'],timeout=40000)
child.sendline(<password>)
child.expect (['Enter Replication partner Platform Services Controller Admin Password :'],timeout=40000)
child.sendline(<password>)
child.expect (['All Repoint configuration settings are correct; proceed?(.*)'],timeout=40000)
child.sendline('Y')
child.expect(pexpect.EOF)
print(child.before)
assert(child.status == 0 , "Operation Failed!", "Successfully Completed Embedded Cross Domain Re-pointing")
except:
print("Exception was thrown")
print("debug information:")
print(str(child))
child.close()
exit(1)
Это делается путем увеличения значения по умолчанию child = pexpect.spawn (command, timeout = 600, maxread = 8000) и maxread параметры