Merge lp:~heut2008/charms/trusty/glance/user-config-flags into lp:~openstack-charmers-archive/charms/trusty/glance/next

Proposed by Yaguang Tang
Status: Merged
Merged at revision: 80
Proposed branch: lp:~heut2008/charms/trusty/glance/user-config-flags
Merge into: lp:~openstack-charmers-archive/charms/trusty/glance/next
Diff against target: 100 lines (+38/-2)
5 files modified
config.yaml (+12/-0)
hooks/glance_utils.py (+8/-2)
templates/icehouse/glance-api.conf (+6/-0)
templates/icehouse/glance-registry.conf (+6/-0)
templates/juno/glance-api.conf (+6/-0)
To merge this branch: bzr merge lp:~heut2008/charms/trusty/glance/user-config-flags
Reviewer Review Type Date Requested Status
OpenStack Charmers Pending
Review via email: mp+241654@code.launchpad.net
To post a comment you must log in.
Revision history for this message
uosci-testing-bot (uosci-testing-bot) wrote :

UOSCI bot says:
charm_lint_check #1013 glance-next for heut2008 mp241654
    LINT FAIL: lint-test failed

LINT Results (max last 5 lines):
  hooks/glance_utils.py:89:27: E122 continuation line missing indentation or outdented
  hooks/glance_utils.py:90:27: E122 continuation line missing indentation or outdented
  hooks/glance_utils.py:107:27: E122 continuation line missing indentation or outdented
  hooks/glance_utils.py:108:27: E122 continuation line missing indentation or outdented
  make: *** [lint] Error 1

Full lint test output: http://paste.ubuntu.com/8979954/
Build: http://10.98.191.181:8080/job/charm_lint_check/1013/

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

UOSCI bot says:
charm_unit_test #847 glance-next for heut2008 mp241654
    UNIT OK: passed

UNIT Results (max last 5 lines):
  hooks/glance_relations 211 9 96% 289-290, 309-320
  hooks/glance_utils 91 8 91% 162, 255-267
  TOTAL 350 23 93%
  Ran 65 tests in 3.379s
  OK

Full unit test output: http://paste.ubuntu.com/8979956/
Build: http://10.98.191.181:8080/job/charm_unit_test/847/

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

UOSCI bot says:
charm_amulet_test #392 glance-next for heut2008 mp241654
    AMULET OK: passed

AMULET Results (max last 5 lines):
  juju-test.conductor.15-basic-trusty-icehouse RESULT :
  juju-test.conductor DEBUG : Tearing down osci-sv07 juju environment
  juju-test.conductor DEBUG : Calling "juju destroy-environment -y osci-sv07"
  WARNING cannot delete security group "juju-osci-sv07-0". Used by another environment?
  juju-test INFO : Results: 3 passed, 0 failed, 0 errored

Full amulet test output: http://paste.ubuntu.com/8980286/
Build: http://10.98.191.181:8080/job/charm_amulet_test/392/

Revision history for this message
Edward Hope-Morley (hopem) wrote :

$ make lint
Running flake8 tests:
hooks/glance_utils.py:89:27: E122 continuation line missing indentation or outdented
hooks/glance_utils.py:90:27: E122 continuation line missing indentation or outdented
hooks/glance_utils.py:107:27: E122 continuation line missing indentation or outdented
hooks/glance_utils.py:108:27: E122 continuation line missing indentation or outdented
make: *** [lint] Error 1

Yaguang, please please please run tests before putting code up for review. Aside from the error this looks fine.

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 2014-10-08 10:40:04 +0000
3+++ config.yaml 2014-11-13 05:42:17 +0000
4@@ -22,6 +22,18 @@
5 default: glance
6 type: string
7 description: Glance database name.
8+ api-config-flags:
9+ type: string
10+ description: |
11+ Comma-separated list of key=value pairs to be added to glance-api.conf
12+ where 'value' may itself be a comma-separated list of values to be
13+ assigned to the 'key'.
14+ registry-config-flags:
15+ type: string
16+ description: |
17+ Comma-separated list of key=value pairs to be added to glance-registry.conf
18+ where 'value' may itself be a comma-separated list of values to be
19+ assigned to the 'key'.
20 region:
21 default: RegionOne
22 type: string
23
24=== modified file 'hooks/glance_utils.py'
25--- hooks/glance_utils.py 2014-10-07 19:33:10 +0000
26+++ hooks/glance_utils.py 2014-11-13 05:42:17 +0000
27@@ -84,7 +84,10 @@
28 context.SyslogContext(),
29 glance_contexts.LoggingConfigContext(),
30 glance_contexts.GlanceIPv6Context(),
31- context.WorkerConfigContext()],
32+ context.WorkerConfigContext(),
33+ context.OSConfigFlagContext(
34+ charm_flag='registry-config-flags',
35+ template_flag='registry_config_flags')],
36 'services': ['glance-registry']
37 }),
38 (GLANCE_API_CONF, {
39@@ -99,7 +102,10 @@
40 glance_contexts.LoggingConfigContext(),
41 glance_contexts.GlanceIPv6Context(),
42 context.WorkerConfigContext(),
43- glance_contexts.MultiStoreContext()],
44+ glance_contexts.MultiStoreContext(),
45+ context.OSConfigFlagContext(
46+ charm_flag='api-config-flags',
47+ template_flag='api_config_flags')],
48 'services': ['glance-api']
49 }),
50 (GLANCE_API_PASTE_INI, {
51
52=== modified file 'templates/icehouse/glance-api.conf'
53--- templates/icehouse/glance-api.conf 2014-10-24 09:36:46 +0000
54+++ templates/icehouse/glance-api.conf 2014-11-13 05:42:17 +0000
55@@ -30,6 +30,12 @@
56 registry_port = 9191
57 registry_client_protocol = http
58
59+{% if api_config_flags -%}
60+{% for key, value in api_config_flags.iteritems() -%}
61+{{ key }} = {{ value }}
62+{% endfor -%}
63+{% endif -%}
64+
65 {% include "parts/rabbitmq" %}
66
67 {% if rabbitmq_host or rabbitmq_hosts -%}
68
69=== modified file 'templates/icehouse/glance-registry.conf'
70--- templates/icehouse/glance-registry.conf 2014-10-07 12:28:20 +0000
71+++ templates/icehouse/glance-registry.conf 2014-11-13 05:42:17 +0000
72@@ -12,5 +12,11 @@
73 api_limit_max = 1000
74 limit_param_default = 25
75
76+{% if registry_config_flags -%}
77+{% for key, value in registry_config_flags.iteritems() -%}
78+{{ key }} = {{ value }}
79+{% endfor -%}
80+{% endif -%}
81+
82 {% include "parts/keystone" %}
83 {% include "parts/section-database" %}
84
85=== modified file 'templates/juno/glance-api.conf'
86--- templates/juno/glance-api.conf 2014-10-24 09:42:04 +0000
87+++ templates/juno/glance-api.conf 2014-11-13 05:42:17 +0000
88@@ -33,6 +33,12 @@
89 registry_port = 9191
90 registry_client_protocol = http
91
92+{% if api_config_flags -%}
93+{% for key, value in api_config_flags.iteritems() -%}
94+{{ key }} = {{ value }}
95+{% endfor -%}
96+{% endif -%}
97+
98 {% include "parts/rabbitmq" %}
99
100 {% if rabbitmq_host or rabbitmq_hosts -%}

Subscribers

People subscribed via source and target branches