Configure IRIS using Python
I am trying to configure IRIS using python. The first task I wanted to do it change the journal directory. I cannot figure out the right way to work with the Config.Journal class with python. I can get the text to query the current setting.
returnValue = dbnative.classMethodValue("Config.Journal","GetList")
print(returnValue )
But I don't see a straightforward way to parse the $List returned by GetList() I was hoping there was an easier way.
How do I
1. Query configuration parameters?
2. Set configuration parameters?
Using python?
I think you need a proxy method in InterSystems IRIS to accept one argument - new path and return the status.
You need to call Modify method of Config.Journal class, but it has one argument which is a local and currently locals are not supported by Native API IIRC.
Calling @Bob Kuszewski
Thanks Eduard,
I think I finally found the answer, use the correct class. Using %SYS.Journal.System instead of Config.Journal updating and reading the setting is very easy.
returnValue = dbnative.classMethodValue("%SYS.Journal.System","SetPrimaryDirectory","/iris/journal/")
print("Set Primary Directory: ", returnValue )
returnValue = dbnative.classMethodValue("%SYS.Journal.System","GetPrimaryDirectory")
print("Get Primary Directory: ", returnValue )
Thanks for your reply.