< Home

Deleting a Specified Switch File

This section provides a sample of deleting a specified switch file.

Table 1 Deleting a specified switch file

Operation

XPATH

rpc

/huawei-device:delete-board-file

Data Requirements

Table 2 Deleting a specified switch file

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>
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >