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
diff --git a/devices/muxpi/muxpi.py b/devices/muxpi/muxpi.py
index a8ee667..5cf49f1 100644
--- a/devices/muxpi/muxpi.py
+++ b/devices/muxpi/muxpi.py
@@ -39,7 +39,8 @@ class MuxPi:
39 IMAGE_PATH_IDS = {'writable/usr/bin/firefox': 'pi-desktop',39 IMAGE_PATH_IDS = {'writable/usr/bin/firefox': 'pi-desktop',
40 'writable/etc': 'ubuntu',40 'writable/etc': 'ubuntu',
41 'writable/system-data': 'core',41 'writable/system-data': 'core',
42 'ubuntu-seed/snaps': 'core20'}42 'ubuntu-seed/snaps': 'core20',
43 'cloudimg-rootfs/etc/cloud/cloud.cfg': 'ubuntu-cpc'}
4344
44 def __init__(self, config, job_data):45 def __init__(self, config, job_data):
45 with open(config) as configfile:46 with open(config) as configfile:
@@ -328,6 +329,8 @@ class MuxPi:
328 base = os.path.join(self.mount_point, 'writable')329 base = os.path.join(self.mount_point, 'writable')
329 if image_type == 'core':330 if image_type == 'core':
330 base = os.path.join(base, 'system-data')331 base = os.path.join(base, 'system-data')
332 if image_type == 'ubuntu-cpc':
333 base = os.path.join(self.mount_point, 'cloudimg-rootfs')
331 ci_path = os.path.join(base, 'var/lib/cloud/seed/nocloud-net')334 ci_path = os.path.join(base, 'var/lib/cloud/seed/nocloud-net')
332 self._run_control('sudo mkdir -p {}'.format(ci_path))335 self._run_control('sudo mkdir -p {}'.format(ci_path))
333 write_cmd = "sudo bash -c \"echo '{}' > /{}/{}\""336 write_cmd = "sudo bash -c \"echo '{}' > /{}/{}\""

Subscribers

People subscribed via source and target branches