Hc_system_geo_options_clean

Команда сброса настроек ГЕО-резерва.

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

system/geo-backup/properties/clean

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

POST

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

http://host:port/commands/system_geo_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 system geo-backup options.
            Usage: http://server:9999/commands/system_geo_options_clean.
        </xs:documentation>
    </xs:annotation>
    <xs:include schemaLocation="error.xsd"/>
    <xs:include schemaLocation="ecm_common.xsd"/>

    <!-- geoSystemOptionsType -->
    <xs:complexType name="geoSystemOptionsType">
        <xs:complexContent>
            <xs:extension base="baseOptionsType">
                <xs:attribute name="slave_sites" type="stringType">
                    <xs:annotation>
                        <xs:documentation xml:lang="en">
                            usage:
                            site1;site2;site3
                        </xs:documentation>
                    </xs:annotation>
                </xs:attribute>
                <xs:attribute name="enabled" type="booleanType"/>
                <xs:attribute name="site" type="stringType"/>
                <xs:attribute name="sync_timeout" type="integerType"/>
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>

    <!-- in -->
    <xs:element name="in">
        <xs:complexType>
            <xs:all>
                <xs:element name="request">
                    <xs:complexType>
                        <xs:all>
                            <xs:element name="system_options" type="systemCleanInType"/>
                        </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">
                    <xs:complexType>
                        <xs:all>
                            <xs:element name="system_options" type="systemCleanOutType"/>
                        </xs:all>
                    </xs:complexType>
                </xs:element>
                <xs:element name="error" type="errorType" />
            </xs:choice>
        </xs:complexType>
    </xs:element>
</xs:schema>
CODE

Пример:

Запрос:

http://192.168.1.21:9999/commands/system_geo_options_clean

<in xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="system_geo_options_set.xsd">
    <request>
        <system_options>
            <system>
                <option name="enabled"/>
                <option name="site"/>
                <option name="slave_sites"/>
                <option name="sync_timeout"/>
            </system>
        </system_options>
    </request>
</in>
CODE

Ответ: 200

<?xml version="1.0"?>
<out
    xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="system_geo_options_clean.xsd">
    <result>
        <system_options>
            <system>
                <success option="sync_timeout"/>
                <success option="slave_sites"/>
                <success option="site"/>
                <success option="enabled"/>
            </system>
        </system_options>
    </result>
</out>
CODE

Hc_system_geo_options_info

Команда просмотра настроек ГЕО-резерва.

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

system/geo-backup/properties/info

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

POST

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

http://host:port/commands/system_geo_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 system geo-backup options.
            Usage: http://server:9999/commands/system_geo_options_info.
        </xs:documentation>
    </xs:annotation>
    <xs:include schemaLocation="error.xsd"/>
    <xs:include schemaLocation="ecm_common.xsd"/>

    <!-- geoSystemOptionsType -->
    <xs:complexType name="geoSystemOptionsType">
        <xs:complexContent>
            <xs:extension base="baseOptionsType">
                <xs:attribute name="slave_sites" type="stringType">
                    <xs:annotation>
                        <xs:documentation xml:lang="en">
                            usage:
                                site1;site2;site3
                        </xs:documentation>
                    </xs:annotation>
                </xs:attribute>
                <xs:attribute name="enabled" type="booleanType"/>
                <xs:attribute name="site" type="stringType"/>
                <xs:attribute name="sync_timeout" type="integerType"/>
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>

    <!-- in -->
    <xs:element name="in">
        <xs:complexType>
            <xs:all>
                <xs:element name="request">
                    <xs:complexType>
                        <xs:all>
                            <xs:element name="system_options" type="systemInfoInType"/>
                        </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">
                    <xs:complexType>
                        <xs:all>
                            <xs:element name="system_options" type="systemInfoOutType"/>
                        </xs:all>
                    </xs:complexType>
                </xs:element>
                <xs:element name="error" type="errorType"/>
            </xs:choice>
        </xs:complexType>
    </xs:element>
</xs:schema>


XML

Пример:

Запрос:

http://192.168.1.21:9999/commands/system_geo_options_info

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

Ответ: 200

<?xml version="1.0"?>
<out
    xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="system_geo_options_info.xsd">
    <result>
        <system_options>
            <system>
                <options xs:type="geoSystemOptionsType" enabled="false" site="ecss10" slave_sites="" sync_timeout="3600000"/>
            </system>
        </system_options>
    </result>
</out>
CODE

Hc_system_geo_options_set

Команда изменения настроек ГЕО-резерва.

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

system/geo-backup/properties/set

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

POST

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

http://host:port/commands/system_geo_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 system geo-backup options.
            Usage: http://server:9999/commands/geo_system_options_set.
        </xs:documentation>
    </xs:annotation>
    <xs:include schemaLocation="error.xsd"/>
    <xs:include schemaLocation="ecm_common.xsd"/>

    <!-- geoSystemOptionsType -->
    <xs:complexType name="geoSystemOptionsType">
        <xs:complexContent>
            <xs:extension base="baseOptionsType">
                <xs:attribute name="slave_sites" type="stringType">
                    <xs:annotation>
                        <xs:documentation xml:lang="en">
                            usage:
                                site1;site2;site3
                        </xs:documentation>
                    </xs:annotation>
                </xs:attribute>
                <xs:attribute name="enabled" type="booleanType"/>
                <xs:attribute name="site" type="stringType"/>
                <xs:attribute name="sync_timeout" type="integerType"/>
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>

    <!-- in -->
    <xs:element name="in">
        <xs:complexType>
            <xs:all>
                <xs:element name="request">
                    <xs:complexType>
                        <xs:all>
                            <xs:element name="system_options" type="systemSetInType"/>
                        </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">
                    <xs:complexType>
                        <xs:all>
                            <xs:element name="system_options" type="systemSetOutType"/>
                        </xs:all>
                    </xs:complexType>
                </xs:element>
                <xs:element name="error" type="errorType" />
            </xs:choice>
        </xs:complexType>
    </xs:element>
</xs:schema>
CODE

Пример:

Запрос:

http://192.168.1.21:9999/commands/system_geo_options_set

<?xml version="1.0"?>
<in xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="system_geo_options_set.xsd">
    <request>
        <system_options>
            <system>
                <options enabled="false" site="ecss10" slave_sites="site1;site2" sync_timeout="1000000" xs:type="geoSystemOptionsType"/>
            </system>
        </system_options>
    </request>
</in>
CODE

Ответ: 200

<?xml version="1.0"?>
<out
    xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="system_geo_options_set.xsd">
    <result>
        <system_options>
            <system>
                <success option="sync_timeout"/>
                <success option="slave_sites"/>
                <success option="site"/>
                <success option="enabled"/>
            </system>
        </system_options>
    </result>
</out>
CODE