Skip to content
Michael Rice edited this page Oct 14, 2015 · 1 revision

PXEProvider

How It Works

A PXEProvider has one public method. That method is generate_ipxe_script(*args, **kwargs). This method is passed the incoming request, and the server_data as returned by one of the get_server_by_* methods from the ProviderPluginBase instance. This method is responsible for taking that data and returning an ipxe script. This method should handle rendering the template, and setting any headers in the response. What ever this method returns is returned directly to the caller.

Making Your Own Plugin

You have a couple of options when it comes to making your own plugin. You can subclass the primary ABC class of PXEProvider or you can just create your own making sure to implement the generate_ipxe_script(*args, **kwargs). Be sure your __init__ method supports taking at least 1 arg. Once you have created your plugin to use it simply edit your pigs_config.py config file with the new namespace and class name to use.

Clone this wiki locally