< Home

Viewing the Switch File List

This section provides a sample of viewing the switch file list.

Table 1 Viewing the switch file list

Operation

XPATH

rpc

/huawei-device:get-board-file-info

Data Requirements

Table 2 Viewing the switch file list

Item

Data

Description

File path

flash:/security

Specifies the file path as flash:/security.

Request Example

<?xml version='1.0' encoding='UTF-8'?>
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="0">
	<dev:get-board-file-info xmlns:dev="urn:huawei:params:xml:ns:yang:huawei-device">
		<dev:file-path>flash:/security</dev:file-path> 
	</dev:get-board-file-info>
</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">
  <get-board-file-info xmlns="urn:huawei:params:xml:ns:yang:huawei-device">
    <file>
      <file-name-or-path>flash:/security/default_ca.cer</file-name-or-path>
      <size>13432</size>
      <modified-time>2019-03-01T10:20:36Z</modified-time>
      <isdirectory>false</isdirectory>
    </file>
    <file>
      <file-name-or-path>flash:/security/houp_root.cer</file-name-or-path>
      <size>1360</size>
      <modified-time>2019-02-20T15:45:46Z</modified-time>
      <isdirectory>false</isdirectory>
    </file>
  </get-board-file-info>
</rpc-reply>

Sample of failed response

# When file-path does not exist on the switch, the following information is displayed.

<?xml version='1.0' encoding='UTF-8'?>
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="0">
  <get-board-file-info xmlns="urn:huawei:params:xml:ns:yang:huawei-device"/>
</rpc-reply>
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >