public class ProvisionVirtualInstanceCommand extends KickstartScheduleCommand
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
GUEST_NAME_REGEXP |
static int |
MAX_CPU |
static int |
MIN_NAME_SIZE |
cobblerOnly, cobblerProfileLabel, DHCP_NETWORK_TYPE, LINK_NETWORK_TYPE, PACKAGE_TO_REMOVE, TARGET_PROFILE_TYPE_EXISTING, TARGET_PROFILE_TYPE_NONE, TARGET_PROFILE_TYPE_PACKAGE, TARGET_PROFILE_TYPE_SYSTEM, UP2DATE_VERSION
server
user
Constructor and Description |
---|
ProvisionVirtualInstanceCommand(java.lang.Long selectedServer,
KickstartData ksData,
User userIn,
java.util.Date scheduleDateIn,
java.lang.String kickstartServerNameIn)
Constructor to be used when you want to call the store()
method.
|
ProvisionVirtualInstanceCommand(java.lang.Long selectedServer,
java.lang.Long ksid,
User userIn,
java.util.Date scheduleDateIn,
java.lang.String kickstartServerNameIn)
Constructor to be used when you want to call the store()
method.
|
ProvisionVirtualInstanceCommand(java.lang.Long selectedServer,
User userIn)
Constructor
|
Modifier and Type | Method and Description |
---|---|
static ProvisionVirtualInstanceCommand |
createCobblerScheduleCommand(java.lang.Long selectedServer,
java.lang.String label,
User userIn,
java.util.Date scheduleDateIn,
java.lang.String kickstartServerNameIn)
Creates the Kickstart Sechdule command that works with a cobbler only
kickstart where the host and the target may or may *not* be
the same system.
|
ValidatorError |
doValidation()
Do the validation needed for this command.
|
protected CobblerSystemCreateCommand |
getCobblerSystemCreateCommand(User userIn,
Server serverIn,
KickstartData ksdataIn,
java.lang.String mediaPath,
java.lang.String tokenList)
This method is extracted out so we can override them in the subclass
|
protected CobblerSystemCreateCommand |
getCobblerSystemCreateCommand(User userIn,
Server serverIn,
java.lang.String cobblerProfileLabelIn)
This method is extracted out so we can override them in the subclass
|
java.lang.String |
getFilePath() |
java.lang.String |
getGuestName() |
DataResult<KickstartDto> |
getKickstartProfiles()
Looks up a list of applicable kickstart profiles.
|
java.lang.Long |
getLocalStorageSize() |
java.lang.String |
getMacAddress()
Returns the mac address
|
java.lang.Long |
getMemoryAllocation() |
protected SelectMode |
getMode() |
java.lang.String |
getVirtBridge() |
java.lang.Long |
getVirtualCpus() |
static java.lang.String |
makeDefaultVirtPath(java.lang.String name,
KickstartVirtualizationType type)
Method to set up the default virt path where the guset will be stored
based on the guest name.
|
Action |
scheduleKickstartAction(Action prereqAction) |
Action |
scheduleRebootAction(Action prereqAction) |
void |
setFilePath(java.lang.String filePathIn) |
void |
setGuestName(java.lang.String guestNameIn) |
void |
setLocalStorageSize(java.lang.Long localStorageIn) |
void |
setMacAddress(java.lang.String macAddressIn)
Sets the mac address
|
void |
setMemoryAllocation(java.lang.Long memoryAllocationIn) |
void |
setVirtBridge(java.lang.String virtBridgeIn) |
void |
setVirtualCpus(java.lang.Long virtualCpusIn) |
protected ValidatorError |
validateUp2dateVersion()
This is a noop in the virtualization case - up2date isn't required
|
createBond, createKickstartActivationKey, findKickstartPackageToInstall, getBondAddress, getBondGateway, getBondInterface, getBondNetmask, getBondOptions, getBondSlaveInterfaces, getCompatibleSystems, getCreatedProfile, getExtraOptions, getHostServer, getKickstartPackageName, getKickstartServerName, getKickstartSession, getKsdata, getPackagesToInstall, getProfileId, getProfiles, getProfileType, getProxyHost, getScheduledAction, getScheduleDate, getServerProfileId, getTargetServer, getUser, isBondDhcp, isCobblerOnly, setBondAddress, setBondDhcp, setBondGateway, setBondInterface, setBondNetmask, setBondOptions, setBondSlaveInterfaces, setCreateBond, setHostServer, setIpv6Gateway, setKernelOptions, setKickstartServerName, setKickstartSession, setKsdata, setNetworkDevice, setPackagesToInstall, setPostKernelOptions, setProfileId, setProfileType, setProxy, setProxyHost, setScheduleDate, setServerProfileId, setTargetServer, setupKickstartSession, setUser, store, useIpv6Gateway, validateKickstartPackage
getServer
public static final int MIN_NAME_SIZE
public static final int MAX_CPU
public static final java.lang.String GUEST_NAME_REGEXP
public ProvisionVirtualInstanceCommand(java.lang.Long selectedServer, User userIn)
selectedServer
- server to kickstartuserIn
- user performing the kickstartpublic ProvisionVirtualInstanceCommand(java.lang.Long selectedServer, java.lang.Long ksid, User userIn, java.util.Date scheduleDateIn, java.lang.String kickstartServerNameIn)
selectedServer
- server to kickstartksid
- id of the KickstartData we are usinguserIn
- user performing the kickstartscheduleDateIn
- Date to schedule the KS.kickstartServerNameIn
- the name of the server who is kickstarting
this machinepublic ProvisionVirtualInstanceCommand(java.lang.Long selectedServer, KickstartData ksData, User userIn, java.util.Date scheduleDateIn, java.lang.String kickstartServerNameIn)
selectedServer
- server to kickstartksData
- the KickstartData we are usinguserIn
- user performing the kickstartscheduleDateIn
- Date to schedule the KS.kickstartServerNameIn
- the name of the server who is kickstarting
this machinepublic static ProvisionVirtualInstanceCommand createCobblerScheduleCommand(java.lang.Long selectedServer, java.lang.String label, User userIn, java.util.Date scheduleDateIn, java.lang.String kickstartServerNameIn)
selectedServer
- server to host the kickstartlabel
- cobbler only profile label.userIn
- user performing the kickstartscheduleDateIn
- Date to schedule the KS.kickstartServerNameIn
- the name of the server who is serving the kickstartpublic Action scheduleRebootAction(Action prereqAction)
scheduleRebootAction
in class KickstartScheduleCommand
prereqAction
- the prerequisite for this actionprotected SelectMode getMode()
getMode
in class KickstartScheduleCommand
protected CobblerSystemCreateCommand getCobblerSystemCreateCommand(User userIn, Server serverIn, KickstartData ksdataIn, java.lang.String mediaPath, java.lang.String tokenList)
KickstartScheduleCommand
getCobblerSystemCreateCommand
in class KickstartScheduleCommand
userIn
- the userserverIn
- the systemksdataIn
- the kickstart datamediaPath
- the media pathtokenList
- the token listprotected CobblerSystemCreateCommand getCobblerSystemCreateCommand(User userIn, Server serverIn, java.lang.String cobblerProfileLabelIn)
KickstartScheduleCommand
getCobblerSystemCreateCommand
in class KickstartScheduleCommand
userIn
- the userserverIn
- the systemcobblerProfileLabelIn
- the cobbler profile labelpublic Action scheduleKickstartAction(Action prereqAction)
scheduleKickstartAction
in class KickstartScheduleCommand
prereqAction
- the prerequisite for this actionprotected ValidatorError validateUp2dateVersion()
validateUp2dateVersion
in class KickstartScheduleCommand
public java.lang.String getMacAddress()
public void setMacAddress(java.lang.String macAddressIn)
macAddressIn
- The mac address to set.public java.lang.String getGuestName()
public void setGuestName(java.lang.String guestNameIn)
guestNameIn
- the guestName to set.public java.lang.Long getMemoryAllocation()
public void setMemoryAllocation(java.lang.Long memoryAllocationIn)
memoryAllocationIn
- the memoryAllocation to set.public java.lang.Long getVirtualCpus()
public void setVirtualCpus(java.lang.Long virtualCpusIn)
virtualCpusIn
- the virtualCpus to set.public java.lang.Long getLocalStorageSize()
public void setLocalStorageSize(java.lang.Long localStorageIn)
localStorageIn
- the localStorage to set.public DataResult<KickstartDto> getKickstartProfiles()
getKickstartProfiles
in class KickstartScheduleCommand
public java.lang.String getFilePath()
public void setFilePath(java.lang.String filePathIn)
filePathIn
- The filePath to set.public java.lang.String getVirtBridge()
public void setVirtBridge(java.lang.String virtBridgeIn)
virtBridgeIn
- The virtBridge to set.public static java.lang.String makeDefaultVirtPath(java.lang.String name, KickstartVirtualizationType type)
name
- the name of the guesttype
- virtualization type to determine the virt paths
its different for xen/kvmpublic ValidatorError doValidation()
doValidation
in class KickstartScheduleCommand