使用 OpenDaylight REST 添加流时出错 API

Error while adding flow using OpenDaylight REST API

我有一个 OpenDaylight 控制器设置为 OpenStack 云中的机制驱动程序。安装是在一体机虚拟机中使用 DevStack 完成的。

一切正常。我的 OpenStack 云中有两个虚拟机,它们可以相互 ping 通。然后我想向我的 Open vSwitch 添加一个新流,我有以下错误:

curl -u admin:admin -H 'Content-Type: application/yang.data+xml' -X PUT -d @flow_data.xml http://192.168.100.100:8181/restconf/config/opendaylight-inventory:nodes/node/openflow:1/table/234/flow/100770 | python -m json.tool
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  1347    0   638  100   709  42078  46761 --:--:-- --:--:-- --:--:-- 50642
{
    "errors": {
        "error": [
            {
                "error-info": "Data from case (urn:opendaylight:flow:inventory?revision=2013-08-19)output-action-case are specified but other data from case (urn:opendaylight:flow:inventory?revision=2013-08-19)drop-action-case were specified earlier. Data aren't from the same case.",
                "error-message": "Error parsing input: Data from case (urn:opendaylight:flow:inventory?revision=2013-08-19)output-action-case are specified but other data from case (urn:opendaylight:flow:inventory?revision=2013-08-19)drop-action-case were specified earlier. Data aren't from the same case.",
                "error-tag": "malformed-message",
                "error-type": "protocol"
            }
        ]
    }
}

flow_data.xml :

<?xml version="1.0"?>
<flow xmlns="urn:opendaylight:flow:inventory">
  <priority>14865</priority>
  <flow-name>jpsampleFlow</flow-name>
  <idle-timeout>12000</idle-timeout>
  <match>
    <ethernet-match>
      <ethernet-type>
        <type>2048</type>
      </ethernet-type>
    </ethernet-match>
    <ipv4-source>10.0.0.1/32</ipv4-source>
    <ipv4-destination>10.0.0.2/32</ipv4-destination>
    <ip-match>
      <ip-dscp>28</ip-dscp>
    </ip-match>
  </match>
  <id>9</id>
  <table_id>0</table_id>
  <instructions>
    <instruction>
      <order>6555</order>
    </instruction>
    <instruction>
      <order>0</order>
      <apply-actions>
        <action>
          <order>0</order>
          <drop-action/>
          <output-action>
            <output-node-connector>1</output-node-connector>
          </output-action>
        </action>
      </apply-actions>
    </instruction>
  </instructions>
</flow>

知道我做错了什么吗?谢谢。

你有一个动作要放弃,另一个动作要转发。不是 那些相互排斥的?试一试。