Question
· 12 hr ago

Python (embedded) for SYS.Mirror.GetFailoverMemberStatus does not work

Hi,

I'm using embedded Python as follows:

AUMHTESTTC01:%SYS>do ##class(%SYS.Python).Shell()

Python 3.6.15 (default, Sep 23 2021, 15:41:43) [GCC] on linux
Type quit() or Ctrl-D to exit this shell.
>>> import iris
>>> mirror=iris.cls('SYS.Mirror')
>>> pri=[]
>>> alt=[]
>>> status=mirror.GetFailoverMemberStatus(pri,alt)
>>> print(status)
1
>>> print(pri)
[]
>>> print(alt)
[]
>>> exit()

However the equivalent ObjectScript works:

%SYS>set sc=##class(SYS.Mirror).GetFailoverMemberStatus(.pri,.alt)
%SYS>zw pri
pri=$lb("SERVERA.FOO.BAR.ORG/STAGE","SERVERA.foo.bar.org|2188","Primary","Active","172.31.33.69|1972","SERVERA.foo.bar.org|1972")
%SYS>zw alt
alt=$lb("SERVERB.FOO.BAR.ORG/STAGE","SERVERB.foo.bar.org|2188","Backup","Active","172.31.33.70|1972","SERVERB.foo.bar.org|1972")

Can someone please explain how to achieve the ObjectScript code in Python?
Thanks
 

Discussion (1)1
Log in or sign up to continue