This section provides a sample of deleting a specified switch file.
Operation |
XPATH |
---|---|
rpc |
/huawei-device:delete-board-file |
Data Requirements
Item |
Data |
Description |
---|---|---|
File path |
flash:/default_ca.cer |
Specify the path of the file to be deleted to flash:/default_ca.cer. |
Request Example
<?xml version='1.0' encoding='UTF-8'?> <rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="0"> <dev:delete-board-file xmlns:dev="urn:huawei:params:xml:ns:yang:huawei-device"> <dev:file-name>flash:/default_ca.cer</dev:file-name> </dev:delete-board-file> </rpc>
Response Example
Sample of successful response
<?xml version='1.0' encoding='UTF-8'?> <rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="0"> <delete-board-file> <ret-code>2</ret-code> <ret-msg>Error: flash:/default_ca.cer cannot be deleted, because it may be a system file.</ret-msg> </delete-board-file> </rpc-reply>
Sample of failed response
<?xml version='1.0' encoding='UTF-8'?> <rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="0"> <rpc-error> <error-type>application</error-type> <error-tag>missing-attribute</error-tag> <error-severity>error</error-severity> <error-path/> <error-message>Get rpc operation name failed.</error-message> </rpc-error> </rpc-reply>