首页 文章

使用OpenDaylight REST API添加流时出错

提问于
浏览
0

我在OpenStack Cloud 中设置了一个OpenDaylight控制器作为机制驱动程序 . 安装是在一体化虚拟机中使用DevStack完成的 .

一切都很好 . 我的OpenStack Cloud 中有两个VM,它们可以相互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>

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

1 回答

  • 1

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

相关问题