Skip navigation links

Oracle VM Manager Web Services API Reference
Release 2.1.5

E14979-01


oracle.ovs.api
Class ServerPoolManagementImpl

java.lang.Object
  extended by oracle.ovs.api.ServerPoolManagementImpl

All Implemented Interfaces:
ServerPoolManagement

public class ServerPoolManagementImpl
extends java.lang.Object
implements ServerPoolManagement

This class provides management funtionality for the virtualServer pools and associated virtual servers.


Constructor Summary
ServerPoolManagementImpl()
          Default constructor.

 

Method Summary
 VirtualServer[] addMembers(ServerPool serverPool, VirtualServerConfig[] serverConfigs)
          Add virtual servers to a server pool.
Server ID and Server Pool ID must be pointed.
 void checkHAAbility4ServerPoolById(java.lang.Long poolId)
          Check HA ability for the server pool.
 void checkServerConnection(VirtualServer vs)
          Check Server can be connected or not.
 void checkVirtualServerCompatibility(MasterVirtualServer masterVS, VirtualServer vs)
          Check Virtual server compatibility, so as to decide these server can be within one server pool or not.
Such compatibility rules will be richful.
1.Check CPU Architecture.
2.Check CPU Platform.
 ServerPool createServerPool(ServerPoolConfig serverPoolConfig)
          Creates a new server pool for the system.
 ServerPool createServerPool(ServerPoolConfig serverPoolConfig, java.lang.Long[] userIDList)
          For OVM Manager UI and CLI usage, this api didn't do precheck to avoid performance issue, so before call this api, please call validateCreateServerPool firstly.
 void deleteServerPool(ServerPool serverPool)
          
 void deleteServerPool(ServerPool serverPool, boolean isDelWorkDirectory)
          Remove a server pool completely from the system (not physical destruction of the server pool).
pool ID must be pointed.
 void deleteServerPool(ServerPool serverPool, boolean isDelWorkingDir, boolean force, java.util.List warningMessageList)
          Remove a server pool from ovm db and unregister the server pool from agent db.
When the flag force is true, following attentions need be paid:
1.If Master server agent is alive, the server pool info will be removed from OVM DB and Agent DB.
2.If Master server agent is unreachable, the server pool info will be removed just from OVM DB.
3.Some ongoing task will not be checked for the server pool, such as importing resource, running vm.
 java.lang.String getAgentVersion(java.lang.Long serverId)
          Get current server's agent version number.
Through getting the agent version, can do some useful estimations.
 java.lang.String getAgentVersion(VirtualServer server)
          Get Virtual Server agent's version directly from agent side.
 VirtualServer[] getAllMembers(ServerPool serverPool)
          Returns all virtual servers for the server pool.
pool ID must be pointed.
 ServerPool[] getAllServerPools()
          Returns an array of all server pools managed by the system.
 java.util.Map getClusterRootByServerPoolId(java.lang.Long serverPoolId)
          Return the root actual server pool shared storage(eg, mount point:/OVS, actual mount point: /dev/sdxx or nfs server:/export_point
 MasterVirtualServerStatus getMasterAgentStatus(ServerPool serverPool)
          Returns the current status of the master server, for a server pool.
Agent Status: Active/Unreachable.
 MasterVirtualServer getMasterServer(ServerPool serverPool)
          Returns the mater server configured for the server pool by pool id.
pool ID must be pointed.
 java.util.Map getMinimumAgentVersion(java.lang.Long[] serverPoolIDs)
          Get minimum agent version in server pools.
 java.lang.String getMinSupportedOVSAgentVersion()
          Get minimum OVS agent version that is required for the OVM API to perform correctly.
 java.util.Map getNetworkBridges(ServerPool serverPool)
          Get xen bridge from a server pool.
pool ID must be pointed.
 java.util.Map getNetworkBridgesByServerIP(VirtualServer virtualServer)
          Get xen brige by virtualServer ip
 VirtualServer getServer(VirtualServer vs)
          Deprecated. replaced by getVirtualServerById(VirtualServer).
 VirtualServer getServerByName(ServerPool serverPool, VirtualServer vs)
          Deprecated. 
 ServerPool getServerPool(ServerPool serverPool)
          Deprecated. replaced by getServerPoolById(ServerPool).
 ServerPool getServerPoolById(java.lang.Long poolId)
          Returns instances of server pool by id managed by the system.
pool ID must be pointed.
 ServerPool getServerPoolById(ServerPool serverPool)
          Deprecated. 
 ServerPool[] getServerPoolByName(ServerPool serverPool)
          Returns instance of specific server pools managed by the system, by (%)its name(%).
ServerPool name must be pointed.
 ServerPool getServerPoolByName(java.lang.String poolName)
          Returns an instance of a specific server pool managed by the system, query condition is its name.
pool name must be pointed.
 ServerPoolMetrics getServerPoolMetricsByServerPoolId(java.lang.Long serverPoolId)
          Get the sum of cpus, chips and cpu speed(MHZ) in one serverPool.
 ServerPool[] getServerPools(ServerPool serverPool, java.lang.Long loginUserId)
          More generic query for server pool, user can query server pools by server pool id, server pool name and server pool status More generic query for server pool, user can query server pools by server pool id, server pool name and server pool status
 java.util.Map getStorageRepositoriesByServerPoolId(java.lang.Long serverPoolId)
          Return all mounted storage repositories, like /OVS/:/dev/sdc;/OVS/uuid:nfs:/export_point;
 VirtualServer getVirtualServerById(java.lang.Long vsID)
          Return a specific instance of the virtual server by virtualServer id.
 VirtualServer getVirtualServerById(VirtualServer vs)
          Return a specific instance of the virtual server by virtualServer id.
server ID must be pointed.
 VirtualServer getVirtualServerByName(java.lang.String serverPoolName, java.lang.String virtualServerName)
          Returns an instance of the virtual server by pool name and server name from a server pool.
pool name and server name must be pointed.
 VirtualServer[] getVirtualServerByServerPool(java.lang.Long serverPoolID)
          Get Server By Server Pool ID
 VirtualServerMetrics[] getVirtualServerMetrics(java.lang.Long[] virtualServerIDList)
          Get statistics for a set of VirtualServers, this covers memory and CPU statistics.
 VirtualServer[] getVirtualServers(ServerPool pool, VirtualServer vs, java.lang.Long loginUserId)
          Get servers which belong to the server pool and currnt login user can access .
 void rebootServer(VirtualServer server)
          Reboots the virtual server.
server ID must be pointed.
 void refreshServerPool(ServerPool pool)
          Refresh server and server pool status , synchronize db data between EM-OVM and Agent db.
 void removeMember(VirtualServer server)
          Deprecated. 
 void removeMember(VirtualServer server, boolean force)
          Deprecated. 
 void removeMember(VirtualServer server, boolean force, java.util.List warningMessageList)
          Removes a virtual server from the server pool (logical de-referencing).
server ID must be pointed.
When the flag force is true, following attentions need be paid:
1.Some ongoing task will not be checked for the virtual server, such as running vm.
2.If the virtual server is unreachable, the virtual server still will be removed from OVM db and agent DB.
Otherwise,removeMember will check following validations:
1.Is there any running vm in this virtual server?
 void restoreVirtualServerPoolByManagerData(java.lang.Long serverPoolId)
          Populate Server Pool data from Manager DB to Agent DB.
 void shutdownServer(VirtualServer server)
          Shuts down the virtual server.
server ID must be pointed.
 void updateServerPool(java.lang.Long poolId, boolean HAStatus, java.lang.String newPoolName)
          Update server pool info, including:
1.Update name of server pool;
2.Enable/Disable HA status for server pool.
 void updateUserList4ServerPool(java.lang.Long serverPoolId, java.lang.Long[] userIDList)
          Update User List for server pool.
 void updateUtilityServerPassword(java.lang.String hostName, java.lang.String oldPassword, java.lang.String newPassword)
          Update password for utility virtual server.
 void updateVirtualServer(VirtualServerConfig serverConfig)
          
 void updateVirtualServerAgentPassword(java.lang.String hostName, java.lang.String oldPassword, java.lang.String newPassword)
          Update virtual server agent's password.
 void updateVirtualServerById(VirtualServer vs, boolean force)
          
 void updateVirtualServerById(VirtualServer vs, boolean force, java.util.List warningMessageList)
          Update Virtual Server information by server id.
1.Change virtual server informaion stored in ovm db, such as agent password, by this way, can populate agent password from agent side to OVM side.
2.Change utility virutl server informaion stored in ovm db, such as login password store in ovmdb,
by using this way, can populate utility virtual server login password from server side to OVM side.
3.Change the virtual server role:
Including:
a)Reassign one virtual server role(Master/Utility/VirtualServer) to another virtual server;
b)Change one virtual server role(Master/Utility/VirtualServer).
Notes:
a) For virtual server, running vm and prefer server list will be checked.
 void validateAddMembers(ServerPool serverPool, VirtualServerConfig[] serverConfigs)
          Pre-check for server addition into serverPool.
 void validateCreateServerPool(ServerPoolConfig poolConfig)
          Pre-check for create server pool.
 void validateDeleteServerPool(ServerPool serverPool)
          Pre-check for server pool deletion.
 void validateRebootServer(VirtualServer vs)
          This API done such validation jobs:
The server's agent and its master agent can be connected or not?
 void validateRemoveMember(VirtualServer vs)
          
 void validateRemoveMember(VirtualServer vs, boolean force)
          
 void validateRemoveMember(VirtualServer vs, boolean force, java.util.List warningMessageList)
          Pre-check for server removal from the serverPool.
 void validateShutdownServer(VirtualServer vs)
          This API done such validation jobs:
1.Check the server's agent can be connected or not.
2.Check the server's master agent can be connected or not.
3.Check the server's agent version, if version number is 212, the operation shutdown server is unsupported.
 void validateUpdateUtilityServerPassword(java.lang.String hostName, java.lang.String oldPassword)
          Validation user and password for utility server.
1.Try to connect utility virtual server using oldpassword.
2.If connection failed, then validtion will fail, and throw error exception message.
 void validateUpdateVSAgentPassword(java.lang.String hostName, java.lang.String oldPassword)
          Validation virtual server agent password can be updated or not.
1.Try to connect virtual server agent usting oldPassword.
2.If failed, then validationg will fail, and throw error exception message.

 

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Constructor Detail

ServerPoolManagementImpl

public ServerPoolManagementImpl()
Default constructor.

Method Detail

getVirtualServers

public VirtualServer[] getVirtualServers(ServerPool pool,
                                         VirtualServer vs,
                                         java.lang.Long loginUserId)
Get servers which belong to the server pool and currnt login user can access .
Specified by:
getVirtualServers in interface ServerPoolManagement
Parameters:
pool - Server Pool
vs - Virtual Server
loginUserId - Current login usre id
Returns:
Array of VirtualServer

getMinSupportedOVSAgentVersion

public java.lang.String getMinSupportedOVSAgentVersion()
Get minimum OVS agent version that is required for the OVM API to perform correctly.
Specified by:
getMinSupportedOVSAgentVersion in interface ServerPoolManagement

getAgentVersion

public java.lang.String getAgentVersion(java.lang.Long serverId)
Get current server's agent version number.
Through getting the agent version, can do some useful estimations.
Specified by:
getAgentVersion in interface ServerPoolManagement
Returns:
agent version

getAgentVersion

public java.lang.String getAgentVersion(VirtualServer server)
                                 throws oracle.ovs.biz.exception.OVSException
Get Virtual Server agent's version directly from agent side.
Specified by:
getAgentVersion in interface ServerPoolManagement
Returns:
agent version number.
Throws:
oracle.ovs.biz.exception.OVSException

getClusterRootByServerPoolId

public java.util.Map getClusterRootByServerPoolId(java.lang.Long serverPoolId)
                                           throws oracle.ovs.biz.exception.OVSException
Return the root actual server pool shared storage(eg, mount point:/OVS, actual mount point: /dev/sdxx or nfs server:/export_point
Specified by:
getClusterRootByServerPoolId in interface ServerPoolManagement
Parameters:
serverPoolId - Server Pool ID
Returns:
Map map of (actual server pool shared storage,actual mount source)
Throws:
oracle.ovs.biz.exception.OVSException

getStorageRepositoriesByServerPoolId

public java.util.Map getStorageRepositoriesByServerPoolId(java.lang.Long serverPoolId)
                                                   throws oracle.ovs.biz.exception.OVSException
Return all mounted storage repositories, like /OVS/:/dev/sdc;/OVS/uuid:nfs:/export_point;
Specified by:
getStorageRepositoriesByServerPoolId in interface ServerPoolManagement
Parameters:
serverPoolId - Server Pool ID
Returns:
Map map of (actual server pool shared storage,actual mount source)
Throws:
oracle.ovs.biz.exception.OVSException

updateUserList4ServerPool

public void updateUserList4ServerPool(java.lang.Long serverPoolId,
                                      java.lang.Long[] userIDList)
Update User List for server pool.
Specified by:
updateUserList4ServerPool in interface ServerPoolManagement
Parameters:
serverPoolId - Server Pool ID
userIDList - Array of User ID

getServerPoolMetricsByServerPoolId

public ServerPoolMetrics getServerPoolMetricsByServerPoolId(java.lang.Long serverPoolId)
                                                     throws oracle.ovs.biz.exception.OVSException
Get the sum of cpus, chips and cpu speed(MHZ) in one serverPool.
Specified by:
getServerPoolMetricsByServerPoolId in interface ServerPoolManagement
Parameters:
serverPoolId - Server Pool ID
Returns:
ServerPoolMetrics ServerPool Metrics
Throws:
oracle.ovs.biz.exception.OVSException
See Also:
ServerPoolMetrics

getVirtualServerMetrics

public VirtualServerMetrics[] getVirtualServerMetrics(java.lang.Long[] virtualServerIDList)
                                               throws oracle.ovs.biz.exception.OVSException
Get statistics for a set of VirtualServers, this covers memory and CPU statistics.
Specified by:
getVirtualServerMetrics in interface ServerPoolManagement
Parameters:
virtualServerIDList - Array of virtualServerID( Data type is Long)
Returns:
VirtualServerMetrics[] Array of VirtualServerMetrics @see oracle.ovs.api.datamodel.server.VirtualServerMetrics
Throws:
oracle.ovs.biz.exception.OVSException

updateVirtualServer

public void updateVirtualServer(VirtualServerConfig serverConfig)
                         throws oracle.ovs.biz.exception.OVSException
Specified by:
updateVirtualServer in interface ServerPoolManagement
Parameters:
serverConfig - using VirtualServer or UtilityVirtualServer object to construct VirtualServerConfig.
Throws:
oracle.ovs.biz.exception.OVSException

validateAddMembers

public void validateAddMembers(ServerPool serverPool,
                               VirtualServerConfig[] serverConfigs)
                        throws oracle.ovs.biz.exception.OVSException
Pre-check for server addition into serverPool. This API done such validation jobs:
1.Is there any server to be added in the input parameter serverConfigs.
2.If the input server is utility server, check the input utility server's user name and password.
3.Check the input server's agent password is correct or not.
4.Check all input server's agent can be connected or not.
5.Check all input server is managed or not by another server pool, in another word, the server's management is exclusive.
6.If current server pool is HA enabled, all of input server's HA cluster ability will be check.
7.Check whether the input server shared one same storage with current server pool or not.
Specified by:
validateAddMembers in interface ServerPoolManagement
Throws:
oracle.ovs.biz.exception.OVSException

addMembers

public VirtualServer[] addMembers(ServerPool serverPool,
                                  VirtualServerConfig[] serverConfigs)
                           throws oracle.ovs.biz.exception.OVSException
Add virtual servers to a server pool.
Server ID and Server Pool ID must be pointed.
Specified by:
addMembers in interface ServerPoolManagement
Parameters:
serverPool - Add members for which server pool
serverConfigs - Array for VirtualServerConfig
Returns:
VirtualServer[]
Throws:
oracle.ovs.biz.exception.OVSException
See Also:
VirtualServerConfig

validateCreateServerPool

public void validateCreateServerPool(ServerPoolConfig poolConfig)
                              throws oracle.ovs.biz.exception.OVSException
Pre-check for create server pool. This API done such validation jobs:
1.Check the Integrity for the new server pool.
2.Check all new server's agent can be connected or not.
3.Check all new server is managed or not, in another word, the server's management is exclusive.
4.If setcurrent server pool's HA enabled, all of new server's ha ability will be check.
5.Check whether all of server shared one same storage or not.
Specified by:
validateCreateServerPool in interface ServerPoolManagement
Throws:
oracle.ovs.biz.exception.OVSException

checkHAAbility4ServerPoolById

public void checkHAAbility4ServerPoolById(java.lang.Long poolId)
                                   throws oracle.ovs.biz.exception.OVSException
Check HA ability for the server pool.
Specified by:
checkHAAbility4ServerPoolById in interface ServerPoolManagement
Throws:
oracle.ovs.biz.exception.OVSException

createServerPool

public ServerPool createServerPool(ServerPoolConfig serverPoolConfig)
                            throws oracle.ovs.biz.exception.OVSException
Creates a new server pool for the system.
Specified by:
createServerPool in interface ServerPoolManagement
Parameters:
serverPoolConfig - @see oracle.ovs.api.datamodel.serverPool.config.ServerPoolConfig
Returns:
serverPool
Throws:
oracle.ovs.biz.exception.OVSException

createServerPool

public ServerPool createServerPool(ServerPoolConfig serverPoolConfig,
                                   java.lang.Long[] userIDList)
                            throws oracle.ovs.biz.exception.OVSException
For OVM Manager UI and CLI usage, this api didn't do precheck to avoid performance issue, so before call this api, please call validateCreateServerPool firstly.
Specified by:
createServerPool in interface ServerPoolManagement
Returns:
ServerPool server pool object.
Throws:
oracle.ovs.biz.exception.OVSException

validateDeleteServerPool

public void validateDeleteServerPool(ServerPool serverPool)
                              throws oracle.ovs.biz.serverPool.ServerPoolException,
                                     oracle.ovs.biz.agent.AgentException,
                                     oracle.ovs.biz.server.ServerException
Pre-check for server pool deletion. This API done such validation jobs:
1.Are there any running vm in the server pool?
2.Are there any importing resources in the server pool?
3.All of agents belong to servers in the pool can be connected or not.
Specified by:
validateDeleteServerPool in interface ServerPoolManagement
Throws:
oracle.ovs.biz.serverPool.ServerPoolException
oracle.ovs.biz.agent.AgentException
oracle.ovs.biz.server.ServerException

deleteServerPool

public void deleteServerPool(ServerPool serverPool,
                             boolean isDelWorkDirectory)
                      throws oracle.ovs.biz.exception.OVSException
Remove a server pool completely from the system (not physical destruction of the server pool).
pool ID must be pointed.
Specified by:
deleteServerPool in interface ServerPoolManagement
Parameters:
serverPool - pool ID must be pointed.
isDelWorkDirectory - Use this flag to decide delete physical working directory or not.
Throws:
oracle.ovs.biz.exception.OVSException

deleteServerPool

public void deleteServerPool(ServerPool serverPool,
                             boolean isDelWorkingDir,
                             boolean force,
                             java.util.List warningMessageList)
                      throws oracle.ovs.biz.exception.OVSException
Remove a server pool from ovm db and unregister the server pool from agent db.
When the flag force is true, following attentions need be paid:
1.If Master server agent is alive, the server pool info will be removed from OVM DB and Agent DB.
2.If Master server agent is unreachable, the server pool info will be removed just from OVM DB.
3.Some ongoing task will not be checked for the server pool, such as importing resource, running vm.
Specified by:
deleteServerPool in interface ServerPoolManagement
isDelWorkingDir - Use this flag to decide delete physical working directory or not.
force - if force=true, the server pool will be forced deleted.
warningMessageList - List of OVSWarningMessage
Throws:
oracle.ovs.biz.exception.OVSException
See Also:
OVSWarningMessage

deleteServerPool

public void deleteServerPool(ServerPool serverPool)
                      throws oracle.ovs.biz.exception.OVSException
Specified by:
deleteServerPool in interface ServerPoolManagement
Throws:
oracle.ovs.biz.exception.OVSException

getAllMembers

public VirtualServer[] getAllMembers(ServerPool serverPool)
Returns all virtual servers for the server pool.
pool ID must be pointed.
Specified by:
getAllMembers in interface ServerPoolManagement
Returns:
VirtualServer[]

getAllServerPools

public ServerPool[] getAllServerPools()
Returns an array of all server pools managed by the system.
Specified by:
getAllServerPools in interface ServerPoolManagement
Returns:
server pool array

getMasterAgentStatus

public MasterVirtualServerStatus getMasterAgentStatus(ServerPool serverPool)
Returns the current status of the master server, for a server pool.
Agent Status: Active/Unreachable.
Specified by:
getMasterAgentStatus in interface ServerPoolManagement
Returns:
Master Virtual Server Status
See Also:
pool ID must be pointed.

getMasterServer

public MasterVirtualServer getMasterServer(ServerPool serverPool)
Returns the mater server configured for the server pool by pool id.
pool ID must be pointed.
Specified by:
getMasterServer in interface ServerPoolManagement
Returns:
MasterVirtualServer

getVirtualServerById

public VirtualServer getVirtualServerById(VirtualServer vs)
Return a specific instance of the virtual server by virtualServer id.
server ID must be pointed.
Specified by:
getVirtualServerById in interface ServerPoolManagement
Returns:
VirtualServer

getVirtualServerById

public VirtualServer getVirtualServerById(java.lang.Long vsID)
Return a specific instance of the virtual server by virtualServer id.
Specified by:
getVirtualServerById in interface ServerPoolManagement
Parameters:
vsID - virtual server Id
Returns:
VirtualServer

getVirtualServerByServerPool

public VirtualServer[] getVirtualServerByServerPool(java.lang.Long serverPoolID)
Get Server By Server Pool ID
Specified by:
getVirtualServerByServerPool in interface ServerPoolManagement
Returns:
array of VirtualServer

getServer

public VirtualServer getServer(VirtualServer vs)
Deprecated. replaced by getVirtualServerById(VirtualServer).
Specified by:
getServer in interface ServerPoolManagement
Returns:
Virtual Server

getServerByName

public VirtualServer getServerByName(ServerPool serverPool,
                                     VirtualServer vs)
Deprecated. 
Specified by:
getServerByName in interface ServerPoolManagement
Returns:
VirtualServer

getMinimumAgentVersion

public java.util.Map getMinimumAgentVersion(java.lang.Long[] serverPoolIDs)
Get minimum agent version in server pools.
Specified by:
getMinimumAgentVersion in interface ServerPoolManagement
Parameters:
serverPoolIDs - Server Pool ID Array
Returns:
Map key:ServerPoolID, value:MinimumAgentVersion.

getVirtualServerByName

public VirtualServer getVirtualServerByName(java.lang.String serverPoolName,
                                            java.lang.String virtualServerName)
Returns an instance of the virtual server by pool name and server name from a server pool.
pool name and server name must be pointed.
Specified by:
getVirtualServerByName in interface ServerPoolManagement
Parameters:
serverPoolName - Virtual Server Pool Name
virtualServerName - Virtual Server Name
Returns:
VirtualServer

getServerPoolById

public ServerPool getServerPoolById(ServerPool serverPool)
Deprecated. 
Specified by:
getServerPoolById in interface ServerPoolManagement
Parameters:
serverPool - query will get one server pool info by its id
Returns:
ServerPool

getServerPoolById

public ServerPool getServerPoolById(java.lang.Long poolId)
Returns instances of server pool by id managed by the system.
pool ID must be pointed.
Specified by:
getServerPoolById in interface ServerPoolManagement
Parameters:
poolId - serverPoolID
Returns:
ServerPool

getServerPool

public ServerPool getServerPool(ServerPool serverPool)
Deprecated. replaced by getServerPoolById(ServerPool).
Specified by:
getServerPool in interface ServerPoolManagement
Parameters:
serverPool - serverPool id is needed
Returns:
ServerPool object.

getServerPools

public ServerPool[] getServerPools(ServerPool serverPool,
                                   java.lang.Long loginUserId)
More generic query for server pool, user can query server pools by server pool id, server pool name and server pool status More generic query for server pool, user can query server pools by server pool id, server pool name and server pool status
Specified by:
getServerPools in interface ServerPoolManagement
Parameters:
serverPool - all of its field value will be looked as query condtion value, except null field.
Currently support query by server pool id, server pool name and server pool status
loginUserId - current login user id
Returns:
server pool array

getServerPoolByName

public ServerPool[] getServerPoolByName(ServerPool serverPool)
Returns instance of specific server pools managed by the system, by (%)its name(%).
ServerPool name must be pointed.
Specified by:
getServerPoolByName in interface ServerPoolManagement
Parameters:
serverPool - server pool name is needed
Returns:
Array of ServerPool object

getServerPoolByName

public ServerPool getServerPoolByName(java.lang.String poolName)
Returns an instance of a specific server pool managed by the system, query condition is its name.
pool name must be pointed.
Specified by:
getServerPoolByName in interface ServerPoolManagement
Parameters:
poolName - VirtualServerPoolName
Returns:
ServerPool

validateRebootServer

public void validateRebootServer(VirtualServer vs)
                          throws oracle.ovs.biz.exception.OVSException
This API done such validation jobs:
The server's agent and its master agent can be connected or not?
Specified by:
validateRebootServer in interface ServerPoolManagement
Parameters:
vs - Virtual Server
Throws:
oracle.ovs.biz.exception.OVSException

rebootServer

public void rebootServer(VirtualServer server)
                  throws oracle.ovs.biz.exception.OVSException
Reboots the virtual server.
server ID must be pointed.
Specified by:
rebootServer in interface ServerPoolManagement
Throws:
oracle.ovs.biz.exception.OVSException

validateRemoveMember

public void validateRemoveMember(VirtualServer vs,
                                 boolean force,
                                 java.util.List warningMessageList)
                          throws oracle.ovs.biz.exception.OVSException
Pre-check for server removal from the serverPool. This API does such validation jobs:
1.The server's master agent can be connected or not.
2.Running vm in the server will be checked.
3.Prefer server list will be checked.
4.If the server is a master server, so the server couldn't be removed directly.
If force=true, upper checking message will be added into warningMessageList;
If force=false, upper checking will thrown error exception.
Specified by:
validateRemoveMember in interface ServerPoolManagement
Parameters:
vs - virtual server to be validate its removal
force - user want to force remove or not? if force is true, validate will not check running virtual machine for the virtual server.
warningMessageList - warning message list, it is a output parameter.
Throws:
oracle.ovs.biz.exception.OVSException

validateRemoveMember

public void validateRemoveMember(VirtualServer vs,
                                 boolean force)
                          throws oracle.ovs.biz.exception.OVSException
Specified by:
validateRemoveMember in interface ServerPoolManagement
Parameters:
vs - virtual server to be validate its removal
force - user want to force remove or not? if force is true, validate will not check running virtual machine for the virtual server.
Throws:
oracle.ovs.biz.exception.OVSException

validateRemoveMember

public void validateRemoveMember(VirtualServer vs)
                          throws oracle.ovs.biz.exception.OVSException
Specified by:
validateRemoveMember in interface ServerPoolManagement
Parameters:
vs - virtual server
Throws:
oracle.ovs.biz.exception.OVSException

removeMember

public void removeMember(VirtualServer server)
                  throws oracle.ovs.biz.exception.OVSException
Deprecated. 
Specified by:
removeMember in interface ServerPoolManagement
Throws:
oracle.ovs.biz.exception.OVSException
See Also:
ServerPoolManagement.removeMember(VirtualServer, boolean,List)

removeMember

public void removeMember(VirtualServer server,
                         boolean force,
                         java.util.List warningMessageList)
                  throws oracle.ovs.biz.exception.OVSException
Removes a virtual server from the server pool (logical de-referencing).
server ID must be pointed.
When the flag force is true, following attentions need be paid:
1.Some ongoing task will not be checked for the virtual server, such as running vm.
2.If the virtual server is unreachable, the virtual server still will be removed from OVM db and agent DB.
Otherwise,removeMember will check following validations:
1.Is there any running vm in this virtual server?
Specified by:
removeMember in interface ServerPoolManagement
force - Force remove virtual server or not?
For example: If user want to remove one virtual serve, but there are some running vm in this server.
so if the flag is true, API will not throw any exception message,just remove the virtual server according
to user's request.And all of running vm in the virtual server will be powered off or HA.
otherwise,API will throw some message to prompt user what they should do.
warningMessageList - List of warnning message for force remove virtual server operation.
Throws:
oracle.ovs.biz.exception.OVSException

removeMember

public void removeMember(VirtualServer server,
                         boolean force)
                  throws oracle.ovs.biz.exception.OVSException
Deprecated. 
Specified by:
removeMember in interface ServerPoolManagement
Throws:
oracle.ovs.biz.exception.OVSException
See Also:
ServerPoolManagement.removeMember(VirtualServer, boolean,List)

validateShutdownServer

public void validateShutdownServer(VirtualServer vs)
                            throws oracle.ovs.biz.exception.OVSException
This API done such validation jobs:
1.Check the server's agent can be connected or not.
2.Check the server's master agent can be connected or not.
3.Check the server's agent version, if version number is 212, the operation shutdown server is unsupported.
Specified by:
validateShutdownServer in interface ServerPoolManagement
Throws:
oracle.ovs.biz.exception.OVSException

shutdownServer

public void shutdownServer(VirtualServer server)
                    throws oracle.ovs.biz.exception.OVSException
Shuts down the virtual server.
server ID must be pointed.
Specified by:
shutdownServer in interface ServerPoolManagement
Throws:
oracle.ovs.biz.exception.OVSException

getNetworkBridges

public java.util.Map getNetworkBridges(ServerPool serverPool)
                                throws oracle.ovs.biz.agent.AgentException,
                                       oracle.ovs.biz.serverPool.ServerPoolException
Get xen bridge from a server pool.
pool ID must be pointed.
Specified by:
getNetworkBridges in interface ServerPoolManagement
Returns:
key value set, such as "<\xenbr0,00:15:60:C3:07:A1>;<\xenbr1,00:15:60:C3:07:A2>"
Throws:
oracle.ovs.biz.agent.AgentException
oracle.ovs.biz.serverPool.ServerPoolException

getNetworkBridgesByServerIP

public java.util.Map getNetworkBridgesByServerIP(VirtualServer virtualServer)
                                          throws oracle.ovs.biz.exception.OVSException
Get xen brige by virtualServer ip
Specified by:
getNetworkBridgesByServerIP in interface ServerPoolManagement
Parameters:
virtualServer - server's ip must be pointed.
Returns:
key value set, such as "<\xenbr0,00:15:60:C3:07:A1>;<\xenbr1,00:15:60:C3:07:A2>"
Throws:
oracle.ovs.biz.exception.OVSException

refreshServerPool

public void refreshServerPool(ServerPool pool)
Refresh server and server pool status , synchronize db data between EM-OVM and Agent db.
Specified by:
refreshServerPool in interface ServerPoolManagement
Parameters:
pool - refresh the server pool

validateUpdateVSAgentPassword

public void validateUpdateVSAgentPassword(java.lang.String hostName,
                                          java.lang.String oldPassword)
                                   throws oracle.ovs.biz.exception.OVSException
Validation virtual server agent password can be updated or not.
1.Try to connect virtual server agent usting oldPassword.
2.If failed, then validationg will fail, and throw error exception message.
Specified by:
validateUpdateVSAgentPassword in interface ServerPoolManagement
Parameters:
hostName - Hostname/IP
oldPassword - Old password
Throws:
oracle.ovs.biz.exception.OVSException

updateVirtualServerAgentPassword

public void updateVirtualServerAgentPassword(java.lang.String hostName,
                                             java.lang.String oldPassword,
                                             java.lang.String newPassword)
                                      throws oracle.ovs.biz.exception.OVSException
Update virtual server agent's password.
Specified by:
updateVirtualServerAgentPassword in interface ServerPoolManagement
Parameters:
hostName - Hostname/IP
oldPassword - Old password
newPassword - New password
Throws:
oracle.ovs.biz.exception.OVSException

validateUpdateUtilityServerPassword

public void validateUpdateUtilityServerPassword(java.lang.String hostName,
                                                java.lang.String oldPassword)
                                         throws oracle.ovs.biz.exception.OVSException
Validation user and password for utility server.
1.Try to connect utility virtual server using oldpassword.
2.If connection failed, then validtion will fail, and throw error exception message.
Specified by:
validateUpdateUtilityServerPassword in interface ServerPoolManagement
Parameters:
hostName - Hostname/IP
oldPassword - Old Password
Throws:
oracle.ovs.biz.exception.OVSException

updateUtilityServerPassword

public void updateUtilityServerPassword(java.lang.String hostName,
                                        java.lang.String oldPassword,
                                        java.lang.String newPassword)
                                 throws oracle.ovs.biz.exception.OVSException
Update password for utility virtual server.
Specified by:
updateUtilityServerPassword in interface ServerPoolManagement
Parameters:
hostName - Hostname/IP
oldPassword - Old Password
newPassword - New Password
Throws:
oracle.ovs.biz.exception.OVSException

checkVirtualServerCompatibility

public void checkVirtualServerCompatibility(MasterVirtualServer masterVS,
                                            VirtualServer vs)
                                     throws oracle.ovs.biz.exception.OVSException
Check Virtual server compatibility, so as to decide these server can be within one server pool or not.
Such compatibility rules will be richful.
1.Check CPU Architecture.
2.Check CPU Platform.
Specified by:
checkVirtualServerCompatibility in interface ServerPoolManagement
Throws:
oracle.ovs.biz.agent.AgentException
oracle.ovs.biz.server.ServerException
oracle.ovs.biz.exception.OVSException

checkServerConnection

public void checkServerConnection(VirtualServer vs)
                           throws oracle.ovs.biz.agent.AgentException,
                                  oracle.ovs.biz.exception.OVSException,
                                  oracle.ovs.biz.server.ServerException
Check Server can be connected or not.
Specified by:
checkServerConnection in interface ServerPoolManagement
Parameters:
vs - Virtual Server
Throws:
oracle.ovs.biz.exception.OVSException
oracle.ovs.biz.agent.AgentException
oracle.ovs.biz.server.ServerException

updateServerPool

public void updateServerPool(java.lang.Long poolId,
                             boolean HAStatus,
                             java.lang.String newPoolName)
                      throws oracle.ovs.biz.exception.OVSException
Update server pool info, including:
1.Update name of server pool;
2.Enable/Disable HA status for server pool.
Specified by:
updateServerPool in interface ServerPoolManagement
Parameters:
poolId - Which server pool will be updated.
HAStatus - New server pool ha status
newPoolName - New server pool name
Throws:
oracle.ovs.biz.exception.OVSException

updateVirtualServerById

public void updateVirtualServerById(VirtualServer vs,
                                    boolean force)
                             throws oracle.ovs.biz.exception.OVSException
Specified by:
updateVirtualServerById in interface ServerPoolManagement
Parameters:
vs - virtual server info, The API will update the server info by getting serverId.
force - this flag is an option for user,
the API execute some default operations or thrown some exception message once need user to confirm.
That means If force=true, API will execute default operations,
otherwise,API will throw some message to prompt user what they should do.
For example: If user remove one virtual serve role, but there are some running vm in this server. so if the flag is true,
API will not throw any exception message,just change the virtual server role according to user's request.
And all of running vm in the virtual server will be power off or HA.
Throws:
oracle.ovs.biz.exception.OVSException - if any exception occur, OVSException will be thrown.

updateVirtualServerById

public void updateVirtualServerById(VirtualServer vs,
                                    boolean force,
                                    java.util.List warningMessageList)
                             throws oracle.ovs.biz.exception.OVSException
Update Virtual Server information by server id.
1.Change virtual server informaion stored in ovm db, such as agent password, by this way, can populate agent password from agent side to OVM side.
2.Change utility virutl server informaion stored in ovm db, such as login password store in ovmdb,
by using this way, can populate utility virtual server login password from server side to OVM side.
3.Change the virtual server role:
Including:
a)Reassign one virtual server role(Master/Utility/VirtualServer) to another virtual server;
b)Change one virtual server role(Master/Utility/VirtualServer).
Notes:
a) For virtual server, running vm and prefer server list will be checked.
Specified by:
updateVirtualServerById in interface ServerPoolManagement
Parameters:
vs - virtual server info, The API will update the server info by getting serverId.
force - this flag is an option for user, the API execute some default operations or thrown some exception message once need user to confirm.
That means If force=true, API will execute default operations,
otherwise,API will throw some message to prompt user what they should do.
For example: If user remove one virtual serve role, but there are some running vm in this server. so if the flag is true,
API will not throw any exception message,just change the virtual server role according to user's request.
warningMessageList - List of OVSWarningMessage
Throws:
oracle.ovs.biz.exception.OVSException - if any exception occur, OVSException will be thrown.
See Also:
OVSWarningMessage

restoreVirtualServerPoolByManagerData

public void restoreVirtualServerPoolByManagerData(java.lang.Long serverPoolId)
                                           throws oracle.ovs.biz.exception.OVSException
Populate Server Pool data from Manager DB to Agent DB.
Specified by:
restoreVirtualServerPoolByManagerData in interface ServerPoolManagement
Parameters:
serverPoolId - ServerPool ID
Throws:
oracle.ovs.biz.exception.OVSException - if any exception occur, OVSException will be thrown.

Skip navigation links

Oracle VM Manager Web Services API Reference
Release 2.1.5

E14979-01


Copyright © 2009, Oracle. All rights reserved.