Merge lp:~seyeongkim/charms/trusty/neutron-api/lp1386911 into lp:~openstack-charmers-archive/charms/trusty/neutron-api/next

Proposed by Seyeong Kim
Status: Merged
Merged at revision: 83
Proposed branch: lp:~seyeongkim/charms/trusty/neutron-api/lp1386911
Merge into: lp:~openstack-charmers-archive/charms/trusty/neutron-api/next
Diff against target: 189 lines (+126/-0)
5 files modified
config.yaml (+65/-0)
hooks/neutron_api_context.py (+13/-0)
templates/icehouse/neutron.conf (+13/-0)
templates/kilo/neutron.conf (+13/-0)
unit_tests/test_neutron_api_context.py (+22/-0)
To merge this branch: bzr merge lp:~seyeongkim/charms/trusty/neutron-api/lp1386911
Reviewer Review Type Date Requested Status
Liam Young (community) Approve
OpenStack Charmers Pending
Review via email: mp+249468@code.launchpad.net

This proposal supersedes a proposal from 2015-02-04.

To post a comment you must log in.
Revision history for this message
uosci-testing-bot (uosci-testing-bot) wrote : Posted in a previous version of this proposal

charm_lint_check #1559 neutron-api-next for xtrusia mp248474
    LINT OK: passed

Build: http://10.245.162.77:8080/job/charm_lint_check/1559/

Revision history for this message
uosci-testing-bot (uosci-testing-bot) wrote : Posted in a previous version of this proposal

charm_unit_test #1514 neutron-api-next for xtrusia mp248474
    UNIT OK: passed

Build: http://10.245.162.77:8080/job/charm_unit_test/1514/

Revision history for this message
uosci-testing-bot (uosci-testing-bot) wrote : Posted in a previous version of this proposal

charm_amulet_test #1637 neutron-api-next for xtrusia mp248474
    AMULET FAIL: amulet-test missing

AMULET Results (max last 2 lines):
INFO:root:Search string not found in makefile target commands.
ERROR:root:No make target was executed.

Full amulet test output: http://paste.ubuntu.com/10046614/
Build: http://10.245.162.77:8080/job/charm_amulet_test/1637/

Revision history for this message
Liam Young (gnuoy) wrote : Posted in a previous version of this proposal

Thanks for this mp Seyeong Kim, this is a great addition to the charm functionality. One small thing, please could you add quota support to the kilo template as well ? I think that the kilo template probably landed after you submitted this mp, so apologies for that.

review: Needs Fixing
Revision history for this message
Seyeong Kim (seyeongkim) wrote :

new options added to kilo

do i need to add this also in config.yaml and neutron.conf for kilo templates?

quota_firewall = 1
quota_firewall_policy = 1
quota_firewall_rule = 100

Revision history for this message
uosci-testing-bot (uosci-testing-bot) wrote :

charm_lint_check #1948 neutron-api-next for xtrusia mp249468
    LINT OK: passed

Build: http://10.245.162.77:8080/job/charm_lint_check/1948/

Revision history for this message
uosci-testing-bot (uosci-testing-bot) wrote :

charm_unit_test #1738 neutron-api-next for xtrusia mp249468
    UNIT OK: passed

Build: http://10.245.162.77:8080/job/charm_unit_test/1738/

Revision history for this message
uosci-testing-bot (uosci-testing-bot) wrote :

charm_amulet_test #1889 neutron-api-next for xtrusia mp249468
    AMULET FAIL: amulet-test missing

AMULET Results (max last 2 lines):
INFO:root:Search string not found in makefile target commands.
ERROR:root:No make target was executed.

Full amulet test output: http://paste.ubuntu.com/10186189/
Build: http://10.245.162.77:8080/job/charm_amulet_test/1889/

78. By Seyeong Kim

rebase 1

79. By Seyeong Kim

rebase 2

Revision history for this message
uosci-testing-bot (uosci-testing-bot) wrote :

charm_lint_check #2204 neutron-api-next for xtrusia mp249468
    LINT OK: passed

Build: http://10.245.162.77:8080/job/charm_lint_check/2204/

Revision history for this message
uosci-testing-bot (uosci-testing-bot) wrote :

charm_unit_test #1993 neutron-api-next for xtrusia mp249468
    UNIT OK: passed

Build: http://10.245.162.77:8080/job/charm_unit_test/1993/

Revision history for this message
uosci-testing-bot (uosci-testing-bot) wrote :

charm_amulet_test #2150 neutron-api-next for xtrusia mp249468
    AMULET FAIL: amulet-test failed

AMULET Results (max last 2 lines):
  ERROR subprocess encountered error code 1
  make: *** [test] Error 1

Full amulet test output: http://paste.ubuntu.com/10396288/
Build: http://10.245.162.77:8080/job/charm_amulet_test/2150/

Revision history for this message
Liam Young (gnuoy) wrote :

Approve

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'config.yaml'
2--- config.yaml 2015-01-13 14:43:04 +0000
3+++ config.yaml 2015-02-24 11:28:29 +0000
4@@ -66,6 +66,71 @@
5 gre
6 vxlan
7 .
8+ # Quota configuration settings
9+ quota-security-group:
10+ default: 10
11+ type: int
12+ description: |
13+ Number of security groups allowed per tenant. A negative value means
14+ unlimited.
15+ quota-security-group-rule:
16+ default: 100
17+ type: int
18+ description: |
19+ Number of security group rules allowed per tenant. A negative value means
20+ unlimited
21+ quota-network:
22+ default: 10
23+ type: int
24+ description: |
25+ Number of networks allowed per tenant. A negative value means unlimited.
26+ quota-subnet:
27+ default: 10
28+ type: int
29+ description: |
30+ Number of subnets allowed per tenant. A negative value means unlimited.
31+ quota-port:
32+ default: 50
33+ type: int
34+ description: |
35+ Number of ports allowed per tenant. A negative value means unlimited.
36+ quota-vip:
37+ default: 10
38+ type: int
39+ description: |
40+ Number of vips allowed per tenant. A negative value means unlimited.
41+ quota-pool:
42+ default: 10
43+ type: int
44+ description: |
45+ Number of pools allowed per tenant. A negative value means unlimited.
46+ quota-member:
47+ default: -1
48+ type: int
49+ description: |
50+ Number of pool members allowed per tenant. A negative value means unlimited.
51+ The default is unlimited because a member is not a real resource consumer
52+ on Openstack. However, on back-end, a member is a resource consumer
53+ and that is the reason why quota is possible.
54+ quota-health-monitors:
55+ default: -1
56+ type: int
57+ description: |
58+ Number of health monitors allowed per tenant. A negative value means
59+ unlimited.
60+ The default is unlimited because a health monitor is not a real resource
61+ consumer on Openstack. However, on back-end, a member is a resource consumer
62+ and that is the reason why quota is possible.
63+ quota-router:
64+ default: 10
65+ type: int
66+ description: |
67+ Number of routers allowed per tenant. A negative value means unlimited.
68+ quota-floatingip:
69+ default: 50
70+ type: int
71+ description: |
72+ Number of floating IPs allowed per tenant. A negative value means unlimited.
73 # HA configuration settings
74 vip:
75 type: string
76
77=== modified file 'hooks/neutron_api_context.py'
78--- hooks/neutron_api_context.py 2014-11-25 10:19:07 +0000
79+++ hooks/neutron_api_context.py 2015-02-24 11:28:29 +0000
80@@ -98,6 +98,19 @@
81 ctxt['neutron_bind_port'] = \
82 determine_api_port(api_port('neutron-server'),
83 singlenode_mode=True)
84+ ctxt['quota_security_group'] = config('quota-security-group')
85+ ctxt['quota_security_group_rule'] = \
86+ config('quota-security-group-rule')
87+ ctxt['quota_network'] = config('quota-network')
88+ ctxt['quota_subnet'] = config('quota-subnet')
89+ ctxt['quota_port'] = config('quota-port')
90+ ctxt['quota_vip'] = config('quota-vip')
91+ ctxt['quota_pool'] = config('quota-pool')
92+ ctxt['quota_member'] = config('quota-member')
93+ ctxt['quota_health_monitors'] = config('quota-health-monitors')
94+ ctxt['quota_router'] = config('quota-router')
95+ ctxt['quota_floatingip'] = config('quota-floatingip')
96+
97 for rid in relation_ids('neutron-api'):
98 for unit in related_units(rid):
99 rdata = relation_get(rid=rid, unit=unit)
100
101=== modified file 'templates/icehouse/neutron.conf'
102--- templates/icehouse/neutron.conf 2014-10-22 16:31:29 +0000
103+++ templates/icehouse/neutron.conf 2015-02-24 11:28:29 +0000
104@@ -50,7 +50,20 @@
105 quota_driver = neutron.db.quota_db.DbQuotaDriver
106 {% if neutron_security_groups -%}
107 quota_items = network,subnet,port,security_group,security_group_rule
108+quota_security_group = {{ quota_security_group }}
109+quota_security_group_rule = {{ quota_security_group_rule }}
110+{% else -%}
111+quota_items = network,subnet,port
112 {% endif -%}
113+quota_network = {{ quota_network }}
114+quota_subnet = {{ quota_subnet }}
115+quota_port = {{ quota_port }}
116+quota_vip = {{ quota_vip }}
117+quota_pool = {{ quota_pool }}
118+quota_member = {{ quota_member }}
119+quota_health_monitors = {{ quota_health_monitors }}
120+quota_router = {{ quota_router }}
121+quota_floatingip = {{ quota_floatingip }}
122
123 [agent]
124 root_helper = sudo /usr/bin/neutron-rootwrap /etc/neutron/rootwrap.conf
125
126=== modified file 'templates/kilo/neutron.conf'
127--- templates/kilo/neutron.conf 2015-01-20 14:15:55 +0000
128+++ templates/kilo/neutron.conf 2015-02-24 11:28:29 +0000
129@@ -50,7 +50,20 @@
130 quota_driver = neutron.db.quota_db.DbQuotaDriver
131 {% if neutron_security_groups -%}
132 quota_items = network,subnet,port,security_group,security_group_rule
133+quota_security_group = {{ quota_security_group }}
134+quota_security_group_rule = {{ quota_security_group_rule }}
135+{% else -%}
136+quota_items = network,subnet,port
137 {% endif -%}
138+quota_network = {{ quota_network }}
139+quota_subnet = {{ quota_subnet }}
140+quota_port = {{ quota_port }}
141+quota_vip = {{ quota_vip }}
142+quota_pool = {{ quota_pool }}
143+quota_member = {{ quota_member }}
144+quota_health_monitors = {{ quota_health_monitors }}
145+quota_router = {{ quota_router }}
146+quota_floatingip = {{ quota_floatingip }}
147
148 [agent]
149 root_helper = sudo /usr/bin/neutron-rootwrap /etc/neutron/rootwrap.conf
150
151=== modified file 'unit_tests/test_neutron_api_context.py'
152--- unit_tests/test_neutron_api_context.py 2015-01-13 14:43:04 +0000
153+++ unit_tests/test_neutron_api_context.py 2015-02-24 11:28:29 +0000
154@@ -157,6 +157,17 @@
155 'verbose': True,
156 'l2_population': True,
157 'overlay_network_type': 'gre',
158+ 'quota_floatingip': 50,
159+ 'quota_health_monitors': -1,
160+ 'quota_member': -1,
161+ 'quota_network': 10,
162+ 'quota_pool': 10,
163+ 'quota_port': 50,
164+ 'quota_router': 10,
165+ 'quota_security_group': 10,
166+ 'quota_security_group_rule': 100,
167+ 'quota_subnet': 10,
168+ 'quota_vip': 10,
169 }
170 napi_ctxt = context.NeutronCCContext()
171 with patch.object(napi_ctxt, '_ensure_packages'):
172@@ -175,6 +186,17 @@
173 'verbose': True,
174 'l2_population': True,
175 'overlay_network_type': 'vxlan',
176+ 'quota_floatingip': 50,
177+ 'quota_health_monitors': -1,
178+ 'quota_member': -1,
179+ 'quota_network': 10,
180+ 'quota_pool': 10,
181+ 'quota_port': 50,
182+ 'quota_router': 10,
183+ 'quota_security_group': 10,
184+ 'quota_security_group_rule': 100,
185+ 'quota_subnet': 10,
186+ 'quota_vip': 10,
187 }
188 napi_ctxt = context.NeutronCCContext()
189 with patch.object(napi_ctxt, '_ensure_packages'):

Subscribers

People subscribed via source and target branches