Merge lp:~cprov/charms/trusty/core-image-tester/install-uci-nova into lp:~canonical-ci-engineering/charms/trusty/core-image-tester/trunk

Proposed by Celso Providelo
Status: Merged
Approved by: Celso Providelo
Approved revision: 4
Merged at revision: 4
Proposed branch: lp:~cprov/charms/trusty/core-image-tester/install-uci-nova
Merge into: lp:~canonical-ci-engineering/charms/trusty/core-image-tester/trunk
Diff against target: 41 lines (+12/-1)
2 files modified
hooks/actions.py (+11/-1)
hooks/services.py (+1/-0)
To merge this branch: bzr merge lp:~cprov/charms/trusty/core-image-tester/install-uci-nova
Reviewer Review Type Date Requested Status
Para Siva (community) Approve
Francis Ginther Approve
Review via email: mp+254916@code.launchpad.net

Commit message

Installing uci-nova adt ssh-setup, if provided as a charm payload (files/uci-nova).

Description of the change

Installing uci-nova adt ssh-setup, if provided as a charm payload (files/uci-nova).

I made it optional to avoid the need to land the charm & the spec changes simultaneously, otherwise CI-CD would eventually deploy a broken environment.

To post a comment you must log in.
Revision history for this message
Francis Ginther (fginther) wrote :

Approve.

Thanks for the explanation on ignoring the missing file.

review: Approve
Revision history for this message
Para Siva (psivaa) wrote :

Approving with an inline question

review: Approve
Revision history for this message
Celso Providelo (cprov) :

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'hooks/actions.py'
2--- hooks/actions.py 2015-03-31 03:11:23 +0000
3+++ hooks/actions.py 2015-04-01 13:52:09 +0000
4@@ -11,7 +11,8 @@
5 SERVICE_NAME = 'core-image-tester'
6 SERVICE_CONFIGNAME = 'core-service.conf'
7 REQUIRED_PACKAGES = [
8- 'autopkgtest', 'bzr', 'python-novaclient', 'python-virtualenv', 'python3-dev',
9+ 'autopkgtest', 'bzr', 'python-novaclient', 'python-virtualenv',
10+ 'python3-dev',
11 ]
12
13 config = hookenv.config()
14@@ -46,6 +47,15 @@
15 archive.extract_tarfile(tarball, os.path.dirname(_service_dir()))
16
17
18+def install_adt_uci_nova(service_name):
19+ hookenv.log('Attempting to install "uci-nova" autopkgtest ssh-setup ...')
20+ uci_nova_path = os.path.join(hookenv.charm_dir(), 'files', 'uci-nova')
21+ if not os.path.exists(uci_nova_path):
22+ hookenv.log('"uci-nova" not provided, nothing installed!')
23+ return
24+ shutil.copy2(uci_nova_path, '/usr/share/autopkgtest/ssh-setup/')
25+
26+
27 def update_config_file(service_name):
28 hookenv.log(
29 'Updating service configuration file: %s', SERVICE_CONFIGNAME)
30
31=== modified file 'hooks/services.py'
32--- hooks/services.py 2015-03-25 04:36:21 +0000
33+++ hooks/services.py 2015-04-01 13:52:09 +0000
34@@ -18,6 +18,7 @@
35 actions.install_packages,
36 actions.install_service_tarball,
37 actions.install_python_packages,
38+ actions.install_adt_uci_nova,
39 actions.update_config_file,
40 actions.create_user,
41 helpers.render_template(

Subscribers

People subscribed via source and target branches