Merge ~sylvain-pineau/checkbox/+git/metabox:daily-images-support into ~checkbox-dev/checkbox/+git/metabox:main

Proposed by Sylvain Pineau
Status: Merged
Approved by: Sylvain Pineau
Approved revision: 1443ad9a7a8f74c6deb2e60c79ad5c1d84b52fae
Merge reported by: Sylvain Pineau
Merged at revision: 1443ad9a7a8f74c6deb2e60c79ad5c1d84b52fae
Proposed branch: ~sylvain-pineau/checkbox/+git/metabox:daily-images-support
Merge into: ~checkbox-dev/checkbox/+git/metabox:main
Diff against target: 28 lines (+7/-2)
1 file modified
metabox/core/lxd_provider.py (+7/-2)
Reviewer Review Type Date Requested Status
Sylvain Pineau (community) Approve
Review via email: mp+402187@code.launchpad.net

Description of the change

Add support for daily lxc images, useful when testing upcoming ubuntu releases.

To post a comment you must log in.
Revision history for this message
Sylvain Pineau (sylvain-pineau) wrote :

self-approved

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/metabox/core/lxd_provider.py b/metabox/core/lxd_provider.py
2index df70b8a..a5f3ca9 100644
3--- a/metabox/core/lxd_provider.py
4+++ b/metabox/core/lxd_provider.py
5@@ -110,6 +110,11 @@ class LxdMachineProvider():
6 def _create_machine(self, config):
7 name = 'metabox-{}'.format(config)
8 base_profiles = ["default", "checkbox"]
9+ alias = config.alias
10+ server = 'https://cloud-images.ubuntu.com/releases'
11+ if alias.endswith('-daily'):
12+ server = 'https://cloud-images.ubuntu.com/daily'
13+ alias = alias.replace('-daily', '')
14 if config.origin == 'snap':
15 base_profiles.append('snap')
16 lxd_config = {
17@@ -117,9 +122,9 @@ class LxdMachineProvider():
18 "profiles": base_profiles + config.profiles,
19 "source": {
20 "type": "image",
21- "alias": config.alias,
22+ "alias": alias,
23 'protocol': 'simplestreams',
24- 'server': 'https://cloud-images.ubuntu.com/releases'
25+ 'server': server
26 }
27 }
28 try:

Subscribers

People subscribed via source and target branches