1
# Copyright 2012 Canonical Ltd. This software is licensed under the
1
# Copyright 2012-2014 Canonical Ltd. This software is licensed under the
2
2
# GNU Affero General Public License version 3 (see the file LICENSE).
4
4
"""Test helpers for boot-image parameters."""
22
22
def make_boot_image_params():
23
23
"""Create an arbitrary dict of boot-image parameters.
25
These are the parameters that together describe a kind of boot that we
26
may need a kernel and initrd for: architecture, sub-architecture,
27
Ubuntu release, and boot purpose. See the `tftppath` module for how
31
architecture=factory.make_name('architecture'),
32
subarchitecture=factory.make_name('subarchitecture'),
33
release=factory.make_name('release'),
34
purpose=factory.make_name('purpose'))
25
These are the parameters that together describe a kind of boot for
26
which we may need a kernel and initrd: architecture,
27
sub-architecture, Ubuntu release, boot purpose, and release label.
30
architecture=factory.make_name('architecture'),
31
subarchitecture=factory.make_name('subarchitecture'),
32
release=factory.make_name('release'),
33
label=factory.make_name('label'),
34
purpose=factory.make_name('purpose'),
38
def make_boot_image_storage_params():
39
"""Create a dict of boot-image parameters as used to store the image.
41
These are the parameters that together describe a path to store a boot
42
image: architecture, sub-architecture, Ubuntu release, and release label.
45
architecture=factory.make_name('architecture'),
46
subarchitecture=factory.make_name('subarchitecture'),
47
release=factory.make_name('release'),
48
label=factory.make_name('label'),