~andreserl/maas/lp1592666

« back to all changes in this revision

Viewing changes to src/maasserver/bootsources.py

  • Committer: LaMont Jones
  • Date: 2016-04-11 16:23:26 UTC
  • mfrom: (4900 maas)
  • mto: This revision was merged to the branch mainline in revision 4924.
  • Revision ID: lamont@canonical.com-20160411162326-6ycj8l2j66v2o5es
merge trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright 2014-2015 Canonical Ltd.  This software is licensed under the
 
1
# Copyright 2014-2016 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
"""Boot Sources."""
26
26
from maasserver.utils.orm import transactional
27
27
from maasserver.utils.threads import deferToDatabase
28
28
from provisioningserver.auth import get_maas_user_gpghome
 
29
from provisioningserver.drivers.osystem.ubuntu import UbuntuOS
29
30
from provisioningserver.import_images.download_descriptions import (
30
31
    download_all_image_descriptions,
31
32
)
48
49
    """Set default boot source if none is currently defined."""
49
50
    if not BootSource.objects.exists():
50
51
        source = BootSource.objects.create(
51
 
            url='http://maas.ubuntu.com/images/ephemeral-v2/releases/',
 
52
            url='https://images.maas.io/ephemeral-v2/releases/',
52
53
            keyring_filename=(
53
54
                '/usr/share/keyrings/ubuntu-cloudimage-keyring.gpg'))
54
55
        # Default is to import newest Ubuntu LTS releases, for only amd64
55
56
        # release versions only.
 
57
        ubuntu = UbuntuOS()
56
58
        BootSourceSelection.objects.create(
57
 
            boot_source=source, os='ubuntu', release='trusty',
 
59
            boot_source=source, os=ubuntu.name,
 
60
            release=ubuntu.get_default_commissioning_release(),
58
61
            arches=['amd64'], subarches=['*'], labels=['release'])
59
62
 
60
63