public class ServerGroupHandler extends BaseHandler
VALID
Constructor and Description |
---|
ServerGroupHandler() |
Modifier and Type | Method and Description |
---|---|
int |
addOrRemoveAdmins(User loggedInUser,
java.lang.String systemGroupName,
java.util.List<java.lang.String> loginNames,
boolean add)
Given a systemGroupName and a list of users
this call adds or removes them as system administrators
Note one needs to be an Org Admin to perform this
operation..
|
int |
addOrRemoveSystems(User loggedInUser,
java.lang.String systemGroupName,
java.util.List serverIds,
java.lang.Boolean add)
Associates a list of servers to a given group
|
ServerGroup |
create(User loggedInUser,
java.lang.String name,
java.lang.String description)
Creates a new system group..
|
int |
delete(User loggedInUser,
java.lang.String systemGroupName)
Deletes a given system group - given the system group name
|
ServerGroup |
getDetails(User loggedInUser,
java.lang.Integer systemGroupId) |
ServerGroup |
getDetails(User loggedInUser,
java.lang.String systemGroupName) |
java.util.List<java.lang.Long> |
listActiveSystemsInGroup(User loggedInUser,
java.lang.String systemGroupName)
Lists active systems in a server group using the default inactivity
time (Currently 1 day)
|
java.util.List |
listAdministrators(User loggedInUser,
java.lang.String systemGroupName)
Given a systemGroupName this call returns the list of users
who can administer the group.
|
java.util.List<ManagedServerGroup> |
listAllGroups(User loggedInUser)
List all groups accessible by the logged in user
|
java.util.List |
listGroupsWithNoAssociatedAdmins(User loggedInUser)
Returns a list of system groups that do not
have a NON-OrgAdmin administrator..
|
java.util.List<java.lang.Long> |
listInactiveSystemsInGroup(User loggedInUser,
java.lang.String systemGroupName)
Lists inactive systems in a server group using the default inactivity
time (Currently 1 day)
|
java.util.List<java.lang.Long> |
listInactiveSystemsInGroup(User loggedInUser,
java.lang.String systemGroupName,
java.lang.Integer daysInactive)
Lists inactive systems in a server group using the specified time
|
java.util.List |
listSystems(User loggedInUser,
java.lang.String systemGroupName)
List the systems that are associated to the given system group.
|
java.util.List<SystemOverview> |
listSystemsMinimal(User loggedInUser,
java.lang.String systemGroupName)
List the systems that are associated to the given system group.
|
java.util.List<java.lang.Long> |
scheduleApplyErrataToActive(User loggedInUser,
java.lang.String systemGroupName,
java.util.List errataIds)
Schedules an action to apply errata updates to active systems from a group.
|
java.util.List<java.lang.Long> |
scheduleApplyErrataToActive(User loggedInUser,
java.lang.String systemGroupName,
java.util.List<java.lang.Integer> errataIds,
java.util.Date earliestOccurrence)
Schedules an action to apply errata updates to active systems from a group
at a specified time.
|
ServerGroup |
update(User loggedInUser,
java.lang.String systemGroupName,
java.lang.String description)
Updates a system group.
|
ensureConfigAdmin, ensureOrgAdmin, ensureOrgOrConfigAdmin, ensureSatAdmin, ensureSystemGroupAdmin, ensureUserRole, getLoggedInUser, invoke, providesAuthentication, setEntityAttribute, validateClientCertificate, validateEntitlements, validateMap, verifyOrgExists
public java.util.List listAdministrators(User loggedInUser, java.lang.String systemGroupName)
loggedInUser
- The current usersystemGroupName
- the name of the system grouppublic int addOrRemoveAdmins(User loggedInUser, java.lang.String systemGroupName, java.util.List<java.lang.String> loginNames, boolean add)
loggedInUser
- The current usersystemGroupName
- the name of the system grouploginNames
- login names of users to be made admins..add
- a boolean to associate or dissociate admins from the grouppublic java.util.List listSystems(User loggedInUser, java.lang.String systemGroupName)
loggedInUser
- The current usersystemGroupName
- the name of the system grouppublic java.util.List<SystemOverview> listSystemsMinimal(User loggedInUser, java.lang.String systemGroupName)
loggedInUser
- The current usersystemGroupName
- the name of the system grouppublic int addOrRemoveSystems(User loggedInUser, java.lang.String systemGroupName, java.util.List serverIds, java.lang.Boolean add)
loggedInUser
- The current usersystemGroupName
- The name system group to whom you want to add serversserverIds
- a list of ids of the servers you wish to add to this group.add
- should this server be associated or dissociated to this group.public ServerGroup create(User loggedInUser, java.lang.String name, java.lang.String description)
loggedInUser
- The current username
- The name of the system group..
Note duplicates names cannot be created
and will be responded to with an exception.description
- The description of a system group.public int delete(User loggedInUser, java.lang.String systemGroupName)
loggedInUser
- The current usersystemGroupName
- the name of the system grouppublic ServerGroup update(User loggedInUser, java.lang.String systemGroupName, java.lang.String description)
loggedInUser
- The current usersystemGroupName
- The name of the system group that needs to updated..description
- The description of the system group.public java.util.List listGroupsWithNoAssociatedAdmins(User loggedInUser)
loggedInUser
- The current userpublic java.util.List<ManagedServerGroup> listAllGroups(User loggedInUser)
loggedInUser
- The current userpublic ServerGroup getDetails(User loggedInUser, java.lang.Integer systemGroupId) throws FaultException
loggedInUser
- The current usersystemGroupId
- Integer id of system group to look upFaultException
- A FaultException is thrown if the server group
corresponding to systemGroupId cannot be retrieved.public ServerGroup getDetails(User loggedInUser, java.lang.String systemGroupName) throws FaultException
loggedInUser
- The current usersystemGroupName
- Name of the system group to lookupFaultException
- A FaultException is thrown if the server group
corresponding to systemGroupName cannot be retrieved.public java.util.List<java.lang.Long> listActiveSystemsInGroup(User loggedInUser, java.lang.String systemGroupName)
loggedInUser
- The current usersystemGroupName
- the system grouppublic java.util.List<java.lang.Long> listInactiveSystemsInGroup(User loggedInUser, java.lang.String systemGroupName, java.lang.Integer daysInactive)
loggedInUser
- The current usersystemGroupName
- the system groupdaysInactive
- number of days a system has to not check in to be inactivepublic java.util.List<java.lang.Long> listInactiveSystemsInGroup(User loggedInUser, java.lang.String systemGroupName)
loggedInUser
- The current usersystemGroupName
- the system grouppublic java.util.List<java.lang.Long> scheduleApplyErrataToActive(User loggedInUser, java.lang.String systemGroupName, java.util.List errataIds)
loggedInUser
- The current usersystemGroupName
- the system grouperrataIds
- List of errata IDs to apply (as Integers)public java.util.List<java.lang.Long> scheduleApplyErrataToActive(User loggedInUser, java.lang.String systemGroupName, java.util.List<java.lang.Integer> errataIds, java.util.Date earliestOccurrence)
loggedInUser
- The current usersystemGroupName
- the system grouperrataIds
- List of errata IDs to apply (as Integers)earliestOccurrence
- Earliest occurrence of the errata update