(Auto-creation of topic Documentation:GA:user:CLC:8.5.2 via TOC Documentation:GA:userTOC8.5.2) |
m (1 revision) |
||
Ligne 1 : | Ligne 1 : | ||
− | = CLC= | + | =Using the Command Line Console (CLC)= |
+ | __TOC__ | ||
+ | |||
+ | The Command Line Console (CLC) enables administrators to use the command line to execute certain GAX functions on [[SolutionPackageDefinitions|solution definitions (SPDs)]] and [[InstallationPackages|installation packages (IPs)]]. For example, you might use the CLC to silently deploy SPDs onto remote hosts. | ||
+ | |||
+ | You must be able to access the operating system's command-line interface to use the CLC. If you are not on the GAX host machine, you must have the CLC tool ('''gaxclc.jar''') available on the local machine. | ||
+ | |||
+ | To access CLC's embedded Help file, execute one of the following commands: | ||
+ | |||
+ | <source lang="dos"> | ||
+ | java –jar gaxclc.jar help | ||
+ | </source> | ||
+ | |||
+ | <source lang="dos"> | ||
+ | java –jar gaxclc.jar ? | ||
+ | </source> | ||
+ | |||
+ | {{NoteFormat|As you execute commands with CLC, a log file is generated in the same location as where the tool is executed.}} | ||
+ | |||
+ | ==Structure== | ||
+ | CLC supports commands that use the following structure: | ||
+ | |||
+ | <source lang="dos"> | ||
+ | java –jar gaxclc.jar -u:user -p:password -s -h:<host>:<port> <function> <operation> <args> | ||
+ | </source> | ||
+ | |||
+ | In the above example: | ||
+ | |||
+ | *<tt>-u:user</tt> is the user name to log in to Configuration Server. | ||
+ | *<tt>-p:password</tt> is the password to log in to Configuration Server. CLC assumes there is no password if this flag does not specify a value. | ||
+ | *<tt>-s</tt> instructs CLC to use a secure ''https'' connection to the GAX server. If this flag is not specified, CLC uses ''http''. | ||
+ | *<tt>-h:<host>:<port></tt> specifies the host and port of the GAX server. If this flag is not specified, CLC uses the following value: <tt>-h:localhost:8080</tt>. | ||
+ | *<tt><function></tt> can be either <tt>ip</tt> or <tt>spd</tt>. | ||
+ | *<tt><operation></tt> specifies the operation to be executed. The valid values for this flag are specific to the function you specified in the previous step (<tt>ip</tt> or <tt>spd</tt>). | ||
+ | *<tt><args></tt> specifies the operation arguments. The valid values for this flag are specific to the <tt><function></tt> and <tt><operation></tt> parameters you specified in the previous steps. | ||
+ | |||
+ | The following is an example of a CLC command: | ||
+ | |||
+ | <source lang="dos"> | ||
+ | java -jar gaxclc.jar -u:default -p:password -h:localhost:8080 spd execute 10054 1 "C:/GAX/input.txt" | ||
+ | </source> | ||
+ | |||
+ | ==SPDs== | ||
+ | CLC supports the following operations for SPDs: | ||
+ | |||
+ | *<tt>add</tt> | ||
+ | *<tt>query</tt> | ||
+ | *<tt>querybyid</tt> | ||
+ | *<tt>execute</tt> | ||
+ | *<tt>delete</tt> | ||
+ | *<tt>encrypt</tt> (see <tt>execute</tt> tab) | ||
+ | |||
+ | <div class="cloud-tabberlive-wrapper"> | ||
+ | <tabber> | ||
+ | add= | ||
+ | <div class="cloud-wrapper"> | ||
+ | <h2>add</h2> | ||
+ | <div class="cloud-left"> | ||
+ | |||
+ | ====Overview==== | ||
+ | This operation adds an SPD to the GAX database. If the SPD already exists, as determined by the name and version in the SPD XML, this operation replaces the existing SPD. | ||
+ | |||
+ | If successful, the operation returns the ID of the added SPD. | ||
+ | |||
+ | ====Format==== | ||
+ | <source lang="dos"> | ||
+ | java –jar gaxclc.jar -u:user -p:password -s -h:<host>:<port> spd add "file path" | ||
+ | </source> | ||
+ | |||
+ | *<tt>"file path"</tt>—The path to the XML file. | ||
+ | |||
+ | ====Example==== | ||
+ | <source lang="dos"> | ||
+ | java -jar gaxclc.jar -u:default -p:password spd add "c:\GAX\newSpd.xml" | ||
+ | </source> | ||
+ | </div> | ||
+ | </div> | ||
+ | |-| | ||
+ | query= | ||
+ | <div class="cloud-wrapper"> | ||
+ | <h2>query</h2> | ||
+ | <div class="cloud-left"> | ||
+ | ====Overview==== | ||
+ | This operation queries all SPDs and displays a table that lists the following for each SPD: | ||
+ | |||
+ | *ID number | ||
+ | *Name | ||
+ | *Version | ||
+ | *Tenant DBID | ||
+ | |||
+ | The following is an example: | ||
+ | |||
+ | <source lang="text"> | ||
+ | 10054 gvp 8.1.5 1 | ||
+ | 10060 genesysOne 8.1.5 1 | ||
+ | 10060 eServices 8.1.5 1 | ||
+ | </source> | ||
+ | |||
+ | ====Format==== | ||
+ | <source lang="dos"> | ||
+ | java –jar gaxclc.jar -u:user -p:password -s -h:<host>:<port> spd query | ||
+ | </source> | ||
+ | |||
+ | ====Example==== | ||
+ | <source lang="dos"> | ||
+ | java -jar gaxclc.jar -u:default -p:password -s -h:132.45.43.45:443 spd query | ||
+ | </source> | ||
+ | </div> | ||
+ | </div> | ||
+ | |-| | ||
+ | querybyid= | ||
+ | <div class="cloud-wrapper"> | ||
+ | <h2>querybyid</h2> | ||
+ | <div class="cloud-left"> | ||
+ | ====Overview==== | ||
+ | This operation queries an SPD by its ID. If the SPD does not exist, the operation fails. | ||
+ | |||
+ | If successful, the operation displays a table that lists the following details about the SPD: | ||
+ | |||
+ | *Profile ID | ||
+ | *Name | ||
+ | |||
+ | For example: | ||
+ | <source lang="text"> | ||
+ | 1 Install | ||
+ | </source> | ||
+ | |||
+ | ====Format==== | ||
+ | <source lang="dos"> | ||
+ | java –jar gaxclc.jar -u:user -p:password -s -h:<host>:<port> spd query SPDID | ||
+ | </source> | ||
+ | |||
+ | *<tt>SPDID</tt>—The ID of the SPD that is being queried. | ||
+ | |||
+ | ====Example==== | ||
+ | <source lang="dos"> | ||
+ | java -jar gaxclc.jar -u:default -p:password -h:132.45.43.45:8080 spd query 4374 | ||
+ | </source> | ||
+ | </div> | ||
+ | </div> | ||
+ | |-| | ||
+ | execute= | ||
+ | <div class="cloud-wrapper"> | ||
+ | <h2>execute</h2> | ||
+ | <div class="cloud-left"> | ||
+ | ====Overview==== | ||
+ | This operation executes a SPD. | ||
+ | |||
+ | ====Format==== | ||
+ | <source lang="dos" enclose="div"> | ||
+ | java –jar gaxclc.jar -u:user -p:password -s -h:<host>:<port> spd execute SPDID profileName|-profileID:profileID|-profileName:profileName -encrypted "input file" | ||
+ | </source> | ||
+ | <br> | ||
+ | *<tt>SPDID</tt>—The ID of the SPD to be executed. | ||
+ | *<tt>profileName|-profileID:profileID|-profileName:profileName</tt>—The SPD profile to be executed. | ||
+ | {{NoteFormat|If no flag is specified, then <tt>profileName</tt> is assumed as the SPD profile to be executed.}} | ||
+ | *<tt>-encrypted</tt>—If specified, indicates if the input file is encrypted. | ||
+ | <toggledisplay linkstyle font-size:larger showtext="[+] Show Usage" hidetext="[-] Hide Usage"> | ||
+ | |||
+ | CLC provides encryption support for input files that include sensitive data such as passwords. | ||
+ | |||
+ | Format: | ||
+ | <source lang="dos"> | ||
+ | java –jar gaxclc.jar -u:user -p:password -s -h:<host>:<port> spd encrypt "input file path" "encrypted output file path" | ||
+ | </source> | ||
+ | |||
+ | The encrypted input file is stored in the location specified by <tt>"encrypted output file path"</tt>. If the file already exists at this location, it is overwritten. | ||
+ | |||
+ | Example: | ||
+ | <source lang="dos"> | ||
+ | java -jar gaxclc.jar -u:default -p:password spd -encrypted "c:\GAX\input.txt" "c:\GAX\encrypted.txt" | ||
+ | </source> | ||
+ | |||
+ | <source lang="dos"> | ||
+ | java -jar gaxclc.jar -u:default -p:password spd -encrypted "input.txt" "encrypted.txt" | ||
+ | </source> | ||
+ | </toggledisplay> | ||
+ | *<tt>"input file"</tt>—Specifies the input file that contains SPD parameters. If <tt>-encrypted</tt> is set, the input file is encrypted. | ||
+ | The input file must be in JSONObject format and include SPD parameters for a specific profile. The file must be encoded in UTF-8 format. | ||
+ | <toggledisplay linkstyle font-size:larger showtext="[+] Show usage" hidetext="[-] Hide usage"> | ||
+ | {{Documentation:GA:Library:CLC:8.5.0}} | ||
+ | </toggledisplay> | ||
+ | |||
+ | ====Example==== | ||
+ | <source lang="dos" enclose="div"> | ||
+ | java -jar gaxclc.jar -u:default -p:password -s -h:localhost:8080 spd execute 10054 -profileID:1 "C:/GAX/input.txt" | ||
+ | </source> | ||
+ | <br> | ||
+ | <source lang="dos" enclose="div"> | ||
+ | java -jar gaxclc.jar -u:default -p:password -h:localhost:8080 spd execute 10054 -profileName:"Install profile" "C:/GAX/input.txt" | ||
+ | </source> | ||
+ | <br> | ||
+ | <source lang="dos" enclose="div"> | ||
+ | java -jar gaxclc.jar -u:default -p:password -s -h:localhost:8080 spd execute 10054 1 -encrypted "C:/GAX/encryptedinput.txt" | ||
+ | </source> | ||
+ | </div> | ||
+ | </div> | ||
+ | |-| | ||
+ | delete= | ||
+ | <div class="cloud-wrapper"> | ||
+ | <h2>delete</h2> | ||
+ | <div class="cloud-left"> | ||
+ | ====Overview==== | ||
+ | This operation deletes an SPD. If SPD does not exist, the operation fails. | ||
+ | |||
+ | ====Format==== | ||
+ | <source lang="dos"> | ||
+ | java –jar gaxclc.jar -u:user -p:password -s -h:<host>:<port> spd delete SPDID | ||
+ | </source> | ||
+ | |||
+ | *<tt>SPDID</tt>—The ID of the SPD to be deleted. | ||
+ | |||
+ | ====Example==== | ||
+ | <source lang="dos"> | ||
+ | java -jar gaxclc.jar -u:default -p:password spd delete 5436 | ||
+ | </source> | ||
+ | </div> | ||
+ | </div> | ||
+ | </tabber> | ||
+ | </div> | ||
+ | |||
+ | ==IPs== | ||
+ | CLC supports the following operations for the <tt>ip</tt> function: | ||
+ | |||
+ | *<tt>add</tt> | ||
+ | *<tt>query</tt> | ||
+ | *<tt>querybyid</tt> | ||
+ | *<tt>delete</tt> | ||
+ | |||
+ | <div class="cloud-tabberlive-wrapper"> | ||
+ | <tabber> | ||
+ | add= | ||
+ | <div class="cloud-wrapper"> | ||
+ | <h2>add</h2> | ||
+ | <div class="cloud-left"> | ||
+ | ====Overview==== | ||
+ | This operation adds an IP (packaged as a .zip file) to the GAX database. If the IP already exists, it is replaced. | ||
+ | |||
+ | If successful, the operation displays the ID of the IP. | ||
+ | |||
+ | {{NoteFormat|The .zip file must contain the IP and the templates folder for the IP.}} | ||
+ | |||
+ | ====Format==== | ||
+ | <source lang="dos"> | ||
+ | java –jar gaxclc.jar -u:user -p:password -s -h:<host>:<port> ip add "path to IP zip file" | ||
+ | </source> | ||
+ | |||
+ | |||
+ | ====Example==== | ||
+ | <source lang="dos" enclose="div"> | ||
+ | java -jar gaxclc.jar -u:default -p:password ip add "C:\GAX\TESTS\zippedIpUpload\PRODUCTION\IP_TSrvSIP64_18100079b1_ENU_windows.zip" | ||
+ | </source> | ||
+ | </div> | ||
+ | </div> | ||
+ | |-| | ||
+ | query= | ||
+ | <div class="cloud-wrapper"> | ||
+ | <h2>query</h2> | ||
+ | <div class="cloud-left"> | ||
+ | ====Overview==== | ||
+ | This operation queries all IPs and displays a table that lists the following details for each IP: | ||
+ | |||
+ | *ID number | ||
+ | *Name | ||
+ | *Version | ||
+ | *OS | ||
+ | *Locale | ||
+ | *Status | ||
+ | |||
+ | ====Format==== | ||
+ | <source lang="dos"> | ||
+ | java –jar gaxclc.jar -u:user -p:password -s -h:<host>:<port> ip query | ||
+ | </source> | ||
+ | |||
+ | ====Example==== | ||
+ | <source lang="dos"> | ||
+ | java -jar gaxclc.jar -u:default -p:password -s -h:132.45.43.45:443 ip query | ||
+ | </source> | ||
+ | </div> | ||
+ | </div> | ||
+ | |-| | ||
+ | querybyid= | ||
+ | <div class="cloud-wrapper"> | ||
+ | <h2>querybyid</h2> | ||
+ | <div class="cloud-left"> | ||
+ | ====Overview==== | ||
+ | This operation queries an IP by its ID and displays a table that lists the following details: | ||
+ | |||
+ | *ID number | ||
+ | *Name | ||
+ | *Version | ||
+ | *OS | ||
+ | *Locale | ||
+ | *Status | ||
+ | |||
+ | ====Format==== | ||
+ | <source lang="dos"> | ||
+ | java –jar gaxclc.jar -u:user -p:password -s -h:<host>:<port> ip query IPID | ||
+ | </source> | ||
+ | |||
+ | *<tt>IPID</tt>—The ID of the IP to query. | ||
+ | |||
+ | ====Example==== | ||
+ | <source lang="dos"> | ||
+ | java -jar gaxclc.jar -u:default -p:password -h:132.45.43.45:8080 ip query 543 | ||
+ | </source> | ||
+ | </div> | ||
+ | </div> | ||
+ | |-| | ||
+ | delete= | ||
+ | <div class="cloud-wrapper"> | ||
+ | <h2>delete</h2> | ||
+ | <div class="cloud-left"> | ||
+ | ====Overview==== | ||
+ | This operation deletes an IP. | ||
+ | |||
+ | ====Format==== | ||
+ | <source lang="dos"> | ||
+ | java –jar gaxclc.jar -u:user -p:password -s -h:<host>:<port> ip delete IPID | ||
+ | </source> | ||
+ | |||
+ | *<tt>IPID</tt>—The ID of the IP to delete. | ||
+ | |||
+ | ====Example==== | ||
+ | <source lang="dos"> | ||
+ | java -jar gaxclc.jar -u:default -p:password ip delete 547 | ||
+ | </source> | ||
+ | </div> | ||
+ | </div> | ||
+ | </tabber> | ||
+ | </div> | ||
[[Category:V:GA:8.5.2]] | [[Category:V:GA:8.5.2]] | ||
+ | [[category:Genesys Administrator Extension]] | ||
+ | [[category:Genesys Administrator Extension Help]] |
Version du juillet 1, 2015 à 23:24
Using the Command Line Console (CLC)
The Command Line Console (CLC) enables administrators to use the command line to execute certain GAX functions on solution definitions (SPDs) and installation packages (IPs). For example, you might use the CLC to silently deploy SPDs onto remote hosts.
You must be able to access the operating system's command-line interface to use the CLC. If you are not on the GAX host machine, you must have the CLC tool (gaxclc.jar) available on the local machine.
To access CLC's embedded Help file, execute one of the following commands:
java –jar gaxclc.jar help
java –jar gaxclc.jar ?
Structure
CLC supports commands that use the following structure:
java –jar gaxclc.jar -u:user -p:password -s -h:<host>:<port> <function> <operation> <args>
In the above example:
- -u:user is the user name to log in to Configuration Server.
- -p:password is the password to log in to Configuration Server. CLC assumes there is no password if this flag does not specify a value.
- -s instructs CLC to use a secure https connection to the GAX server. If this flag is not specified, CLC uses http.
- -h:<host>:<port> specifies the host and port of the GAX server. If this flag is not specified, CLC uses the following value: -h:localhost:8080.
- <function> can be either ip or spd.
- <operation> specifies the operation to be executed. The valid values for this flag are specific to the function you specified in the previous step (ip or spd).
- <args> specifies the operation arguments. The valid values for this flag are specific to the <function> and <operation> parameters you specified in the previous steps.
The following is an example of a CLC command:
java -jar gaxclc.jar -u:default -p:password -h:localhost:8080 spd execute 10054 1 "C:/GAX/input.txt"
SPDs
CLC supports the following operations for SPDs:
- add
- query
- querybyid
- execute
- delete
- encrypt (see execute tab)
add
Overview
This operation adds an SPD to the GAX database. If the SPD already exists, as determined by the name and version in the SPD XML, this operation replaces the existing SPD.
If successful, the operation returns the ID of the added SPD.
Format
java –jar gaxclc.jar -u:user -p:password -s -h:<host>:<port> spd add "file path"
- "file path"—The path to the XML file.
Example
java -jar gaxclc.jar -u:default -p:password spd add "c:\GAX\newSpd.xml"
query
Overview
This operation queries all SPDs and displays a table that lists the following for each SPD:
- ID number
- Name
- Version
- Tenant DBID
The following is an example:
10054 gvp 8.1.5 1
10060 genesysOne 8.1.5 1
10060 eServices 8.1.5 1
Format
java –jar gaxclc.jar -u:user -p:password -s -h:<host>:<port> spd query
Example
java -jar gaxclc.jar -u:default -p:password -s -h:132.45.43.45:443 spd query
querybyid
Overview
This operation queries an SPD by its ID. If the SPD does not exist, the operation fails.
If successful, the operation displays a table that lists the following details about the SPD:
- Profile ID
- Name
For example:
1 Install
Format
java –jar gaxclc.jar -u:user -p:password -s -h:<host>:<port> spd query SPDID
- SPDID—The ID of the SPD that is being queried.
Example
java -jar gaxclc.jar -u:default -p:password -h:132.45.43.45:8080 spd query 4374
execute
Overview
This operation executes a SPD.
Format
java –jar gaxclc.jar -u:user -p:password -s -h:<host>:<port> spd execute SPDID profileName|-profileID:profileID|-profileName:profileName -encrypted "input file"
- SPDID—The ID of the SPD to be executed.
- profileName|-profileID:profileID|-profileName:profileName—The SPD profile to be executed.
- -encrypted—If specified, indicates if the input file is encrypted.
- "input file"—Specifies the input file that contains SPD parameters. If -encrypted is set, the input file is encrypted.
The input file must be in JSONObject format and include SPD parameters for a specific profile. The file must be encoded in UTF-8 format.
[+] Show usageExample
java -jar gaxclc.jar -u:default -p:password -s -h:localhost:8080 spd execute 10054 -profileID:1 "C:/GAX/input.txt"
java -jar gaxclc.jar -u:default -p:password -h:localhost:8080 spd execute 10054 -profileName:"Install profile" "C:/GAX/input.txt"
java -jar gaxclc.jar -u:default -p:password -s -h:localhost:8080 spd execute 10054 1 -encrypted "C:/GAX/encryptedinput.txt"
delete
Overview
This operation deletes an SPD. If SPD does not exist, the operation fails.
Format
java –jar gaxclc.jar -u:user -p:password -s -h:<host>:<port> spd delete SPDID
- SPDID—The ID of the SPD to be deleted.
Example
java -jar gaxclc.jar -u:default -p:password spd delete 5436
IPs
CLC supports the following operations for the ip function:
- add
- query
- querybyid
- delete
add
Overview
This operation adds an IP (packaged as a .zip file) to the GAX database. If the IP already exists, it is replaced.
If successful, the operation displays the ID of the IP.
Format
java –jar gaxclc.jar -u:user -p:password -s -h:<host>:<port> ip add "path to IP zip file"
Example
java -jar gaxclc.jar -u:default -p:password ip add "C:\GAX\TESTS\zippedIpUpload\PRODUCTION\IP_TSrvSIP64_18100079b1_ENU_windows.zip"
query
Overview
This operation queries all IPs and displays a table that lists the following details for each IP:
- ID number
- Name
- Version
- OS
- Locale
- Status
Format
java –jar gaxclc.jar -u:user -p:password -s -h:<host>:<port> ip query
Example
java -jar gaxclc.jar -u:default -p:password -s -h:132.45.43.45:443 ip query
querybyid
Overview
This operation queries an IP by its ID and displays a table that lists the following details:
- ID number
- Name
- Version
- OS
- Locale
- Status
Format
java –jar gaxclc.jar -u:user -p:password -s -h:<host>:<port> ip query IPID
- IPID—The ID of the IP to query.
Example
java -jar gaxclc.jar -u:default -p:password -h:132.45.43.45:8080 ip query 543
delete
Overview
This operation deletes an IP.
Format
java –jar gaxclc.jar -u:user -p:password -s -h:<host>:<port> ip delete IPID
- IPID—The ID of the IP to delete.
Example
java -jar gaxclc.jar -u:default -p:password ip delete 547