~lutostag/ubuntu/trusty/maas/1.5.2+packagefix

« back to all changes in this revision

Viewing changes to src/provisioningserver/testing/boot_images.py

  • Committer: Package Import Robot
  • Author(s): Andres Rodriguez
  • Date: 2014-03-28 10:43:53 UTC
  • mto: This revision was merged to the branch mainline in revision 57.
  • Revision ID: package-import@ubuntu.com-20140328104353-ekpolg0pm5xnvq2s
Tags: upstream-1.5+bzr2204
ImportĀ upstreamĀ versionĀ 1.5+bzr2204

Show diffs side-by-side

added added

removed removed

Lines of Context:
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).
3
3
 
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.
24
24
 
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
28
 
    these fit together.
29
 
    """
30
 
    return dict(
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.
 
28
    """
 
29
    return dict(
 
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'),
 
35
        )
 
36
 
 
37
 
 
38
def make_boot_image_storage_params():
 
39
    """Create a dict of boot-image parameters as used to store the image.
 
40
 
 
41
    These are the parameters that together describe a path to store a boot
 
42
    image: architecture, sub-architecture, Ubuntu release, and release label.
 
43
    """
 
44
    return dict(
 
45
        architecture=factory.make_name('architecture'),
 
46
        subarchitecture=factory.make_name('subarchitecture'),
 
47
        release=factory.make_name('release'),
 
48
        label=factory.make_name('label'),
 
49
        )