Hc_snmp_agent_system_options_clean
Команда сброса настроек подсистемы SNMP на уровне кластера медиатора.
Аналог команды в CoCon:
cluster/mediator/<MD>/snmp/agent/properties/clean
Метод HTTP-запроса:
POST
Шаблон HTTP-запроса:
http://host:port/commands/snmp_agent_system_options_clean
Код HTTP-ответа:
- 200 – в случае успеха;
- 404 – в случае ошибки.
XSD-схема XML-запроса/ответа:
<?xml version="1.0" encoding="UTF-8"?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xs:annotation> <xs:documentation xml:lang="en"> Clean cluster options of snmp agent. Usage: http://server:9999/commands/snmp_agent_system_options_clean </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="cluster_options" type="clusterCleanInType"/> </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="cluster_options" type="clusterCleanOutType"/> </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/snmp_agent_system_options_clean
<?xml version="1.0" encoding="UTF-8"?> <in xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="snmp_agent_system_options_clean.xsd"> <request> <cluster_options> <cluster name="md1"> <option name="snmp_v2c_community"/> <option name="snmp_v2c_enabled"/> <option name="snmp_v3_auth_priv"/> <option name="snmp_v3_enabled"/> </cluster> </cluster_options> </request> </in>
Ответ: 200
<?xml version="1.0"?> <out xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="snmp_agent_system_options_clean.xsd"> <result> <cluster_options> <cluster name="md1"> <success option="snmp_v3_enabled"/> <success option="snmp_v3_auth_priv"/> <success option="snmp_v2c_enabled"/> <success option="snmp_v2c_community"/> </cluster> </cluster_options> </result> </out>
Hc_snmp_agent_system_options_info
Команда просмотра настоек подсистемы SNMP на уровне кластера медиатора.
Аналог команды в CoCon:
cluster/mediator/<MD>/snmp/agent/properties/info
Метод HTTP-запроса:
POST
Шаблон HTTP-запроса:
http://host:port/commands/snmp_agent_system_options_info
Код HTTP-ответа:
- 200 – в случае успеха;
- 404 – в случае ошибки.
XSD-схема XML-запроса/ответа:
<?xml version="1.0" encoding="UTF-8"?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xs:annotation> <xs:documentation xml:lang="en"> Get cluster options of snmp agent. Usage: http://server:9999/commands/snmp_agent_system_options_info </xs:documentation> </xs:annotation> <xs:include schemaLocation="error.xsd" /> <xs:include schemaLocation="ecm_common.xsd" /> <!-- snmpAgentClusterOptionsType --> <xs:complexType name="snmpAgentClusterOptionsType"> <xs:complexContent> <xs:extension base="baseOptionsType"> <xs:attribute name="snmp_v2c_community" type="nonEmptyNormalizedStringType"/> <xs:attribute name="snmp_v2c_enabled" type="booleanType"/> <xs:attribute name="snmp_v3_auth_priv" type="nonEmptyNormalizedStringType"/> <xs:attribute name="snmp_v3_enabled" type="booleanType"/> </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="cluster_options" type="clusterInfoInType"/> </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="cluster_options" type="clusterInfoOutType"/> </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/snmp_agent_system_options_info
<?xml version="1.0" encoding="UTF-8"?> <in> <request> <cluster_options cluster="md1"/> </request> </in>
Код ответа:
200
Ответ:
<?xml version="1.0"?> <out xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="snmp_agent_system_options_info.xsd"> <result> <cluster_options> <cluster name="md1"> <options xs:type="snmpAgentClusterOptionsType" snmp_v2c_community="none" snmp_v2c_enabled="false" snmp_v3_auth_priv="none" snmp_v3_enabled="false"/> </cluster> </cluster_options> </result> </out>
Hc_snmp_agent_system_options_set
Команда изменения настроек подсистемы SNMP на уровне кластера медиатора.
Аналог команды в CoCon:
cluster/mediator/<MD>/snmp/agent/properties/set
Метод HTTP-запроса:
POST
Шаблон HTTP-запроса:
http://host:port/commands/snmp_agent_system_options_set
Код HTTP-ответа:
- 200 – в случае успеха;
- 404 – в случае ошибки.
XSD-схема XML-запроса/ответа:
<?xml version="1.0" encoding="UTF-8"?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xs:annotation> <xs:documentation xml:lang="en"> Set cluster options of snmp agent. Usage: http://server:9999/commands/snmp_agent_system_options_set </xs:documentation> </xs:annotation> <xs:include schemaLocation="error.xsd" /> <xs:include schemaLocation="ecm_common.xsd" /> <!-- snmpAgentClusterOptionsType --> <xs:complexType name="snmpAgentClusterOptionsType"> <xs:complexContent> <xs:extension base="baseOptionsType"> <xs:attribute name="snmp_v2c_community" type="nonEmptyNormalizedStringType"/> <xs:attribute name="snmp_v2c_enabled" type="booleanType"/> <xs:attribute name="snmp_v3_auth_priv" type="nonEmptyNormalizedStringType"/> <xs:attribute name="snmp_v3_enabled" type="booleanType"/> </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="cluster_options" type="clusterSetInType"/> </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="cluster_options" type="clusterSetOutType"/> </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/snmp_agent_system__options_set
<?xml version="1.0"?> <in xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="snmp_agent_system_options_set.xsd"> <request> <cluster_options> <cluster name="md1"> <options snmp_v2c_community="none" snmp_v2c_enabled="false" snmp_v3_auth_priv="none" snmp_v3_enabled="false" xs:type="snmpAgentClusterOptionsType"/> </cluster> </cluster_options> </request> </in>
Ответ:200
<?xml version="1.0"?> <out xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="snmp_agent_system_options_set.xsd"> <result> <cluster_options> <cluster name="md1"> <success option="snmp_v3_enabled"/> <success option="snmp_v3_auth_priv"/> <success option="snmp_v2c_enabled"/> <success option="snmp_v2c_community"/> </cluster> </cluster_options> </result> </out>
Добавить комментарий