Beispiel #1
0
 /**
  * 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));
   }
 }
Beispiel #2
0
 /**
  * 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));
 }
Beispiel #3
0
 /**
  * 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));
 }
Beispiel #4
0
 /**
  * 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();
 }