Merge "Handle default quotas"
diff --git a/README.rst b/README.rst
index 3aa133d..7ee2ea3 100644
--- a/README.rst
+++ b/README.rst
@@ -1502,6 +1502,24 @@
ovsdb_timeout: 30 # Queens and beyond
bridge_mac_table_size: 100000
+Change default resource quotas
+------------------------------
+
+.. code-block:: yaml
+
+ neutron:
+ server:
+ quotas:
+ default_quota: 100
+ quota_network: 150
+ quota_subnet: 150
+ quota_port: 200
+ quota_router: 50
+ quota_floatingip: 30
+ quota_security_group: 20
+ quota_security_group_rule: 50
+
+
Enhanced logging with logging.conf
----------------------------------
diff --git a/neutron/files/pike/neutron-server.conf b/neutron/files/pike/neutron-server.conf
index 6aef662..5cccb0f 100644
--- a/neutron/files/pike/neutron-server.conf
+++ b/neutron/files/pike/neutron-server.conf
@@ -2200,18 +2200,31 @@
# Default number of resource allowed per tenant. A negative value means
# unlimited. (integer value)
#default_quota = -1
+{%- if server.get('quotas',{}).default_quota is defined %}
+default_quota = {{ server.quotas.default_quota }}
+{%- endif %}
# Number of networks allowed per tenant. A negative value means unlimited.
# (integer value)
#quota_network = 10
+{%- if server.get('quotas',{}).quota_network is defined %}
+quota_network = {{ server.quotas.quota_network }}
+{%- endif %}
# Number of subnets allowed per tenant, A negative value means unlimited.
# (integer value)
#quota_subnet = 10
+{%- if server.get('quotas',{}).quota_subnet is defined %}
+quota_subnet = {{ server.quotas.quota_subnet }}
+{%- endif %}
+
# Number of ports allowed per tenant. A negative value means unlimited.
# (integer value)
#quota_port = 50
+{%- if server.get('quotas',{}).quota_port is defined %}
+quota_port = {{ server.quotas.quota_port }}
+{%- endif %}
# Default driver to use for quota checks. (string value)
#quota_driver = neutron.db.quota.driver.DbQuotaDriver
@@ -2230,18 +2243,30 @@
# Number of routers allowed per tenant. A negative value means unlimited.
# (integer value)
#quota_router = 10
+{%- if server.get('quotas',{}).quota_router is defined %}
+quota_router = {{ server.quotas.quota_router }}
+{%- endif %}
# Number of floating IPs allowed per tenant. A negative value means unlimited.
# (integer value)
#quota_floatingip = 50
+{%- if server.get('quotas',{}).quota_floatingip is defined %}
+quota_floatingip = {{ server.quotas.quota_floatingip }}
+{%- endif %}
# Number of security groups allowed per tenant. A negative value means
# unlimited. (integer value)
#quota_security_group = 10
+{%- if server.get('quotas',{}).quota_security_group is defined %}
+quota_security_group = {{ server.quotas.quota_security_group }}
+{%- endif %}
# Number of security rules allowed per tenant. A negative value means
# unlimited. (integer value)
#quota_security_group_rule = 100
+{%- if server.get('quotas',{}).quota_security_group_rule is defined %}
+quota_security_group_rule = {{ server.quotas.quota_security_group_rule }}
+{%- endif %}
[ssl]
diff --git a/neutron/files/queens/neutron-server.conf b/neutron/files/queens/neutron-server.conf
index aa083b2..7aa7e4e 100644
--- a/neutron/files/queens/neutron-server.conf
+++ b/neutron/files/queens/neutron-server.conf
@@ -523,18 +523,30 @@
# Default number of resource allowed per tenant. A negative value means
# unlimited. (integer value)
#default_quota = -1
+{%- if server.get('quotas',{}).default_quota is defined %}
+default_quota = {{ server.quotas.default_quota }}
+{%- endif %}
# Number of networks allowed per tenant. A negative value means unlimited.
# (integer value)
#quota_network = 100
+{%- if server.get('quotas',{}).quota_network is defined %}
+quota_network = {{ server.quotas.quota_network }}
+{%- endif %}
# Number of subnets allowed per tenant, A negative value means unlimited.
# (integer value)
#quota_subnet = 100
+{%- if server.get('quotas',{}).quota_subnet is defined %}
+quota_subnet = {{ server.quotas.quota_subnet }}
+{%- endif %}
# Number of ports allowed per tenant. A negative value means unlimited.
# (integer value)
#quota_port = 500
+{%- if server.get('quotas',{}).quota_port is defined %}
+quota_port = {{ server.quotas.quota_port }}
+{%- endif %}
# Default driver to use for quota checks. (string value)
#quota_driver = neutron.db.quota.driver.DbQuotaDriver
@@ -553,18 +565,30 @@
# Number of routers allowed per tenant. A negative value means unlimited.
# (integer value)
#quota_router = 10
+{%- if server.get('quotas',{}).quota_router is defined %}
+quota_router = {{ server.quotas.quota_router }}
+{%- endif %}
# Number of floating IPs allowed per tenant. A negative value means unlimited.
# (integer value)
#quota_floatingip = 50
+{%- if server.get('quotas',{}).quota_floatingip is defined %}
+quota_floatingip = {{ server.quotas.quota_floatingip }}
+{%- endif %}
# Number of security groups allowed per tenant. A negative value means
# unlimited. (integer value)
#quota_security_group = 10
+{%- if server.get('quotas',{}).quota_security_group is defined %}
+quota_security_group = {{ server.quotas.quota_security_group }}
+{%- endif %}
# Number of security rules allowed per tenant. A negative value means
# unlimited. (integer value)
#quota_security_group_rule = 100
+{%- if server.get('quotas',{}).quota_security_group_rule is defined %}
+quota_security_group_rule = {{ server.quotas.quota_security_group_rule }}
+{%- endif %}
[ssl]
diff --git a/neutron/files/rocky/neutron-server.conf b/neutron/files/rocky/neutron-server.conf
index 1bb21a1..97ed365 100644
--- a/neutron/files/rocky/neutron-server.conf
+++ b/neutron/files/rocky/neutron-server.conf
@@ -542,18 +542,30 @@
# Default number of resource allowed per tenant. A negative value means
# unlimited. (integer value)
#default_quota = -1
+{%- if server.get('quotas',{}).default_quota is defined %}
+default_quota = {{ server.quotas.default_quota }}
+{%- endif %}
# Number of networks allowed per tenant. A negative value means unlimited.
# (integer value)
#quota_network = 100
+{%- if server.get('quotas',{}).quota_network is defined %}
+quota_network = {{ server.quotas.quota_network }}
+{%- endif %}
# Number of subnets allowed per tenant, A negative value means unlimited.
# (integer value)
#quota_subnet = 100
+{%- if server.get('quotas',{}).quota_subnet is defined %}
+quota_subnet = {{ server.quotas.quota_subnet }}
+{%- endif %}
# Number of ports allowed per tenant. A negative value means unlimited.
# (integer value)
#quota_port = 500
+{%- if server.get('quotas',{}).quota_port is defined %}
+quota_port = {{ server.quotas.quota_port }}
+{%- endif %}
# Default driver to use for quota checks. (string value)
#quota_driver = neutron.db.quota.driver.DbQuotaDriver
@@ -573,18 +585,30 @@
# Number of routers allowed per tenant. A negative value means unlimited.
# (integer value)
#quota_router = 10
+{%- if server.get('quotas',{}).quota_router is defined %}
+quota_router = {{ server.quotas.quota_router }}
+{%- endif %}
# Number of floating IPs allowed per tenant. A negative value means unlimited.
# (integer value)
#quota_floatingip = 50
+{%- if server.get('quotas',{}).quota_floatingip is defined %}
+quota_floatingip = {{ server.quotas.quota_floatingip }}
+{%- endif %}
# Number of security groups allowed per tenant. A negative value means
# unlimited. (integer value)
#quota_security_group = 10
+{%- if server.get('quotas',{}).quota_security_group is defined %}
+quota_security_group = {{ server.quotas.quota_security_group }}
+{%- endif %}
# Number of security rules allowed per tenant. A negative value means
# unlimited. (integer value)
#quota_security_group_rule = 100
+{%- if server.get('quotas',{}).quota_security_group_rule is defined %}
+quota_security_group_rule = {{ server.quotas.quota_security_group_rule }}
+{%- endif %}
[ssl]