/** * Sets a globally visible variable for use within sosreport. * * @param name the name of the variable * @param value the value of the variable, must be adaptable by Jython */ public void setGlobal(String name, Object value) { if (value != null) { ClassicPyObjectAdapter adapter = new ClassicPyObjectAdapter(); sosreport.invoke(SET_GLOBAL, new PyString(name), adapter.adapt(value)); } }
/** * Sets a configuration option for sosreport. * * @param name the name of the option * @param value the value of the option */ public void setOption(String name, String value) { sosreport.invoke(SET_OPTION, new PyString(name), new PyString(value)); }
/** * Enables a flag-like option for sosreport. * * @param name the name of the option */ public void enableOption(String name) { sosreport.invoke(SET_OPTION, new PyString(name)); }
/** * Executes sosreport and returns the path to the final archived report * * @return the full path to the report archive */ public String execute() { return sosreport.invoke("execute").asString(); }