Hc_backup_restore_domain
Команда восстанавливает настройки домена (из формата base64).
Аналог команды в CoCon:
domain/<DOMAIN>/backup/restore
Метод HTTP-запроса:
POST
Шаблон HTTP-запроса:
http://host:port/commands/backup_restore_domain
Код HTTP-ответа:
- 200 – в случае успеха;
- 404 – в случае ошибки.
XSD-схема XML-файла с запросом/ответом hc_backup_restore_domain.xsd:
<?xml version="1.0" encoding="UTF-8"?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"> <xs:include schemaLocation="error.xsd"/> <!-- in --> <xs:element name="in"> <xs:complexType> <xs:choice> <xs:element name="backup"> <xs:complexType> <xs:simpleContent> <xs:extension base="xs:string"> <xs:attribute name="storage" type="xs:string" use="required"/> <xs:attribute name="domain" type="xs:string" use="required"/> </xs:extension> </xs:simpleContent> </xs:complexType> </xs:element> </xs:choice> </xs:complexType> </xs:element> <!-- out --> <xs:element name="out"> <xs:complexType> <xs:choice> <xs:element name="error" type="errorType" /> </xs:choice> </xs:complexType> </xs:element> </xs:schema>
Пример:
Запрос: http://192.168.1.21:9999/commands/backup_restore_domain
<?xml version="1.0" encoding="UTF-8"?> <in xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="hc_backup_restore_domain.xsd"> <backup storage="ds1@ecss1" domain="test.domain">g2gFZAAQcnRvcC1leHBvcnQtZGF ... /KQL0ZhvwlhpBicYDC6otx+mQ0Ecb8KguJSB3ueSMqZxABbh8uPvjf/wNflcoU</backup> </in>
Ответ: 204
Hc_backup_restore
Команда восстанавливает настройки системы (из формата base64).
Аналог команды в CoCon:
cluster/storage/<STORAGE>/backup/restore
Метод HTTP-запроса:
POST
Шаблон HTTP-запроса:
http://host:port/commands/backup_restore
Код HTTP-ответа:
- 204 – в случае успеха;
- 404 – в случае ошибки.
XSD-схема XML-файла с запросом/ответом hc_backup_restore.xsd:
<?xml version="1.0" encoding="UTF-8"?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"> <xs:include schemaLocation="error.xsd"/> <!-- in --> <xs:element name="in"> <xs:complexType> <xs:choice> <xs:element name="backup"> <xs:complexType> <xs:simpleContent> <xs:extension base="xs:string"> <xs:attribute name="storage" type="xs:string" use="required"/> </xs:extension> </xs:simpleContent> </xs:complexType> </xs:element> </xs:choice> </xs:complexType> </xs:element> <!-- out --> <xs:element name="out"> <xs:complexType> <xs:choice> <xs:element name="error" type="errorType" /> </xs:choice> </xs:complexType> </xs:element> </xs:schema>
Пример:
Запрос: http://192.168.1.21:9999/commands/backup_restore:
<?xml version="1.0" encoding="UTF-8"?> <in xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="hc_backup_restore.xsd"> <backup storage="ds1@ecss1">H4sIAAAAAAAAA+ ... GWf9vQv+P0f8hL/0fAAAAEuii/wN5fQCUe7BCAHIRAA==</backup> </in>
Ответ: 204
Hc_ backup_store_domain
Команда возвращает настройки домена (в формате base64).
Аналог команды в CoCon:
domain/<DOMAIN>/backup/store
Метод HTTP-запроса:
POST
Шаблон HTTP-запроса:
http://host:port/commands/store_domain
Код HTTP-ответа:
- 200 – в случае успеха;
- 404 – в случае ошибки.
XSD-схема XML-файла с ответом hc_backup_store_domain.xsd:
<?xml version="1.0" encoding="UTF-8"?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"> <xs:include schemaLocation="error.xsd"/> <!-- in --> <xs:element name="in"> <xs:complexType> <xs:choice> <xs:element name="store"> <xs:complexType> <xs:attribute name="storage" type="xs:string" use="required"/> <xs:attribute name="domain" type="xs:string" use="required"/> </xs:complexType> </xs:element> </xs:choice> </xs:complexType> </xs:element> <!-- out --> <xs:element name="out"> <xs:complexType> <xs:choice> <xs:element name="response"> <xs:complexType> <xs:choice> <xs:element name="backup"> <xs:complexType> <xs:simpleContent> <xs:extension base="xs:string"> <xs:attribute name="storage" type="xs:string" use="required"/> <xs:attribute name="domain" type="xs:string" use="required"/> </xs:extension> </xs:simpleContent> </xs:complexType> </xs:element> </xs:choice> </xs:complexType> </xs:element> <xs:element name="error" type="errorType" /> </xs:choice> </xs:complexType> </xs:element> </xs:schema>
Пример:
Запрос: http://192.168.1.21:9999/commands/backup_store_domain
<?xml version="1.0" encoding="UTF-8"?> <in xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="hc_backup_store_domain.xsd"> <store storage="ds1@ecss1" domain="test.domain"/> </in>
Ответ: 200
<?xml version="1.0"?> <out xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="hc_backup_store_domain.xsd"> <response> <backup storage="ds1@ecss1" domain="test.domain">g2gFZAAQcnRvcC1leHBvcnQtZGF ... /KQL0ZhvwlhpBicYDC6otx+mQ0Ecb8KguJSB3ueSMqZxABbh8uPvjf/wNflcoU</backup> </response> </out>
Hc_backup_store
Команда возвращает настройки системы (в формате base64).
Аналог команды в CoCon:
cluster/storage/<STORAGE>/backup/store
Метод HTTP-запроса:
POST
Шаблон HTTP-запроса:
http://host:port/commands/backup_store
Код HTTP-ответа:
- 200 – в случае успеха;
- 404 – в случае ошибки.
XSD-схема XML-файла с запросом/ответом hc_backup_store.xsd:
<?xml version="1.0" encoding="UTF-8"?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"> <xs:include schemaLocation="error.xsd"/> <!-- in --> <xs:element name="in"> <xs:complexType> <xs:choice> <xs:element name="store"> <xs:complexType> <xs:attribute name="storage" type="xs:string" use="required"/> </xs:complexType> </xs:element> </xs:choice> </xs:complexType> </xs:element> <!-- out --> <xs:element name="out"> <xs:complexType> <xs:choice> <xs:element name="response"> <xs:complexType> <xs:choice> <xs:element name="backup"> <xs:complexType> <xs:simpleContent> <xs:extension base="xs:string"> <xs:attribute name="storage" type="xs:string" use="required"/> </xs:extension> </xs:simpleContent> </xs:complexType> </xs:element> </xs:choice> </xs:complexType> </xs:element> <xs:element name="error" type="errorType" /> </xs:choice> </xs:complexType> </xs:element> </xs:schema>
Пример:
Запрос: http://192.168.1.21:9999/commands/backup_store
<?xml version="1.0" encoding="UTF-8"?> <in xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="hc_backup_store.xsd"> <store storage="ds1@ecss1"/> </in>
Ответ: 200
<?xml version="1.0"?> <out xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="hc_backup_store.xsd"> <response> <backup storage="ds1@ecss1">H4sIAAAAAAAAA+ ... GWf9vQv+P0f8hL/0fAAAAEuii/wN5fQCUe7BCAHIRAA==</backup> </response> </out>
Добавить комментарий