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

Hс_domain_radius_servers_info

Команда позволяет получить информацию о настройках RADIUS серверов на уровне домена.

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

/domain/<DOMAIN>/aaa/radius/info

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

POST

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

http://host:port/commands/domain_radius_servers_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 domain RADIUS servers settings.
            Usage: http://server:9999/commands/domain_radius_servers_info.
            Implementation: hc_domain_radius_servers_info.erl.
            Git: git@git.eltex.loc:httpTerminal.git.
            Copyright (c) 2015, Eltex. All rights reserved.
        </xs:documentation>
    </xs:annotation>
    <xs:include schemaLocation="error.xsd"/>
    <xs:include schemaLocation="ecm_common.xsd"/>
    <xs:complexType name="radiusOptionsType">
        <xs:complexContent>
            <xs:extension base="baseOptionsType">
                <xs:attribute name="servers" type="xs:string" use="optional">
                    <xs:annotation>
                        <xs:documentation xml:lang="en">
                            The list of the RADIUS servers' settings splitted by semicolon.
                            id - RADIUS server id;
                            host - IP or host name of server;
                            port - port number [1—49151];
                            secret - RADIUS server security key;
                            retry-count - number of repeats when no answer from RADIUS server (>= 0);
                            retry-timeout - timeout for RADIUS server response (> 50 ms);
                            idle-timeout  - pause for sending requests to unaccessible RADIUS server (>= 0 ms).

                            Sample:  id:master,host:127.0.0.1,port:1812,secret:test123,retry-count:3,retry-timeout:1000,idle-timeout:60000;
                            id:backup,host:127.0.0.1,port:1813,secret:test123,retry-count:3,retry-timeout:1000,idle-timeout:60000;
                            id:backup,host:::1,port:1813,secret:test123,retry-count:3,retry-timeout:1000,idle-timeout:60000,ip-family:inet6
                        </xs:documentation>
                    </xs:annotation>
                </xs:attribute>
            </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>

Пример

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

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

Код ответа:

200

Ответ:

<?xml version="1.0"?>
<out
    xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="domain_radius_servers_info.xsd">
    <result>
        <domain_options>
            <system>
                <options xs:type="radiusOptionsType"/>
            </system>
            <domain name="biysk.local">
                <options xs:type="radiusOptionsType" servers="id:master,host:192.168.2.12,port:1813,secret:eltex_secret2,retry-count:3,retry-timeout:100,idle-timeout:5000;id:backup,host:192.168.2.15,port:1813,secret:eltex_secret,retry-count:3,retry-timeout:1000,idle-timeout:0"/>
            </domain>
        </domain_options>
    </result>
</out>

Hс_domain_radius_servers_set

Изменение настроек RADIUS серверов на уровне домена (включая создание новых RADIUS серверов).

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

/domain/<DOMAIN>/aaa/radius/set

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

POST

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

http://host:port/commands/domain_radius_servers_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 domain RADIUS servers settings.
            Usage: http://server:9999/commands/domain_radius_servers_set.
            Implementation: hc_domain_radius_servers_set.erl.
            Git: git@git.eltex.loc:httpTerminal.git.
            Copyright (c) 2015, Eltex. All rights reserved.
        </xs:documentation>
    </xs:annotation>
    <xs:include schemaLocation="error.xsd"/>
    <xs:include schemaLocation="ecm_common.xsd"/>

    <xs:complexType name="radiusOptionsType">
        <xs:complexContent>
            <xs:extension base="baseOptionsType">
                <xs:attribute name="servers" type="xs:string" use="optional">
                    <xs:annotation>
                        <xs:documentation xml:lang="en">
                            The list of the RADIUS servers' settings splitted by semicolon.
                            id - RADIUS server id;
                            host - IP or host name of server;
                            port - port number [1—49151];
                            secret - RADIUS server security key;
                            retry-count - number of repeats when no answer from RADIUS server (>= 0);
                            retry-timeout - timeout for RADIUS server response (> 50 ms);
                            idle-timeout  - pause for sending requests to unaccessible RADIUS server (>= 0 ms).

                            Sample:  id:master,host:127.0.0.1,port:1812,secret:test123,retry-count:3,retry-timeout:1000,idle-timeout:60000;
                            id:backup,host:127.0.0.1,port:1813,secret:test123,retry-count:3,retry-timeout:1000,idle-timeout:60000;
                            id:backup,host:::1,port:1813,secret:test123,retry-count:3,retry-timeout:1000,idle-timeout:60000,ip-family:inet6
                        </xs:documentation>
                    </xs:annotation>
                </xs:attribute>
            </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" minOccurs="1" maxOccurs="1"/>
                <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/domain_radius_servers_set

<?xml version="1.0"?>
<in xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="domain_radius_servers_set.xsd">
  <request>
    <domain_options>
      <system>
        <options xs:type="radiusOptionsType"/>
      </system>
      <domain name="biysk.local">
        <options xs:type="radiusOptionsType" servers="id:master,host:192.168.2.12,port:1813,secret:eltex_secret2,retry-count:3,retry-timeout:100,idle-timeout:5000;id:backup,host:192.168.2.15,port:1813,secret:eltex_secret,retry-count:3,retry-timeout:1000,idle-timeout:0"/>
      </domain>
    </domain_options>
  </request>
</in>

Код ответа:

200

Ответ:

<?xml version="1.0"?>
<out
    xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="domain_radius_servers_set.xsd">
    <result>
        <domain_options>
            <system/>
            <domain name="biysk.local">
                <success option="servers"/>
            </domain>
        </domain_options>
    </result>
</out>
  • Нет меток