跳转到内容
Ask AI

System-Netconf

此内容尚不支持你的语言。

YANG Pathget/get-configedit-configrpc
/save-config——Y
image-upgrade——Y
reboot——Y
reload——Y
reset——Y
show-image——Y

This chapter provides examples on how to use Netconf to manage System on AsterNOS devices.

Request example to retrieve system version information via rpc show-version. This command is used to reboot the system, you can add a delay parameter to postpone the system startup.

<reboot>
<delay>10<delay>
</reboot>

Response example

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:09044029-1970-45de-b5f4-a35d452381d6">
<ok/>
</rpc-reply>

Request example to save running configurations via rpc save-config.

<save-config/>

Response example

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:1a942816-c2bf-4068-b4ee-0c8d38540ec7">
<ok/>
</rpc-reply>

Request example to get images via rpc show-image.

<show-image/>

Response example

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:26dc04b5-6c97-4266-ba7d-a88dd41db957">
<current xmlns="http://asterfusion.com/ns/yang/asternos-ip">SONiC-OS-V6.1R004T006</current>
<next xmlns="http://asterfusion.com/ns/yang/asternos-ip">SONiC-OS-V6.1R004T006</next>
<available>SONiC-OS-V6.1R004T006</available>
<available>SONiC-OS-V6.1R004T005</available>
<available/>
</rpc-reply>

Request example to upgrade image via rpc image-update.

<image-upgrade>
<path>AsterNOS-V6.1R004T006-amd64.bin</path>
<save-config>false</save-config>
</image-upgrade>

Response example

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:1a942816-c2bf-4068-b4ee-0c8d38540ec7">
<ok/>
</rpc-reply>

Tree Diagram

module: asternos-system
rpcs:
+---x save-config

Table of Properties

NameRequiredType/RangeDescription
save-configO

Tree Diagram

module: asternos-system
rpcs:
+---x image-upgrade
+---w input
+---w path string
+---w save-config? boolean

Table of Properties

NameRequiredType/RangeDescription
image-upgradeO
pathMstringPath to the image file to upgrade.

Relative paths are resolved from the home directory of the admin user.
save-configO”true"
"false”
Save current config and apply them after upgrading.

If not set, discard all configuration and setup the system with default config.
Default value: True

Tree Diagram

module: asternos-system
rpcs:
+---x reboot
+---w input
+---w delay? uint32

Table of Properties

NameRequiredType/RangeDescription
rebootO
delayOintegerDelay before rebooting the system.
Default value: 0

Tree Diagram

module: asternos-system
rpcs:
+---x reload

Table of Properties

NameRequiredType/RangeDescription
reloadO

Tree Diagram

module: asternos-system
rpcs:
+---x reset
+---w input
+---w preserve-mgmt-intf? boolean

Table of Properties

NameRequiredType/RangeDescription
resetO
preserve-mgmt-intfO”true"
"false”
If true, don not reset management network interface.
Default value: False

Tree Diagram

module: asternos-system
rpcs:
+---x show-image
+--ro output
+--ro current? string
+--ro next? string
+--ro available* string

Table of Properties

NameRequiredType/RangeDescription
show-imageO
currentOstringCurrent image of system.
nextOstringImage after next boot.
availableOstringAvailable images that have installed and can be switched to.