استخدام وحدة تحكم سطر الأوامر (CLC)
تُمكن وحدة تحكم سطر الأوامر (CLC) المسؤولين من استخدام سطر الأوامر لتنفيذ وظائف GAX المعينة الخاصة بـتعريفات الحل (SPDs) وحزم التثبيت (IPs). على سبيل المثال، قد تستخدم CLC لنشر SPDs تلقائيًا على المضيفون البعيدون.
يجب أن تكون قادرًا على الوصول إلى واجهة سطر أوامر نظام التشغيل لاستخدام CLC. إذا لم تكن على جهاز GAX المضيف، فيجب أن تكون أداة CLC (gaxclc.jar ) متاحة لديك على الجهاز المحلي.
للوصول إلى ملف تعليمات CLC المضمّن، نفذ أحد الأوامر التالية:
java –jar gaxclc.jar help
Important
بمجرد تنفيذك الأوامر مع CLC، يتم إنشاء ملف السجل في نفس المكان الذي تم تنفيذ الأداه به.
البنية
تدعم CLC الأوامر التي تستخدم البنية التالية:
java –jar gaxclc.jar -u:user -p:password -s -h:<host>:<port> <function> <operation> <args>
في المثال أعلاه:
-u:user هو اسم المستخدم لتسجيل الدخول في خادم التكوين.
-p:password هو كلمة المرور لتسجيل الدخول في خادم التكوين. يفترض CLC أنه لا توجد كلمة مرور إذا لم تحدد هذه العلامة قيمة.
-s لاستخدام اتصال https آمن بخادم GAX. إذا كانت العلامة غير محددة، فإن CLC تستخدم http .
-h:<host>:<port> تُحدد المضيف ومنفذ الخادم GAX. إذا كانت العلامة غير محددة، فإن CLC تستخدم القيمة التالية. -h:localhost:8080 .
<function> من الممكن أن تكون ip أو spd .
<operation> تُحدد العملية ليتم تنفيذها. تُحدد القيم الصالحة لهذه العملية للوظيفة التي قمت بتحديدها في الخطوة السابقة (ip أو spd ).
<args> تُحدد وسيطات العملية. تُحدد القيم الصالحة لهذه العملية للوظيفة <function> و<operation> المعلمات التي قمت بتحديدها في الخطوات السابقة.
ما يلي هو مثال لأمر CLC:
java -jar gaxclc.jar -u:default -p:password -h:localhost:8080 spd execute 10054 1 "C:/GAX/input.txt"
SPDs
تدعم CLC العمليات التالية لـ SPDs:
إضافة
استعلام
الاستعلام حسب المعرف
تنفيذ
حذف
تشفير (راجع علامة تبويب تنفيذ )
إضافة
نظرة عامة
تُضيف هذه العملية SPD إلى قاعدة بيانات GAX. إذا كانت SPD موجودة بالفعل، كما هي محددة من خلال الاسم والإصدار في SPD XML، فإن هذه العملية تستبدل SPD الموجودة.
في حال نجاحها، تقوم العملية بإرجاع معرف SPD المضافة.
التنسيق
java –jar gaxclc.jar -u:user -p:password -s -h:<host>:<port> spd أضاف "مسار الملف"
"مسار الملف" —المسار لملف XML.
مثال
java -jar gaxclc.jar -u:default -p:password spd add "c:\GAX\newSpd.xml"
الاستعلام
نظرة عامة
تستعلم هذه العملية عن جميع SPDs وتعرض جدول يُدرج التالي لكل SPD:
رقم المعرف
الاسم
الإصدار
المستأجر DBID
ما يلي مثال لذلك:
10054 gvp 8.1.5 1
10060 genesysOne 8.1.5 1
10060 eServices 8.1.5 1
التنسيق
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
الاستعلام حسب المعرف
نظرة عامة
تستعلم هذه العملية عن SPD من خلال المعرف الخاص بها. إذا لم تكن SPD موجودة، سوف تفشل العملية.
في حال نجاحها، تعرض العملية جدول يُدرج التفاصيل التالية عن SPD:
على سبيل المثال:
تنسيق
java –jar gaxclc.jar -u:user -p:password -s -h:<host>:<port> spd query SPDID
SPDID —معرف SPD الذي يتم الاستعلام عنه.
مثال
java -jar gaxclc.jar -u:default -p:password -h:132.45.43.45:8080 spd query 4374
تنفيذ
نظرة عامة
تقوم هذه العملية بتنفيذ SPD.
التنسيق
java –jar gaxclc.jar -u:user -p:password -s -h:<host>:<port> spd execute SPDID profileName|-profileID:profileID|-profileName:profileName -encrypted "input file"
SPDID —معرف SPD كي يتم تنفيذه.
profileName|-profileID:profileID|-profileName:profileName —ملف التعريف SPD كي يتم تنفيذه.
Important
إذا لم يتم تحديد علامة، من ثم يفترض تنفيذ
profileName مثلها مثل ملف تعريف
SPD.
-encrypted —إذا تم تحديدها، فتوضح ما إذا كان قد تم تشفير ملف الإدخال.
[+] عرض الاستخدام
توفر CLC دعم التشفير لملفات الإدخال التي تحتوي على بيانات حساسة مثل كلمات المرور.
تنسيق:
java –jar gaxclc.jar -u:user -p:password -s -h:<host>:<port> spd encrypt "مسار ملف الإدخال" "مسار ملف الإخراج المشفر"
يتم تخزين ملف الإدخال المشفر في الموقع المحدد بواسطة "مسار ملف إخراج مشفر" . إذا كان الملف موجود بالفعل في هذا المكان، فسوف يتم استبداله.
مثال:
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"
"ملف الإدخال" —يحدد ملف الإدخال الذي يحتوي على معلمات SPD. إذا تم تعيين -encrypted ، سيتم تشفير ملف الإدخال.
يجب أن يكون ملف الإدخال في صيغة JSONObject ويحتوي على معلمات SPD لملف التعريف المحدد. يجب أن يتم ترميز الملف في التنسيق UTF-8.
[+] عرض الاستخدام
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.
The input structure for a string type is described below:
{
"Dialog name" : {
"Input name" : "string"
}
}
Example
SPD Profile
<profile name="Install">
<dialog step="Step1">
<input name="NAME_PARAM1" title="PERSON NAME" default="birit" type="string" required="true">
<description>Please enter the person name</description>
</input>
</dialog>
<dialog step="Step2">
<input name="NAME_PARAM2" title="PERSON NAME" default="birit" type="string" required="true">
<description>Please enter the person name</description>
</input>
</dialog>
<execution>
<script>
log('string test' );
</script>
</execution>
</profile>
Input File for Install Profile
{
"Step1" : {
"NAME_PARAM1" : "Kate"
},
"Step2" : {
"NAME_PARAM2" : "John"
}
}
The input structure for a boolean type is described below:
{
"Dialog name" : {
"Input name" : true/false
}
}
Example
SPD Profile
<profile name="Install">
<dialog step="Step1">
<input name="STATUS" title="status" type="boolean" required="true">
<description>status field</description>
</input>
</dialog>
<execution>
<script>
log('boolean test');
</script>
</execution>
</profile>
Input File for Install Profile
{
"Step1" : {
"STATUS" : true
}
}
The input structure for an integer type is described below:
{
"Dialog name" : {
"Input name" : <integer>
}
}
Example
SPD Profile
<profile name="Install">
<dialog step="Step1">
<input name="NUMBER" title="number" type="integer" required="true">
<description>number field</description>
</input>
</dialog>
<execution>
<script>
log('number test');
</script>
</execution>
</profile>
Input File for Install Profile
{
"Step1" : {
"NUMBER" : 132
}
}
The input structure for a password type is described below:
{
"Dialog name" : {
"Input name" : "password"
}
}
Important
Input files that include sensitive data such as passwords should be encrypted using the SPD encrypt operation.
Example
SPD Profile
<profile name="Install">
<dialog step="Step1">
<input name="PASSWORD" title="password" type="password" required="true">
<description>password field</description>
</input>
</dialog>
<execution>
<script>
log('password test');
</script>
</execution>
</profile>
Input File for Install Profile
{
"Step1" : {
"PASSWORD" : "xyz9846gdkjg"
}
}
The input structure for a selectOne type with an <objectselect> tag is described bellow:
{
"Dialog name" : {
"Input name" : {
"objectselect" : {
"filter" : [{
"value" : "filter value",
"name" : "filter name"
}
]
}
}
}
}
Important
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.
Example
SPD Profile
<profile name="Install">
<dialog step="Step1">
<input name="APP_OBJ_SELECT_ONE" title="Application Name" hidden="false" type="selectOne" default="">
<description>select application</description>
<objectselect>
<filter value="CfgApplication" name="type"/>
</objectselect>
</input>
</dialog>
<execution>
<script>
log('test select one' );
</script>
</execution>
Input File for Install Profile
{
"Step1" : {
"APP_OBJ_SELECT_ONE" : {
"objectselect" : {
"filter" : [{
"value" : "SIP_lrm26",
"name" : "name"
}
]
}
}
}
}
The input structure for a selectMultiple type with <objectselect> tag is described below:
{
"Dialog name" : {
"Input name" : {
"objectselect" : {
"filter" : [{
"value" : "filter value",
"name" : "filter name"
}
]
}
}
}
}
Filters defined in an SPD input file are joined in union (OR ) and then intersect (AND ) with filters defined in an SPD file for a selectMultiple input.
Example
SPD Profile
<profile name="Install">
<dialog step="Step1">
<input name="APP_OBJ_SELECT_MULTIPLE" title="Application Name" hidden="false" type="selectMultiple" default="">
<description>select application</description>
<objectselect>
<filter value="CfgApplication" name="type"/>
</objectselect>
</input>
</dialog>
<execution>
<script>
log('test select multiple' );
</script>
</execution>
Input File for Install Profile
{
"Step1" : {
"APP_OBJ_SELECT_MULTIPLE" : {
"objectselect" : {
"filter" : [{
"value" : "SIP_lrm26",
"name" : "name"
},{
"value" : "SIP_lrm27",
"name" : "name"
}
]
}
}
}
}
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>
Input File for Install Profile
{
"Application Parameters" : {
"DATA_MODEL" : {
"selection" : {
"option" : [{
"value" : "64",
"name" : "64"
}
]
}
}
}
}
Important
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:
<dialog step="Role input" cond="false">
<input name="ROLE" title="Role" hidden="false" type="selectOne" required="true">
<description>Please indicate the role</description>
<objectselect>
<filter value="CfgRole" name="type"/>
</objectselect>
</input>
</dialog>
مثال
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"
حذف
نظرة عامة
تقوم هذه العملية بمسح SPD. إذا لم تكن SPD موجودة، سوف تفشل العملية.
التنسيق
java –jar gaxclc.jar -u:user -p:password -s -h:<host>:<port> spd delete SPDID
SPDID —معرف SPD الذي سيتم حذفه.
مثال
java -jar gaxclc.jar -u:default -p:password spd delete 5436
IPs
تدعم CLC العمليات التالية لوظيفة ip :
إضافة
استعلام
استعلام حسب المعرف
حذف
إضافة
نظرة عامة
تُضيف هذه العملية IP (تم حزمه كملف .zip) إلى قاعدة بيانات GAX. إذا كان IP موجود بالفعل، فسوف يتم استبداله.
في حال نجاحها، تقوم العملية بعرض معرف الـ IP.
Important
يجب أن يحتوي ملف .zip على IP ومجلد قوالب لـ IP.
التنسيق
java –jar gaxclc.jar -u:user -p:password -s -h:<host>:<port> ip add "path to IP zip file"
مثال
java -jar gaxclc.jar -u:default -p:password ip add "C:\GAX\TESTS\zippedIpUpload\PRODUCTION\IP_TSrvSIP64_18100079b1_ENU_windows.zip"
استعلام
نظرة عامة
تستعلم هذه العملية عن جميع IPs وتعرض جدول يُدرج التالي لكل IP:
رقم المعرف
الاسم
الإصدار
OS
الإعدادات المحلية
الحالة
التنسيق
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
الاستعلام حسب المعرف
نظرة عامة
تستعلم هذه العملية عن IP من خلال المعرف الخاص به وتعرض جدول يُدرج التفاصيل التالية:
رقم المعرف
الاسم
الإصدار
OS
الإعدادات المحلية
الحالة
التنسيق
java –jar gaxclc.jar -u:user -p:password -s -h:<host>:<port> ip query IPID
مثال
java -jar gaxclc.jar -u:default -p:password -h:132.45.43.45:8080 ip query 543
تنفيذ
نظرة عامة
تقوم هذه العملية بمسح SPD.
التنسيق
java –jar gaxclc.jar -u:user -p:password -s -h:<host>:<port> ip delete IPID
مثال
java -jar gaxclc.jar -u:default -p:password ip delete 547
category:Genesys Administrator Extension
category:Genesys Administrator Extension Help