【问题标题】:Error while adding flow using OpenDaylight REST API使用 OpenDaylight REST API 添加流时出错
【发布时间】:2018-05-08 10:33:25
【问题描述】:

我有一个 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>

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

【问题讨论】:

    标签: opendaylight openflow


    【解决方案1】:

    您有一个要放弃的动作和另一个要转发的动作。不是 那些相互排斥的?尝试不使用其中之一。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-12-31
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多