Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
198 views
in Technique[技术] by (71.8m points)

rest - How to filter out or stop getting data field within Opendaylight(Oxygen) BGP-LS data change event

Following is the example of topology i have for BGP-LS updates:

{
"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"
                }
            ]

As soon as i am making any changes within the topology. I receive data change events within the websocket i subscribed to for this topology. Example of a data change event is given below:

<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>

Due to some latency issues, i do not need data field and want to remove it. Is there any way i can filter out the data field from data change event? Or if it is possible that i can make any changes while data change subscription to stop getting data field?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

There is no mechanism currently to filter out fields. Seems like useful functionality - perhaps you would like to contribute it?


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...