diff options
-rw-r--r-- | sdnvpn/lib/config.py | 1 | ||||
-rw-r--r-- | sdnvpn/lib/utils.py | 10 | ||||
-rw-r--r-- | sdnvpn/test/functest/run_sdnvpn_tests.py | 14 |
3 files changed, 16 insertions, 9 deletions
diff --git a/sdnvpn/lib/config.py b/sdnvpn/lib/config.py index 9659fc3..8d87f33 100644 --- a/sdnvpn/lib/config.py +++ b/sdnvpn/lib/config.py @@ -57,6 +57,7 @@ class CommonConfig(object): self.neutron_nw_quota = -1 self.neutron_subnet_quota = -1 self.neutron_port_quota = -1 + self.neutron_router_quota = -1 self.nova_instances_quota_class = -1 commonCfgInstance = None diff --git a/sdnvpn/lib/utils.py b/sdnvpn/lib/utils.py index 0ab8b84..44641ee 100644 --- a/sdnvpn/lib/utils.py +++ b/sdnvpn/lib/utils.py @@ -777,11 +777,12 @@ def is_fail_mode_secure(): def update_nw_subnet_port_quota(neutron_client, tenant_id, nw_quota, - subnet_quota, port_quota): + subnet_quota, port_quota, router_quota): json_body = {"quota": { "network": nw_quota, "subnet": subnet_quota, - "port": port_quota + "port": port_quota, + "router": router_quota }} try: @@ -790,8 +791,9 @@ def update_nw_subnet_port_quota(neutron_client, tenant_id, nw_quota, return True except Exception as e: logger.error("Error [update_nw_subnet_port_quota(neutron_client," - " '%s', '%s', '%s', '%s')]: %s" % - (tenant_id, nw_quota, subnet_quota, port_quota, e)) + " '%s', '%s', '%s', '%s, %s')]: %s" % + (tenant_id, nw_quota, subnet_quota, + port_quota, router_quota, e)) return False diff --git a/sdnvpn/test/functest/run_sdnvpn_tests.py b/sdnvpn/test/functest/run_sdnvpn_tests.py index 1a1d8f3..7e39e22 100644 --- a/sdnvpn/test/functest/run_sdnvpn_tests.py +++ b/sdnvpn/test/functest/run_sdnvpn_tests.py @@ -37,18 +37,21 @@ class SdnvpnFunctest(base.Feature): os.environ['OS_PROJECT_NAME']) neutron_quota = test_utils.get_neutron_quota(neutron_client, tenant_id) - (neutron_nw_quota, neutron_subnet_quota, neutron_port_quota) = ( + (neutron_nw_quota, neutron_subnet_quota, neutron_port_quota, + neutron_router_quota) = ( neutron_quota['network'], neutron_quota['subnet'], - neutron_quota['port']) + neutron_quota['port'], neutron_quota['router']) instances_quota = test_utils.get_nova_instances_quota(nova_client) - self.__logger.info("Setting net/subnet/port quota to unlimited") + self.__logger.info("Setting net/subnet/port/router " + "quota to unlimited") test_utils.update_nw_subnet_port_quota( neutron_client, tenant_id, COMMON_CONFIG.neutron_nw_quota, COMMON_CONFIG.neutron_subnet_quota, - COMMON_CONFIG.neutron_port_quota) + COMMON_CONFIG.neutron_port_quota, + COMMON_CONFIG.neutron_router_quota) # Workaround for # https://jira.opnfv.org/projects/SDNVPN/issues/SDNVPN-115 @@ -98,7 +101,8 @@ class SdnvpnFunctest(base.Feature): tenant_id, neutron_nw_quota, neutron_subnet_quota, - neutron_port_quota) + neutron_port_quota, + neutron_router_quota) self.__logger.info("Resetting instances quota class") test_utils.update_instance_quota_class(nova_client, instances_quota) |