Hc_ecss_mlpp_options_clean

Команда изменяет настройки на уровне виртуальной АТС или возвращает их значения по умолчанию для кластерных настроек.

Аналог команды в CoCon:

mlpp/clean

domain/<DOMAIN>/mlpp/clean

Метод HTTP-запроса:

POST

Шаблон HTTP-запроса:

http://host:port/commands/ecss_mlpp_options_clean

Код HTTP-ответа:

  • 200 – в случае успеха;
  • 404 – в случае ошибки.

XSD-схема XML-запроса/ответа:

<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified">
	<xs:annotation>
		<xs:documentation xml:lang="en">
			Clean properties of MLPP service.
			Usage: http://server:9999/commands/ecss_mlpp_options_clean.
			Implementation: hc_ecss_mlpp_options_clean.erl.
			Git: git@git.eltex.loc:httpTerminal.git.
			Copyright (c) 2014, Eltex. All rights reserved.
    </xs:documentation>
	</xs:annotation>
	<xs:include schemaLocation="error.xsd"/>
	<xs:include schemaLocation="ecm_common.xsd"/>
	<!-- resultType-->
	<xs:complexType name="resultType">
		<xs:all>
			<xs:element name="domain_options" type="domainCleanOutType" minOccurs="1"/>
		</xs:all>
	</xs:complexType>
	<!-- in-->
	<xs:element name="in">
		<xs:complexType>
			<xs:sequence>
				<xs:element name="request">
					<xs:complexType>
						<xs:all>
							<xs:element name="domain_options" type="domainCleanInType"/>
						</xs:all>
					</xs:complexType>
				</xs:element>
			</xs:sequence>
		</xs:complexType>
	</xs:element>
	<!-- out -->
	<xs:element name="out">
		<xs:complexType>
			<xs:choice>
				<xs:element name="result" type="resultType"/>
				<xs:element name="error" type="errorType"/>
			</xs:choice>
		</xs:complexType>
	</xs:element>
</xs:schema>
XML

Пример 1:

Запрос: http://192.168.1.21:9999/commands/ecss_mlpp_options_clean

<?xml version="1.0"?>
<in
    xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="hc_ecss_mlpp_options_clean.xsd">
    <request>
        <domain_options>
            <system>
                <option name="queue_time"/>
                <option name="queue_length"/>
                <option name="mode"/>
                <option name="enable"/>
            </system>
            <domain name="biysk.local">
                <option name="queue_time"/>
                <option name="mode"/>
                <option name="enable"/>
            </domain>
        </domain_options>
    </request>
</in>
XML

Ответ:

<?xml version="1.0"?>
<out
	xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="hc_ecss_mlpp_options_clean.xsd">
	<result>
		<domain_options>
			<system>
				<success option="enable"/>
				<success option="mode"/>
				<success option="queue_length"/>
				<success option="queue_time"/>
			</system>
			<domain name="biysk.local">
				<success option="enable"/>
				<success option="mode"/>
				<success option="queue_time"/>
			</domain>
		</domain_options>
	</result>
</out>
XML

Hc_ecss_mlpp_options_info

Команда просмотра настроек подсистемы MLPP всей системы или виртуальной АТС.

Аналог команды в CoCon:

mlpp/info

domain/<DOMAIN>/mlpp/info

Метод HTTP-запроса:

POST

Шаблон HTTP-запроса:

http://host:port/commands/ecss_mlpp_options_info

Код HTTP-ответа:

  • 200 – в случае успеха;
  • 404 – в случае ошибки.

XSD-схема XML-запроса/ответа:

<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified">
	<xs:annotation>
		<xs:documentation xml:lang="en">
			Show properties of MLPP service.
			Usage: http://server:9999/commands/ecss_mlpp_options_info.
			Implementation: hc_ecss_mlpp_options_info.erl.
			Git: git@git.eltex.loc:httpTerminal.git.
			Copyright (c) 2014, Eltex. All rights reserved.
    </xs:documentation>
	</xs:annotation>
	<xs:include schemaLocation="error.xsd"/>
	<xs:include schemaLocation="ecm_common.xsd"/>
	<!-- modeType -->
	<xs:simpleType name="modeType">
		<xs:restriction base="unionType">
			<xs:enumeration value="wait"/>
			<xs:enumeration value="force"/>
		</xs:restriction>
	</xs:simpleType>
	<!-- defaultPriorityType -->
	<xs:simpleType name="defaultPriorityType">
		<xs:restriction base="integerRangeType">
			<xs:minInclusive value="0"/>
			<xs:maxInclusive value="15"/>
		</xs:restriction>
	</xs:simpleType>
	<!-- queueLengthType -->
	<xs:simpleType name="queueLengthType">
		<xs:restriction base="integerRangeType">
			<xs:minInclusive value="2"/>
			<xs:maxInclusive value="3"/>
		</xs:restriction>
	</xs:simpleType>
	<!-- queueTimeType -->
	<xs:simpleType name="queueTimeType">
		<xs:restriction base="integerRangeType">
			<xs:minInclusive value="0"/>
			<xs:maxInclusive value="40"/>
		</xs:restriction>
	</xs:simpleType>
	<!-- ecssMLPPOptionsType-->
	<xs:complexType name="ecssMLPPOptionsType">
		<xs:complexContent>
			<xs:extension base="baseOptionsType">
				<xs:attribute name="default_priority" type="defaultPriorityType" use="optional"/>
				<xs:attribute name="priority" type="xs:string" use="optional"/>
				<xs:attribute name="enable" type="booleanType" use="optional"/>
				<xs:attribute name="mode" type="modeType" use="optional"/>
				<xs:attribute name="queue_length" type="queueLengthType" use="optional"/>
				<xs:attribute name="queue_time" type="queueTimeType" use="optional"/>
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>
	<!-- resultType-->
	<xs:complexType name="resultType">
		<xs:all>
			<xs:element name="domain_options" type="domainInfoOutType" minOccurs="1"/>
		</xs:all>
	</xs:complexType>
	<!-- in-->
	<xs:element name="in">
		<xs:complexType>
			<xs:sequence>
				<xs:element name="request">
					<xs:complexType>
						<xs:all>
							<xs:element name="domain_options" type="domainInfoInType" minOccurs="1"/>
						</xs:all>
					</xs:complexType>
				</xs:element>
			</xs:sequence>
		</xs:complexType>
	</xs:element>
	<!-- out -->
	<xs:element name="out">
		<xs:complexType>
			<xs:choice>
				<xs:element name="result" type="resultType"/>
				<xs:element name="error" type="errorType"/>
			</xs:choice>
		</xs:complexType>
	</xs:element>
</xs:schema
XML

Параметр "domain" является необязательным, если параметр не задан - возвращаются все настройки подсистемы MLPP в рамках системы.

Пример 1:

Запрос: http://192.168.1.21:9999/commands/ecss_mlpp_options_info

<?xml version="1.0"?>
<in xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="hc_ecss_mlpp_options_info.xsd">
    <request>
        <domain_options domain="biysk.local"/>
    </request>
</in>
XML

Ответ:

<?xml version="1.0"?>
<out
	xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="hc_ecss_mlpp_options_info.xsd">
	<result>
		<domain_options>
			<system>
				<options xs:type="ecssMLPPOptionsType"/>
			</system>
			<domain name="biysk.local">
				<options xs:type="ecssMLPPOptionsType" queue_time="40" queue_length="2" priority="[]" mode="wait" enable="true" default_priority="4"/>
			</domain>
		</domain_options>
	</result>
</out>
XML

Пример 2:

Запрос: http://192.168.1.21:9999/commands/ecss_mlpp_options_info

<?xml version="1.0"?>
<in xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="hc_ecss_mlpp_options_info.xsd">
    <request>
        <domain_options/>
    </request>
</in>
XML

Ответ:

<?xml version="1.0"?>
<out
    xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="hc_ecss_mlpp_options_info.xsd">
    <result>
        <domain_options>
            <system>
                <options xs:type="ecssMLPPOptionsType" queue_time="40" queue_length="2" priority="[]" mode="wait" enable="false" default_priority="4"/>
            </system>
            <domain name="ct.office">
                <options xs:type="ecssMLPPOptionsType" queue_length="3"/>
            </domain>
            <domain name="biysk.local">
                <options xs:type="ecssMLPPOptionsType" queue_time="25" queue_length="3" mode="force" enable="false"/>
            </domain>
        </domain_options>
    </result>
</out>
XML

Hc_ecss_mlpp_options_set

Команда настройки подсистемы MLPP для всей системы или виртуальной АТС.

Аналог команды в CoCon:

mlpp/set

domain/<DOMAIN>/mlpp/set

Метод HTTP-запроса:

POST

Шаблон HTTP-запроса:

http://host:port/commands/ecss_mlpp_options_set

Код HTTP-ответа:

  • 200 – в случае успеха;
  • 404 – в случае ошибки.

XSD-схема XML-запроса/ответа:

<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified">
	<xs:annotation>
		<xs:documentation xml:lang="en">
			Set properties of MLPP service.
			Usage: http://server:9999/commands/ecss_mlpp_options_set.
			Implementation: hc_ecss_mlpp_options_set.erl.
			Git: git@git.eltex.loc:httpTerminal.git.
			Copyright (c) 2014, Eltex. All rights reserved.
    </xs:documentation>
	</xs:annotation>
	<xs:include schemaLocation="error.xsd"/>
	<xs:include schemaLocation="ecm_common.xsd"/>
	<!-- modeType -->
	<xs:simpleType name="modeType">
		<xs:restriction base="unionType">
			<xs:enumeration value="wait"/>
			<xs:enumeration value="force"/>
		</xs:restriction>
	</xs:simpleType>
	<!-- defaultPriorityType -->
	<xs:simpleType name="defaultPriorityType">
		<xs:restriction base="integerRangeType">
			<xs:minInclusive value="0"/>
			<xs:maxInclusive value="15"/>
		</xs:restriction>
	</xs:simpleType>
	<!-- queueLengthType -->
	<xs:simpleType name="queueLengthType">
		<xs:restriction base="integerRangeType">
			<xs:minInclusive value="2"/>
			<xs:maxInclusive value="3"/>
		</xs:restriction>
	</xs:simpleType>
	<!-- queueTimeType -->
	<xs:simpleType name="queueTimeType">
		<xs:restriction base="integerRangeType">
			<xs:minInclusive value="0"/>
			<xs:maxInclusive value="40"/>
		</xs:restriction>
	</xs:simpleType>
	<!-- ecssMLPPOptionsType-->
	<xs:complexType name="ecssMLPPOptionsType">
		<xs:complexContent>
			<xs:extension base="baseOptionsType">
				<xs:attribute name="default_priority" type="defaultPriorityType" use="optional"/>
				<xs:attribute name="priority" type="xs:string" use="optional"/>
				<xs:attribute name="enable" type="booleanType" use="optional"/>
				<xs:attribute name="mode" type="modeType" use="optional"/>
				<xs:attribute name="queue_length" type="queueLengthType" use="optional"/>
				<xs:attribute name="queue_time" type="queueTimeType" use="optional"/>
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>
	<!-- resultType-->
	<xs:complexType name="resultType">
		<xs:all>
			<xs:element name="domain_options" type="domainSetOutType" minOccurs="1"/>
		</xs:all>
	</xs:complexType>
	<!-- in-->
	<xs:element name="in">
		<xs:complexType>
			<xs:sequence>
				<xs:element name="request">
					<xs:complexType>
						<xs:all>
							<xs:element name="domain_options" type="domainSetInType"/>
						</xs:all>
					</xs:complexType>
				</xs:element>
			</xs:sequence>
		</xs:complexType>
	</xs:element>
	<!-- out -->
	<xs:element name="out">
		<xs:complexType>
			<xs:choice>
				<xs:element name="result" type="resultType"/>
				<xs:element name="error" type="errorType"/>
			</xs:choice>
		</xs:complexType>
	</xs:element>
</xs:schema>
XML
Namespase для поля "type" в теге "options" обязательно должен быть xs.

Пример 1:

Запрос: http://192.168.1.21:9999/commands/ecss_mlpp_options_set

<?xml version="1.0"?>
<in
    xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="hc_ecss_mlpp_options_set.xsd">
    <request>
        <domain_options>
            <system>
                <options xs:type="ecssMLPPOptionsType" queue_time="40" queue_length="2" mode="wait" enable="false"/>
            </system>
            <domain name="biysk.local">
                <options xs:type="ecssMLPPOptionsType" queue_time="25" mode="force" enable="false"/>
            </domain>
        </domain_options>
    </request>
</in>
XML

Ответ:

<?xml version="1.0"?>
<out
	xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="hc_ecss_mlpp_options_set.xsd">
	<result>
		<domain_options>
			<system>
				<success option="enable"/>
				<success option="mode"/>
				<success option="queue_length"/>
				<success option="queue_time"/>
			</system>
			<domain name="biysk.local">
				<success option="enable"/>
				<success option="mode"/>
				<success option="queue_time"/>
			</domain>
		</domain_options>
	</result>
</out>
XML

Пример 2:

Запрос: http://192.168.23.34:9999/commands/ecss_mlpp_options_set

<?xml version="1.0"?>
<in xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="hc_ecss_mlpp_options_set.xsd">
    <request>
        <domain_options>
            <system>
                <options xs:type="ecssMLPPOptionsType"/>
            </system>
            <domain name="biysk.local">
                <options xs:type="ecssMLPPOptionsType" queue_length="3"/>
            </domain>
        </domain_options>
    </request>
</in>
XML

Ответ:

<?xml version="1.0"?>
<out
	xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="hc_ecss_mlpp_options_set.xsd">
	<result>
		<domain_options>
			<system/>
			<domain name="biysk.local">
				<success option="queue_length"/>
			</domain>
		</domain_options>
	</result>
</out>
XML