JIRA: SDNVPN-237
JIRA: SDNVPN-233
This patch fixes the bug which exists when trying to query neutron
quota with openstacksdk.
Change-Id: Iead824ca44f381ba314f38933cf48fe7932f74f3
Signed-off-by: Stamatis Katsaounis <mokats@intracom-telecom.com>
(cherry picked from commit 
edd6cfe15ecd4e2bf608c23c6ca4612334df044b)
 import re
 import subprocess
 from concurrent.futures import ThreadPoolExecutor
+from openstack.exceptions import ResourceNotFound
 from requests.auth import HTTPBasicAuth
 
 from opnfv.deployment.factory import Factory as DeploymentFactory
 
 def get_neutron_quota(conn, tenant_id):
     try:
-        return conn.network.quotas(project_id=tenant_id).next()
-    except Exception as e:
+        return conn.network.get_quota(tenant_id)
+    except ResourceNotFound as e:
         logger.error("Error in getting network quota for tenant "
                      " '%s' )]: %s" % (tenant_id, e))
         raise