public class KickstartScheduleCommand extends BaseSystemOperation
Modifier and Type | Field and Description |
---|---|
protected boolean |
cobblerOnly |
protected java.lang.String |
cobblerProfileLabel |
static java.lang.String |
DHCP_NETWORK_TYPE |
static java.lang.String |
LINK_NETWORK_TYPE |
static java.lang.String |
PACKAGE_TO_REMOVE |
static java.lang.String |
TARGET_PROFILE_TYPE_EXISTING |
static java.lang.String |
TARGET_PROFILE_TYPE_NONE |
static java.lang.String |
TARGET_PROFILE_TYPE_PACKAGE |
static java.lang.String |
TARGET_PROFILE_TYPE_SYSTEM |
static java.lang.String |
UP2DATE_VERSION |
server
user
Constructor and Description |
---|
KickstartScheduleCommand(java.lang.Long selectedServer,
KickstartData data,
User userIn,
java.util.Date scheduleDateIn,
java.lang.String kickstartServerNameIn)
Constructor for a kickstart where the host and the target are the same system.
|
KickstartScheduleCommand(java.lang.Long selectedHostServer,
java.lang.Long selectedTargetServer,
KickstartData data,
User userIn,
java.util.Date scheduleDateIn,
java.lang.String kickstartServerNameIn)
Constructor for a kickstart where the host and the target may or may *not* be
the same system.
|
KickstartScheduleCommand(java.lang.Long selectedHostServer,
java.lang.Long selectedTargetServer,
java.lang.Long ksid,
User userIn,
java.util.Date scheduleDateIn,
java.lang.String kickstartServerNameIn)
Constructor for a kickstart where the host and the target may or may *not* be
the same system.
|
KickstartScheduleCommand(java.lang.Long selectedHostServer,
java.lang.Long selectedTargetServer,
java.lang.String ksLabel,
User userIn,
java.util.Date scheduleDateIn,
java.lang.String kickstartServerNameIn)
Constructor for a kickstart where the host and the target may or may *not* be
the same system.
|
KickstartScheduleCommand(java.lang.Long selectedServer,
java.lang.Long ksid,
User userIn)
Constructor for a kickstart where the host and the target are the same system.
|
KickstartScheduleCommand(java.lang.Long selectedServer,
java.lang.Long ksid,
User userIn,
java.util.Date scheduleDateIn,
java.lang.String kickstartServerNameIn)
Constructor for a kickstart where the host and the target are the same system.
|
KickstartScheduleCommand(java.lang.Long selectedServer,
User userIn)
Constructor for a kickstart where the host and the target are the same system.
|
Modifier and Type | Method and Description |
---|---|
boolean |
createBond() |
static KickstartScheduleCommand |
createCobblerScheduleCommand(java.lang.Long selectedHostServer,
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 are the same system
To be used when you want to call the store() method.
|
static ActivationKey |
createKickstartActivationKey(User creator,
KickstartData ksdata,
Server server,
KickstartSession session,
java.lang.Long usageLimit,
java.lang.String note)
Create a one time activation key for use with a kickstart
|
ValidatorError |
doValidation()
Do the validation needed for this command.
|
java.util.Map<java.lang.String,java.lang.Long> |
findKickstartPackageToInstall(Server server,
java.util.Collection<java.lang.Long> channelIds)
Looks for the package name among the specified channels and, if it is found,
it returns the highest available version in Map form.
|
java.lang.String |
getBondAddress() |
java.lang.String |
getBondGateway() |
java.lang.String |
getBondInterface() |
java.lang.String |
getBondNetmask() |
java.lang.String |
getBondOptions() |
java.util.List<java.lang.String> |
getBondSlaveInterfaces() |
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.util.List<java.util.Map<java.lang.String,java.lang.Object>> |
getCompatibleSystems()
Get the list of compatible systems you could sync to
|
Profile |
getCreatedProfile() |
java.lang.String |
getExtraOptions()
Create ExtraOptions string
|
Server |
getHostServer() |
java.lang.String |
getKickstartPackageName()
Return the kickstart package name for this kickstart action.
|
DataResult<KickstartDto> |
getKickstartProfiles()
Looks up a list of applicable kickstart profiles.
|
java.lang.String |
getKickstartServerName() |
KickstartSession |
getKickstartSession() |
KickstartData |
getKsdata() |
protected SelectMode |
getMode() |
java.util.List |
getPackagesToInstall() |
java.lang.Long |
getProfileId() |
java.util.List<ProfileDto> |
getProfiles()
Get the DataResult list of com.redhat.rhn.frontend.dto.ProfileDto that are
compatible with the BaseChannel for the selected KickstartData object.
|
java.lang.String |
getProfileType() |
java.lang.String |
getProxyHost() |
Action |
getScheduledAction() |
java.util.Date |
getScheduleDate() |
java.lang.Long |
getServerProfileId() |
Server |
getTargetServer() |
User |
getUser()
All PersistOperations must have a User object
who is performing the Operation.
|
boolean |
isBondDhcp() |
boolean |
isCobblerOnly() |
Action |
scheduleKickstartAction(Action prereqAction) |
Action |
scheduleRebootAction(Action prereqAction) |
void |
setBondAddress(java.lang.String bondAddressIn) |
void |
setBondDhcp(boolean isBondDhcpIn) |
void |
setBondGateway(java.lang.String bondGatewayIn) |
void |
setBondInterface(java.lang.String bondInterfaceIn) |
void |
setBondNetmask(java.lang.String bondNetmaskIn) |
void |
setBondOptions(java.lang.String bondOptionsIn) |
void |
setBondSlaveInterfaces(java.util.List<java.lang.String> bondSlaveInterfacesIn) |
void |
setCreateBond(boolean createBondIn) |
void |
setHostServer(Server serverIn) |
void |
setIpv6Gateway()
Sets to use IPv6 gateway.
|
void |
setKernelOptions(java.lang.String kernelOptionsIn) |
void |
setKickstartServerName(java.lang.String kickstartServerNameIn) |
void |
setKickstartSession(KickstartSession kickstartSessionIn) |
void |
setKsdata(KickstartData ksdataIn) |
void |
setNetworkDevice(java.lang.String networkType,
java.lang.String networkInterfaceIn) |
void |
setPackagesToInstall(java.util.List packagesToInstallIn) |
void |
setPostKernelOptions(java.lang.String postKernelOptionsIn) |
void |
setProfileId(java.lang.Long profileIdIn) |
void |
setProfileType(java.lang.String profileTypeIn) |
void |
setProxy(Server serverIn) |
void |
setProxyHost(java.lang.String proxyHostIn) |
void |
setScheduleDate(java.util.Date scheduleDateIn) |
void |
setServerProfileId(java.lang.Long serverProfileIdIn) |
void |
setTargetServer(Server serverIn) |
protected KickstartSession |
setupKickstartSession(Action firstAction) |
void |
setUser(User userIn) |
ValidatorError |
store()
Perform the storage Operation to the Persistence
Layer.
|
boolean |
useIpv6Gateway()
Indicate whether an IPv6 gateway is to be used for re-provisioning.
|
ValidatorError |
validateKickstartPackage()
Get the id of the Package installed for this KS.
|
protected ValidatorError |
validateUp2dateVersion() |
getServer
public static final java.lang.String DHCP_NETWORK_TYPE
public static final java.lang.String LINK_NETWORK_TYPE
public static final java.lang.String UP2DATE_VERSION
public static final java.lang.String TARGET_PROFILE_TYPE_EXISTING
public static final java.lang.String TARGET_PROFILE_TYPE_PACKAGE
public static final java.lang.String TARGET_PROFILE_TYPE_SYSTEM
public static final java.lang.String TARGET_PROFILE_TYPE_NONE
public static final java.lang.String PACKAGE_TO_REMOVE
protected java.lang.String cobblerProfileLabel
protected boolean cobblerOnly
public KickstartScheduleCommand(java.lang.Long selectedServer, User userIn)
selectedServer
- server to kickstartuserIn
- user performing the kickstartpublic KickstartScheduleCommand(java.lang.Long selectedServer, java.lang.Long ksid, User userIn)
selectedServer
- server to kickstartksid
- id of the KickstartData we are usinguserIn
- user performing the kickstartpublic KickstartScheduleCommand(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 serving the kickstartpublic KickstartScheduleCommand(java.lang.Long selectedServer, KickstartData data, User userIn, java.util.Date scheduleDateIn, java.lang.String kickstartServerNameIn)
selectedServer
- server to kickstartdata
- the KickstartData we are usinguserIn
- user performing the kickstartscheduleDateIn
- Date to schedule the KS.kickstartServerNameIn
- the name of the server who is serving the kickstartpublic KickstartScheduleCommand(java.lang.Long selectedHostServer, java.lang.Long selectedTargetServer, java.lang.Long ksid, User userIn, java.util.Date scheduleDateIn, java.lang.String kickstartServerNameIn)
selectedHostServer
- server to host the kickstartselectedTargetServer
- server to be kickstartedksid
- id of the KickstartData we are usinguserIn
- user performing the kickstartscheduleDateIn
- Date to schedule the KS.kickstartServerNameIn
- the name of the server who is serving the kickstartpublic KickstartScheduleCommand(java.lang.Long selectedHostServer, java.lang.Long selectedTargetServer, java.lang.String ksLabel, User userIn, java.util.Date scheduleDateIn, java.lang.String kickstartServerNameIn)
selectedHostServer
- server to host the kickstartselectedTargetServer
- server to be kickstartedksLabel
- label of the KickstartData we are usinguserIn
- user performing the kickstartscheduleDateIn
- Date to schedule the KS.kickstartServerNameIn
- the name of the server who is serving the kickstartpublic KickstartScheduleCommand(java.lang.Long selectedHostServer, java.lang.Long selectedTargetServer, KickstartData data, User userIn, java.util.Date scheduleDateIn, java.lang.String kickstartServerNameIn)
selectedHostServer
- server to host the kickstartselectedTargetServer
- server to be kickstarteddata
- KickstartData object..userIn
- user performing the kickstartscheduleDateIn
- Date to schedule the KS.kickstartServerNameIn
- the name of the server who is serving the kickstartpublic static KickstartScheduleCommand createCobblerScheduleCommand(java.lang.Long selectedHostServer, java.lang.String label, User userIn, java.util.Date scheduleDateIn, java.lang.String kickstartServerNameIn)
selectedHostServer
- 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 DataResult<KickstartDto> getKickstartProfiles()
protected SelectMode getMode()
public java.util.List<ProfileDto> getProfiles()
public Action getScheduledAction()
public KickstartData getKsdata()
public void setKsdata(KickstartData ksdataIn)
ksdataIn
- The ksdata to set.public java.lang.String getProxyHost()
public void setProxyHost(java.lang.String proxyHostIn)
proxyHostIn
- The proxy host to set.public ValidatorError store()
protected CobblerSystemCreateCommand getCobblerSystemCreateCommand(User userIn, Server serverIn, KickstartData ksdataIn, java.lang.String mediaPath, java.lang.String tokenList)
userIn
- the userserverIn
- the systemksdataIn
- the kickstart datamediaPath
- the media pathtokenList
- the token listprotected CobblerSystemCreateCommand getCobblerSystemCreateCommand(User userIn, Server serverIn, java.lang.String cobblerProfileLabelIn)
userIn
- the userserverIn
- the systemcobblerProfileLabelIn
- the cobbler profile labelprotected KickstartSession setupKickstartSession(Action firstAction)
firstAction
- The first Action in the session's action chainpublic Action scheduleKickstartAction(Action prereqAction)
prereqAction
- the prerequisite for this actionpublic Action scheduleRebootAction(Action prereqAction)
prereqAction
- the prerequisite for this actionpublic ValidatorError doValidation()
public static ActivationKey createKickstartActivationKey(User creator, KickstartData ksdata, Server server, KickstartSession session, java.lang.Long usageLimit, java.lang.String note)
creator
- of the keyksdata
- associated with the keyserver
- being kickstarted (can be null)session
- associated with the kickstart (NOT NULL)note
- to add to keyusageLimit
- to apply to the key. null for unlimited.public java.lang.String getExtraOptions()
public ValidatorError validateKickstartPackage()
public java.util.Map<java.lang.String,java.lang.Long> findKickstartPackageToInstall(Server server, java.util.Collection<java.lang.Long> channelIds)
server
- the serverchannelIds
- channels the server could be subscribed topublic java.lang.String getKickstartPackageName()
protected ValidatorError validateUp2dateVersion()
public java.util.List<java.util.Map<java.lang.String,java.lang.Object>> getCompatibleSystems()
public java.util.List getPackagesToInstall()
public void setPackagesToInstall(java.util.List packagesToInstallIn)
packagesToInstallIn
- The packagesToInstall to set.public java.lang.String getProfileType()
public void setProfileType(java.lang.String profileTypeIn)
profileTypeIn
- The profileType to set.public KickstartSession getKickstartSession()
public void setKickstartSession(KickstartSession kickstartSessionIn)
kickstartSessionIn
- The kickstartSession to set.public java.lang.Long getProfileId()
public void setProfileId(java.lang.Long profileIdIn)
profileIdIn
- The profileId to set.public java.lang.Long getServerProfileId()
public void setServerProfileId(java.lang.Long serverProfileIdIn)
serverProfileIdIn
- The serverProfileId to set.public Profile getCreatedProfile()
public void setProxy(Server serverIn)
serverIn
- Proxy Host to set for this ks sessionpublic java.util.Date getScheduleDate()
public void setScheduleDate(java.util.Date scheduleDateIn)
scheduleDateIn
- The scheduleDate to set.public java.lang.String getKickstartServerName()
public void setKickstartServerName(java.lang.String kickstartServerNameIn)
kickstartServerNameIn
- The kickstartServerName to set.public void setNetworkDevice(java.lang.String networkType, java.lang.String networkInterfaceIn)
networkType
- dhcp/static/link one of em.networkInterfaceIn
- The staticDevice to set.public void setIpv6Gateway()
public boolean useIpv6Gateway()
public java.lang.String getBondInterface()
public void setBondInterface(java.lang.String bondInterfaceIn)
bondInterfaceIn
- The bond name to setpublic java.util.List<java.lang.String> getBondSlaveInterfaces()
public void setBondSlaveInterfaces(java.util.List<java.lang.String> bondSlaveInterfacesIn)
bondSlaveInterfacesIn
- The bond slave interfaces to set.public boolean createBond()
public void setCreateBond(boolean createBondIn)
createBondIn
- Whether or not to create a bondpublic java.lang.String getBondOptions()
public void setBondOptions(java.lang.String bondOptionsIn)
bondOptionsIn
- The bond options to set.public boolean isBondDhcp()
public void setBondDhcp(boolean isBondDhcpIn)
isBondDhcpIn
- True if we want to use dhcp for the bondpublic java.lang.String getBondAddress()
public void setBondAddress(java.lang.String bondAddressIn)
bondAddressIn
- The bondAddress to setpublic java.lang.String getBondNetmask()
public void setBondNetmask(java.lang.String bondNetmaskIn)
bondNetmaskIn
- The bondNetmask to setpublic java.lang.String getBondGateway()
public void setBondGateway(java.lang.String bondGatewayIn)
bondGatewayIn
- The bondGateway to setpublic User getUser()
BasePersistOperation
getUser
in interface PersistOperation
getUser
in class BasePersistOperation
public void setUser(User userIn)
userIn
- The user to set.public Server getHostServer()
public void setHostServer(Server serverIn)
serverIn
- The host server to set.public Server getTargetServer()
public void setTargetServer(Server serverIn)
serverIn
- The server to set.public boolean isCobblerOnly()
public void setKernelOptions(java.lang.String kernelOptionsIn)
kernelOptionsIn
- The kernelOptions to set.public void setPostKernelOptions(java.lang.String postKernelOptionsIn)
postKernelOptionsIn
- The postKernelOptions to set.