Make test_detail_quota() test more generic

Backends such as OVN will create a port to be used by the metadata agent
upon creating a network. That port will be substract from the tenant's
quota and that was what was previsouly causing this test to fail in OVN.

This patch is changing the approach to make it more generic by calculating
the number of used ports based on the number existent after the network
is created and prior to the new port being created.

A similar approach was used in the patch
https://review.openstack.org/#/c/559758/ for the same reason.

Change-Id: I952d31c4473159a3fdd0552eeae98750ee27a1f9
1 file changed