Hc_tts_cluster_options - Управление опцией подсистемы TTS уровня кластера
Hc_tts_cluster_options_info
Просмотр списка опций подсистемы TTS уровня кластера.
Аналог команды в CoCon:
cluster/core/<CLUSTER>/tts/db/info
Метод HTTP-запроса:
POST
Шаблон HTTP-запроса:
http://host:port/commands/tts_cluster_options_info
Код HTTP-ответа:
- 200 – в случае успеха;
- 404 – в случае ошибки.
XSD-схема XML-запроса/ответа:
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" id="tts_cluster_options_info">
<xs:annotation>
<xs:documentation xml:lang="en">
Get options of TTS node.
Usage: http://server:9999/commands/tts_cluster_options_info
Copyright (c) 2014, Eltex. All rights reserved.
</xs:documentation>
</xs:annotation>
<xs:include schemaLocation="error.xsd" />
<xs:include schemaLocation="ecm_common.xsd" />
<!-- Options for TTS node -->
<xs:complexType name="TtsClusterOptions">
<xs:complexContent>
<xs:extension base="baseOptionsType">
<xs:attribute name="mysql_database" type="nonEmptyNormalizedStringType" use="optional" />
<xs:attribute name="mysql_enabled" type="booleanType" use="optional" />
<xs:attribute name="mysql_host" type="nonEmptyNormalizedStringType" use="optional" />
<xs:attribute name="mysql_password" type="stringType">
<xs:annotation>
<xs:documentation xml:lang="en">
In case of strong security restrictions password may be shown as ********
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="mysql_port" type="inetPortType" use="optional" />
<xs:attribute name="mysql_user" type="nonEmptyNormalizedStringType" use="optional" />
</xs:extension>
</xs:complexContent>
</xs:complexType>
<!-- in -->
<xs:element name="in">
<xs:complexType>
<xs:all minOccurs="1" maxOccurs="1">
<xs:element name="request" minOccurs="1" maxOccurs="1">
<xs:complexType>
<xs:all minOccurs="1" maxOccurs="1">
<xs:element name="cluster_options" type="clusterInfoInType"/>
</xs:all>
</xs:complexType>
</xs:element>
</xs:all>
</xs:complexType>
</xs:element>
<!-- out -->
<xs:element name="out">
<xs:complexType>
<xs:choice>
<xs:element name="result" minOccurs="1" maxOccurs="1">
<xs:complexType>
<xs:all minOccurs="1" maxOccurs="1">
<xs:element name="cluster_options" type="clusterInfoOutType"/>
</xs:all>
</xs:complexType>
</xs:element>
<xs:element name="error" type="errorType" minOccurs="1" maxOccurs="1" />
</xs:choice>
</xs:complexType>
</xs:element>
</xs:schema>
Пример:
Запрос:
http://192.168.1.21:9999/commands/tts_cluster_options_info
<?xml version="1.0" encoding="UTF-8"?>
<in>
<request>
<cluster_options cluster="core1"/>
</request>
</in>
Код ответа:
200
Ответ:
<?xml version="1.0"?>
<out
xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="hc_tts_cluster_options_info.xsd">
<result>
<cluster_options>
<cluster name="core1">
<options xs:type="TtsClusterOptions" mysql_database="ecss_calls_db" mysql_enabled="true" mysql_host="tts.mysql.ecss" mysql_password="********" mysql_port="3306" mysql_user="calls_db"/>
</cluster>
</cluster_options>
</result>
</out>
Hc_tts_cluster_options_set
Установка значения опций подсистемы TTS уровня кластера.
Аналог команды в CoCon:
cluster/core/<CLUSTER>/tts/db/set
Метод HTTP-запроса:
POST
Шаблон HTTP-запроса:
http://host:port/commands/tts_cluster_options_set
Код HTTP-ответа:
- 200 – в случае успеха;
- * 404 – в случае ошибки.
XSD-схема XML-запроса/ответа hc_tts_cluster_options_set.xsd:
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" id="tts_cluster_options_set">
<xs:annotation>
<xs:documentation xml:lang="en">
Set tts cluster options.
Usage: http://server:9999/commands/tts_cluster_options_set
Copyright (c) 2014, Eltex. All rights reserved.
</xs:documentation>
</xs:annotation>
<xs:include schemaLocation="error.xsd" />
<xs:include schemaLocation="ecm_common.xsd" />
<xs:complexType name="TtsClusterOptions">
<xs:complexContent>
<xs:extension base="baseOptionsType">
<xs:attribute name="mysql_database" type="nonEmptyNormalizedStringType" use="optional" />
<xs:attribute name="mysql_enabled" type="booleanType" use="optional" />
<xs:attribute name="mysql_host" type="nonEmptyNormalizedStringType" use="optional" />
<xs:attribute name="mysql_password" type="nonEmptyNormalizedStringType" use="optional" />
<xs:attribute name="mysql_port" type="inetPortType" use="optional" />
<xs:attribute name="mysql_user" type="nonEmptyNormalizedStringType" use="optional" />
</xs:extension>
</xs:complexContent>
</xs:complexType>
<!-- in -->
<xs:element name="in">
<xs:complexType>
<xs:all minOccurs="1" maxOccurs="1">
<xs:element name="request" minOccurs="1" maxOccurs="1">
<xs:complexType>
<xs:all minOccurs="1" maxOccurs="1">
<xs:element name="cluster_options" type="clusterSetInType"/>
</xs:all>
</xs:complexType>
</xs:element>
</xs:all>
</xs:complexType>
</xs:element>
<!-- out -->
<xs:element name="out">
<xs:complexType>
<xs:choice>
<xs:element name="result" minOccurs="1" maxOccurs="1">
<xs:complexType>
<xs:all minOccurs="1" maxOccurs="1">
<xs:element name="cluster_options" type="clusterSetOutType"/>
</xs:all>
</xs:complexType>
</xs:element>
<xs:element name="error" type="errorType" minOccurs="1" maxOccurs="1" />
</xs:choice>
</xs:complexType>
</xs:element>
</xs:schema>
Пример:
Запрос:
http://192.168.1.21:9999/commands/tts_cluster_options_set
<?xml version="1.0" encoding="UTF-8"?>
<in xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="hc_tts_cluster_options_set.xsd">
<request>
<cluster_options>
<cluster name="core1">
<options xs:type="TtsClusterOptions" mysql_host="tts.mysql.ecss" mysql_password="calls_db" mysql_port="13306" mysql_user="calls_db"/>
</cluster>
</cluster_options>
</request>
</in>
Код ответа:
200
Ответ:
<?xml version="1.0"?>
<out
xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="hc_tts_cluster_options_set.xsd">
<result>
<cluster_options>
<cluster name="core1">
<success option="mysql_user"/>
<success option="mysql_port"/>
<success option="mysql_password"/>
<success option="mysql_host"/>
</cluster>
</cluster_options>
</result>
</out>
Hc_tts_cluster_options_clean
Сброс значения опций подсистемы TTS уровня кластера.
Аналог команды в CoCon:
cluster/core/<CLUSTER>/tts/db/clean
Метод HTTP-запроса:
POST
Шаблон HTTP-запроса:
http://host:port/commands/tts_cluster_options_clean
Код HTTP-ответа:
- 200 – в случае успеха;
- * 404 – в случае ошибки.
XSD-схема XML-запроса/ответа:
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" id="tts_cluster_options_clean">
<xs:annotation>
<xs:documentation xml:lang="en">
Clean tts cluster options.
Usage: http://server:9999/commands/tts_cluster_options_clean
Copyright (c) 2014, Eltex. All rights reserved.
</xs:documentation>
</xs:annotation>
<xs:include schemaLocation="error.xsd" />
<xs:include schemaLocation="ecm_common.xsd" />
<!-- in -->
<xs:element name="in">
<xs:complexType>
<xs:all minOccurs="1" maxOccurs="1">
<xs:element name="request" minOccurs="1" maxOccurs="1">
<xs:complexType>
<xs:all minOccurs="1" maxOccurs="1">
<xs:element name="cluster_options" type="clusterCleanInType"/>
</xs:all>
</xs:complexType>
</xs:element>
</xs:all>
</xs:complexType>
</xs:element>
<!-- out -->
<xs:element name="out">
<xs:complexType>
<xs:choice>
<xs:element name="result" minOccurs="1" maxOccurs="1">
<xs:complexType>
<xs:all minOccurs="1" maxOccurs="1">
<xs:element name="cluster_options" type="clusterCleanOutType"/>
</xs:all>
</xs:complexType>
</xs:element>
<xs:element name="error" type="errorType" minOccurs="1" maxOccurs="1" />
</xs:choice>
</xs:complexType>
</xs:element>
</xs:schema>
Пример:
Запрос:
http://192.168.1.21:9999/commands/tts_cluster_options_clean
<?xml version="1.0" encoding="UTF-8"?>
<in
xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="hc_tts_cluster_options_clean.xsd">
<request>
<cluster_options>
<cluster name="core1">
<option name="mysql_port"/>
</cluster>
</cluster_options>
</request>
</in>
Код ответа:
200
Ответ:
<?xml version="1.0"?>
<out
xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="hc_tts_cluster_options_clean.xsd">
<result>
<cluster_options>
<cluster name="core1">
<success option="mysql_port"/>
</cluster>
</cluster_options>
</result>
</out>