This group is locked. No changes can be made to the group while it is locked.
example of mapping ovs interfaces of tenant vm to neutron port, subnet, tenant id
Flavio Fernandes <ffernand@...>
I was asked for an example dump of an openstack config on ovsdb netvirt and how one can piece mail the ovs ports
to the overlay network that goes with it.
For that, I ‘devstacked' 3 nodes using my one trick pony github  repo. ;)
Then, I created 2 tenants with 2 internal subnets and put 2 vms in each with floating ips.
The output of operational tree using my handy tool  looked like this  ( with flows).
The output from neutron’s rest interface gave me this .
Pulling the string for a tenant port in openstack compute node 192.168.50.22 —as an example-- you can see that:
* lines 14, 15, 30, 31, 37 and 40 from  represent the tunnel ports that interconnect the openstack nodes
* line 42 from  is: of:6 tapbd8efa88-36 mac:fa:16:3e:fb:d9:bf ifaceId:bd8efa88-3665-409a-a7fa-47663a9089b2.
So, the tenant vm that owns that port is in compute node 192.168.50.22.
br-int in that node is aka openflow:191757013640004 (charlie)
If you search for ‘47663a9089b2’ in , you will find it belongs to neutron port that has address 10.20.0.3 and
belongs to subnet id 8daa2590-67d9-45c1-b956-f820aa5dba43. That is on line 691 of .
Furthermore you can see that it belongs to tenant 33d676feac934d98a809eadfd8e5e985, mentioned in line 702.
* with that, you can connect the dots and find all neutron ports that belong to a certain subnet / tenant, as well as the bridge
and openstack nodes they are located.
These where the curl commands that dumped me the crud tables in neutron northbound . I’m pretty sure that can be obtained
via mdsal’s restconf too, but I am not too familiar with that yet.
Hope this helps. :)
: curl -u admin:admin http://192.168.50.1:8080/controller/nb/v2/neutron/networks
curl -u admin:admin http://192.168.50.1:8080/controller/nb/v2/neutron/subnets
curl -u admin:admin http://192.168.50.1:8080/controller/nb/v2/neutron/ports
$ ./showOvsdbMdsal.py -f
Richard Woo <richardwoo2003@...>
toggle quoted messageShow quoted text
Thanks, Flavio, I tried it. These tools are awesome!
On Thu, Jul 16, 2015 at 10:45 PM, Flavio Fernandes <ffernand@...> wrote: