Mgmt-Netconf
此内容尚不支持你的语言。
Resources Summary
Section titled “Resources Summary”| YANG Path | get/get-config | edit-config | rpc |
|---|---|---|---|
| /mgmt-interfaces/{name} | Y | merge | — |
| /mgmt-interfaces/{name}/address/{ip-prefix} | Y | merge, replace, create, delete | — |
| /show-interface-mgmt | — | — | Y |
Examples
Section titled “Examples”It’s not supported to do a ‘create’/‘replace’/‘delete’ operation on ‘mgmt-interfaces’ or ‘mgmt-interfaces/mgmt-interface’ container node.
This document provides examples of using NETCONF to manage management interfaces on network devices.
It includes examples of retrieving management interface configurations and modifying them.
Get Mgmt Configuration
Section titled “Get Mgmt Configuration”Request example to get current mgmt interface configuration via get-config
<filter type="subtree"> <top> <mgmt-interfaces> <mgmt-interface/> </mgmt-interfaces> </top></filter>Response example
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:c7801c02-0c5c-4515-b8dd-453fd1e105d4"> <data xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"> <top> <mgmt-interfaces xmlns="http://asterfusion.com/ns/yang/asternos-mgmt-interface"> <mgmt-interface> <name>eth0</name> <vrf-enable>false</vrf-enable> <address> <ip-prefix>192.168.122.42/24</ip-prefix> <gwaddr>192.168.122.1</gwaddr> </address> </mgmt-interface> </mgmt-interfaces> </top> </data></rpc-reply>Modify Mgmt Interface
Section titled “Modify Mgmt Interface”Use operation=“create” to add a new IP address to the management interface (this operation will remove old mgmt ip).
If you want to modify an mgmt ip’s gwaddr, use operation=“merge” instead.
Request example to create a new IP address on the management interface via edit-config
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:c7801c02-0c5c-4515-b8dd-453fd1e105d4"> <config><top> <mgmt-interfaces> <mgmt-interface> <name>eth0</name> <address operation="create"> <ip-prefix>192.168.122.42/24</ip-prefix> <gwaddr>192.168.122.1</gwaddr> </address> </mgmt-interface> </mgmt-interfaces> </top></config></rpc-reply>Response example
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:ee0561f1-8170-427c-a5f5-7c6ffbfc309d"> <ok/></rpc-reply>Get MGMT Interface via RPC show-interface-mgmt
Section titled “Get MGMT Interface via RPC show-interface-mgmt”Request example to retrieves the current management interface VRF status via show-interface-mgmt
<show-interface-mgmt/>Response example
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:8a94da11-87a0-4394-a6a9-aba2208ac361"> <data xmlns="http://asterfusion.com/ns/yang/asternos-mgmt-interface">MGMT_VRF_CONFIG is not present.
ManagementVRF : Disabled
MGMT_VRF_CONFIG is not present.
ManagementVRF : Disabled</data></rpc-reply>Properties Descriptions
Section titled “Properties Descriptions”Mgmt Interfaces
Section titled “Mgmt Interfaces”Tree Diagram
module: asternos-mgmt-interface +--rw mgmt-interfaces +--rw mgmt-interface* [name] +--rw name string +--rw address* [ip-prefix] | +--rw ip-prefix inet:ip-prefix | +--rw gwaddr? inet:ip-address-no-zone +--rw vrf-enable? booleanTable of Properties
| Name | Required | Type/Range | Description |
|---|---|---|---|
| mgmt-interfaces | M | Path-only node, has no configurable value. The mgmt-interfaces struct containing all attributes of mgmt-interfaces data set. | |
| mgmt-interface | M | Path-only node, has no configurable value. | |
| name | O | string | |
| address | M | Path-only node, has no configurable value. The type of ip-prefix must be same as the type of gw. | |
| ip-prefix | O | inet:ip-prefix | |
| gwaddr | O | inet:ip-address-no-zone | |
| vrf-enable | O | ”true" "false” | Default value: False |
Address
Section titled “Address”Tree Diagram
module: asternos-mgmt-interface +--rw mgmt-interfacesShow Interface Mgmt
Section titled “Show Interface Mgmt”Tree Diagram
module: asternos-mgmt-interface
rpcs: +---x show-interface-mgmt +---w input | +---w vrf? string +--ro output +--ro data? <anydata>Table of Properties
| Name | Required | Type/Range | Description |
|---|---|---|---|
| show-interface-mgmt | O | ||
| vrf | O | string | Management interface of vrf. |
| data | O | Display the management interface. |