~smoser/curtin/trunk.lp1680591

« back to all changes in this revision

Viewing changes to tests/vmtests/releases.py

  • Committer: Ryan Harper
  • Date: 2017-03-23 16:57:41 UTC
  • mfrom: (387.7.35 trunk.snappy-dd)
  • Revision ID: ryan.harper@canonical.com-20170323165741-o3jcvcgjd9xdy342
Add support for installing Ubuntu-Core 16 images

UC16 images are compressed-xz raw images which need to be written
directly to disk. Introduce new source types dd-{xz,gz,bz2,raw}
and pass them to block_meta write_image_to_disk. Update block_meta's
find_root_dev to look for UC16 specific paths to identify the root
partition.

UC16 images are generally not modifiable and do not contain dpkg/apt,
therefore curtin handles curthooks on UC16 differently. Add a new
top-level 'cloudconfig' key which is modeled after write_files to be
used by maas to inject cloud-init into a UC16 image; curtin appends
these files out in the "writable" partition of UC16 which will be
mounted up on top of the root partition. Add an initial vmtest
(disabled by default) as UC16 images are not yet available via maas
streams data.

Show diffs side-by-side

added added

removed removed

Lines of Context:
15
15
    target_distro = "centos"
16
16
 
17
17
 
 
18
class _UbuntuCoreUbuntuBase(_UbuntuBase):
 
19
    # base for installing UbuntuCore root-image.xz from ubuntu base
 
20
    target_distro = "ubuntu-core-16"
 
21
 
 
22
 
18
23
class _Centos70FromXenialBase(_CentosFromUbuntuBase):
19
24
    # release for boot
20
25
    release = "xenial"
22
27
    target_release = "centos70"
23
28
 
24
29
 
 
30
class _UbuntuCore16FromXenialBase(_UbuntuCoreUbuntuBase):
 
31
    # release for boot
 
32
    release = "xenial"
 
33
    # release for target
 
34
    target_release = "ubuntu-core-16"
 
35
 
 
36
 
25
37
class _Centos66FromXenialBase(_CentosFromUbuntuBase):
26
38
    release = "xenial"
27
39
    target_release = "centos66"
106
118
    centos66fromxenial = _Centos66FromXenialBase
107
119
 
108
120
 
 
121
class _UbuntuCoreReleases(object):
 
122
    uc16fromxenial = _UbuntuCore16FromXenialBase
 
123
 
 
124
 
109
125
base_vm_classes = _Releases
110
126
centos_base_vm_classes = _CentosReleases
 
127
ubuntu_core_base_vm_classes = _UbuntuCoreReleases
111
128
 
112
129
# vi: ts=4 expandtab syntax=python