~rvb/maas/bug-1070765-hostname2

« back to all changes in this revision

Viewing changes to src/maasserver/api.py

[r=julian-edwards][bug=][author=allenap] Use the node-facing address of the cluster controller as the iSCSI host.

The cluster and node addresses are passed over to the pxeconfig view.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1792
1792
    :param arch: Architecture name (in the pxelinux namespace, eg. 'arm' not
1793
1793
        'armhf').
1794
1794
    :param subarch: Subarchitecture name (in the pxelinux namespace).
 
1795
    :param local: The IP address of the cluster controller.
 
1796
    :param remote: The IP address of the booting node.
1795
1797
    """
1796
1798
    node = get_node_from_mac_string(request.GET.get('mac', None))
1797
1799
 
1846
1848
 
1847
1849
    purpose = get_boot_purpose(node)
1848
1850
    server_address = get_maas_facing_server_address()
 
1851
    cluster_address = get_mandatory_param(request.GET, "local")
1849
1852
 
1850
1853
    params = KernelParameters(
1851
1854
        arch=arch, subarch=subarch, release=series, purpose=purpose,
1852
1855
        hostname=hostname, domain=domain, preseed_url=preseed_url,
1853
 
        log_host=server_address, fs_host=server_address)
 
1856
        log_host=server_address, fs_host=cluster_address)
1854
1857
 
1855
1858
    return HttpResponse(
1856
1859
        json.dumps(params._asdict()),