hudson.plugins.pxe
Class PartedMagicConfiguration

java.lang.Object
  extended by hudson.model.AbstractModelObject
      extended by hudson.plugins.pxe.BootConfiguration
          extended by hudson.plugins.pxe.ZipBasedBootConfiguration
              extended by hudson.plugins.pxe.PartedMagicConfiguration
All Implemented Interfaces:
hudson.model.Describable<BootConfiguration>, hudson.model.ModelObject, hudson.search.SearchableModelObject, hudson.search.SearchItem

public class PartedMagicConfiguration
extends ZipBasedBootConfiguration

Author:
Kohsuke Kawaguchi

Nested Class Summary
static class PartedMagicConfiguration.DescriptorImpl
           
 
Nested classes/interfaces inherited from class hudson.plugins.pxe.ZipBasedBootConfiguration
ZipBasedBootConfiguration.ZipBasedBootConfigurationDescriptor
 
Field Summary
 
Fields inherited from class hudson.plugins.pxe.ZipBasedBootConfiguration
zip
 
Constructor Summary
PartedMagicConfiguration(java.io.File zip)
           
 
Method Summary
protected  java.lang.String getIdSeed()
          Returns the string that becomes the seed of the BootConfiguration.getId().
 java.lang.String getPxeLinuxConfigFragment()
          Returns the fragment to be merged into pxelinux.cfg/default.
 org.jvnet.hudson.tftpd.Data tftp(java.lang.String fileName)
          Serves data from TFTP.
 
Methods inherited from class hudson.plugins.pxe.ZipBasedBootConfiguration
doImage, doIndex, getDescriptor, getDisplayName, getRelease
 
Methods inherited from class hudson.plugins.pxe.BootConfiguration
all, getAbsoluteUrl, getId, getResourceAsStream, getSearchUrl, getUrl, shutdown
 
Methods inherited from class hudson.model.AbstractModelObject
getSearch, getSearchIndex, getSearchName, makeSearchIndex, requirePOST, sendError, sendError, sendError, sendError, sendError
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PartedMagicConfiguration

@DataBoundConstructor
public PartedMagicConfiguration(java.io.File zip)
Method Detail

getIdSeed

protected java.lang.String getIdSeed()
Description copied from class: BootConfiguration
Returns the string that becomes the seed of the BootConfiguration.getId(). The ID is in turn used for HTTP URLs and TFTP file names, so this method should return something stable and not entirely illegible. But avoid unsafe characters like spaces, '/', etc. A good example would be "OpenSolaris2008.11" or "Ubuntu8.10".

Several BootConfigurations can return the same ID seed, and BootConfiguration.getId() handles those situations correctly.

Specified by:
getIdSeed in class BootConfiguration

getPxeLinuxConfigFragment

public java.lang.String getPxeLinuxConfigFragment()
                                           throws java.io.IOException
Description copied from class: BootConfiguration
Returns the fragment to be merged into pxelinux.cfg/default.

Specified by:
getPxeLinuxConfigFragment in class BootConfiguration
Throws:
java.io.IOException

tftp

public org.jvnet.hudson.tftpd.Data tftp(java.lang.String fileName)
                                 throws java.io.IOException
Description copied from class: BootConfiguration
Serves data from TFTP.

This mechanism is useful when you need to generate the data to be served on the fly. Static resources can be more easily served by simply placing them as resources under /tftp.

The TFTP file namespace is divided for each BootConfigurations as /ID/... to avoid collisions between different configurations.

Overrides:
tftp in class BootConfiguration
Parameters:
fileName - Relative path within the space designated for this boot configuration. For example, if the client requests "foo/bar/zot" and the ID of this configuration is "foo", this parameter will be "bar/zot".
Returns:
null if no such file exists, as far as this plugin is concerned. The PXE plugin will continue to search other BootConfigurations to see if anyone understands it.
Throws:
java.io.IOException - If a problem occurs. The PXE plugin will abort the search and the download will fail.


Copyright © 2010. All Rights Reserved.