This section provides a sample of changing the enablement status of performance reporting using the replace method.
Operation |
XPATH |
---|---|
edit-config:replace |
/huawei-system-performance:pm-config |
Data requirement
Item |
Data |
Description |
---|---|---|
Server IP address |
10.1.1.1 |
The following packet is used to change the enablement status of performance reporting. |
Server port |
10031 |
|
Type of collected performance data |
performance-data |
|
Whether performance data collection is enabled |
false |
Request example
<?xml version='1.0' encoding='UTF-8'?> <rpc message-id="3" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"> <edit-config> <target> <running/> </target> <error-option>rollback-on-error</error-option> <config> <pm:pm-config xmlns:pm="urn:huawei:params:xml:ns:yang:huawei-system-performance" xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0" xc:operation="replace"> <pm:server-connection-parameters> <pm:connections> <pm:name>CloudManagerCollectConnection</pm:name> <pm:server-url>10.1.1.1</pm:server-url> <pm:server-port>10031</pm:server-port> <pm:collection-polices> <pm:collection-items>CloudManagerCollectPolicy</pm:collection-items> <pm:default-upload-interval>5</pm:default-upload-interval> </pm:collection-polices> </pm:connections> </pm:server-connection-parameters> <pm:collection-item-policy> <pm:policies> <pm:name>CloudManagerCollectPolicy</pm:name> <pm:data-collection-item> <pm:type>performance-data</pm:type> <pm:collection-enable>false</pm:collection-enable> <pm:item-collection-interval>5</pm:item-collection-interval> </pm:data-collection-item> </pm:policies> </pm:collection-item-policy> </pm:pm-config> </config> </edit-config> </rpc>
Response example
Sample of successful response
<?xml version='1.0' encoding='UTF-8'?> <rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="3"> <ok/> </rpc-reply>
Sample of failed response
<?xml version='1.0' encoding='UTF-8'?> <rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="4"> <rpc-error> <error-type>application</error-type> <error-tag>operation-failed</error-tag> <error-severity>error</error-severity> <error-message>parse rpc config error.</error-message> </rpc-error> </rpc-reply>