2017-08-03 80 views
2

有谁知道为什么我不能调用由OpenDaylight提供的Restful API,即使我已经安装了RESTCONF,l2switch,md-sal模块。从dlux我的反应是alwyas这样的:Opendaylight RESTful APIs(RESTCONF)

数据丢失:请求无法完成,因为相关 数据模型内容不存在。 - :请求无法完成 因为相关数据模型内容不存在enter image description here

我怎样才能完成这个“有关数据模型”?我确定我已经安装了md-sal & restconf-all & l2switch-all模块,那么还有什么我仍然需要的?我使用碳分布。谢谢你们!! YC

+1

你能给出你正在做的确切的REST调用和ODL的确切版本吗? – dfarrell07

回答

0

确保您的RESCONF流明确包含以太网类型和IP协议。

例如:

<?xml version="1.0" encoding="UTF-8" standalone="no"?> 
<flow xmlns="urn:opendaylight:flow:inventory"> 
    <instructions> 
     <instruction> 
      <order>0</order> 
      <go-to-table> 
       <table_id>1</table_id> 
      </go-to-table> 
     </instruction> 
    </instructions> 
    <table_id>0</table_id> 
    <id>256</id> 
    <match> 
     <ethernet-match> 
      <ethernet-type> 
       <type>2048</type> 
      </ethernet-type> 
     </ethernet-match> 
     <ipv4-source>192.168.11.0/24</ipv4-source> 
     <ipv4-destination>192.168.11.0/24</ipv4-destination> 
     <ip-match> 
      <ip-protocol>6</ip-protocol>   
     </ip-match> 
     <in-port>0</in-port> 
    </match> 
    <hard-timeout>0</hard-timeout> 
    <cookie>10</cookie> 
    <idle-timeout>0</idle-timeout> 
    <flow-name>flow-instruction-go-to-table</flow-name> 
    <priority>200</priority> 
</flow> 

一定要改变指令和IPv4地址节,以配合您的流量。