H3C Technologies H3C S6300 Series Switches User Manual

Page 275

Advertising
background image

262

Operation Description XML

example

lock

Locks the configuration data
made through NETCONF
sessions. The configuration data

can be changed by the

edit-config operation. Other
configuration data are not

limited by the lock operation.
This lock operation does not

lock configuration data made

through other protocols, for
example, SNMP.

To lock the configuration:

<rpc message-id="101"

xmlns="urn:ietf:params:xml:ns:netconf:ba
se:1.0">

<lock>

<target>

<running/>

</target>

</lock>

</rpc>

unlock

Unlocks the configuration, so
NETCONF sessions can change
device configuration.
When a NETCONF session is
terminated, the related locked

configuration is also unlocked.

To unlock the configuration:

<rpc message-id="101"

xmlns="urn:ietf:params:xml:ns:netconf:ba
se:1.0">

<unlock>

<target>

<running/>

</target>

</unlock>

</rpc>

get-sessions

Retrieves information about all
NETCONF sessions in the

system.

To retrieve information about all NETCONF sessions
in the system:

<rpc message-id="101"

xmlns="urn:ietf:params:xml:ns:netconf:ba
se:1.0">

<get-sessions/>

</rpc>

close-session

Terminates the NETCONF
session for the current user, to
unlock the configuration and

release the resources (for

example, memory) of this
session. This operation logs the

current user off the XML view.

To terminate the NETCONF session for the current
user:

<rpc message-id="101"
xmlns="urn:ietf:params:xml:ns:netconf:ba
se:1.0">

<close-session />

</rpc>

kill-session

Terminates the NETCONF
session for another user. This
operation cannot terminate the

NETCONF session for the

current user.

To terminate the NETCONF session with session-id 1:

<rpc message-id="101"

xmlns="urn:ietf:params:xml:ns:netconf:ba
se:1.0">

<kill-session>

<session-id>1</session-id>

</kill-session>

</rpc>

Advertising