This section provides a sample of configuring the eMDI function using the edit-config method.
Operation |
XPATH |
---|---|
edit-config:config |
/emdi:emdi/emdi:emdi-enables/emdi:emdi-enable/emdi:emdi-instances/emdi:emdi-instance |
RPC |
/huawei-emdi:flow-switch |
Item |
Data |
Description |
---|---|---|
emdi-enable |
enable |
Enable eMDI and display the eMDI view. |
emdi-instance-id |
11 |
Create an eMDI instance and display the eMDI instance view. |
source-ip-address |
10.10.10.10 |
Set the source IP address of a target flow. |
destination-ip-address |
10.10.10.20 |
Set the destination IP address of a target flow. |
ip-protocol-id |
6 |
Set the protocol type of a target flow. |
source-port |
65535 |
Set the source port number of a target flow. |
destination-port |
65535 |
Set the destination port number of a target flow. |
uplr-threshold |
100000 |
Set the alarm threshold of the upstream TCP packet loss rate. |
dplr-threshold |
100000 |
Set the alarm threshold of the downstream TCP packet loss rate. |
duration |
300 |
Set the lifetime of the eMDI instance. |
monitor-period |
10 |
Set an eMDI monitoring interval. |
auto-start |
true |
Starts the eMDI instance. |
Request Example
<?xml version="1.0" encoding="utf-8"?> <rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="14"> <edit-config> <target> <running/> </target> <config> <emdi:emdi xmlns:emdi="urn:huawei:yang:huawei-emdi"> <emdi:emdi-enables> <emdi:emdi-enable> <emdi:emdi-enable>enable</emdi:emdi-enable> <emdi:emdi-instances> <emdi:emdi-instance> <emdi:emdi-instance-id>11</emdi:emdi-instance-id> <emdi:monitor-period>second-10s</emdi:monitor-period> <emdi:uplr-threshold>100000</emdi:uplr-threshold> <emdi:dplr-threshold>100000</emdi:dplr-threshold> <emdi:source-ip-address>10.10.10.10</emdi:source-ip-address> <emdi:destination-ip-address>10.10.10.20</emdi:destination-ip-address> <emdi:ip-protocol-id>6</emdi:ip-protocol-id> <emdi:source-port>65535</emdi:source-port> <emdi:destination-port>65535</emdi:destination-port> <emdi:duration>300</emdi:duration> <emdi:auto-start>true</emdi:auto-start> </emdi:emdi-instance> </emdi:emdi-instances> </emdi:emdi-enable> </emdi:emdi-enables> </emdi:emdi> </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="14"> <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="14"> <rpc-error> <error-path>/huawei-emdi:flow-switch/instance-id/huawei-emdi:flow-switch/instance-id> <error-message>error-message>Leafref "/emdi/emdi-enables/emdi-enable/emdi-instances/emdi-instance/emdi-instance-id" of value "12" points to a non-existing leaf.</error-message> </rpc-error> </rpc-reply>
Item |
Data |
Description |
---|---|---|
instance-id |
11 |
Set the ID of the eMDI instance. |
start |
[spaces] |
Start the eMDI instance. Spaces indicate to start an eMDI instance. |
Start Request Example
<?xml version="1.0" encoding="utf-8"?> <rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="14"> <emdi:flow-switch xmlns:emdi="urn:huawei:yang:huawei-emdi"> <emdi:instance-id>11</emdi:instance-id> <emdi:start> <emdi:start> </emdi:flow-switch> </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="14"> <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="14"> <rpc-error> <error-path>/huawei-emdi:flow-switch/instance-id/huawei-emdi:flow-switch/instance-id> <error-message>error-message>Leafref "/emdi/emdi-enables/emdi-enable/emdi-instances/emdi-instance/emdi-instance-id" of value "12" points to a non-existing leaf.</error-message> </rpc-error> </rpc-reply>
Item |
Data |
Description |
---|---|---|
instance-id |
11 |
Specify the ID of the eMDI instance. |
Deletion Request Example
<?xml version="1.0" encoding="utf-8"?> <rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="14"> <edit-config> <target> <running/> </target> <config> <emdi:emdi xmlns:emdi="urn:huawei:yang:huawei-emdi"> <emdi:emdi-enables> <emdi:emdi-enable> <emdi:emdi-enable>enable</emdi:emdi-enable> <emdi:emdi-instances> <emdi:emdi-instance nc:operation="delete" xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0"> <emdi:emdi-instance-id>11</emdi:emdi-instance-id> </emdi:emdi-instance> <emdi:emdi-instance nc:operation="delete" xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0"> </emdi:emdi-instances> </emdi:emdi-enable> </emdi:emdi-enables> </emdi:emdi> </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="14"> <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="14"> <rpc-error> <error-path>/huawei-emdi:flow-switch/instance-id/huawei-emdi:flow-switch/instance-id> <error-message>error-message>Leafref "/emdi/emdi-enables/emdi-enable/emdi-instances/emdi-instance/emdi-instance-id" of value "12" points to a non-existing leaf.</error-message> </rpc-error> </rpc-reply>