~evilnick/maas/1.2-docs-tidyup+preseed

« back to all changes in this revision

Viewing changes to src/maasserver/api.py

[r=julian-edwards][bug=][author=jameinel] Expose the new kernel options to the pxeconfig api.

Add the extra options to KernelParameters, and return them when the tftp server places its request.
Tweak the tftp server so that it adds the new parameters to the commandline.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1784
1784
    else:
1785
1785
        series = node.get_distro_series()
1786
1786
 
 
1787
    if node is not None:
 
1788
        # We don't care if the kernel opts is from the global setting or a tag,
 
1789
        # just get the options
 
1790
        _, extra_kernel_opts = node.get_effective_kernel_options()
 
1791
    else:
 
1792
        extra_kernel_opts = None
 
1793
 
1787
1794
    purpose = get_boot_purpose(node)
1788
1795
    server_address = get_maas_facing_server_address()
1789
1796
    cluster_address = get_mandatory_param(request.GET, "local")
1791
1798
    params = KernelParameters(
1792
1799
        arch=arch, subarch=subarch, release=series, purpose=purpose,
1793
1800
        hostname=hostname, domain=domain, preseed_url=preseed_url,
1794
 
        log_host=server_address, fs_host=cluster_address)
 
1801
        log_host=server_address, fs_host=cluster_address,
 
1802
        extra_opts=extra_kernel_opts)
1795
1803
 
1796
1804
    return HttpResponse(
1797
1805
        json.dumps(params._asdict()),