~lutostag/ubuntu/trusty/maas/1.5.4+keystone

« back to all changes in this revision

Viewing changes to src/provisioningserver/tasks.py

  • Committer: Package Import Robot
  • Author(s): Andres Rodriguez
  • Date: 2013-03-04 11:49:44 UTC
  • mto: This revision was merged to the branch mainline in revision 25.
  • Revision ID: package-import@ubuntu.com-20130304114944-azcvu9anlf8mizpa
Tags: upstream-1.3+bzr1452+dfsg
ImportĀ upstreamĀ versionĀ 1.3+bzr1452+dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
374
374
# =====================================================================
375
375
 
376
376
@task
377
 
def import_pxe_files(http_proxy=None):
 
377
def import_boot_images(http_proxy=None, main_archive=None, ports_archive=None,
 
378
                       cloud_images_archive=None):
378
379
    env = dict(os.environ)
379
380
    if http_proxy is not None:
380
381
        env['http_proxy'] = http_proxy
381
382
        env['https_proxy'] = http_proxy
382
 
    check_call(['maas-import-pxe-files'], env=env)
 
383
    if main_archive is not None:
 
384
        env['MAIN_ARCHIVE'] = main_archive
 
385
    if ports_archive is not None:
 
386
        env['PORTS_ARCHIVE'] = ports_archive
 
387
    if cloud_images_archive is not None:
 
388
        env['CLOUD_IMAGES_ARCHIVE'] = cloud_images_archive
 
389
    check_call(['sudo', '-n', '-E', 'maas-import-pxe-files'], env=env)