test_class.declarator: s_logger = LoggerFactory.getLogger(HighAvailabilityManagerImplTest.class)
test_class.modifier: private static final
test_class.original_string: private static final Logger s_logger = LoggerFactory.getLogger(HighAvailabilityManagerImplTest.class);
test_class.type: Logger
test_class.var_name: s_logger
test_class.declarator: _haDao
test_class.modifier: @Mock
test_class.original_string: @Mock
    HighAvailabilityDao _haDao;
test_class.type: HighAvailabilityDao
test_class.var_name: _haDao
test_class.declarator: _instanceDao
test_class.modifier: @Mock
test_class.original_string: @Mock
    VMInstanceDao _instanceDao;
test_class.type: VMInstanceDao
test_class.var_name: _instanceDao
test_class.declarator: _hostDao
test_class.modifier: @Mock
test_class.original_string: @Mock
    HostDao _hostDao;
test_class.type: HostDao
test_class.var_name: _hostDao
test_class.declarator: _dcDao
test_class.modifier: @Mock
test_class.original_string: @Mock
    DataCenterDao _dcDao;
test_class.type: DataCenterDao
test_class.var_name: _dcDao
test_class.declarator: _podDao
test_class.modifier: @Mock
test_class.original_string: @Mock
    HostPodDao _podDao;
test_class.type: HostPodDao
test_class.var_name: _podDao
test_class.declarator: _clusterDetailsDao
test_class.modifier: @Mock
test_class.original_string: @Mock
    ClusterDetailsDao _clusterDetailsDao;
test_class.type: ClusterDetailsDao
test_class.var_name: _clusterDetailsDao
test_class.declarator: _serviceOfferingDao
test_class.modifier: @Mock
test_class.original_string: @Mock
    ServiceOfferingDao _serviceOfferingDao;
test_class.type: ServiceOfferingDao
test_class.var_name: _serviceOfferingDao
test_class.declarator: _managedContext
test_class.modifier: @Mock
test_class.original_string: @Mock
    ManagedContext _managedContext;
test_class.type: ManagedContext
test_class.var_name: _managedContext
test_class.declarator: _agentMgr
test_class.modifier: @Mock
test_class.original_string: @Mock
    AgentManager _agentMgr;
test_class.type: AgentManager
test_class.var_name: _agentMgr
test_class.declarator: _alertMgr
test_class.modifier: @Mock
test_class.original_string: @Mock
    AlertManager _alertMgr;
test_class.type: AlertManager
test_class.var_name: _alertMgr
test_class.declarator: _storageMgr
test_class.modifier: @Mock
test_class.original_string: @Mock
    StorageManager _storageMgr;
test_class.type: StorageManager
test_class.var_name: _storageMgr
test_class.declarator: _guestOSDao
test_class.modifier: @Mock
test_class.original_string: @Mock
    GuestOSDao _guestOSDao;
test_class.type: GuestOSDao
test_class.var_name: _guestOSDao
test_class.declarator: _guestOSCategoryDao
test_class.modifier: @Mock
test_class.original_string: @Mock
    GuestOSCategoryDao _guestOSCategoryDao;
test_class.type: GuestOSCategoryDao
test_class.var_name: _guestOSCategoryDao
test_class.declarator: _itMgr
test_class.modifier: @Mock
test_class.original_string: @Mock
    VirtualMachineManager _itMgr;
test_class.type: VirtualMachineManager
test_class.var_name: _itMgr
test_class.declarator: _accountMgr
test_class.modifier: @Mock
test_class.original_string: @Mock
    AccountManager _accountMgr;
test_class.type: AccountManager
test_class.var_name: _accountMgr
test_class.declarator: _resourceMgr
test_class.modifier: @Mock
test_class.original_string: @Mock
    ResourceManager _resourceMgr;
test_class.type: ResourceManager
test_class.var_name: _resourceMgr
test_class.declarator: _msServer
test_class.modifier: @Mock
test_class.original_string: @Mock
    ManagementServer _msServer;
test_class.type: ManagementServer
test_class.var_name: _msServer
test_class.declarator: _configDao
test_class.modifier: @Mock
test_class.original_string: @Mock
    ConfigurationDao _configDao;
test_class.type: ConfigurationDao
test_class.var_name: _configDao
test_class.declarator: volumeMgr
test_class.modifier: @Mock
test_class.original_string: @Mock
    VolumeOrchestrationService volumeMgr;
test_class.type: VolumeOrchestrationService
test_class.var_name: volumeMgr
test_class.declarator: hostVO
test_class.modifier: @Mock
test_class.original_string: @Mock
    HostVO hostVO;
test_class.type: HostVO
test_class.var_name: hostVO
test_class.declarator: highAvailabilityManager
test_class.original_string: HighAvailabilityManagerImpl highAvailabilityManager;
test_class.type: HighAvailabilityManagerImpl
test_class.var_name: highAvailabilityManager
test_class.declarator: highAvailabilityManagerSpy
test_class.original_string: HighAvailabilityManagerImpl highAvailabilityManagerSpy;
test_class.type: HighAvailabilityManagerImpl
test_class.var_name: highAvailabilityManagerSpy
test_class.declarator: processWorkMethod = null
test_class.modifier: static
test_class.original_string: static Method processWorkMethod = null;
test_class.type: Method
test_class.var_name: processWorkMethod
test_class.file: server/src/test/java/com/cloud/ha/HighAvailabilityManagerImplTest.java
test_class.identifier: HighAvailabilityManagerImplTest
test_case.body: @Test
    public void scheduleRestartForVmsOnHostNonEmptyVMList() {
      Mockito.when(hostVO.getId()).thenReturn(1l);
      Mockito.when(hostVO.getType()).thenReturn(Host.Type.Routing);
      Mockito.when(hostVO.getHypervisorType()).thenReturn(HypervisorType.XenServer);
      final List<VMInstanceVO> vms = new ArrayList<VMInstanceVO>();
      final VMInstanceVO vm1 = Mockito.mock(VMInstanceVO.class);
      Mockito.when(vm1.getHostId()).thenReturn(1l);
      Mockito.when(vm1.getInstanceName()).thenReturn("i-2-3-VM");
      Mockito.when(vm1.getType()).thenReturn(VirtualMachine.Type.User);
      Mockito.when(vm1.isHaEnabled()).thenReturn(true);
      vms.add(vm1);
      final VMInstanceVO vm2 = Mockito.mock(VMInstanceVO.class);
      Mockito.when(vm2.getHostId()).thenReturn(1l);
      Mockito.when(vm2.getInstanceName()).thenReturn("r-2-VM");
      Mockito.when(vm2.getType()).thenReturn(VirtualMachine.Type.DomainRouter);
      Mockito.when(vm2.isHaEnabled()).thenReturn(true);
      vms.add(vm2);
      Mockito.when(_instanceDao.listByHostId(Mockito.anyLong())).thenReturn(vms);
      Mockito.when(_instanceDao.findByUuid(vm1.getUuid())).thenReturn(vm1);
      Mockito.when(_instanceDao.findByUuid(vm2.getUuid())).thenReturn(vm2);
      Mockito.when(_podDao.findById(Mockito.anyLong())).thenReturn(Mockito.mock(HostPodVO.class));
      Mockito.when(_dcDao.findById(Mockito.anyLong())).thenReturn(Mockito.mock(DataCenterVO.class));
      Mockito.when(_haDao.findPreviousHA(Mockito.anyLong())).thenReturn(Arrays.asList(Mockito.mock(HaWorkVO.class)));
      Mockito.when(_haDao.persist((HaWorkVO)Mockito.anyObject())).thenReturn(Mockito.mock(HaWorkVO.class));
  
      highAvailabilityManager.scheduleRestartForVmsOnHost(hostVO, true);
    }
test_case.class_method_signature: HighAvailabilityManagerImplTest.scheduleRestartForVmsOnHostNonEmptyVMList()
test_case.full_signature: @Test public void scheduleRestartForVmsOnHostNonEmptyVMList()
test_case.identifier: scheduleRestartForVmsOnHostNonEmptyVMList
test_case.invocations: thenReturn when getId thenReturn when getType thenReturn when getHypervisorType mock thenReturn when getHostId thenReturn when getInstanceName thenReturn when getType thenReturn when isHaEnabled add mock thenReturn when getHostId thenReturn when getInstanceName thenReturn when getType thenReturn when isHaEnabled add thenReturn when listByHostId anyLong thenReturn when findByUuid getUuid thenReturn when findByUuid getUuid thenReturn when findById anyLong mock thenReturn when findById anyLong mock thenReturn when findPreviousHA anyLong asList mock thenReturn when persist anyObject mock scheduleRestartForVmsOnHost
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void scheduleRestartForVmsOnHostNonEmptyVMList()
focal_class.declarator: s_logger = LoggerFactory.getLogger(HighAvailabilityManagerImpl.class)
focal_class.modifier: protected static final
focal_class.original_string: protected static final Logger s_logger = LoggerFactory.getLogger(HighAvailabilityManagerImpl.class);
focal_class.type: Logger
focal_class.var_name: s_logger
focal_class.declarator: _workers
focal_class.original_string: WorkerThread[] _workers;
focal_class.type: WorkerThread[]
focal_class.var_name: _workers
focal_class.declarator: _stopped
focal_class.original_string: boolean _stopped;
focal_class.type: boolean
focal_class.var_name: _stopped
focal_class.declarator: _timeToSleep
focal_class.original_string: long _timeToSleep;
focal_class.type: long
focal_class.var_name: _timeToSleep
focal_class.declarator: _haDao
focal_class.modifier: @Inject
focal_class.original_string: @Inject
    HighAvailabilityDao _haDao;
focal_class.type: HighAvailabilityDao
focal_class.var_name: _haDao
focal_class.declarator: _instanceDao
focal_class.modifier: @Inject
focal_class.original_string: @Inject
    VMInstanceDao _instanceDao;
focal_class.type: VMInstanceDao
focal_class.var_name: _instanceDao
focal_class.declarator: _hostDao
focal_class.modifier: @Inject
focal_class.original_string: @Inject
    HostDao _hostDao;
focal_class.type: HostDao
focal_class.var_name: _hostDao
focal_class.declarator: _dcDao
focal_class.modifier: @Inject
focal_class.original_string: @Inject
    DataCenterDao _dcDao;
focal_class.type: DataCenterDao
focal_class.var_name: _dcDao
focal_class.declarator: _podDao
focal_class.modifier: @Inject
focal_class.original_string: @Inject
    HostPodDao _podDao;
focal_class.type: HostPodDao
focal_class.var_name: _podDao
focal_class.declarator: _clusterDetailsDao
focal_class.modifier: @Inject
focal_class.original_string: @Inject
    ClusterDetailsDao _clusterDetailsDao;
focal_class.type: ClusterDetailsDao
focal_class.var_name: _clusterDetailsDao
focal_class.declarator: _serviceOfferingDao
focal_class.modifier: @Inject
focal_class.original_string: @Inject
    ServiceOfferingDao _serviceOfferingDao;
focal_class.type: ServiceOfferingDao
focal_class.var_name: _serviceOfferingDao
focal_class.declarator: _serverId
focal_class.original_string: long _serverId;
focal_class.type: long
focal_class.var_name: _serverId
focal_class.declarator: _managedContext
focal_class.modifier: @Inject
focal_class.original_string: @Inject
    ManagedContext _managedContext;
focal_class.type: ManagedContext
focal_class.var_name: _managedContext
focal_class.declarator: investigators
focal_class.original_string: List<Investigator> investigators;
focal_class.type: List<Investigator>
focal_class.var_name: investigators
focal_class.declarator: fenceBuilders
focal_class.original_string: List<FenceBuilder> fenceBuilders;
focal_class.type: List<FenceBuilder>
focal_class.var_name: fenceBuilders
focal_class.declarator: _haPlanners
focal_class.original_string: List<HAPlanner> _haPlanners;
focal_class.type: List<HAPlanner>
focal_class.var_name: _haPlanners
focal_class.declarator: _agentMgr
focal_class.modifier: @Inject
focal_class.original_string: @Inject
    AgentManager _agentMgr;
focal_class.type: AgentManager
focal_class.var_name: _agentMgr
focal_class.declarator: _alertMgr
focal_class.modifier: @Inject
focal_class.original_string: @Inject
    AlertManager _alertMgr;
focal_class.type: AlertManager
focal_class.var_name: _alertMgr
focal_class.declarator: _storageMgr
focal_class.modifier: @Inject
focal_class.original_string: @Inject
    StorageManager _storageMgr;
focal_class.type: StorageManager
focal_class.var_name: _storageMgr
focal_class.declarator: _guestOSDao
focal_class.modifier: @Inject
focal_class.original_string: @Inject
    GuestOSDao _guestOSDao;
focal_class.type: GuestOSDao
focal_class.var_name: _guestOSDao
focal_class.declarator: _guestOSCategoryDao
focal_class.modifier: @Inject
focal_class.original_string: @Inject
    GuestOSCategoryDao _guestOSCategoryDao;
focal_class.type: GuestOSCategoryDao
focal_class.var_name: _guestOSCategoryDao
focal_class.declarator: _itMgr
focal_class.modifier: @Inject
focal_class.original_string: @Inject
    VirtualMachineManager _itMgr;
focal_class.type: VirtualMachineManager
focal_class.var_name: _itMgr
focal_class.declarator: _accountMgr
focal_class.modifier: @Inject
focal_class.original_string: @Inject
    AccountManager _accountMgr;
focal_class.type: AccountManager
focal_class.var_name: _accountMgr
focal_class.declarator: _resourceMgr
focal_class.modifier: @Inject
focal_class.original_string: @Inject
    ResourceManager _resourceMgr;
focal_class.type: ResourceManager
focal_class.var_name: _resourceMgr
focal_class.declarator: _msServer
focal_class.modifier: @Inject
focal_class.original_string: @Inject
    ManagementServer _msServer;
focal_class.type: ManagementServer
focal_class.var_name: _msServer
focal_class.declarator: _configDao
focal_class.modifier: @Inject
focal_class.original_string: @Inject
    ConfigurationDao _configDao;
focal_class.type: ConfigurationDao
focal_class.var_name: _configDao
focal_class.declarator: volumeMgr
focal_class.modifier: @Inject
focal_class.original_string: @Inject
    VolumeOrchestrationService volumeMgr;
focal_class.type: VolumeOrchestrationService
focal_class.var_name: volumeMgr
focal_class.declarator: _instance
focal_class.original_string: String _instance;
focal_class.type: String
focal_class.var_name: _instance
focal_class.declarator: _executor
focal_class.original_string: ScheduledExecutorService _executor;
focal_class.type: ScheduledExecutorService
focal_class.var_name: _executor
focal_class.declarator: _stopRetryInterval
focal_class.original_string: int _stopRetryInterval;
focal_class.type: int
focal_class.var_name: _stopRetryInterval
focal_class.declarator: _investigateRetryInterval
focal_class.original_string: int _investigateRetryInterval;
focal_class.type: int
focal_class.var_name: _investigateRetryInterval
focal_class.declarator: _migrateRetryInterval
focal_class.original_string: int _migrateRetryInterval;
focal_class.type: int
focal_class.var_name: _migrateRetryInterval
focal_class.declarator: _restartRetryInterval
focal_class.original_string: int _restartRetryInterval;
focal_class.type: int
focal_class.var_name: _restartRetryInterval
focal_class.declarator: _maxRetries
focal_class.original_string: int _maxRetries;
focal_class.type: int
focal_class.var_name: _maxRetries
focal_class.declarator: _timeBetweenFailures
focal_class.original_string: long _timeBetweenFailures;
focal_class.type: long
focal_class.var_name: _timeBetweenFailures
focal_class.declarator: _timeBetweenCleanups
focal_class.original_string: long _timeBetweenCleanups;
focal_class.type: long
focal_class.var_name: _timeBetweenCleanups
focal_class.declarator: _forceHA
focal_class.original_string: boolean _forceHA;
focal_class.type: boolean
focal_class.var_name: _forceHA
focal_class.declarator: _haTag = null
focal_class.original_string: String _haTag = null;
focal_class.type: String
focal_class.var_name: _haTag
focal_class.file: server/src/main/java/com/cloud/ha/HighAvailabilityManagerImpl.java
focal_class.identifier: HighAvailabilityManagerImpl
focal_class.interfaces: implements HighAvailabilityManager, ClusterManagerListener
focal_class.class_method_signature: HighAvailabilityManagerImpl.getInvestigators()
focal_class.full_signature: public List<Investigator> getInvestigators()
focal_class.identifier: getInvestigators
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: List<Investigator>
focal_class.signature: List<Investigator> getInvestigators()
focal_class.class_method_signature: HighAvailabilityManagerImpl.setInvestigators(List<Investigator> investigators)
focal_class.full_signature: public void setInvestigators(List<Investigator> investigators)
focal_class.identifier: setInvestigators
focal_class.modifiers: public
focal_class.parameters: (List<Investigator> investigators)
focal_class.return: void
focal_class.signature: void setInvestigators(List<Investigator> investigators)
focal_class.class_method_signature: HighAvailabilityManagerImpl.getFenceBuilders()
focal_class.full_signature: public List<FenceBuilder> getFenceBuilders()
focal_class.identifier: getFenceBuilders
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: List<FenceBuilder>
focal_class.signature: List<FenceBuilder> getFenceBuilders()
focal_class.class_method_signature: HighAvailabilityManagerImpl.setFenceBuilders(List<FenceBuilder> fenceBuilders)
focal_class.full_signature: public void setFenceBuilders(List<FenceBuilder> fenceBuilders)
focal_class.identifier: setFenceBuilders
focal_class.modifiers: public
focal_class.parameters: (List<FenceBuilder> fenceBuilders)
focal_class.return: void
focal_class.signature: void setFenceBuilders(List<FenceBuilder> fenceBuilders)
focal_class.class_method_signature: HighAvailabilityManagerImpl.getHaPlanners()
focal_class.full_signature: public List<HAPlanner> getHaPlanners()
focal_class.identifier: getHaPlanners
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: List<HAPlanner>
focal_class.signature: List<HAPlanner> getHaPlanners()
focal_class.class_method_signature: HighAvailabilityManagerImpl.setHaPlanners(List<HAPlanner> haPlanners)
focal_class.full_signature: public void setHaPlanners(List<HAPlanner> haPlanners)
focal_class.identifier: setHaPlanners
focal_class.modifiers: public
focal_class.parameters: (List<HAPlanner> haPlanners)
focal_class.return: void
focal_class.signature: void setHaPlanners(List<HAPlanner> haPlanners)
focal_class.class_method_signature: HighAvailabilityManagerImpl.HighAvailabilityManagerImpl()
focal_class.full_signature: protected  HighAvailabilityManagerImpl()
focal_class.identifier: HighAvailabilityManagerImpl
focal_class.modifiers: protected
focal_class.parameters: ()
focal_class.signature:  HighAvailabilityManagerImpl()
focal_class.class_method_signature: HighAvailabilityManagerImpl.investigate(final long hostId)
focal_class.full_signature: @Override public Status investigate(final long hostId)
focal_class.identifier: investigate
focal_class.modifiers: @Override public
focal_class.parameters: (final long hostId)
focal_class.return: Status
focal_class.signature: Status investigate(final long hostId)
focal_class.class_method_signature: HighAvailabilityManagerImpl.scheduleRestartForVmsOnHost(final HostVO host, boolean investigate)
focal_class.full_signature: @Override public void scheduleRestartForVmsOnHost(final HostVO host, boolean investigate)
focal_class.identifier: scheduleRestartForVmsOnHost
focal_class.modifiers: @Override public
focal_class.parameters: (final HostVO host, boolean investigate)
focal_class.return: void
focal_class.signature: void scheduleRestartForVmsOnHost(final HostVO host, boolean investigate)
focal_class.class_method_signature: HighAvailabilityManagerImpl.scheduleStop(VMInstanceVO vm, long hostId, WorkType type)
focal_class.full_signature: @Override public void scheduleStop(VMInstanceVO vm, long hostId, WorkType type)
focal_class.identifier: scheduleStop
focal_class.modifiers: @Override public
focal_class.parameters: (VMInstanceVO vm, long hostId, WorkType type)
focal_class.return: void
focal_class.signature: void scheduleStop(VMInstanceVO vm, long hostId, WorkType type)
focal_class.class_method_signature: HighAvailabilityManagerImpl.wakeupWorkers()
focal_class.full_signature: protected void wakeupWorkers()
focal_class.identifier: wakeupWorkers
focal_class.modifiers: protected
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void wakeupWorkers()
focal_class.class_method_signature: HighAvailabilityManagerImpl.scheduleMigration(final VMInstanceVO vm)
focal_class.full_signature: @Override public boolean scheduleMigration(final VMInstanceVO vm)
focal_class.identifier: scheduleMigration
focal_class.modifiers: @Override public
focal_class.parameters: (final VMInstanceVO vm)
focal_class.return: boolean
focal_class.signature: boolean scheduleMigration(final VMInstanceVO vm)
focal_class.class_method_signature: HighAvailabilityManagerImpl.scheduleRestart(VMInstanceVO vm, boolean investigate)
focal_class.full_signature: @Override public void scheduleRestart(VMInstanceVO vm, boolean investigate)
focal_class.identifier: scheduleRestart
focal_class.modifiers: @Override public
focal_class.parameters: (VMInstanceVO vm, boolean investigate)
focal_class.return: void
focal_class.signature: void scheduleRestart(VMInstanceVO vm, boolean investigate)
focal_class.class_method_signature: HighAvailabilityManagerImpl.restart(final HaWorkVO work)
focal_class.full_signature: protected Long restart(final HaWorkVO work)
focal_class.identifier: restart
focal_class.modifiers: protected
focal_class.parameters: (final HaWorkVO work)
focal_class.return: Long
focal_class.signature: Long restart(final HaWorkVO work)
focal_class.class_method_signature: HighAvailabilityManagerImpl.migrate(final HaWorkVO work)
focal_class.full_signature: public Long migrate(final HaWorkVO work)
focal_class.identifier: migrate
focal_class.modifiers: public
focal_class.parameters: (final HaWorkVO work)
focal_class.return: Long
focal_class.signature: Long migrate(final HaWorkVO work)
focal_class.class_method_signature: HighAvailabilityManagerImpl.scheduleDestroy(VMInstanceVO vm, long hostId)
focal_class.full_signature: @Override public void scheduleDestroy(VMInstanceVO vm, long hostId)
focal_class.identifier: scheduleDestroy
focal_class.modifiers: @Override public
focal_class.parameters: (VMInstanceVO vm, long hostId)
focal_class.return: void
focal_class.signature: void scheduleDestroy(VMInstanceVO vm, long hostId)
focal_class.class_method_signature: HighAvailabilityManagerImpl.cancelDestroy(VMInstanceVO vm, Long hostId)
focal_class.full_signature: @Override public void cancelDestroy(VMInstanceVO vm, Long hostId)
focal_class.identifier: cancelDestroy
focal_class.modifiers: @Override public
focal_class.parameters: (VMInstanceVO vm, Long hostId)
focal_class.return: void
focal_class.signature: void cancelDestroy(VMInstanceVO vm, Long hostId)
focal_class.class_method_signature: HighAvailabilityManagerImpl.destroyVM(final HaWorkVO work)
focal_class.full_signature: protected Long destroyVM(final HaWorkVO work)
focal_class.identifier: destroyVM
focal_class.modifiers: protected
focal_class.parameters: (final HaWorkVO work)
focal_class.return: Long
focal_class.signature: Long destroyVM(final HaWorkVO work)
focal_class.class_method_signature: HighAvailabilityManagerImpl.stopVM(final HaWorkVO work)
focal_class.full_signature: protected Long stopVM(final HaWorkVO work)
focal_class.identifier: stopVM
focal_class.modifiers: protected
focal_class.parameters: (final HaWorkVO work)
focal_class.return: Long
focal_class.signature: Long stopVM(final HaWorkVO work)
focal_class.class_method_signature: HighAvailabilityManagerImpl.cancelScheduledMigrations(final HostVO host)
focal_class.full_signature: @Override public void cancelScheduledMigrations(final HostVO host)
focal_class.identifier: cancelScheduledMigrations
focal_class.modifiers: @Override public
focal_class.parameters: (final HostVO host)
focal_class.return: void
focal_class.signature: void cancelScheduledMigrations(final HostVO host)
focal_class.class_method_signature: HighAvailabilityManagerImpl.findTakenMigrationWork()
focal_class.full_signature: @Override public List<VMInstanceVO> findTakenMigrationWork()
focal_class.identifier: findTakenMigrationWork
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: List<VMInstanceVO>
focal_class.signature: List<VMInstanceVO> findTakenMigrationWork()
focal_class.class_method_signature: HighAvailabilityManagerImpl.rescheduleWork(final HaWorkVO work, final long nextTime)
focal_class.full_signature: private void rescheduleWork(final HaWorkVO work, final long nextTime)
focal_class.identifier: rescheduleWork
focal_class.modifiers: private
focal_class.parameters: (final HaWorkVO work, final long nextTime)
focal_class.return: void
focal_class.signature: void rescheduleWork(final HaWorkVO work, final long nextTime)
focal_class.class_method_signature: HighAvailabilityManagerImpl.getRescheduleTime(WorkType workType)
focal_class.full_signature: private long getRescheduleTime(WorkType workType)
focal_class.identifier: getRescheduleTime
focal_class.modifiers: private
focal_class.parameters: (WorkType workType)
focal_class.return: long
focal_class.signature: long getRescheduleTime(WorkType workType)
focal_class.class_method_signature: HighAvailabilityManagerImpl.processWork(final HaWorkVO work)
focal_class.full_signature: private void processWork(final HaWorkVO work)
focal_class.identifier: processWork
focal_class.modifiers: private
focal_class.parameters: (final HaWorkVO work)
focal_class.return: void
focal_class.signature: void processWork(final HaWorkVO work)
focal_class.class_method_signature: HighAvailabilityManagerImpl.configure(final String name, final Map<String, Object> xmlParams)
focal_class.full_signature: @Override public boolean configure(final String name, final Map<String, Object> xmlParams)
focal_class.identifier: configure
focal_class.modifiers: @Override public
focal_class.parameters: (final String name, final Map<String, Object> xmlParams)
focal_class.return: boolean
focal_class.signature: boolean configure(final String name, final Map<String, Object> xmlParams)
focal_class.class_method_signature: HighAvailabilityManagerImpl.start()
focal_class.full_signature: @Override public boolean start()
focal_class.identifier: start
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean start()
focal_class.class_method_signature: HighAvailabilityManagerImpl.stop()
focal_class.full_signature: @Override public boolean stop()
focal_class.identifier: stop
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean stop()
focal_class.class_method_signature: HighAvailabilityManagerImpl.onManagementNodeJoined(List<? extends ManagementServerHost> nodeList, long selfNodeId)
focal_class.full_signature: @Override public void onManagementNodeJoined(List<? extends ManagementServerHost> nodeList, long selfNodeId)
focal_class.identifier: onManagementNodeJoined
focal_class.modifiers: @Override public
focal_class.parameters: (List<? extends ManagementServerHost> nodeList, long selfNodeId)
focal_class.return: void
focal_class.signature: void onManagementNodeJoined(List<? extends ManagementServerHost> nodeList, long selfNodeId)
focal_class.class_method_signature: HighAvailabilityManagerImpl.onManagementNodeLeft(List<? extends ManagementServerHost> nodeList, long selfNodeId)
focal_class.full_signature: @Override public void onManagementNodeLeft(List<? extends ManagementServerHost> nodeList, long selfNodeId)
focal_class.identifier: onManagementNodeLeft
focal_class.modifiers: @Override public
focal_class.parameters: (List<? extends ManagementServerHost> nodeList, long selfNodeId)
focal_class.return: void
focal_class.signature: void onManagementNodeLeft(List<? extends ManagementServerHost> nodeList, long selfNodeId)
focal_class.class_method_signature: HighAvailabilityManagerImpl.onManagementNodeIsolated()
focal_class.full_signature: @Override public void onManagementNodeIsolated()
focal_class.identifier: onManagementNodeIsolated
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void onManagementNodeIsolated()
focal_class.class_method_signature: HighAvailabilityManagerImpl.getHaTag()
focal_class.full_signature: @Override public String getHaTag()
focal_class.identifier: getHaTag
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String getHaTag()
focal_class.class_method_signature: HighAvailabilityManagerImpl.getHAPlanner()
focal_class.full_signature: @Override public DeploymentPlanner getHAPlanner()
focal_class.identifier: getHAPlanner
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: DeploymentPlanner
focal_class.signature: DeploymentPlanner getHAPlanner()
focal_class.class_method_signature: HighAvailabilityManagerImpl.hasPendingHaWork(long vmId)
focal_class.full_signature: @Override public boolean hasPendingHaWork(long vmId)
focal_class.identifier: hasPendingHaWork
focal_class.modifiers: @Override public
focal_class.parameters: (long vmId)
focal_class.return: boolean
focal_class.signature: boolean hasPendingHaWork(long vmId)
focal_class.superclass: extends ManagerBase
focal_method.body: @Override
    public void scheduleRestartForVmsOnHost(final HostVO host, boolean investigate) {
  
      if (host.getType() != Host.Type.Routing) {
        return;
      }
  
      s_logger.warn("Scheduling restart for VMs on host " + host.getId() + "-" + host.getName());
  
      final List<VMInstanceVO> vms = _instanceDao.listByHostId(host.getId());
      final DataCenterVO dcVO = _dcDao.findById(host.getDataCenterId());
  
      // send an email alert that the host is down
      StringBuilder sb = null;
      final List<VMInstanceVO> reorderedVMList = new ArrayList<VMInstanceVO>();
      if (vms != null && !vms.isEmpty()) {
        sb = new StringBuilder();
        sb.append("  Starting HA on the following VMs:");
        // collect list of vm names for the alert email
        for (int i = 0; i < vms.size(); i++) {
          final VMInstanceVO vm = vms.get(i);
          if (vm.getType() == VirtualMachine.Type.User) {
            reorderedVMList.add(vm);
          } else {
            reorderedVMList.add(0, vm);
          }
          if (vm.isHaEnabled()) {
            sb.append(" " + vm.getHostName());
          }
        }
      }
  
      // send an email alert that the host is down, include VMs
      final HostPodVO podVO = _podDao.findById(host.getPodId());
      final String hostDesc = "name: " + host.getName() + " (id:" + host.getId() + "), availability zone: " + dcVO.getName() + ", pod: " + podVO.getName();
      _alertMgr.sendAlert(AlertManager.AlertType.ALERT_TYPE_HOST, host.getDataCenterId(), host.getPodId(), "Host is down, " + hostDesc,
          "Host [" + hostDesc + "] is down." + (sb != null ? sb.toString() : ""));
  
      for (VMInstanceVO vm : reorderedVMList) {
        if (s_logger.isDebugEnabled()) {
          s_logger.debug("Notifying HA Mgr of to restart vm " + vm.getId() + "-" + vm.getInstanceName());
        }
        vm = _instanceDao.findByUuid(vm.getUuid());
        final Long hostId = vm.getHostId();
        if (hostId != null && !hostId.equals(host.getId())) {
          s_logger.debug("VM " + vm.getInstanceName() + " is not on down host " + host.getId() + " it is on other host "
              + hostId + " VM HA is done");
          continue;
        }
        scheduleRestart(vm, investigate);
      }
    }
focal_method.class_method_signature: HighAvailabilityManagerImpl.scheduleRestartForVmsOnHost(final HostVO host, boolean investigate)
focal_method.full_signature: @Override public void scheduleRestartForVmsOnHost(final HostVO host, boolean investigate)
focal_method.identifier: scheduleRestartForVmsOnHost
focal_method.invocations: getType warn getId getName listByHostId getId findById getDataCenterId isEmpty append size get getType add add isHaEnabled append getHostName findById getPodId getName getId getName getName sendAlert getDataCenterId getPodId toString isDebugEnabled debug getId getInstanceName findByUuid getUuid getHostId equals getId debug getInstanceName getId scheduleRestart
focal_method.modifiers: @Override public
focal_method.parameters: (final HostVO host, boolean investigate)
focal_method.return: void
focal_method.signature: void scheduleRestartForVmsOnHost(final HostVO host, boolean investigate)