bgp插件:数据模型内容不存在

时间:2018-07-09 13:16:04

标签: opendaylight

在全新的Opendaylight安装中,以下查询失败:

In [42]: url
Out[42]: '/restconf/operational/bgp-rib:bgp-rib'

In [43]: requests.get('http://{}:{}{}'.format(odl['api']['ipaddr'],odl['api']['port'],url), auth=auth).text
Out[43]: '{"errors":{"error":[{"error-type":"application","error-tag":"data-missing","error-message":"Request could not be completed because the relevant data model content does not exist "}]}}'

鉴于已安装以下与BGP相关的功能

opendaylight-user@root>feature:list | grep bgp
odl-bgpcep-pcep-topology                         │ 0.9.2            │          │ Started     │ odl-bgpcep-pcep-topology                         │ OpenDaylight :: PCEP :: Topology
odl-bgpcep-pcep-cli                              │ 0.9.2            │          │ Started     │ odl-bgpcep-pcep-cli                              │ OpenDaylight :: PCEP :: Topology Cli
odl-bgpcep-pcep-stateful07                       │ 0.9.2            │          │ Started     │ odl-bgpcep-pcep-stateful07                       │ OpenDaylight :: PCEP :: Stateful 07
odl-bgpcep-data-change-counter                   │ 0.9.2            │          │ Uninstalled │ odl-bgpcep-data-change-counter                   │ ODL :: Bgpcep :: odl-bgpcep-data-change-counter
odl-bgpcep-bgp-flowspec                          │ 0.9.2            │          │ Started     │ odl-bgpcep-bgp-flowspec                          │ OpenDaylight :: BGP :: Flowspec
odl-bgpcep-pcep-api                              │ 0.9.2            │          │ Started     │ odl-bgpcep-pcep-api                              │ OpenDaylight :: PCEP :: Api
odl-bgpcep-extras-dependencies                   │ 0.9.2            │          │ Started     │ odl-bgpcep-extras-dependencies                   │ OpenDaylight :: Extras :: Dependencies
odl-bgpcep-config-loader-spi                     │ 0.9.2            │          │ Started     │ odl-bgpcep-config-loader-spi                     │ OpenDaylight :: BGPCEP :: SPI Config Loader
odl-bgpcep-pcep-topology-stats                   │ 0.9.2            │          │ Started     │ odl-bgpcep-pcep-topology-stats                   │ OpenDaylight :: PCEP :: Topology Stats
odl-bgpcep-bgp-rib-api                           │ 0.9.2            │          │ Started     │ odl-bgpcep-bgp-rib-api                           │ OpenDaylight :: BGP :: RIB Api
odl-bgpcep-bgp-labeled-unicast                   │ 0.9.2            │          │ Started     │ odl-bgpcep-bgp-labeled-unicast                   │ OpenDaylight :: BGP :: Labeled Unicast
odl-bgpcep-bgp-parser-api                        │ 0.9.2            │          │ Started     │ odl-bgpcep-bgp-parser-api                        │ OpenDaylight :: BGP :: Parser :: API
odl-bgpcep-bgp-path-selection-mode               │ 0.9.2            │          │ Started     │ odl-bgpcep-bgp-path-selection-mode               │ OpenDaylight :: BGP :: Path Selection
odl-bgpcep-programming-impl                      │ 0.9.2            │          │ Started     │ odl-bgpcep-programming-impl                      │ OpenDaylight :: PCEP :: Programming Impl
odl-bgpcep-rsvp-api                              │ 0.9.2            │          │ Started     │ odl-bgpcep-rsvp-api                              │ OpenDaylight :: RSVP :: API
odl-bgpcep-bgp-dependencies                      │ 0.9.2            │          │ Started     │ odl-bgpcep-bgp-dependencies-0.9.2                │ OpenDaylight :: BGP :: Dependencies
odl-bgpcep-bgp-inet                              │ 0.9.2            │          │ Started     │ odl-bgpcep-bgp-inet                              │ OpenDaylight :: BGP :: Inet
odl-bgpcep-pcep-auto-bandwidth                   │ 0.9.2            │          │ Started     │ odl-bgpcep-pcep-auto-bandwidth                   │ OpenDaylight :: PCEP :: Auto Bandwidth
odl-bgpcep-bmp-config-example                    │ 0.9.2            │          │ Uninstalled │ odl-bgpcep-0.9.2                                 │ OpenDaylight :: BMP :: Config files example
odl-bgpcep-bgp-config-example                    │ 0.9.2            │          │ Uninstalled │ odl-bgpcep-0.9.2                                 │ OpenDaylight :: Configuration Example Files
odl-bgpcep-pcep-config-example                   │ 0.9.2            │          │ Started     │ odl-bgpcep-0.9.2                                 │ OpenDaylight :: Pcep Configuration Example Files
odl-bgpcep-topology-api                          │ 0.9.2            │          │ Started     │ odl-bgpcep-topology-api                          │ OpenDaylight :: BGPCEP :: Topology :: Api
odl-bgpcep-concepts                              │ 0.9.2            │          │ Started     │ odl-bgpcep-concepts                              │ OpenDaylight :: BGPCEP :: Concepts
odl-bgpcep-bgp-cli                               │ 0.9.2            │          │ Started     │ odl-bgpcep-bgp-cli                               │ OpenDaylight :: BGP :: Cli
odl-bgpcep-bgp-topology                          │ 0.9.2            │          │ Started     │ odl-bgpcep-bgp-topology                          │ OpenDaylight :: BGP :: Topology
odl-bgpcep-bmp-api                               │ 0.9.2            │          │ Started     │ odl-bgpcep-bmp-api                               │ OpenDaylight :: BMP :: API
odl-bgpcep-bgp-rib-impl                          │ 0.9.2            │          │ Started     │ odl-bgpcep-bgp-rib-impl                          │ OpenDaylight :: BGP :: RIB Impl
odl-bgpcep-pcep                                  │ 0.9.2            │ x        │ Started     │ odl-bgpcep-pcep                                  │ OpenDaylight :: PCEP
odl-bgpcep-bmp-config-loader                     │ 0.9.2            │          │ Uninstalled │ odl-bgpcep-bmp-config-loader                     │ OpenDaylight :: BGPCEP :: BMP Config Loader
odl-bgpcep-pcep-impl                             │ 0.9.2            │          │ Started     │ odl-bgpcep-pcep-impl                             │ OpenDaylight :: PCEP :: Impl
odl-bgpcep-bgp-openconfig                        │ 0.9.2            │          │ Started     │ odl-bgpcep-bgp-openconfig                        │ OpenDaylight :: BGP :: Openconfig
features-bgpcep-extras                           │ 0.9.2            │          │ Uninstalled │ features-bgpcep-extras                           │ features-bgpcep-extras
odl-bgpcep-bgp-benchmark                         │ 0.9.2            │          │ Uninstalled │ odl-bgpcep-bgp-benchmark                         │ OpenDaylight :: BGP :: Benchmark
odl-bgpcep-pcep-topology-provider                │ 0.9.2            │          │ Started     │ odl-bgpcep-pcep-topology-provider                │ OpenDaylight :: PCEP :: Topology Provider
odl-bgpcep-pcep-tunnel-provider                  │ 0.9.2            │          │ Started     │ odl-bgpcep-pcep-tunnel-provider                  │ OpenDaylight :: PCEP :: Tunnel Provider
odl-bgpcep-programming-api                       │ 0.9.2            │          │ Started     │ odl-bgpcep-programming-api                       │ OpenDaylight :: PCEP :: Programming Api
odl-bgpcep-pcep-segment-routing                  │ 0.9.2            │          │ Started     │ odl-bgpcep-pcep-segment-routing                  │ OpenDaylight :: PCEP :: Segment Routing
odl-bgpcep-bmp                                   │ 0.9.2            │          │ Uninstalled │ odl-bgpcep-bmp                                   │ OpenDaylight :: BMP
odl-bgpcep-pcep-base-parser                      │ 0.9.2            │          │ Started     │ odl-bgpcep-pcep-base-parser                      │ OpenDaylight :: PCEP :: Base Parser
odl-bgpcep-topology-config-loader                │ 0.9.2            │          │ Started     │ odl-bgpcep-topology-config-loader                │ OpenDaylight :: BGPCEP :: Topology Config Loader
features-bgp                                     │ 0.9.2            │          │ Uninstalled │ features-bgp                                     │ features-bgp
odl-bgpcep-rsvp                                  │ 0.9.2            │          │ Started     │ odl-bgpcep-rsvp                                  │ OpenDaylight :: RSVP
odl-bgpcep-bgp-l3vpn                             │ 0.9.2            │          │ Started     │ odl-bgpcep-bgp-l3vpn                             │ OpenDaylight :: BGP :: L3Vpn
odl-bgpcep-config-loader-impl                    │ 0.9.2            │          │ Started     │ odl-bgpcep-config-loader-impl                    │ OpenDaylight :: BGPCEP :: Config Loader Impl
odl-bgpcep-bgp-parser                            │ 0.9.2            │          │ Started     │ odl-bgpcep-bgp-parser                            │ OpenDaylight :: BGP :: Parser
odl-bgpcep-bgp                                   │ 0.9.2            │ x        │ Started     │ odl-bgpcep-bgp                                   │ OpenDaylight :: BGP
odl-bgpcep-bgp-evpn                              │ 0.9.2            │          │ Started     │ odl-bgpcep-bgp-evpn                              │ OpenDaylight :: BGP :: Evpn
odl-bgpcep-protocols-config-loader               │ 0.9.2            │          │ Started     │ odl-bgpcep-protocols-config-loader               │ OpenDaylight :: BGPCEP :: Protocols Config Loader
odl-bgpcep-bgp-linkstate                         │ 0.9.2            │          │ Started     │ odl-bgpcep-bgp-linkstate                         │ OpenDaylight :: BGP :: RIB Linkstate
odl-bgpcep-bgp-openconfig-state                  │ 0.9.2            │          │ Started     │ odl-bgpcep-bgp-openconfig-state                  │ OpenDaylight :: BGP :: Config Loader

org.apache.karaf.features.cfg被配置为:

featuresBoot = b8b5047f-c696-4a9c-9c49-d21ea2c16986,odl-restconf-all,odl-netconf-all,odl-netconf-connector-all,odl-bgpcep-bgp,odl-bgpcep-pcep,odl-mdsal-apidocs

您能告诉我我在做什么错吗?

PS。我以此为指导:https://github.com/opendaylight/docs/blob/master/docs/user-guide/bgpcep-guide/bgp/bgp-user-guide-running-bgp.rst

1 个答案:

答案 0 :(得分:0)

似乎 odl-bgpcep-bgp-config-example通过安装一些依赖项解决了这个问题。