An der Befehlszeilenkonsole (CLC) können Administratoren bestimmte Funktionen von GAX für Lösungsdefinitionen (SPDs) und Installationspakete (IPs) ausführen. An der CLC können Sie beispielsweise SPDs im Hintergrund auf Remote-Hosts implementieren.
Die CLC können Sie nur verwenden, wenn Sie über Zugriff auf die Befehlszeilenoberfläche des Betriebssystems verfügen. Auf anderen Computern als dem GAX-Hostcomputer muss lokal das CLC-Tool (gaxclc.jar) verfügbar sein.
Die Hilfedatei für die CLC öffnen Sie mit einem der folgenden Befehle:
java –jar gaxclc.jar help
java –jar gaxclc.jar ?
Wichtig
Bei der Ausführung von Befehlen an der CLC wird im Verzeichnis des Tools eine Protokolldatei erzeugt.
Struktur
Die CLC unterstützt Befehle mit der folgenden Struktur:
-u:user ist der Benutzername für die Anmeldung bei Configuration Server.
-p:password ist das Passwort für die Anmeldung bei Configuration Server. Wenn für dieses Flag kein Wert angegeben ist, geht die CLC davon aus, dass kein Passwort festgelegt wurde.
-s gibt an die CLC die Anweisung aus, eine sichere HTTPS-Verbindung mit dem GAX-Server zu verwenden. Wenn dieses Flag nicht festgelegt ist, wird HTTP verwendet.
-h:<host>:<port> bezeichnet Host und Port des GAX-Servers. Wenn dieses Flag nicht festgelegt ist, wird folgender Wert verwendet. -h:localhost:8080.
<function> kann auf ip oder auf spd festgelegt sein.
<operation> gibt den auszuführenden Wert an. Die gültigen Werte für dieses Flag sind von der im vorherigen Schritt angegebenen Funktion abhängig (ip oder spd).
<args> gibt die Argumente für den Vorgang an. Die gültigen Werte für dieses Flag sind von den in den vorherigen Schritten angegebenen Parametern <function> und <operation> abhängig.
Nachstehend finden Sie ein Beispiel für einen Befehlszeilenkonsolen-Befehl:
Die CLC unterstützt die folgenden Vorgänge für SPDs:
add
query
querybyid
execute
delete
encrypt (siehe Registerkarte Ausführen)
add
Übersicht
Mit diesem Vorgang wird der GAX-Datenbank eine SPD hinzugefügt. Wenn anhand von Name und Version in der SPD-XML festgestellt wird, dass die SPD bereits vorhanden ist, wird die vorhandene SPD ersetzt.
Bei erfolgreichem Abschluss wird die ID der hinzugefügten SPD zurückgegeben.
Die verschlüsselte Eingabedatei wird in dem durch "encrypted output file path" angegebenen Verzeichnis gespeichert. Wenn die Datei in diesem Verzeichnis bereits vorhanden ist, wird sie überschrieben.
Beispiel:
java -jar gaxclc.jar -u:default -p:password spd -encrypted "c:\GAX\input.txt" "c:\GAX\encrypted.txt"
java -jar gaxclc.jar -u:default -p:password spd -encrypted "input.txt" "encrypted.txt"
"input file": Die Eingabedatei mit SPD-Parametern. Bei Angabe von -encrypted ist die Eingabedatei verschlüsselt.
Die Eingabedatei muss im JSONObject-Format vorliegen und SPD-Parameter für ein bestimmtes Profil enthalten. Die Datei muss im UTF8-Format vorliegen.
CLC intersects (AND) filters defined in the SPD file and input file for a selectOne input. The filter criteria should be different in an SPD input file and filter names should differ in the same filter definition.
The operation returns two applications named SIP_lrm26 and SIP_lrm27.
The input structure for a selectOne/selectMultiple/boolean type with <selection> tag is described below:
{
"Dialog name" : {
"Input name" : {
"selection" : {
"option" : [{
"value" : "option value assigned to the input parameter",
"name" : "option name is displayed in UI"
}
]
}
}
}
}
CLC selects options defined in the SPD input file. Multiple options can be specified only for the selectMultiple input type.
Example
SPD Profile
<profile name="Install">
<dialog step="Application Parameters">
<input name="DATA_MODEL" title="Binary Version (32-bit or 64-bit)" default="64" type="selectOne" required="true">
<description>This parameter defines the 32-bit or the 64-bit version of the binary to be deployed. </description>
<selection>
<option name="32" value="32"/>
<option name="64" value="64"/>
</selection>
</input>
</dialog>
<execution>
<script>
log('test selection support' );
</script>
</execution>
If the input file does not specify a value for a SPD parameter, the value defined in the default attribute of the input element will be used.
If an SPD input element has the required attribute set to true, but there is no corresponding input value that is supplied in either the SPD (as a default) or in the input file, then the SPD execution fails.
If an SPD input element has the readonly attribute value set to true, then the value in the default attribute value is used for the execution, if defined.
If the readonly attribute value is set to true, required is set to false, and the default attribute is not defined, then the following logic is used for input value determination:
For the boolean input type, the input value is set to false.
For the string and password input types, the input value is set to "".
For the integer input type, the input is not propagated.
If a dialog cond attribute value evaluates to false, the dialog is skipped by the CLC tool.
Example: