如何过滤掉或停止在Opendaylight(Oxygen)BGP-LS数据更改事件中获取数据字段

时间:2018-04-30 16:16:00

标签: rest websocket network-programming opendaylight bgp

以下是我对BGP-LS更新的拓扑示例:

{
"topology": [
{
    "topology-id": "bgp-example-linkstate-topology",
    "link": [
        {
            "link-id": "bgpls://IsisLevel2:0/type=link&local-as=65038&local- 
            router=0000.0000.0010.07&remote-as=65038&remote-router=0000.0000.0005",
            "source": {
                "source-tp": "bgpls://IsisLevel2:0/type=tp",
                "source-node": 
          "bgpls://IsisLevel2:0/type=node&as=65038&router=0000.0000.0010.07"
            },
            "destination": {
                "dest-tp": "bgpls://IsisLevel2:0/type=tp",
                "dest-node": 
             "bgpls://IsisLevel2:0/type=node&as=65038&router=0000.0000.0005"
            },
            "l3-unicast-igp-topology:igp-link-attributes": {
                "isis-topology:isis-link-attributes": {
                    "ted": {
                        "te-default-metric": 0
                    }
                }
            }
        }
    "topology-types": {
        "odl-bgp-topology-types:bgp-linkstate-topology": {}
    },
    "node": [
        {
            "node-id": 
         "bgpls://IsisLevel2:0/type=node&as=65038&router=0000.0000.0008.03",
            "l3-unicast-igp-topology:igp-node-attributes": {
                "isis-topology:isis-node-attributes": {
                    "ted": {},
                    "iso": {
                        "iso-system-id": "0000.0000.0008",
                        "iso-pseudonode-id": "03"
                    }
                }
            },
            "termination-point": [
                {
                    "tp-id": "bgpls://IsisLevel2:0/type=tp"
                }
            ]
    },
    "node": [
        {
            "node-id": 
         "bgpls://IsisLevel2:0/type=node&as=65038&router=0000.0000.0008.04",
            "l3-unicast-igp-topology:igp-node-attributes": {
                "isis-topology:isis-node-attributes": {
                    "ted": {},
                    "iso": {
                        "iso-system-id": "0000.0000.0008",
                        "iso-pseudonode-id": "03"
                    }
                }
            },
            "termination-point": [
                {
                    "tp-id": "bgpls://IsisLevel2:0/type=tp"
                }
            ]

我在拓扑中进行任何更改。我在为此拓扑订阅的websocket中接收数据更改事件。下面给出了数据更改事件的示例:

<data-change-event>
        <path>/network-topology:network-topology/network-topology:topology[network-topology:topology-id='bgp-example-linkstate-topology']/network-topology:link[network-topology:link-id='bgpls://IsisLevel2:0/type=link&amp;local-as=65038&amp;local-router=0000.0000.0008.03&amp']</path>
        <operation>updated</operation>
        <data>
            <unreserved-bandwidth xmlns="urn:TBD:params:xml:ns:yang:network:isis-topology">
                <priority>4</priority>
                <bandwidth>12499999744</bandwidth>
            </unreserved-bandwidth>
        </data>
    </data-change-event>

由于一些延迟问题,我不需要数据字段并希望将其删除。有什么办法可以从数据更改事件中筛选出数据字段吗?或者,如果我可以在数据更改订阅时停止获取数据字段,我可以进行任何更改吗?

1 个答案:

答案 0 :(得分:0)

目前没有机制来过滤掉字段。看起来像有用的功能 - 也许你想贡献它?