531214fa981b5f5167d92ecb49e20df20524398a
[mirror/dsa-puppet.git] / 3rdparty / modules / neutron / manifests / quota.pp
1 # == Class: neutron::quota
2 #
3 # Setups neutron quota.
4 #
5 # === Parameters
6 #
7 # [*default_quota*]
8 #   (optional) Default number of resources allowed per tenant,
9 #   minus for unlimited. Defaults to -1.
10 #
11 # [*quota_network*]
12 #   (optional) Number of networks allowed per tenant, and minus means unlimited.
13 #   Defaults to 10.
14 #
15 # [*quota_subnet*]
16 #   (optional) Number of subnets allowed per tenant, and minus means unlimited.
17 #   Defaults to 10.
18 #
19 # [*quota_port*]
20 #   (optional) Number of ports allowed per tenant, and minus means unlimited.
21 #   Defaults to 50.
22 #
23 # [*quota_router*]
24 #   (optional) Number of routers allowed per tenant, and minus means unlimited.
25 #   Requires L3 extension. Defaults to 10.
26 #
27 # [*quota_floatingip*]
28 #   (optional) Number of floating IPs allowed per tenant,
29 #   and minus means unlimited. Requires L3 extension. Defaults to 50.
30 #
31 # [*quota_security_group*]
32 #   (optional) Number of security groups allowed per tenant,
33 #   and minus means unlimited. Requires securitygroup extension.
34 #   Defaults to 10.
35 #
36 # [*quota_security_group_rule*]
37 #   (optional) Number of security rules allowed per tenant,
38 #   and minus means unlimited. Requires securitygroup extension.
39 #   Defaults to 100.
40 #
41 # [*quota_driver*]
42 #   (optional) Default driver to use for quota checks.
43 #   Defaults to 'neutron.db.quota_db.DbQuotaDriver'.
44 #
45 # [*quota_firewall*]
46 #   (optional) Number of firewalls allowed per tenant, -1 for unlimited.
47 #   Defaults to '1'.
48 #
49 # [*quota_firewall_policy*]
50 #   (optional) Number of firewalls policies allowed per tenant, -1 for unlimited.
51 #   Defaults to '1'.
52 #
53 # [*quota_firewall_rule*]
54 #   (optional) Number of firewalls rules allowed per tenant, -1 for unlimited.
55 #   Defaults to '-1'.
56 #
57 # [*quota_health_monitor*]
58 #   (optional) Number of health monitors allowed per tenant.
59 #   A negative value means unlimited.
60 #   Defaults to '-1'.
61 #
62 # [*quota_items*]
63 #   (optional) Resource name(s) that are supported in quota features.
64 #   Defaults to 'network,subnet,port'.
65 #
66 # [*quota_member*]
67 #   (optional) Number of pool members allowed per tenant.
68 #   A negative value means unlimited
69 #   Defaults to '-1'.
70 #
71 # [*quota_network_gateway*]
72 #   (optional) Number of network gateways allowed per tenant, -1 for unlimited.
73 #   Defaults to '5'.
74 #
75 # [*quota_packet_filter*]
76 #   (optional) Number of packet_filters allowed per tenant, -1 for unlimited.
77 #   Defaults to '100'.
78 #
79 # [*quota_pool*]
80 #   (optional) Number of pools allowed per tenant.
81 #   A negative value means unlimited.
82 #   Defaults to '10'.
83 #
84 # [*quota_vip*]
85 #   (optional) Number of vips allowed per tenant.
86 #   A negative value means unlimited.
87 #   Defaults to '10'.
88 #
89 class neutron::quota (
90   $default_quota             = -1,
91   $quota_network             = 10,
92   $quota_subnet              = 10,
93   $quota_port                = 50,
94   # l3 extension
95   $quota_router              = 10,
96   $quota_floatingip          = 50,
97   # securitygroup extension
98   $quota_security_group      = 10,
99   $quota_security_group_rule = 100,
100   $quota_driver              = 'neutron.db.quota_db.DbQuotaDriver',
101   $quota_firewall            = 1,
102   $quota_firewall_policy     = 1,
103   $quota_firewall_rule       = -1,
104   $quota_health_monitor      = -1,
105   $quota_items               = 'network,subnet,port',
106   $quota_member              = -1,
107   $quota_network_gateway     = 5,
108   $quota_packet_filter       = 100,
109   $quota_pool                = 10,
110   $quota_vip                 = 10
111 ) {
112
113   neutron_config {
114     'quotas/default_quota':             value => $default_quota;
115     'quotas/quota_network':             value => $quota_network;
116     'quotas/quota_subnet':              value => $quota_subnet;
117     'quotas/quota_port':                value => $quota_port;
118     'quotas/quota_router':              value => $quota_router;
119     'quotas/quota_floatingip':          value => $quota_floatingip;
120     'quotas/quota_security_group':      value => $quota_security_group;
121     'quotas/quota_security_group_rule': value => $quota_security_group_rule;
122     'quotas/quota_driver':              value => $quota_driver;
123     'quotas/quota_firewall':            value => $quota_firewall;
124     'quotas/quota_firewall_policy':     value => $quota_firewall_policy;
125     'quotas/quota_firewall_rule':       value => $quota_firewall_rule;
126     'quotas/quota_health_monitor':      value => $quota_health_monitor;
127     'quotas/quota_items':               value => $quota_items;
128     'quotas/quota_member':              value => $quota_member;
129     'quotas/quota_network_gateway':     value => $quota_network_gateway;
130     'quotas/quota_packet_filter':       value => $quota_packet_filter;
131     'quotas/quota_pool':                value => $quota_pool;
132     'quotas/quota_vip':                 value => $quota_vip;
133   }
134 }