public class KickstartData
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
kickstartType |
static java.lang.String |
LEGACY_KICKSTART_PACKAGE_NAME |
static java.lang.String |
RAW_DIR |
static java.lang.String |
SELINUX_MODE_COMMAND |
static java.lang.String |
TYPE_RAW |
static java.lang.String |
TYPE_WIZARD |
static java.lang.String |
WIZARD_DIR |
Constructor and Description |
---|
KickstartData()
Initializes properties.
|
Modifier and Type | Method and Description |
---|---|
void |
addChildChannel(Channel childChnl)
Add a ChildChannel to this kickstart
|
void |
addCommand(KickstartCommand clonedCmd)
Add a kickstartCommand object
|
void |
addCryptoKey(CryptoKey key)
Add a CryptoKey to this kickstart
|
void |
addDefaultRegToken(Token key)
Adds an Token object to default.
|
void |
addIpRange(KickstartIpRange ipIn) |
void |
addKsPackage(KickstartPackage kp)
Adds a KickstartPackage object to ksPackages.
|
void |
addPreserveFileList(FileList fileList)
Adds a PreserveFileList object to preserveFileLists
|
void |
addScript(KickstartScript ksIn)
Add a KickstartScript to the KickstartData
|
java.lang.String |
buildCobblerFileName()
Build std kickstart cfg template path
|
boolean |
changeBootloaderType(java.lang.String type)
Changes the bootloader
|
void |
clearKsPackages()
Clear all ksPackages
|
KickstartData |
deepCopy(User user,
java.lang.String newLabel)
Copy this KickstartData into a new one.
|
java.lang.String |
defaultAuthArgs()
Return the default args to the auth command for this ksdata
|
java.lang.String |
encryptPassword(java.lang.String password)
Encrypt the password with whichever algorithm is appropriate for this ksdata
|
boolean |
getActive()
Getter for active
|
java.lang.String |
getBootloaderType()
Get the bootloader type
|
Channel |
getChannel()
Convenience method to get the Channel associated with this profile
KickstartData -> KickstartDefault -> KickstartTree -> Channel
|
java.util.Set<Channel> |
getChildChannels() |
java.lang.String |
getCobblerFileName() |
java.lang.String |
getCobblerId() |
org.cobbler.Profile |
getCobblerObject(User user)
Returns the cobbler object associated to
to this profile.
|
KickstartCommand |
getCommand(java.lang.String commandName)
Convenience method to find a command by name stopping at the first match
|
java.util.Collection<KickstartCommand> |
getCommands()
Getter for commands
|
java.lang.String |
getComments()
Getter for comments
|
java.util.Date |
getCreated()
Getter for created
|
java.util.Set<CryptoKey> |
getCryptoKeys() |
java.util.LinkedHashSet<KickstartCommand> |
getCustomOptions() |
java.util.Set<Token> |
getDefaultRegTokens()
Getter for defaultRegTokens
|
java.lang.String |
getDefaultVirtBridge()
Get the default virt bridge for this KickstartData object.
|
boolean |
getEliloRequired()
Is ELILO required for this kickstart profile?
We base this off of the channel arch, because IA64 systems
require elilo
|
java.lang.String |
getFileData(java.lang.String host,
KickstartSession session)
Return the string containing the kickstart file
|
java.lang.Long |
getId()
Getter for id
|
boolean |
getIgnoreMissing() |
KickstartInstallType |
getInstallType()
Conv method
|
java.util.Set<KickstartIpRange> |
getIps() |
protected boolean |
getIsOrgDefault()
Getter for isOrgDefault
|
java.lang.String |
getKernelParams()
Getter for kernelParams
|
KickstartDefaults |
getKickstartDefaults() |
java.lang.String |
getKickstartPackageName()
Get the name of the kickstart package this KS will use.
|
protected java.lang.String |
getKickstartType() |
java.lang.Boolean |
getKsCfg() |
java.util.Set<KickstartPackage> |
getKsPackages()
Getter for ksPackages
|
java.lang.String |
getLabel()
Getter for label
|
boolean |
getLegacyKickstart()
Bean wrapper so we can call isLegacyKickstart() from JSTL
|
java.util.Date |
getModified()
Getter for modified
|
boolean |
getNoBase() |
java.lang.Boolean |
getNonChrootPost() |
java.util.Set<KickstartCommand> |
getOptions()
Getter for command options
|
Org |
getOrg()
Getter for org
|
java.lang.String |
getPartitionData()
Get the partition data as string
|
protected byte[] |
getPartitionDataBinary() |
KickstartScript |
getPostKickstartScript()
Get the KickstartScript of type "post"
|
java.lang.Boolean |
getPostLog() |
KickstartScript |
getPreKickstartScript()
Get the KickstartScript of type "pre"
|
java.lang.Boolean |
getPreLog() |
java.util.Set<FileList> |
getPreserveFileLists()
Gets the value of preserveFileLists
|
KickstartTreeUpdateType |
getRealUpdateType()
get the update type
|
RegistrationType |
getRegistrationType(User user)
Gets the Registration Type (i.e.
|
java.util.Set<RepoInfo> |
getRepoInfos() |
java.util.Set<KickstartCommand> |
getRepos() |
java.util.Set<KickstartScript> |
getScripts() |
SELinuxMode |
getSELinuxMode()
Returns the SE Linux mode associated to this kickstart profile
|
java.lang.String |
getTimezone()
Get the timezone - just the timezone, not the --utc or other args
|
KickstartableTree |
getTree()
Convenience method to get the KickstartableTree object
|
java.lang.String |
getUpdateType()
get the update type
|
java.lang.String |
getUrl() |
java.lang.Boolean |
getVerboseUp2date() |
boolean |
hasCommand(java.lang.String commandName)
Convenience method to detect if command is set
|
boolean |
hasKsPackage(PackageName pName) |
java.lang.Boolean |
isActive()
Getter for active
|
boolean |
isConfigManageable()
True if config management is enabled in this profile..
|
boolean |
isFedora()
returns true if this is a fedora kickstart
|
boolean |
isGeneric()
returns true if this is a generic kickstart
as in non rhel and non fedora.
|
boolean |
isLegacyKickstart()
Util method to determine if we are RHEL3/2.1
|
java.lang.Boolean |
isOrgDefault()
Getter for isOrgDefault
|
boolean |
isRawData()
Returns true if this is a
raw mode data .
|
boolean |
isRemoteCommandable()
True if remote command flag is enabled in this profile..
|
boolean |
isRhel() |
boolean |
isRhel2() |
boolean |
isRhel3() |
boolean |
isRhel4() |
boolean |
isRhel5() |
boolean |
isRhel5OrGreater() |
boolean |
isRHEL5OrLess() |
boolean |
isRhel6OrGreater() |
boolean |
isRhel7() |
boolean |
isRhel7OrGreater() |
boolean |
isRhel8() |
boolean |
isSUSE()
returns true if this is a SUSE autoinstallation
|
java.lang.Boolean |
isUsingUtc()
Will the system hardware clock use UTC
|
boolean |
isValid()
Method to determine if the profile
is valid or if it needs to be corrected.
|
void |
removeChildChannel(Channel childChnl)
Remove a child Channel from the set.
|
void |
removeCommand(java.lang.String commandName,
boolean removeFirst)
Convenience method to remove commands by name
|
void |
removeCommands()
Convenience method to remove all commands
|
void |
removeCryptoKey(CryptoKey key)
Remove a crypto key from the set.
|
void |
removeKsPackage(KickstartPackage kp)
Removes a KickstartPackage object from ksPackages.
|
void |
removePreserveFileList(FileList fileList)
Remove a file list from the set.
|
void |
removeScript(KickstartScript ksIn)
Remove a KickstartScript from this Profile.
|
void |
setActive(java.lang.Boolean activeIn)
Setter for active
|
void |
setChildChannels(java.util.Set<Channel> childChannelsIn) |
void |
setCobblerId(java.lang.String cobblerIdIn) |
void |
setCommands(java.util.Collection<KickstartCommand> c)
Setter for commands
|
void |
setComments(java.lang.String commentsIn)
Setter for comments
|
void |
setCreated(java.util.Date createdIn)
Setter for created
|
void |
setCryptoKeys(java.util.Set<CryptoKey> cryptoKeysIn) |
void |
setCustomOptions(java.util.Collection<KickstartCommand> customIn)
remove old custom options and replace with new
|
void |
setDefaultRegTokens(java.util.Set<Token> p)
Setter for defaultRegTokens
|
void |
setId(java.lang.Long idIn)
Setter for id
|
void |
setIgnoreMissing(java.lang.Boolean ignoreMissingIn) |
void |
setIps(java.util.Set<KickstartIpRange> ipsIn) |
protected void |
setIsOrgDefault(boolean isDefault)
Setter for isOrgDefault
|
void |
setKernelParams(java.lang.String kernelParamsIn)
Setter for kernelParams
|
void |
setKickstartDefaults(KickstartDefaults kd) |
protected void |
setKickstartType(java.lang.String kickstartTypeIn) |
void |
setKsCfg(java.lang.Boolean ksCfgIn) |
void |
setKsPackages(java.util.Set<KickstartPackage> p)
Setter for ksPackages
|
void |
setLabel(java.lang.String labelIn)
Setter for label
|
void |
setModified(java.util.Date modifiedIn)
Setter for modified
|
void |
setNoBase(java.lang.Boolean noBaseIn) |
void |
setNonChrootPost(java.lang.Boolean nonchrootpostIn) |
void |
setOptions(java.util.Collection<KickstartCommand> optionsIn)
remove old options and replace with new
|
void |
setOrg(Org orgIn)
Associates the KS with an Org.
|
void |
setOrgDefault(boolean isDefault)
Setter for isOrgDefault
|
void |
setPartitionData(java.lang.String data)
Set the partition data
|
protected void |
setPartitionDataBinary(byte[] partitionDataIn) |
void |
setPostLog(java.lang.Boolean postLogIn) |
void |
setPreLog(java.lang.Boolean preLogIn) |
void |
setPreserveFileLists(java.util.Set<FileList> preserveFileListsIn)
Sets the value of preserveFileLists
|
void |
setRealUpdateType(KickstartTreeUpdateType updateTypeIn)
Set the update type
Hibernate wigs out if this is called "setUpdateType", which is should be
|
void |
setRegistrationType(RegistrationType type,
User user)
Sets the registration type
|
void |
setRepoInfos(java.util.Collection<RepoInfo> repos)
Updates the repos commands associated to this ks data.
|
void |
setRepos(java.util.Collection<KickstartCommand> repoCommands)
Updates the repos commands associated to this ks data.
|
void |
setScripts(java.util.Set<KickstartScript> scriptsIn) |
void |
setTree(KickstartableTree kstreeIn)
Setter for KickstartableTree object
|
void |
setUpdateType(java.lang.String updateTypeIn)
Set the update type
Hibernate wigs out if this is called "setUpdateType", which is should be
|
void |
setVerboseUp2date(java.lang.Boolean verboseup2dateIn) |
protected void |
updateCloneDetails(KickstartData cloned,
User user,
java.lang.String newLabel) |
protected java.lang.String kickstartType
public static final java.lang.String LEGACY_KICKSTART_PACKAGE_NAME
public static final java.lang.String WIZARD_DIR
public static final java.lang.String RAW_DIR
public static final java.lang.String SELINUX_MODE_COMMAND
public static final java.lang.String TYPE_WIZARD
public static final java.lang.String TYPE_RAW
public java.lang.Long getId()
public void setId(java.lang.Long idIn)
idIn
- to setpublic void setOrg(Org orgIn)
orgIn
- Org to be associated to this KS.public Org getOrg()
public java.lang.String getLabel()
public void setLabel(java.lang.String labelIn)
labelIn
- to setpublic java.lang.String getComments()
public void setComments(java.lang.String commentsIn)
commentsIn
- to setpublic java.lang.Boolean isActive()
public boolean getActive()
public void setActive(java.lang.Boolean activeIn)
activeIn
- to setpublic java.util.Date getCreated()
public void setCreated(java.util.Date createdIn)
createdIn
- to setpublic java.util.Date getModified()
public void setModified(java.util.Date modifiedIn)
modifiedIn
- to setpublic java.lang.Boolean isOrgDefault()
protected boolean getIsOrgDefault()
protected void setIsOrgDefault(boolean isDefault)
isDefault
- to setpublic void setOrgDefault(boolean isDefault)
isDefault
- to setpublic java.lang.String getKernelParams()
public void setKernelParams(java.lang.String kernelParamsIn)
kernelParamsIn
- to setpublic java.util.Set<CryptoKey> getCryptoKeys()
public void setCryptoKeys(java.util.Set<CryptoKey> cryptoKeysIn)
cryptoKeysIn
- The cryptoKeys to set.public void addCryptoKey(CryptoKey key)
key
- to addpublic void removeCryptoKey(CryptoKey key)
key
- to remove.public java.util.Set<Channel> getChildChannels()
public void setChildChannels(java.util.Set<Channel> childChannelsIn)
childChannelsIn
- childChannels to set.public void addChildChannel(Channel childChnl)
childChnl
- to addpublic void removeChildChannel(Channel childChnl)
childChnl
- to remove.public void addDefaultRegToken(Token key)
key
- Token to addpublic java.util.Set<Token> getDefaultRegTokens()
public void setDefaultRegTokens(java.util.Set<Token> p)
p
- The packageLists to set.public java.util.Set<FileList> getPreserveFileLists()
public void setPreserveFileLists(java.util.Set<FileList> preserveFileListsIn)
preserveFileListsIn
- set of FileList objects to assign to
this.preserveFileListspublic void addPreserveFileList(FileList fileList)
fileList
- preserveFileList to addpublic void removePreserveFileList(FileList fileList)
fileList
- to remove.public void addKsPackage(KickstartPackage kp)
kp
- KickstartPackage to addpublic void removeKsPackage(KickstartPackage kp)
kp
- KickstartPackage to removepublic java.util.Set<KickstartPackage> getKsPackages()
public void setKsPackages(java.util.Set<KickstartPackage> p)
p
- The KickstartPackage set to set.public void clearKsPackages()
public boolean hasKsPackage(PackageName pName)
pName
- Package name to check if Kickstart Data containspublic KickstartScript getPreKickstartScript()
public KickstartScript getPostKickstartScript()
public java.util.Collection<KickstartCommand> getCommands()
public boolean hasCommand(java.lang.String commandName)
commandName
- Command namepublic void removeCommand(java.lang.String commandName, boolean removeFirst)
commandName
- Command nameremoveFirst
- if true only stop at first instance, otherwise remove allpublic KickstartCommand getCommand(java.lang.String commandName)
commandName
- Command namepublic void setCommands(java.util.Collection<KickstartCommand> c)
c
- The Command List to set.public void removeCommands()
public java.util.Set<KickstartCommand> getRepos()
public void setRepos(java.util.Collection<KickstartCommand> repoCommands)
repoCommands
- the repos to updatepublic java.util.Set<RepoInfo> getRepoInfos()
public void setRepoInfos(java.util.Collection<RepoInfo> repos)
repos
- the repos to updatepublic java.util.LinkedHashSet<KickstartCommand> getCustomOptions()
public void setCustomOptions(java.util.Collection<KickstartCommand> customIn)
customIn
- to replace old with.public void setOptions(java.util.Collection<KickstartCommand> optionsIn)
optionsIn
- to replace old with.public java.util.Set<KickstartCommand> getOptions()
public java.lang.String getUrl()
public void setKickstartDefaults(KickstartDefaults kd)
kd
- KickstartDefaults to setpublic KickstartDefaults getKickstartDefaults()
public KickstartInstallType getInstallType()
public boolean isRhel()
public boolean isRhel8()
public boolean isRhel7()
public boolean isRhel5()
public boolean isRhel7OrGreater()
public boolean isRhel6OrGreater()
public boolean isRhel5OrGreater()
public boolean isRHEL5OrLess()
public boolean isFedora()
public boolean isGeneric()
public boolean isSUSE()
public boolean isRhel4()
public boolean isRhel3()
public boolean isRhel2()
public java.util.Set<KickstartIpRange> getIps()
public void setIps(java.util.Set<KickstartIpRange> ipsIn)
ipsIn
- Set of IPRanges to setpublic void addIpRange(KickstartIpRange ipIn)
ipIn
- KickstartIpRange to addpublic KickstartableTree getTree()
public void setTree(KickstartableTree kstreeIn)
kstreeIn
- the KickstartableTree to setpublic java.util.Set<KickstartScript> getScripts()
public void setScripts(java.util.Set<KickstartScript> scriptsIn)
scriptsIn
- The scripts to set.public void addScript(KickstartScript ksIn)
ksIn
- to addpublic void removeScript(KickstartScript ksIn)
ksIn
- to remove.public boolean getEliloRequired()
public java.lang.String getBootloaderType()
public boolean changeBootloaderType(java.lang.String type)
type
- either "grub" or "lilo"public Channel getChannel()
public java.lang.String getTimezone()
public java.lang.Boolean isUsingUtc()
public KickstartData deepCopy(User user, java.lang.String newLabel)
user
- who is doing the cloningnewLabel
- to set on the cloned objectprotected void updateCloneDetails(KickstartData cloned, User user, java.lang.String newLabel)
public void addCommand(KickstartCommand clonedCmd)
clonedCmd
- The kickstartCommand to addpublic boolean isLegacyKickstart()
public boolean getLegacyKickstart()
public java.lang.String getKickstartPackageName()
public java.lang.Boolean getPostLog()
public java.lang.Boolean getPreLog()
public java.lang.Boolean getKsCfg()
public void setPostLog(java.lang.Boolean postLogIn)
postLogIn
- The postLog to set.public void setPreLog(java.lang.Boolean preLogIn)
preLogIn
- The preLog to set.public void setKsCfg(java.lang.Boolean ksCfgIn)
ksCfgIn
- The ksCfg to set.public SELinuxMode getSELinuxMode()
public boolean isConfigManageable()
public boolean isRemoteCommandable()
public java.lang.String getCobblerFileName()
public java.lang.String buildCobblerFileName()
public java.lang.Boolean getVerboseUp2date()
public void setVerboseUp2date(java.lang.Boolean verboseup2dateIn)
verboseup2dateIn
- The verboseup2date to set.public java.lang.Boolean getNonChrootPost()
public void setNonChrootPost(java.lang.Boolean nonchrootpostIn)
nonchrootpostIn
- The nonchrootpost to set.public boolean isRawData()
public java.lang.String getFileData(java.lang.String host, KickstartSession session)
host
- the kickstart hostsession
- the kickstart session,
can be null if the data
is not part of a sessionpublic java.lang.String getCobblerId()
public void setCobblerId(java.lang.String cobblerIdIn)
cobblerIdIn
- The cobblerId to set.protected java.lang.String getKickstartType()
protected void setKickstartType(java.lang.String kickstartTypeIn)
kickstartTypeIn
- the kickstartType to setpublic boolean getNoBase()
public void setNoBase(java.lang.Boolean noBaseIn)
noBaseIn
- the noBase to setpublic boolean getIgnoreMissing()
public void setIgnoreMissing(java.lang.Boolean ignoreMissingIn)
ignoreMissingIn
- the ignoreMissing to setpublic java.lang.String getDefaultVirtBridge()
public org.cobbler.Profile getCobblerObject(User user)
user
- the user object needed for connection,
enter null if you want to use the
automated connection as provided by
taskomatic.public RegistrationType getRegistrationType(User user)
user
- the user object needed to load the profile from cobblerpublic void setRegistrationType(RegistrationType type, User user)
type
- the refgistration typeuser
- the user needed to load the profile form cobblerpublic boolean isValid()
protected byte[] getPartitionDataBinary()
protected void setPartitionDataBinary(byte[] partitionDataIn)
partitionDataIn
- The partitionData to set.public java.lang.String getPartitionData()
public void setPartitionData(java.lang.String data)
data
- the partition infopublic java.lang.String getUpdateType()
public KickstartTreeUpdateType getRealUpdateType()
public void setUpdateType(java.lang.String updateTypeIn)
updateTypeIn
- the update type to setpublic void setRealUpdateType(KickstartTreeUpdateType updateTypeIn)
updateTypeIn
- the update type to setpublic java.lang.String defaultAuthArgs()
public java.lang.String encryptPassword(java.lang.String password)
password
- the password to encrypt