System-Netconf
此内容尚不支持你的语言。
SYSTEM
Section titled “SYSTEM”Resources Summary
Section titled “Resources Summary”| YANG Path | get/get-config | edit-config | rpc |
|---|---|---|---|
| /save-config | — | — | Y |
| image-upgrade | — | — | Y |
| reboot | — | — | Y |
| reload | — | — | Y |
| reset | — | — | Y |
| show-image | — | — | Y |
Examples
Section titled “Examples”This chapter provides examples on how to use Netconf to manage System on AsterNOS devices.
Reboot System
Section titled “Reboot System”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>Save Running Configurations
Section titled “Save Running Configurations”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>Get Images
Section titled “Get Images”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>Upgrade Image
Section titled “Upgrade Image”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>Properties Descriptions
Section titled “Properties Descriptions”Save Config
Section titled “Save Config”Tree Diagram
module: asternos-system
rpcs: +---x save-configTable of Properties
| Name | Required | Type/Range | Description |
|---|---|---|---|
| save-config | O |
Image Upgrade
Section titled “Image Upgrade”Tree Diagram
module: asternos-system
rpcs: +---x image-upgrade +---w input +---w path string +---w save-config? booleanTable of Properties
| Name | Required | Type/Range | Description |
|---|---|---|---|
| image-upgrade | O | ||
| path | M | string | Path to the image file to upgrade. Relative paths are resolved from the home directory of the admin user. |
| save-config | O | ”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 |
Reboot
Section titled “Reboot”Tree Diagram
module: asternos-system
rpcs: +---x reboot +---w input +---w delay? uint32Table of Properties
| Name | Required | Type/Range | Description |
|---|---|---|---|
| reboot | O | ||
| delay | O | integer | Delay before rebooting the system. Default value: 0 |
Reload
Section titled “Reload”Tree Diagram
module: asternos-system
rpcs: +---x reloadTable of Properties
| Name | Required | Type/Range | Description |
|---|---|---|---|
| reload | O |
Tree Diagram
module: asternos-system
rpcs: +---x reset +---w input +---w preserve-mgmt-intf? booleanTable of Properties
| Name | Required | Type/Range | Description |
|---|---|---|---|
| reset | O | ||
| preserve-mgmt-intf | O | ”true" "false” | If true, don not reset management network interface. Default value: False |
Show Image
Section titled “Show Image”Tree Diagram
module: asternos-system
rpcs: +---x show-image +--ro output +--ro current? string +--ro next? string +--ro available* stringTable of Properties
| Name | Required | Type/Range | Description |
|---|---|---|---|
| show-image | O | ||
| current | O | string | Current image of system. |
| next | O | string | Image after next boot. |
| available | O | string | Available images that have installed and can be switched to. |