The following pull request was submitted through Github. It can be accessed and reviewed at: https://github.com/lxc/pylxd/pull/100
This e-mail was sent by the LXC bot, direct replies will not reach the author unless they happen to be subscribed to this list. === Description (from pull-request) === Alternative to #93
From 12c93f21b509ed9e74938b895a0000f2b737c0be Mon Sep 17 00:00:00 2001 From: jpic <james...@gmail.com> Date: Tue, 24 May 2016 20:41:34 +0200 Subject: [PATCH] Create busybox image at first create_container call --- integration/testing.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/integration/testing.py b/integration/testing.py index e6e3cfe..3c50633 100644 --- a/integration/testing.py +++ b/integration/testing.py @@ -34,6 +34,20 @@ def generate_object_name(self): def create_container(self): """Create a container in lxd.""" + if not getattr(type(self), '_busybox_ready', False): + path, fingerprint = create_busybox_image() + + with open(path) as f: + image = self.client.images.create(f.read(), wait=True) + + response = self.lxd.images.aliases.post(json={ + 'description': '', + 'target': fingerprint, + 'name': 'busybox', + }) + + type(self)._busybox_ready = True + name = self.generate_object_name() machine = { 'name': name,
_______________________________________________ lxc-devel mailing list lxc-devel@lists.linuxcontainers.org http://lists.linuxcontainers.org/listinfo/lxc-devel