Example For Saving The Configuration; Filtering Data - HP 5920 Configuration Manual

Table of Contents

Advertisement

<rpc-reply message-id="101"
xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<ok/>
</rpc-reply>

Example for saving the configuration

Network requirements
Save the current configuration to the configuration file my_config.cfg.
Configuration procedure
# Enter XML view.
<Sysname> xml
# Exchange capabilities.
<hello xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<capabilities>
<capability>
</capability>
</capabilities>
</hello>
# Save the configuration of the device to the configuration file my_config.cfg.
<?xml version="1.0" encoding="UTF-8"?>
<rpc message-id="101" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<save>
<file> my_config.cfg</file>
</save>
</rpc>
Verifying the configuration
If the client receives the following response, the save operation is successful:
<?xml version="1.0" encoding="UTF-8"?>
<rpc-reply message-id="101"
xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<ok/>
</rpc-reply>

Filtering data

You can define a filter with the <filter> element to filter information when you perform a get, get-bulk,
get-config, or get-bulk-config operation. Data filtering mechanisms include full match, regular expression
match, and conditional match.
Full match
You can specify an element value in an XML message to implement full match. If multiple element
values are provided, the system returns the data matching all the specified values.
# Copy the following text to the client to retrieve the configuration data of all interfaces in UP state:
urn:ietf:params:netconf:base:1.0
259

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

5900

Table of Contents