Merge ~xnox/snappy-device-agents:add-cloudimg-rootfs-label into snappy-device-agents:master

Proposed by Dimitri John Ledkov
Status: Merged
Approved by: Paul Larson
Approved revision: 7521e14e19bf48f1b23a31e275aeec8d2b5ea7b8
Merged at revision: 5b53394f16a89dbb674141289024b5db9da32241
Proposed branch: ~xnox/snappy-device-agents:add-cloudimg-rootfs-label
Merge into: snappy-device-agents:master
Diff against target: 23 lines (+4/-1)
1 file modified
devices/muxpi/muxpi.py (+4/-1)
Reviewer Review Type Date Requested Status
Paul Larson Approve
Review via email: mp+394707@code.launchpad.net

Commit message

add cloudimg-rootfs label support

To post a comment you must log in.
Revision history for this message
Dimitri John Ledkov (xnox) wrote :
Revision history for this message
Paul Larson (pwlars) wrote :

I've tested this with our hifive, and it does seem to get the cloud data copied into /var/lig/cloud/seed/nocloud-net. So hopefully once we have working network, it should be good :)

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/devices/muxpi/muxpi.py b/devices/muxpi/muxpi.py
2index a8ee667..5cf49f1 100644
3--- a/devices/muxpi/muxpi.py
4+++ b/devices/muxpi/muxpi.py
5@@ -39,7 +39,8 @@ class MuxPi:
6 IMAGE_PATH_IDS = {'writable/usr/bin/firefox': 'pi-desktop',
7 'writable/etc': 'ubuntu',
8 'writable/system-data': 'core',
9- 'ubuntu-seed/snaps': 'core20'}
10+ 'ubuntu-seed/snaps': 'core20',
11+ 'cloudimg-rootfs/etc/cloud/cloud.cfg': 'ubuntu-cpc'}
12
13 def __init__(self, config, job_data):
14 with open(config) as configfile:
15@@ -328,6 +329,8 @@ class MuxPi:
16 base = os.path.join(self.mount_point, 'writable')
17 if image_type == 'core':
18 base = os.path.join(base, 'system-data')
19+ if image_type == 'ubuntu-cpc':
20+ base = os.path.join(self.mount_point, 'cloudimg-rootfs')
21 ci_path = os.path.join(base, 'var/lib/cloud/seed/nocloud-net')
22 self._run_control('sudo mkdir -p {}'.format(ci_path))
23 write_cmd = "sudo bash -c \"echo '{}' > /{}/{}\""

Subscribers

People subscribed via source and target branches