theforeman/foreman — pull request #1106 by brandondunne (2013-12-18 22:26:43+00:00)
Title: Accept MAC address as a paramater to obtain the gPXE configuration

I attempted a brown-field install, so I already have a PXE server in my lab which serves PXELinux, gPXE and iPXE (both PXElinux and gPXE chain-load to iPXE since it is the most flexible). This server is used frequently by our team for OS installations and to test our product. My challenge was to allow continued use of the existing PXE server and also bring in Foreman. I am already running a Windows DHCP server and haven't attempted installing the smart-proxy to handle DHCP yet. Since I can't have two PXE servers on the network, I decided to create a default entry in my iPXE menu which chain loads the Foreman gPXE URL. The only problem is that Foreman doesn't have any way to tie the incoming request to a Host in it's database. This PR allows you to append the mac as a param to identify the host similar to the way that the spoof param is used for the IP.

iPXE entry looks something like:
```
:foreman
chain http://foreman.example.com/unattended/gPXE?mac=${net0/mac}
```
To Foreman, the requested URL looks something like:
``` http://foreman.example.com/unattended/gPXE?mac=00:11:22:33:44:55 ```