Hi,

I am trying to use the PyRouting.get_route() function to get a route between 
two switches that are directly connected to each other (no intermediary node).
My code is something like this:
            r = Route()
            r.id.src = datapathid.from_host(src_host.datapath_id) #this value 
is 002320049119
            r.id.dst = datapathid.from_host(dst_host.datapath_id) #this value 
is 00232009203a
            self.routing.get_route(r)

            piter = r.path.begin()
            while piter != r.path.end():
                log.info("printing one")
                log.info("dst: ")
                log.info(piter.value().dst)
                log.info("inport: ")
                log.info(piter.value().inport)
                log.info("outport: ")
                log.info(piter.value().outport)
                log.info("printing one done")
                piter.incr()

The datapath ids of my switches are 002320049119 and 00232009203a.
The first id is passed as the source and the second id is passed as the 
destination into the Route object.

The code above runs without error but the result of the log messages are weird:
00232|myrouting|INFO:printing one
00233|myrouting|INFO:dst:
00234|myrouting|INFO:0023b5a96bf8
00235|myrouting|INFO:inport:
00236|myrouting|INFO:2
00237|myrouting|INFO:outport:
00238|myrouting|INFO:2
00239|myrouting|INFO:printing one done

As you can see above, the value of the dst printed out doesn't match any of my 
switch's datapathids. The inport and outport values are correct though.
If my understanding is correct, the piter.value().dst should print 00232009203a 
because the switches are directly connected, am I right?
Is this the desired behaviour or is this a bug?

Heryandi

CONFIDENTIALITY: This email is intended solely for the person(s) named and may 
be confidential and/or privileged. If you are not the intended recipient, 
please delete it, notify us and do not copy, use, or disclose its content.

Towards A Sustainable Earth: Print Only When Necessary. Thank you.
_______________________________________________
nox-dev mailing list
nox-dev@noxrepo.org
http://noxrepo.org/mailman/listinfo/nox-dev

Reply via email to