Hc_mediator_http_terminal - Управление подсистемой HTTP Terminal
Общая схема
hc_mediator_common.xsd:
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified">
<!-- Options for TTS node -->
<xs:complexType name="httpTerminalOptionsType">
<xs:complexContent>
<xs:extension base="baseOptionsType">
<xs:attribute name="http_server_name" type="stringType" use="optional" />
<xs:attribute name="http_server_port" type="inetPortType" use="optional" />
<xs:attribute name="http_server_listen_iface" type="ipAddressType" use="optional" />
<xs:attribute name="request_time" type="positiveIntegerType" use="optional" />
<xs:attribute name="session_lifetime" type="positiveIntegerType" use="optional" />
<xs:attribute name="ssl_certfile" type="stringType" use="optional" />
<xs:attribute name="ssl_keyfile" type="stringType" use="optional" />
<xs:attribute name="ssl_password" type="stringType" use="optional">
<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:extension>
</xs:complexContent>
</xs:complexType>
</xs:schema>
Hc_mediator_http_terminal_info
Команда используется для получения свойств подсистемы HTTP Terminal кластера Mediator.
Аналог команды в CoCon:
cluster/mediator/<CLUSTER>/properties/cocon_http_terminal/info
Шаблон HTTP-запроса:
http://host:port/commands/mediator_http_terminal_info
Код HTTP-ответа:
- 200 – в случае успеха;
- 404 – в случае ошибки.
XSD-схема XML-запроса/ответа:
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" id="mediator_http_terminal_info">
<xs:annotation>
<xs:documentation xml:lang="en">
Get options of TTS node.
Usage: http://server:9999/commands/mediator_http_terminal_info
Copyright (c) 2014, Eltex. All rights reserved.
</xs:documentation>
</xs:annotation>
<xs:include schemaLocation="error.xsd" />
<xs:include schemaLocation="ecm_common.xsd" />
<xs:include schemaLocation="hc_mediator_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="nc_options" type="ncInfoInType"/>
</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="nc_options" type="ncInfoOutType"/>
</xs:all>
</xs:complexType>
</xs:element>
<xs:element name="error" type="errorType" minOccurs="1" maxOccurs="1" />
</xs:choice>
</xs:complexType>
</xs:element>
</xs:schema>
Пример 1:
Запрос:
http://192.168.1.21:9999/commands/mediator_http_terminal_info
<?xml version="1.0" encoding="UTF-8"?><in>
<request>
<nc_options cluster="md1"/>
</request>
</in>
Ответ:
<?xml version="1.0"?>
<out
xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="hc_mediator_http_terminal_info.xsd">
<result>
<nc_options>
<cluster name="md1">
<options xs:type="httpTerminalOptionsType" ssl_password="********" ssl_keyfile="undefined" ssl_certfile="undefined" session_lifetime="3600000" request_time="60000" http_server_port="9999" http_server_name="http_terminal" http_server_listen_iface="0.0.0.0"/>
</cluster>
</nc_options>
</result>
</out>
Пример 2:
Запрос:
http://192.168.1.21:9999/commands/mediator_http_terminal_info
<?xml version="1.0" encoding="UTF-8"?>
<in>
<request>
<nc_options cluster="md1" node="md1@ecss1"/>
</request>
</in>
Ответ:
<?xml version="1.0"?>
<out
xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="hc_mediator_http_terminal_info.xsd">
<result>
<nc_options>
<cluster name="md1">
<options xs:type="httpTerminalOptionsType"/>
</cluster>
<node name="md1@ecss1">
<options xs:type="httpTerminalOptionsType" ssl_password="********" ssl_keyfile="undefined" ssl_certfile="undefined" session_lifetime="3600000" request_time="60000" http_server_port="9999" http_server_name="http_terminal" http_server_listen_iface="0.0.0.0"/>
</node>
</nc_options>
</result>
</out>
Hc_mediator_http_terminal_set
Команда установки свойства подсистемы HTTP Terminal кластера Mediator.
Аналог команды в CoCon:
cluster/mediator/<CLUSTER>/properties/cocon_http_terminal/set
Шаблон HTTP-запроса:
http://host:port/commands/mediator_http_terminal_set
Код HTTP-ответа:
- 200 – в случае успеха;
- 404 – в случае ошибки.
XSD-схема XML-запроса/ответа:
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" id="mediator_http_terminal_set">
<xs:annotation>
<xs:documentation xml:lang="en">
Get options of TTS node.
Usage: http://server:9999/commands/mediator_info_terminal_set
Copyright (c) 2014, Eltex. All rights reserved.
</xs:documentation>
</xs:annotation>
<xs:include schemaLocation="error.xsd" />
<xs:include schemaLocation="ecm_common.xsd" />
<xs:include schemaLocation="hc_mediator_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="nc_options" type="ncSetInType"/>
</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="nc_options" type="ncSetOutType"/>
</xs:all>
</xs:complexType>
</xs:element>
<xs:element name="error" type="errorType" minOccurs="1" maxOccurs="1" />
</xs:choice>
</xs:complexType>
</xs:element>
</xs:schema>
XSD-схема hc_mediator_common.xsd:
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified">
<!-- Options for TTS node -->
<xs:complexType name="httpTerminalOptionsType">
<xs:complexContent>
<xs:extension base="baseOptionsType">
<xs:attribute name="http_server_name" type="stringType" use="optional" />
<xs:attribute name="http_server_port" type="inetPortType" use="optional" />
<xs:attribute name="http_server_listen_iface" type="ipAddressType" use="optional" />
<xs:attribute name="request_time" type="positiveIntegerType" use="optional" />
<xs:attribute name="session_lifetime" type="positiveIntegerType" use="optional" />
<xs:attribute name="ssl_certfile" type="stringType" use="optional" />
<xs:attribute name="ssl_keyfile" type="stringType" use="optional" />
<xs:attribute name="ssl_password" type="stringType" use="optional" />
</xs:extension>
</xs:complexContent>
</xs:complexType>
</xs:schema>
Пример:
Запрос:
http://192.168.1.21:9999/commands/mediator_http_terminal_set
<?xml version="1.0" encoding="UTF-8"?>
<in xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="hc_mediator_http_terminal_set.xsd">
<request>
<nc_options>
<cluster name="md1">
<options xs:type="httpTerminalOptionsType" session_lifetime="1800000"/>
</cluster>
<node name="md1@ecss1">
<options xs:type="httpTerminalOptionsType" session_lifetime="1800000"/>
</node>
</nc_options>
</request>
</in>
Ответ:
<?xml version="1.0"?>
<out
xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="hc_mediator_http_terminal_set.xsd">
<result>
<nc_options>
<cluster name="md1">
<success option="session_lifetime"/>
</cluster>
<node name="md1@ecss1">
<success option="session_lifetime"/>
</node>
</nc_options>
</result>
</out>
Или 404 в случае, если после установки свойств http-terminal стал недоступен.
Hc_mediator_http_terminal_clean
Команда очистки свойств подсистемы HTTP Terminal кластера Mediator.
Аналог команды в CoCon:
cluster/mediator/<CLUSTER>/properties/cocon_http_terminal/clean
Шаблон HTTP-запроса:
http://host:port/commands/mediator_http_terminal_clean
Код HTTP-ответа:
- 200 – в случае успеха;
- 404 – в случае ошибки.
XSD-схема XML-запроса/ответа:
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" id="mediator_http_terminal_clean">
<xs:annotation>
<xs:documentation xml:lang="en">
Get options of TTS node.
Usage: http://server:9999/commands/mediator_http_terminal_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="nc_options" type="ncCleanInType"/>
</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="nc_options" type="ncCleanOutType"/>
</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/mediator_http_terminal_clean
<?xml version="1.0" encoding="UTF-8"?>
<in xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="hc_tts_general_options_clean.xsd">
<request>
<nc_options>
<cluster name="md1">
<option name="http_server_name"/>
</cluster>
<node name="md1@ecss1">
<option name="http_server_name"/>
</node>
</nc_options>
</request>
</in>
Ответ:
<?xml version="1.0"?>
<out xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="hc_mediator_http_terminal_clean.xsd">
<response>
<nc_options>
<cluster name="md1">
<success option="http_server_name"/>
</cluster>
<node name="md1@ecss1">
<success option="http_server_name"/>
</node>
</nc_options>
</response>
</out>
Запрос:
<?xml version="1.0" encoding="UTF-8"?>
<in xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="hc_mediator_http_terminal_clean.xsd">
<request>
<nc_options>
<cluster name="md1">
</cluster>
</nc_options>
</request>
</in>
Ответ:
<?xml version="1.0"?>
<out
xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="hc_mediator_http_terminal_clean.xsd">
<result>
<nc_options>
<cluster name="md1"/>
</nc_options>
</result>
</out>