Merge lp:~corey.bryant/charms/trusty/glance/git-ods into lp:~openstack-charmers-archive/charms/trusty/glance/next
- Trusty Tahr (14.04)
- git-ods
- Merge into next
Status: | Merged |
---|---|
Merged at revision: | 116 |
Proposed branch: | lp:~corey.bryant/charms/trusty/glance/git-ods |
Merge into: | lp:~openstack-charmers-archive/charms/trusty/glance/next |
Diff against target: |
467 lines (+165/-40) 7 files modified
hooks/charmhelpers/contrib/openstack/utils.py (+65/-18) hooks/charmhelpers/contrib/python/packages.py (+28/-5) hooks/charmhelpers/fetch/giturl.py (+7/-5) hooks/glance_utils.py (+41/-2) tests/basic_deployment.py (+2/-2) unit_tests/test_glance_relations.py (+8/-4) unit_tests/test_glance_utils.py (+14/-4) |
To merge this branch: | bzr merge lp:~corey.bryant/charms/trusty/glance/git-ods |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
OpenStack Charmers | Pending | ||
Review via email: mp+257187@code.launchpad.net |
Commit message
Adds support to:
* Use a Python virtualenv when deploying from source
* Default to shallow clone for git (depth=1)
* Pass http_proxy to pip installs if specified
Description of the change
uosci-testing-bot (uosci-testing-bot) wrote : | # |
uosci-testing-bot (uosci-testing-bot) wrote : | # |
charm_unit_test #3607 glance-next for corey.bryant mp257187
UNIT FAIL: unit-test failed
UNIT Results (max last 2 lines):
make: *** [unit_test] Error 1
ERROR:root:Make target returned non-zero.
Full unit test output: http://
Build: http://
uosci-testing-bot (uosci-testing-bot) wrote : | # |
charm_amulet_test #3606 glance-next for corey.bryant mp257187
AMULET OK: passed
Build: http://
uosci-testing-bot (uosci-testing-bot) wrote : | # |
charm_lint_check #3829 glance-next for corey.bryant mp257187
LINT OK: passed
uosci-testing-bot (uosci-testing-bot) wrote : | # |
charm_unit_test #3616 glance-next for corey.bryant mp257187
UNIT OK: passed
uosci-testing-bot (uosci-testing-bot) wrote : | # |
charm_amulet_test #3615 glance-next for corey.bryant mp257187
AMULET OK: passed
Build: http://
uosci-testing-bot (uosci-testing-bot) wrote : | # |
charm_lint_check #3864 glance-next for corey.bryant mp257187
LINT OK: passed
uosci-testing-bot (uosci-testing-bot) wrote : | # |
charm_unit_test #3651 glance-next for corey.bryant mp257187
UNIT OK: passed
uosci-testing-bot (uosci-testing-bot) wrote : | # |
charm_lint_check #3873 glance-next for corey.bryant mp257187
LINT OK: passed
uosci-testing-bot (uosci-testing-bot) wrote : | # |
charm_unit_test #3660 glance-next for corey.bryant mp257187
UNIT OK: passed
uosci-testing-bot (uosci-testing-bot) wrote : | # |
charm_amulet_test #3655 glance-next for corey.bryant mp257187
AMULET OK: passed
Build: http://
uosci-testing-bot (uosci-testing-bot) wrote : | # |
charm_lint_check #3904 glance-next for corey.bryant mp257187
LINT OK: passed
uosci-testing-bot (uosci-testing-bot) wrote : | # |
charm_unit_test #3691 glance-next for corey.bryant mp257187
UNIT OK: passed
uosci-testing-bot (uosci-testing-bot) wrote : | # |
charm_lint_check #4257 glance-next for corey.bryant mp257187
LINT OK: passed
uosci-testing-bot (uosci-testing-bot) wrote : | # |
charm_unit_test #3983 glance-next for corey.bryant mp257187
UNIT OK: passed
- 144. By Corey Bryant
-
Sync charm-helpers
- 145. By Corey Bryant
-
Add comment to fix bin symlinks
- 146. By Corey Bryant
-
Sync charm-helpers
- 147. By Corey Bryant
-
Sync charm-helpers
- 148. By Corey Bryant
-
Clone from github in deploy from source amulet tests
- 149. By Corey Bryant
-
Add libyaml-dev as base git package
uosci-testing-bot (uosci-testing-bot) wrote : | # |
charm_lint_check #4462 glance-next for corey.bryant mp257187
LINT OK: passed
uosci-testing-bot (uosci-testing-bot) wrote : | # |
charm_unit_test #4187 glance-next for corey.bryant mp257187
UNIT OK: passed
uosci-testing-bot (uosci-testing-bot) wrote : | # |
charm_amulet_test #4085 glance-next for corey.bryant mp257187
AMULET OK: passed
Build: http://
uosci-testing-bot (uosci-testing-bot) wrote : | # |
charm_lint_check #4525 glance-next for corey.bryant mp257187
LINT OK: passed
uosci-testing-bot (uosci-testing-bot) wrote : | # |
charm_unit_test #4250 glance-next for corey.bryant mp257187
UNIT OK: passed
uosci-testing-bot (uosci-testing-bot) wrote : | # |
charm_amulet_test #4104 glance-next for corey.bryant mp257187
AMULET OK: passed
Build: http://
uosci-testing-bot (uosci-testing-bot) wrote : | # |
charm_lint_check #4533 glance-next for corey.bryant mp257187
LINT OK: passed
uosci-testing-bot (uosci-testing-bot) wrote : | # |
charm_unit_test #4258 glance-next for corey.bryant mp257187
UNIT OK: passed
uosci-testing-bot (uosci-testing-bot) wrote : | # |
charm_amulet_test #4112 glance-next for corey.bryant mp257187
AMULET OK: passed
Build: http://
- 150. By Corey Bryant
-
Sync charm-helpers
Preview Diff
1 | === modified file 'hooks/charmhelpers/contrib/openstack/utils.py' |
2 | --- hooks/charmhelpers/contrib/openstack/utils.py 2015-04-16 19:53:49 +0000 |
3 | +++ hooks/charmhelpers/contrib/openstack/utils.py 2015-05-27 13:06:47 +0000 |
4 | @@ -53,9 +53,13 @@ |
5 | get_ipv6_addr |
6 | ) |
7 | |
8 | +from charmhelpers.contrib.python.packages import ( |
9 | + pip_create_virtualenv, |
10 | + pip_install, |
11 | +) |
12 | + |
13 | from charmhelpers.core.host import lsb_release, mounts, umount |
14 | from charmhelpers.fetch import apt_install, apt_cache, install_remote |
15 | -from charmhelpers.contrib.python.packages import pip_install |
16 | from charmhelpers.contrib.storage.linux.utils import is_block_device, zap_disk |
17 | from charmhelpers.contrib.storage.linux.loopback import ensure_loopback_device |
18 | |
19 | @@ -497,7 +501,17 @@ |
20 | requirements_dir = None |
21 | |
22 | |
23 | -def git_clone_and_install(projects_yaml, core_project): |
24 | +def _git_yaml_load(projects_yaml): |
25 | + """ |
26 | + Load the specified yaml into a dictionary. |
27 | + """ |
28 | + if not projects_yaml: |
29 | + return None |
30 | + |
31 | + return yaml.load(projects_yaml) |
32 | + |
33 | + |
34 | +def git_clone_and_install(projects_yaml, core_project, depth=1): |
35 | """ |
36 | Clone/install all specified OpenStack repositories. |
37 | |
38 | @@ -510,23 +524,22 @@ |
39 | repository: 'git://git.openstack.org/openstack/requirements.git', |
40 | branch: 'stable/icehouse'} |
41 | directory: /mnt/openstack-git |
42 | - http_proxy: http://squid.internal:3128 |
43 | - https_proxy: https://squid.internal:3128 |
44 | + http_proxy: squid-proxy-url |
45 | + https_proxy: squid-proxy-url |
46 | |
47 | The directory, http_proxy, and https_proxy keys are optional. |
48 | """ |
49 | global requirements_dir |
50 | parent_dir = '/mnt/openstack-git' |
51 | - |
52 | - if not projects_yaml: |
53 | - return |
54 | - |
55 | - projects = yaml.load(projects_yaml) |
56 | + http_proxy = None |
57 | + |
58 | + projects = _git_yaml_load(projects_yaml) |
59 | _git_validate_projects_yaml(projects, core_project) |
60 | |
61 | old_environ = dict(os.environ) |
62 | |
63 | if 'http_proxy' in projects.keys(): |
64 | + http_proxy = projects['http_proxy'] |
65 | os.environ['http_proxy'] = projects['http_proxy'] |
66 | if 'https_proxy' in projects.keys(): |
67 | os.environ['https_proxy'] = projects['https_proxy'] |
68 | @@ -534,15 +547,19 @@ |
69 | if 'directory' in projects.keys(): |
70 | parent_dir = projects['directory'] |
71 | |
72 | + pip_create_virtualenv(os.path.join(parent_dir, 'venv')) |
73 | + |
74 | for p in projects['repositories']: |
75 | repo = p['repository'] |
76 | branch = p['branch'] |
77 | if p['name'] == 'requirements': |
78 | - repo_dir = _git_clone_and_install_single(repo, branch, parent_dir, |
79 | + repo_dir = _git_clone_and_install_single(repo, branch, depth, |
80 | + parent_dir, http_proxy, |
81 | update_requirements=False) |
82 | requirements_dir = repo_dir |
83 | else: |
84 | - repo_dir = _git_clone_and_install_single(repo, branch, parent_dir, |
85 | + repo_dir = _git_clone_and_install_single(repo, branch, depth, |
86 | + parent_dir, http_proxy, |
87 | update_requirements=True) |
88 | |
89 | os.environ = old_environ |
90 | @@ -574,7 +591,8 @@ |
91 | error_out('openstack-origin-git key \'{}\' is missing'.format(key)) |
92 | |
93 | |
94 | -def _git_clone_and_install_single(repo, branch, parent_dir, update_requirements): |
95 | +def _git_clone_and_install_single(repo, branch, depth, parent_dir, http_proxy, |
96 | + update_requirements): |
97 | """ |
98 | Clone and install a single git repository. |
99 | """ |
100 | @@ -587,7 +605,8 @@ |
101 | |
102 | if not os.path.exists(dest_dir): |
103 | juju_log('Cloning git repo: {}, branch: {}'.format(repo, branch)) |
104 | - repo_dir = install_remote(repo, dest=parent_dir, branch=branch) |
105 | + repo_dir = install_remote(repo, dest=parent_dir, branch=branch, |
106 | + depth=depth) |
107 | else: |
108 | repo_dir = dest_dir |
109 | |
110 | @@ -598,7 +617,12 @@ |
111 | _git_update_requirements(repo_dir, requirements_dir) |
112 | |
113 | juju_log('Installing git repo from dir: {}'.format(repo_dir)) |
114 | - pip_install(repo_dir) |
115 | + if http_proxy: |
116 | + pip_install(repo_dir, proxy=http_proxy, |
117 | + venv=os.path.join(parent_dir, 'venv')) |
118 | + else: |
119 | + pip_install(repo_dir, |
120 | + venv=os.path.join(parent_dir, 'venv')) |
121 | |
122 | return repo_dir |
123 | |
124 | @@ -621,16 +645,27 @@ |
125 | os.chdir(orig_dir) |
126 | |
127 | |
128 | +def git_pip_venv_dir(projects_yaml): |
129 | + """ |
130 | + Return the pip virtualenv path. |
131 | + """ |
132 | + parent_dir = '/mnt/openstack-git' |
133 | + |
134 | + projects = _git_yaml_load(projects_yaml) |
135 | + |
136 | + if 'directory' in projects.keys(): |
137 | + parent_dir = projects['directory'] |
138 | + |
139 | + return os.path.join(parent_dir, 'venv') |
140 | + |
141 | + |
142 | def git_src_dir(projects_yaml, project): |
143 | """ |
144 | Return the directory where the specified project's source is located. |
145 | """ |
146 | parent_dir = '/mnt/openstack-git' |
147 | |
148 | - if not projects_yaml: |
149 | - return |
150 | - |
151 | - projects = yaml.load(projects_yaml) |
152 | + projects = _git_yaml_load(projects_yaml) |
153 | |
154 | if 'directory' in projects.keys(): |
155 | parent_dir = projects['directory'] |
156 | @@ -640,3 +675,15 @@ |
157 | return os.path.join(parent_dir, os.path.basename(p['repository'])) |
158 | |
159 | return None |
160 | + |
161 | + |
162 | +def git_yaml_value(projects_yaml, key): |
163 | + """ |
164 | + Return the value in projects_yaml for the specified key. |
165 | + """ |
166 | + projects = _git_yaml_load(projects_yaml) |
167 | + |
168 | + if key in projects.keys(): |
169 | + return projects[key] |
170 | + |
171 | + return None |
172 | |
173 | === modified file 'hooks/charmhelpers/contrib/python/packages.py' |
174 | --- hooks/charmhelpers/contrib/python/packages.py 2015-03-20 17:15:02 +0000 |
175 | +++ hooks/charmhelpers/contrib/python/packages.py 2015-05-27 13:06:47 +0000 |
176 | @@ -17,8 +17,11 @@ |
177 | # You should have received a copy of the GNU Lesser General Public License |
178 | # along with charm-helpers. If not, see <http://www.gnu.org/licenses/>. |
179 | |
180 | +import os |
181 | +import subprocess |
182 | + |
183 | from charmhelpers.fetch import apt_install, apt_update |
184 | -from charmhelpers.core.hookenv import log |
185 | +from charmhelpers.core.hookenv import charm_dir, log |
186 | |
187 | try: |
188 | from pip import main as pip_execute |
189 | @@ -51,11 +54,15 @@ |
190 | pip_execute(command) |
191 | |
192 | |
193 | -def pip_install(package, fatal=False, upgrade=False, **options): |
194 | +def pip_install(package, fatal=False, upgrade=False, venv=None, **options): |
195 | """Install a python package""" |
196 | - command = ["install"] |
197 | + if venv: |
198 | + venv_python = os.path.join(venv, 'bin/pip') |
199 | + command = [venv_python, "install"] |
200 | + else: |
201 | + command = ["install"] |
202 | |
203 | - available_options = ('proxy', 'src', 'log', "index-url", ) |
204 | + available_options = ('proxy', 'src', 'log', 'index-url', ) |
205 | for option in parse_options(options, available_options): |
206 | command.append(option) |
207 | |
208 | @@ -69,7 +76,10 @@ |
209 | |
210 | log("Installing {} package with options: {}".format(package, |
211 | command)) |
212 | - pip_execute(command) |
213 | + if venv: |
214 | + subprocess.check_call(command) |
215 | + else: |
216 | + pip_execute(command) |
217 | |
218 | |
219 | def pip_uninstall(package, **options): |
220 | @@ -94,3 +104,16 @@ |
221 | """Returns the list of current python installed packages |
222 | """ |
223 | return pip_execute(["list"]) |
224 | + |
225 | + |
226 | +def pip_create_virtualenv(path=None): |
227 | + """Create an isolated Python environment.""" |
228 | + apt_install('python-virtualenv') |
229 | + |
230 | + if path: |
231 | + venv_path = path |
232 | + else: |
233 | + venv_path = os.path.join(charm_dir(), 'venv') |
234 | + |
235 | + if not os.path.exists(venv_path): |
236 | + subprocess.check_call(['virtualenv', venv_path]) |
237 | |
238 | === modified file 'hooks/charmhelpers/fetch/giturl.py' |
239 | --- hooks/charmhelpers/fetch/giturl.py 2015-03-20 17:15:02 +0000 |
240 | +++ hooks/charmhelpers/fetch/giturl.py 2015-05-27 13:06:47 +0000 |
241 | @@ -45,14 +45,16 @@ |
242 | else: |
243 | return True |
244 | |
245 | - def clone(self, source, dest, branch): |
246 | + def clone(self, source, dest, branch, depth=None): |
247 | if not self.can_handle(source): |
248 | raise UnhandledSource("Cannot handle {}".format(source)) |
249 | |
250 | - repo = Repo.clone_from(source, dest) |
251 | - repo.git.checkout(branch) |
252 | + if depth: |
253 | + Repo.clone_from(source, dest, branch=branch, depth=depth) |
254 | + else: |
255 | + Repo.clone_from(source, dest, branch=branch) |
256 | |
257 | - def install(self, source, branch="master", dest=None): |
258 | + def install(self, source, branch="master", dest=None, depth=None): |
259 | url_parts = self.parse_url(source) |
260 | branch_name = url_parts.path.strip("/").split("/")[-1] |
261 | if dest: |
262 | @@ -63,7 +65,7 @@ |
263 | if not os.path.exists(dest_dir): |
264 | mkdir(dest_dir, perms=0o755) |
265 | try: |
266 | - self.clone(source, dest_dir, branch) |
267 | + self.clone(source, dest_dir, branch, depth) |
268 | except GitCommandError as e: |
269 | raise UnhandledSource(e.message) |
270 | except OSError as e: |
271 | |
272 | === modified file 'hooks/glance_utils.py' |
273 | --- hooks/glance_utils.py 2015-04-17 12:05:48 +0000 |
274 | +++ hooks/glance_utils.py 2015-05-27 13:06:47 +0000 |
275 | @@ -14,6 +14,10 @@ |
276 | apt_install, |
277 | add_source) |
278 | |
279 | +from charmhelpers.contrib.python.packages import ( |
280 | + pip_install, |
281 | +) |
282 | + |
283 | from charmhelpers.core.hookenv import ( |
284 | charm_dir, |
285 | config, |
286 | @@ -47,6 +51,8 @@ |
287 | git_install_requested, |
288 | git_clone_and_install, |
289 | git_src_dir, |
290 | + git_yaml_value, |
291 | + git_pip_venv_dir, |
292 | configure_installation_source, |
293 | os_release, |
294 | ) |
295 | @@ -60,8 +66,12 @@ |
296 | "python-psycopg2", "python-keystone", "python-six", "uuid", "haproxy", ] |
297 | |
298 | BASE_GIT_PACKAGES = [ |
299 | + 'libffi-dev', |
300 | + 'libmysqlclient-dev', |
301 | 'libxml2-dev', |
302 | 'libxslt1-dev', |
303 | + 'libssl-dev', |
304 | + 'libyaml-dev', |
305 | 'python-dev', |
306 | 'python-pip', |
307 | 'python-setuptools', |
308 | @@ -340,6 +350,14 @@ |
309 | |
310 | def git_post_install(projects_yaml): |
311 | """Perform glance post-install setup.""" |
312 | + http_proxy = git_yaml_value(projects_yaml, 'http_proxy') |
313 | + if http_proxy: |
314 | + pip_install('mysql-python', proxy=http_proxy, |
315 | + venv=git_pip_venv_dir(projects_yaml)) |
316 | + else: |
317 | + pip_install('mysql-python', |
318 | + venv=git_pip_venv_dir(projects_yaml)) |
319 | + |
320 | src_etc = os.path.join(git_src_dir(projects_yaml, 'glance'), 'etc') |
321 | configs = { |
322 | 'src': src_etc, |
323 | @@ -350,13 +368,34 @@ |
324 | shutil.rmtree(configs['dest']) |
325 | shutil.copytree(configs['src'], configs['dest']) |
326 | |
327 | + symlinks = [ |
328 | + # NOTE(coreycb): Need to find better solution than bin symlinks. |
329 | + {'src': os.path.join(git_pip_venv_dir(projects_yaml), |
330 | + 'bin/glance-manage'), |
331 | + 'link': '/usr/local/bin/glance-manage'}, |
332 | + # NOTE(coreycb): This is ugly but couldn't find pypi package that |
333 | + # installs rbd.py and rados.py. |
334 | + {'src': '/usr/lib/python2.7/dist-packages/rbd.py', |
335 | + 'link': os.path.join(git_pip_venv_dir(projects_yaml), |
336 | + 'lib/python2.7/site-packages/rbd.py')}, |
337 | + {'src': '/usr/lib/python2.7/dist-packages/rados.py', |
338 | + 'link': os.path.join(git_pip_venv_dir(projects_yaml), |
339 | + 'lib/python2.7/site-packages/rados.py')}, |
340 | + ] |
341 | + |
342 | + for s in symlinks: |
343 | + if os.path.lexists(s['link']): |
344 | + os.remove(s['link']) |
345 | + os.symlink(s['src'], s['link']) |
346 | + |
347 | + bin_dir = os.path.join(git_pip_venv_dir(projects_yaml), 'bin') |
348 | glance_api_context = { |
349 | 'service_description': 'Glance API server', |
350 | 'service_name': 'Glance', |
351 | 'user_name': 'glance', |
352 | 'start_dir': '/var/lib/glance', |
353 | 'process_name': 'glance-api', |
354 | - 'executable_name': '/usr/local/bin/glance-api', |
355 | + 'executable_name': os.path.join(bin_dir, 'glance-api'), |
356 | 'config_files': ['/etc/glance/glance-api.conf'], |
357 | 'log_file': '/var/log/glance/api.log', |
358 | } |
359 | @@ -367,7 +406,7 @@ |
360 | 'user_name': 'glance', |
361 | 'start_dir': '/var/lib/glance', |
362 | 'process_name': 'glance-registry', |
363 | - 'executable_name': '/usr/local/bin/glance-registry', |
364 | + 'executable_name': os.path.join(bin_dir, 'glance-registry'), |
365 | 'config_files': ['/etc/glance/glance-registry.conf'], |
366 | 'log_file': '/var/log/glance/registry.log', |
367 | } |
368 | |
369 | === modified file 'tests/basic_deployment.py' |
370 | --- tests/basic_deployment.py 2015-04-16 21:31:48 +0000 |
371 | +++ tests/basic_deployment.py 2015-05-27 13:06:47 +0000 |
372 | @@ -66,10 +66,10 @@ |
373 | openstack_origin_git = { |
374 | 'repositories': [ |
375 | {'name': 'requirements', |
376 | - 'repository': 'git://git.openstack.org/openstack/requirements', |
377 | + 'repository': 'git://github.com/openstack/requirements', |
378 | 'branch': branch}, |
379 | {'name': 'glance', |
380 | - 'repository': 'git://git.openstack.org/openstack/glance', |
381 | + 'repository': 'git://github.com/openstack/glance', |
382 | 'branch': branch}, |
383 | ], |
384 | 'directory': '/mnt/openstack-git', |
385 | |
386 | === modified file 'unit_tests/test_glance_relations.py' |
387 | --- unit_tests/test_glance_relations.py 2015-04-21 15:33:15 +0000 |
388 | +++ unit_tests/test_glance_relations.py 2015-05-27 13:06:47 +0000 |
389 | @@ -130,10 +130,14 @@ |
390 | self.apt_update.assert_called_with(fatal=True) |
391 | self.apt_install.assert_called_with(['haproxy', 'python-setuptools', |
392 | 'python-six', 'uuid', |
393 | - 'python-mysqldb', 'python-pip', |
394 | - 'apache2', 'libxslt1-dev', |
395 | - 'python-psycopg2', 'zlib1g-dev', |
396 | - 'python-dev', 'libxml2-dev'], |
397 | + 'python-mysqldb', |
398 | + 'libmysqlclient-dev', |
399 | + 'libssl-dev', 'libffi-dev', |
400 | + 'apache2', 'python-pip', |
401 | + 'libxslt1-dev', 'libyaml-dev', |
402 | + 'python-psycopg2', |
403 | + 'zlib1g-dev', 'python-dev', |
404 | + 'libxml2-dev'], |
405 | fatal=True) |
406 | self.git_install.assert_called_with(projects_yaml) |
407 | |
408 | |
409 | === modified file 'unit_tests/test_glance_utils.py' |
410 | --- unit_tests/test_glance_utils.py 2015-04-17 12:05:48 +0000 |
411 | +++ unit_tests/test_glance_utils.py 2015-05-27 13:06:47 +0000 |
412 | @@ -23,6 +23,7 @@ |
413 | 'apt_install', |
414 | 'mkdir', |
415 | 'os_release', |
416 | + 'pip_install', |
417 | 'service_start', |
418 | 'service_stop', |
419 | 'service_name', |
420 | @@ -236,26 +237,35 @@ |
421 | @patch.object(utils, 'git_src_dir') |
422 | @patch.object(utils, 'service_restart') |
423 | @patch.object(utils, 'render') |
424 | + @patch.object(utils, 'git_pip_venv_dir') |
425 | @patch('os.path.join') |
426 | @patch('os.path.exists') |
427 | + @patch('os.symlink') |
428 | @patch('shutil.copytree') |
429 | @patch('shutil.rmtree') |
430 | - def test_git_post_install(self, rmtree, copytree, exists, join, render, |
431 | - service_restart, git_src_dir): |
432 | + @patch('subprocess.check_call') |
433 | + def test_git_post_install(self, check_call, rmtree, copytree, symlink, |
434 | + exists, join, venv, render, service_restart, |
435 | + git_src_dir): |
436 | projects_yaml = openstack_origin_git |
437 | join.return_value = 'joined-string' |
438 | + venv.return_value = '/mnt/openstack-git/venv' |
439 | utils.git_post_install(projects_yaml) |
440 | expected = [ |
441 | call('joined-string', '/etc/glance'), |
442 | ] |
443 | copytree.assert_has_calls(expected) |
444 | + expected = [ |
445 | + call('joined-string', '/usr/local/bin/glance-manage'), |
446 | + ] |
447 | + symlink.assert_has_calls(expected, any_order=True) |
448 | glance_api_context = { |
449 | 'service_description': 'Glance API server', |
450 | 'service_name': 'Glance', |
451 | 'user_name': 'glance', |
452 | 'start_dir': '/var/lib/glance', |
453 | 'process_name': 'glance-api', |
454 | - 'executable_name': '/usr/local/bin/glance-api', |
455 | + 'executable_name': 'joined-string', |
456 | 'config_files': ['/etc/glance/glance-api.conf'], |
457 | 'log_file': '/var/log/glance/api.log', |
458 | } |
459 | @@ -265,7 +275,7 @@ |
460 | 'user_name': 'glance', |
461 | 'start_dir': '/var/lib/glance', |
462 | 'process_name': 'glance-registry', |
463 | - 'executable_name': '/usr/local/bin/glance-registry', |
464 | + 'executable_name': 'joined-string', |
465 | 'config_files': ['/etc/glance/glance-registry.conf'], |
466 | 'log_file': '/var/log/glance/registry.log', |
467 | } |
charm_lint_check #3820 glance-next for corey.bryant mp257187
LINT OK: passed
Build: http:// 10.245. 162.77: 8080/job/ charm_lint_ check/3820/