public class ActionChainManager
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static java.util.Set<Action> |
createConfigActionForServers(User user,
java.util.Collection<java.lang.Long> revisions,
java.util.Collection<Server> servers,
ActionType type,
java.util.Date earliest,
ActionChain actionChain)
Creates configuration actions for the given servers.
|
static java.util.Set<Action> |
createConfigActionForServers(User user,
java.util.Map<java.lang.Long,java.util.Collection<java.lang.Long>> revisions,
java.util.Collection<Server> servers,
ActionType type,
java.util.Date earliest,
ActionChain actionChain)
Creates configuration actions from server-revision maps.
|
static java.util.Set<Action> |
createConfigActions(User user,
java.util.Collection<java.lang.Long> revisions,
java.util.Collection<java.lang.Long> serverIds,
ActionType type,
java.util.Date earliest,
ActionChain actionChain)
Creates configuration actions for the given server IDs.
|
static java.util.Set<Action> |
createConfigActions(User user,
java.util.Map<java.lang.Long,java.util.Collection<java.lang.Long>> revisions,
java.util.Collection<java.lang.Long> serverIds,
ActionType type,
java.util.Date earliest,
ActionChain actionChain)
Creates configuration actions from server-revision maps.
|
static Action |
scheduleErrataUpdate(User user,
Server server,
java.util.List<java.lang.Integer> errataIds,
java.util.Date earliest,
ActionChain actionChain)
Schedules an Errata update on a server.
|
static java.util.Set<Action> |
scheduleErrataUpdates(User user,
java.util.Set<java.lang.Long> serverIds,
java.util.List<java.lang.Integer> errataIds,
java.util.Date earliest,
ActionChain actionChain)
Schedules one or more Errata updates on multiple servers.
|
static PackageAction |
schedulePackageInstall(User user,
Server server,
java.util.List<java.util.Map<java.lang.String,java.lang.Long>> packages,
java.util.Date earliest,
ActionChain actionChain)
Schedules s package installation on a server.
|
static java.util.List<Action> |
schedulePackageInstalls(User user,
java.util.Collection<java.lang.Long> serverIds,
java.util.List<java.util.Map<java.lang.String,java.lang.Long>> packages,
java.util.Date earliest,
ActionChain actionChain)
Schedules one or more package installation actions on one or more servers.
|
static PackageAction |
schedulePackageRemoval(User user,
Server server,
java.util.List<java.util.Map<java.lang.String,java.lang.Long>> packages,
java.util.Date earliest,
ActionChain actionChain)
Schedules s package removal on a server.
|
static java.util.List<Action> |
schedulePackageRemovals(User user,
java.util.Collection<java.lang.Long> serverIds,
java.util.List<java.util.Map<java.lang.String,java.lang.Long>> packages,
java.util.Date earliest,
ActionChain actionChain)
Schedules one or more package removal actions on one or more servers.
|
static PackageAction |
schedulePackageUpgrade(User user,
Server server,
java.util.List<java.util.Map<java.lang.String,java.lang.Long>> packages,
java.util.Date earliest,
ActionChain actionChain)
Schedules a package upgrade for the given server.
|
static java.util.List<Action> |
schedulePackageUpgrades(User user,
java.util.Map<java.lang.Long,java.util.List<java.util.Map<java.lang.String,java.lang.Long>>> packageMaps,
java.util.Date earliestAction,
ActionChain actionChain)
Schedules package upgrade(s) for the given servers.
|
static PackageAction |
schedulePackageVerify(User user,
Server server,
java.util.List<java.util.Map<java.lang.String,java.lang.Long>> packages,
java.util.Date earliest,
ActionChain actionChain)
Schedules a package verification for the given server.
|
static Action |
scheduleRebootAction(User user,
Server server,
java.util.Date earliest,
ActionChain actionChain)
Schedules a reboot action on a server.
|
static java.util.Set<Action> |
scheduleRebootActions(User user,
java.util.Set<java.lang.Long> serverIds,
java.util.Date earliest,
ActionChain actionChain)
Schedules one or more reboot actions on multiple servers.
|
static java.util.Set<Action> |
scheduleScriptRuns(User user,
java.util.List<java.lang.Long> sids,
java.lang.String name,
ScriptActionDetails script,
java.util.Date earliest,
ActionChain actionChain)
Schedules script actions for the given servers.
|
public static PackageAction schedulePackageInstall(User user, Server server, java.util.List<java.util.Map<java.lang.String,java.lang.Long>> packages, java.util.Date earliest, ActionChain actionChain)
user - the user scheduling actionsserver - the serverpackages - the packagesearliest - the earliest execution dateactionChain - the action chain or nullActionManager.schedulePackageInstall(com.redhat.rhn.domain.user.User, com.redhat.rhn.domain.server.Server, java.util.List, java.util.Date)public static PackageAction schedulePackageRemoval(User user, Server server, java.util.List<java.util.Map<java.lang.String,java.lang.Long>> packages, java.util.Date earliest, ActionChain actionChain)
user - the user scheduling actionsserver - the serverpackages - the packagesearliest - the earliest execution dateactionChain - the action chain or nullActionManager.schedulePackageRemoval(com.redhat.rhn.domain.user.User, com.redhat.rhn.domain.server.Server, com.redhat.rhn.domain.rhnset.RhnSet, java.util.Date)public static java.util.List<Action> schedulePackageUpgrades(User user, java.util.Map<java.lang.Long,java.util.List<java.util.Map<java.lang.String,java.lang.Long>>> packageMaps, java.util.Date earliestAction, ActionChain actionChain)
user - the user scheduling actionspackageMaps - maps system IDs to lists of "package maps"earliestAction - Date of earliest action to be executedactionChain - the action chain or nullfor "package map"public static PackageAction schedulePackageUpgrade(User user, Server server, java.util.List<java.util.Map<java.lang.String,java.lang.Long>> packages, java.util.Date earliest, ActionChain actionChain)
user - the user scheduling actionsserver - the serverpackages - a list of "package maps"earliest - the earliest execution dateactionChain - the action chain or nullfor "package map"public static PackageAction schedulePackageVerify(User user, Server server, java.util.List<java.util.Map<java.lang.String,java.lang.Long>> packages, java.util.Date earliest, ActionChain actionChain)
user - the user scheduling actionsserver - the serverpackages - a list of "package maps"earliest - the earliest execution dateactionChain - the action chain or nullActionManager.schedulePackageVerify(com.redhat.rhn.domain.user.User, com.redhat.rhn.domain.server.Server, com.redhat.rhn.domain.rhnset.RhnSet, java.util.Date),
for "package map"public static java.util.Set<Action> scheduleScriptRuns(User user, java.util.List<java.lang.Long> sids, java.lang.String name, ScriptActionDetails script, java.util.Date earliest, ActionChain actionChain)
user - the user scheduling actionssids - IDs of affected serversscript - detail object of the script to runname - name of the script actionearliest - the earliest execution dateactionChain - the action chain or nullMissingCapabilityException - if any server
in the list is missing script.run schedule failsMissingEntitlementException - if any server
in the list is missing Provisioning schedule failsActionManager.scheduleScriptRun(com.redhat.rhn.domain.user.User, java.util.List<java.lang.Long>, java.lang.String, com.redhat.rhn.domain.action.script.ScriptActionDetails, java.util.Date),
for "package map"public static java.util.Set<Action> createConfigActions(User user, java.util.Collection<java.lang.Long> revisions, java.util.Collection<java.lang.Long> serverIds, ActionType type, java.util.Date earliest, ActionChain actionChain)
user - the user scheduling actionsrevisions - a set of revision IDsserverIds - a set of server IDstype - the type of configuration actionearliest - the earliest execution dateactionChain - the action chain or nullpublic static java.util.Set<Action> createConfigActionForServers(User user, java.util.Collection<java.lang.Long> revisions, java.util.Collection<Server> servers, ActionType type, java.util.Date earliest, ActionChain actionChain)
user - the user scheduling actionsrevisions - a set of revision IDsservers - a set of serverstype - the type of configuration actionearliest - the earliest execution dateactionChain - the action chain or nullpublic static java.util.Set<Action> createConfigActions(User user, java.util.Map<java.lang.Long,java.util.Collection<java.lang.Long>> revisions, java.util.Collection<java.lang.Long> serverIds, ActionType type, java.util.Date earliest, ActionChain actionChain)
user - the user scheduling actionsrevisions - maps servers to multiple revision IDsserverIds - a set of server IDstype - the type of configuration actionearliest - the earliest execution dateactionChain - the action chain or nullpublic static java.util.Set<Action> createConfigActionForServers(User user, java.util.Map<java.lang.Long,java.util.Collection<java.lang.Long>> revisions, java.util.Collection<Server> servers, ActionType type, java.util.Date earliest, ActionChain actionChain)
user - the user scheduling actionsrevisions - maps servers to multiple revision IDsservers - a set of server objectstype - the type of configuration actionearliest - the earliest execution dateactionChain - the action chain or nullpublic static Action scheduleRebootAction(User user, Server server, java.util.Date earliest, ActionChain actionChain)
user - the user scheduling actionsserver - the affected serverearliest - the earliest execution dateactionChain - the action chain or nullpublic static java.util.Set<Action> scheduleRebootActions(User user, java.util.Set<java.lang.Long> serverIds, java.util.Date earliest, ActionChain actionChain)
user - the user scheduling actionsserverIds - the affected servers' IDsearliest - the earliest execution dateactionChain - the action chain or nullpublic static Action scheduleErrataUpdate(User user, Server server, java.util.List<java.lang.Integer> errataIds, java.util.Date earliest, ActionChain actionChain)
user - the user scheduling actionsserver - the affected servererrataIds - a list of erratas IDsearliest - the earliest execution dateactionChain - the action chain or nullpublic static java.util.Set<Action> scheduleErrataUpdates(User user, java.util.Set<java.lang.Long> serverIds, java.util.List<java.lang.Integer> errataIds, java.util.Date earliest, ActionChain actionChain)
user - the user scheduling actionsserverIds - the affected servers' IDserrataIds - a list of erratas IDsearliest - the earliest execution dateactionChain - the action chain or nullpublic static java.util.List<Action> schedulePackageInstalls(User user, java.util.Collection<java.lang.Long> serverIds, java.util.List<java.util.Map<java.lang.String,java.lang.Long>> packages, java.util.Date earliest, ActionChain actionChain)
user - the user scheduling actionsserverIds - the affected servers' IDspackages - a list of "package maps"earliest - the earliest execution dateactionChain - the action chain or nullfor "package map"public static java.util.List<Action> schedulePackageRemovals(User user, java.util.Collection<java.lang.Long> serverIds, java.util.List<java.util.Map<java.lang.String,java.lang.Long>> packages, java.util.Date earliest, ActionChain actionChain)
user - the user scheduling actionsserverIds - the affected servers' IDspackages - a list of "package maps"earliest - the earliest execution dateactionChain - the action chain or nullfor "package map"