Дерево страниц
Перейти к концу метаданных
Переход к началу метаданных

Hc_ftp_cluster_options_info

Просмотр значений опций FTP подсистемы TTS уровня ноды и кластера.

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

cluster/core/<CLUSTER>/tts/ftp/properties/info

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

POST

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

http://host:port/commands/ftp_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="ftp_cluster_options_info">
  <xs:annotation>
    <xs:documentation xml:lang="en">
      Get FTP cluster options.
      Usage: http://server:9999/commands/ftp_cluster_options_info
          
      Copyright (c) 2015, Eltex. All rights reserved.
    </xs:documentation>
  </xs:annotation>

          
  <xs:include schemaLocation="error.xsd" />
  <xs:include schemaLocation="ecm_common.xsd" />
  <!-- Network port -->
  <xs:simpleType name="portType">
        <xs:restriction base="positiveIntegerType">
            <xs:minExclusive value="1"/>
            <xs:maxInclusive value="49151"/>
        </xs:restriction>
  </xs:simpleType>
  <!-- Options for TTS node -->
    <xs:complexType name="FtpClusterOptions">
        <xs:complexContent>
            <xs:extension base="baseOptionsType">
                <xs:attribute name="password" type="nonEmptyNormalizedStringType" use="optional" />
                <xs:attribute name="port" type="portType" use="optional" />
                <xs:attribute name="iface" 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="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/ftp_cluster_options_info

<?xml version="1.0" encoding="UTF-8"?>
<in>    
    <request>
        <nc_options cluster="core1"/>
    </request>
</in>

Код ответа:

200

Ответ:

<?xml version="1.0"?>
<out
    xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="hc_ftp_cluster_options_info.xsd">
    <result>
        <nc_options>
            <cluster name="core1">
                <options xs:type="FtpClusterOptions" port="21" password="cdr" iface="0.0.0.0"/>
            </cluster>
        </nc_options>
    </result>
</out>

Пример 2:

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

<?xml version="1.0" encoding="UTF-8"?>
<in>
  <request>
    <nc_options cluster="core1" node="core1@ecss1"/>
  </request>
</in>

Код ответа:

200

Ответ:

<?xml version="1.0"?>
<out
    xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="hc_ftp_cluster_options_info.xsd">
    <result>
        <nc_options>
            <cluster name="core1">
                <options xs:type="FtpClusterOptions"/>
            </cluster>
            <node name="core1@ecss1">
                <options xs:type="FtpClusterOptions" port="21" password="cdr" iface="0.0.0.0"/>
            </node>
        </nc_options>
    </result>
</out>

Hc_ftp_cluster_options_set

Установка значения опций FTP подсистемы TTS уровня ноды и кластера.

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

cluster/core/<CLUSTER>/tts/ftp/properties/set

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

POST

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

http://host:port/commands/ftp_cluster_options_set

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

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

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

<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" id="ftp_cluster_options_set">
    <xs:annotation>
        <xs:documentation xml:lang="en">
            Set ftp cluster options.
            Usage: http://server:9999/commands/ftp_cluster_options_set
          
            Copyright (c) 2015, Eltex. All rights reserved.
        </xs:documentation>
    </xs:annotation>

          
    <xs:include schemaLocation="error.xsd" />
    <xs:include schemaLocation="ecm_common.xsd" />
    <!-- Network port -->
    <xs:simpleType name="portType">
        <xs:restriction base="positiveIntegerType">
            <xs:minExclusive value="1"/>
            <xs:maxInclusive value="49151"/>
        </xs:restriction>
    </xs:simpleType>

          
    <xs:complexType name="FtpClusterOptions">
        <xs:complexContent>
            <xs:extension base="baseOptionsType">
                <xs:attribute name="password" type="nonEmptyNormalizedStringType" use="optional" />
                <xs:attribute name="port" type="portType" use="optional" />
                <xs:attribute name="iface" 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="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>

Пример:

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

<?xml version="1.0" encoding="UTF-8"?>
<in xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="hc_ftp_cluster_options_set.xsd">
  <request>
      <nc_options>
        <cluster name="core1">
            <options xs:type="FtpClusterOptions" iface="127.0.0.1" password="cdr" port="21"/>
        </cluster>
          <node name="core1@ecss1">
              <options xs:type="FtpClusterOptions" port="10021"/>
          </node>
    </nc_options>
  </request>
</in>

Код ответа:

200

Ответ:

<?xml version="1.0"?>
<out
    xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="hc_ftp_cluster_options_set.xsd">
    <result>
        <nc_options>
            <cluster name="core1">
                <success option="iface"/>
                <success option="password"/>
                <success option="port"/>
            </cluster>
            <node name="core1@ecss1">
                <success option="port"/>
            </node>
        </nc_options>
    </result>
</out>

Hc_ftp_cluster_options_clean

Сброс значений опций FTP подсистемы TTS уровня ноды и кластера.

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

cluster/core/<CLUSTER>/tts/ftp/properties/clean

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

POST

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

http://host:port/commands/ftp_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="ftp_cluster_options_clean">
  <xs:annotation>
    <xs:documentation xml:lang="en">
      Clean ftp cluster options.
      Usage: http://server:9999/commands/ftp_cluster_options_clean
          
      Copyright (c) 2015, 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/ftp_cluster_options_clean

<?xml version="1.0" encoding="UTF-8"?>
<in xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="hc_ftp_cluster_options_clean.xsd">
  <request>
    <nc_options>
      <cluster name="core1">
          <option name="iface"/>
          <option name="password"/>
          <option name="port"/>
      </cluster>
        <node name="core1@ecss1">
            <option name="port"/>
      </node>
    </nc_options>
  </request>
</in>

Код ответа:

200

Ответ:

<?xml version="1.0"?>
<out
    xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="hc_ftp_cluster_options_clean.xsd">
    <result>
        <nc_options>
            <cluster name="core1">
                <success option="iface"/>
                <success option="password"/>
                <success option="port"/>
            </cluster>
            <node name="core1@ecss1">
                <success option="port"/>
            </node>
        </nc_options>
    </result>
</out>
  • Нет меток