test_class.declarator: templateManager = new TemplateManagerImpl()
test_class.modifier: @Inject
test_class.original_string: @Inject
      TemplateManagerImpl templateManager = new TemplateManagerImpl();
test_class.type: TemplateManagerImpl
test_class.var_name: templateManager
test_class.declarator: dataStoreManager
test_class.modifier: @Inject
test_class.original_string: @Inject
      DataStoreManager dataStoreManager;
test_class.type: DataStoreManager
test_class.var_name: dataStoreManager
test_class.declarator: vmTemplateDao
test_class.modifier: @Inject
test_class.original_string: @Inject
      VMTemplateDao vmTemplateDao;
test_class.type: VMTemplateDao
test_class.var_name: vmTemplateDao
test_class.declarator: vmTemplatePoolDao
test_class.modifier: @Inject
test_class.original_string: @Inject
      VMTemplatePoolDao vmTemplatePoolDao;
test_class.type: VMTemplatePoolDao
test_class.var_name: vmTemplatePoolDao
test_class.declarator: templateDataStoreDao
test_class.modifier: @Inject
test_class.original_string: @Inject
      TemplateDataStoreDao templateDataStoreDao;
test_class.type: TemplateDataStoreDao
test_class.var_name: templateDataStoreDao
test_class.declarator: storagePoolHostDao
test_class.modifier: @Inject
test_class.original_string: @Inject
      StoragePoolHostDao storagePoolHostDao;
test_class.type: StoragePoolHostDao
test_class.var_name: storagePoolHostDao
test_class.declarator: primaryDataStoreDao
test_class.modifier: @Inject
test_class.original_string: @Inject
      PrimaryDataStoreDao primaryDataStoreDao;
test_class.type: PrimaryDataStoreDao
test_class.var_name: primaryDataStoreDao
test_class.declarator: resourceLimitMgr
test_class.modifier: @Inject
test_class.original_string: @Inject
      ResourceLimitService resourceLimitMgr;
test_class.type: ResourceLimitService
test_class.var_name: resourceLimitMgr
test_class.declarator: imgStoreDao
test_class.modifier: @Inject
test_class.original_string: @Inject
      ImageStoreDao imgStoreDao;
test_class.type: ImageStoreDao
test_class.var_name: imgStoreDao
test_class.declarator: guestOSDao
test_class.modifier: @Inject
test_class.original_string: @Inject
      GuestOSDao guestOSDao;
test_class.type: GuestOSDao
test_class.var_name: guestOSDao
test_class.declarator: tmpltDao
test_class.modifier: @Inject
test_class.original_string: @Inject
      VMTemplateDao tmpltDao;
test_class.type: VMTemplateDao
test_class.var_name: tmpltDao
test_class.declarator: snapshotDao
test_class.modifier: @Inject
test_class.original_string: @Inject
      SnapshotDao snapshotDao;
test_class.type: SnapshotDao
test_class.var_name: snapshotDao
test_class.file: server/src/test/java/com/cloud/template/TemplateManagerImplTest.java
test_class.identifier: TemplateManagerImplTest
test_case.body: @Test
      public void testTemplateScheduledForDownloadInMultiplePool() {
          VMTemplateVO mockTemplate = mock(VMTemplateVO.class);
          PrimaryDataStore mockPrimaryDataStore = mock(PrimaryDataStore.class);
          VMTemplateStoragePoolVO mockTemplateStore = mock(VMTemplateStoragePoolVO.class);
          List<StoragePoolVO> pools = new ArrayList<StoragePoolVO>();
  
          StoragePoolVO mockPool1 = mock(StoragePoolVO.class);
          when(mockPool1.getId()).thenReturn(2l);
          when(mockPool1.getStatus()).thenReturn(StoragePoolStatus.Up);
          when(mockPool1.getDataCenterId()).thenReturn(1l);
          StoragePoolVO mockPool2 = mock(StoragePoolVO.class);
          when(mockPool2.getId()).thenReturn(3l);
          when(mockPool2.getStatus()).thenReturn(StoragePoolStatus.Up);
          when(mockPool2.getDataCenterId()).thenReturn(1l);
          StoragePoolVO mockPool3 = mock(StoragePoolVO.class);
          when(mockPool3.getId()).thenReturn(4l);
          when(mockPool3.getStatus()).thenReturn(StoragePoolStatus.Up);
          when(mockPool3.getDataCenterId()).thenReturn(2l);
          pools.add(mockPool1);
          pools.add(mockPool2);
          pools.add(mockPool3);
  
          when(mockPrimaryDataStore.getId()).thenReturn(2l);
          when(mockTemplate.getId()).thenReturn(202l);
          when(mockTemplateStore.getDownloadState()).thenReturn(VMTemplateStorageResourceAssoc.Status.DOWNLOADED);
          when(vmTemplateDao.findById(anyLong())).thenReturn(mockTemplate);
          when(dataStoreManager.getPrimaryDataStore(anyLong())).thenReturn(mockPrimaryDataStore);
          when(vmTemplateDao.findById(anyLong(), anyBoolean())).thenReturn(mockTemplate);
          when(vmTemplatePoolDao.findByPoolTemplate(anyLong(), anyLong())).thenReturn(mockTemplateStore);
          when(primaryDataStoreDao.findById(2l)).thenReturn(mockPool1);
          when(primaryDataStoreDao.findById(3l)).thenReturn(mockPool2);
          when(primaryDataStoreDao.findById(4l)).thenReturn(mockPool3);
          when(primaryDataStoreDao.listByStatus(StoragePoolStatus.Up)).thenReturn(pools);
  
          doNothing().when(mockTemplateStore).setMarkedForGC(anyBoolean());
  
          ExecutorService preloadExecutor = new CustomThreadPoolExecutor(8, 8, 0L, TimeUnit.MILLISECONDS, new LinkedBlockingQueue(),
                  new NamedThreadFactory("Template-Preloader"));
          templateManager._preloadExecutor = preloadExecutor;
  
          templateManager.prepareTemplate(202, 1, null);
          assertTrue("Test template is scheduled for seeding to on pool", ((CustomThreadPoolExecutor) preloadExecutor).getCount() == 2);
      }
test_case.class_method_signature: TemplateManagerImplTest.testTemplateScheduledForDownloadInMultiplePool()
test_case.full_signature: @Test public void testTemplateScheduledForDownloadInMultiplePool()
test_case.identifier: testTemplateScheduledForDownloadInMultiplePool
test_case.invocations: mock mock mock mock thenReturn when getId thenReturn when getStatus thenReturn when getDataCenterId mock thenReturn when getId thenReturn when getStatus thenReturn when getDataCenterId mock thenReturn when getId thenReturn when getStatus thenReturn when getDataCenterId add add add thenReturn when getId thenReturn when getId thenReturn when getDownloadState thenReturn when findById anyLong thenReturn when getPrimaryDataStore anyLong thenReturn when findById anyLong anyBoolean thenReturn when findByPoolTemplate anyLong anyLong thenReturn when findById thenReturn when findById thenReturn when findById thenReturn when listByStatus setMarkedForGC when doNothing anyBoolean prepareTemplate assertTrue getCount
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testTemplateScheduledForDownloadInMultiplePool()
focal_class.declarator: s_logger = LoggerFactory.getLogger(TemplateManagerImpl.class)
focal_class.modifier: private final static
focal_class.original_string: private final static Logger s_logger = LoggerFactory.getLogger(TemplateManagerImpl.class);
focal_class.type: Logger
focal_class.var_name: s_logger
focal_class.declarator: _tmpltDao
focal_class.modifier: @Inject
      private
focal_class.original_string: @Inject
      private VMTemplateDao _tmpltDao;
focal_class.type: VMTemplateDao
focal_class.var_name: _tmpltDao
focal_class.declarator: _tmplStoreDao
focal_class.modifier: @Inject
      private
focal_class.original_string: @Inject
      private TemplateDataStoreDao _tmplStoreDao;
focal_class.type: TemplateDataStoreDao
focal_class.var_name: _tmplStoreDao
focal_class.declarator: _tmpltPoolDao
focal_class.modifier: @Inject
      private
focal_class.original_string: @Inject
      private VMTemplatePoolDao _tmpltPoolDao;
focal_class.type: VMTemplatePoolDao
focal_class.var_name: _tmpltPoolDao
focal_class.declarator: _tmpltZoneDao
focal_class.modifier: @Inject
      private
focal_class.original_string: @Inject
      private VMTemplateZoneDao _tmpltZoneDao;
focal_class.type: VMTemplateZoneDao
focal_class.var_name: _tmpltZoneDao
focal_class.declarator: _vmInstanceDao
focal_class.modifier: @Inject
      private
focal_class.original_string: @Inject
      private VMInstanceDao _vmInstanceDao;
focal_class.type: VMInstanceDao
focal_class.var_name: _vmInstanceDao
focal_class.declarator: _poolDao
focal_class.modifier: @Inject
      private
focal_class.original_string: @Inject
      private PrimaryDataStoreDao _poolDao;
focal_class.type: PrimaryDataStoreDao
focal_class.var_name: _poolDao
focal_class.declarator: _poolHostDao
focal_class.modifier: @Inject
      private
focal_class.original_string: @Inject
      private StoragePoolHostDao _poolHostDao;
focal_class.type: StoragePoolHostDao
focal_class.var_name: _poolHostDao
focal_class.declarator: _accountDao
focal_class.modifier: @Inject
      private
focal_class.original_string: @Inject
      private AccountDao _accountDao;
focal_class.type: AccountDao
focal_class.var_name: _accountDao
focal_class.declarator: _agentMgr
focal_class.modifier: @Inject
      private
focal_class.original_string: @Inject
      private AgentManager _agentMgr;
focal_class.type: AgentManager
focal_class.var_name: _agentMgr
focal_class.declarator: _accountMgr
focal_class.modifier: @Inject
      private
focal_class.original_string: @Inject
      private AccountManager _accountMgr;
focal_class.type: AccountManager
focal_class.var_name: _accountMgr
focal_class.declarator: _hostDao
focal_class.modifier: @Inject
      private
focal_class.original_string: @Inject
      private HostDao _hostDao;
focal_class.type: HostDao
focal_class.var_name: _hostDao
focal_class.declarator: _dcDao
focal_class.modifier: @Inject
      private
focal_class.original_string: @Inject
      private DataCenterDao _dcDao;
focal_class.type: DataCenterDao
focal_class.var_name: _dcDao
focal_class.declarator: _userVmDao
focal_class.modifier: @Inject
      private
focal_class.original_string: @Inject
      private UserVmDao _userVmDao;
focal_class.type: UserVmDao
focal_class.var_name: _userVmDao
focal_class.declarator: _volumeDao
focal_class.modifier: @Inject
      private
focal_class.original_string: @Inject
      private VolumeDao _volumeDao;
focal_class.type: VolumeDao
focal_class.var_name: _volumeDao
focal_class.declarator: _snapshotDao
focal_class.modifier: @Inject
      private
focal_class.original_string: @Inject
      private SnapshotDao _snapshotDao;
focal_class.type: SnapshotDao
focal_class.var_name: _snapshotDao
focal_class.declarator: _configDao
focal_class.modifier: @Inject
      private
focal_class.original_string: @Inject
      private ConfigurationDao _configDao;
focal_class.type: ConfigurationDao
focal_class.var_name: _configDao
focal_class.declarator: _domainDao
focal_class.modifier: @Inject
      private
focal_class.original_string: @Inject
      private DomainDao _domainDao;
focal_class.type: DomainDao
focal_class.var_name: _domainDao
focal_class.declarator: _guestOSDao
focal_class.modifier: @Inject
      private
focal_class.original_string: @Inject
      private GuestOSDao _guestOSDao;
focal_class.type: GuestOSDao
focal_class.var_name: _guestOSDao
focal_class.declarator: _storageMgr
focal_class.modifier: @Inject
      private
focal_class.original_string: @Inject
      private StorageManager _storageMgr;
focal_class.type: StorageManager
focal_class.var_name: _storageMgr
focal_class.declarator: _usageEventDao
focal_class.modifier: @Inject
      private
focal_class.original_string: @Inject
      private UsageEventDao _usageEventDao;
focal_class.type: UsageEventDao
focal_class.var_name: _usageEventDao
focal_class.declarator: _accountService
focal_class.modifier: @Inject
      private
focal_class.original_string: @Inject
      private AccountService _accountService;
focal_class.type: AccountService
focal_class.var_name: _accountService
focal_class.declarator: _resourceLimitMgr
focal_class.modifier: @Inject
      private
focal_class.original_string: @Inject
      private ResourceLimitService _resourceLimitMgr;
focal_class.type: ResourceLimitService
focal_class.var_name: _resourceLimitMgr
focal_class.declarator: _launchPermissionDao
focal_class.modifier: @Inject
      private
focal_class.original_string: @Inject
      private LaunchPermissionDao _launchPermissionDao;
focal_class.type: LaunchPermissionDao
focal_class.var_name: _launchPermissionDao
focal_class.declarator: _projectMgr
focal_class.modifier: @Inject
      private
focal_class.original_string: @Inject
      private ProjectManager _projectMgr;
focal_class.type: ProjectManager
focal_class.var_name: _projectMgr
focal_class.declarator: _volFactory
focal_class.modifier: @Inject
      private
focal_class.original_string: @Inject
      private VolumeDataFactory _volFactory;
focal_class.type: VolumeDataFactory
focal_class.var_name: _volFactory
focal_class.declarator: _tmplFactory
focal_class.modifier: @Inject
      private
focal_class.original_string: @Inject
      private TemplateDataFactory _tmplFactory;
focal_class.type: TemplateDataFactory
focal_class.var_name: _tmplFactory
focal_class.declarator: _snapshotFactory
focal_class.modifier: @Inject
      private
focal_class.original_string: @Inject
      private SnapshotDataFactory _snapshotFactory;
focal_class.type: SnapshotDataFactory
focal_class.var_name: _snapshotFactory
focal_class.declarator: _tmpltSvr
focal_class.modifier: @Inject
      private
focal_class.original_string: @Inject
      private TemplateService _tmpltSvr;
focal_class.type: TemplateService
focal_class.var_name: _tmpltSvr
focal_class.declarator: _dataStoreMgr
focal_class.modifier: @Inject
      private
focal_class.original_string: @Inject
      private DataStoreManager _dataStoreMgr;
focal_class.type: DataStoreManager
focal_class.var_name: _dataStoreMgr
focal_class.declarator: _volumeMgr
focal_class.modifier: @Inject
      private
focal_class.original_string: @Inject
      private VolumeOrchestrationService _volumeMgr;
focal_class.type: VolumeOrchestrationService
focal_class.var_name: _volumeMgr
focal_class.declarator: _epSelector
focal_class.modifier: @Inject
      private
focal_class.original_string: @Inject
      private EndPointSelector _epSelector;
focal_class.type: EndPointSelector
focal_class.var_name: _epSelector
focal_class.declarator: _userVmJoinDao
focal_class.modifier: @Inject
      private
focal_class.original_string: @Inject
      private UserVmJoinDao _userVmJoinDao;
focal_class.type: UserVmJoinDao
focal_class.var_name: _userVmJoinDao
focal_class.declarator: _snapshotStoreDao
focal_class.modifier: @Inject
      private
focal_class.original_string: @Inject
      private SnapshotDataStoreDao _snapshotStoreDao;
focal_class.type: SnapshotDataStoreDao
focal_class.var_name: _snapshotStoreDao
focal_class.declarator: _imgStoreDao
focal_class.modifier: @Inject
      private
focal_class.original_string: @Inject
      private ImageStoreDao _imgStoreDao;
focal_class.type: ImageStoreDao
focal_class.var_name: _imgStoreDao
focal_class.declarator: _messageBus
focal_class.modifier: @Inject
focal_class.original_string: @Inject
      MessageBus _messageBus;
focal_class.type: MessageBus
focal_class.var_name: _messageBus
focal_class.declarator: _disableExtraction = false
focal_class.modifier: private
focal_class.original_string: private boolean _disableExtraction = false;
focal_class.type: boolean
focal_class.var_name: _disableExtraction
focal_class.declarator: _adapters
focal_class.modifier: private
focal_class.original_string: private List<TemplateAdapter> _adapters;
focal_class.type: List<TemplateAdapter>
focal_class.var_name: _adapters
focal_class.declarator: _preloadExecutor
focal_class.original_string: ExecutorService _preloadExecutor;
focal_class.type: ExecutorService
focal_class.var_name: _preloadExecutor
focal_class.declarator: cacheMgr
focal_class.modifier: @Inject
      private
focal_class.original_string: @Inject
      private StorageCacheManager cacheMgr;
focal_class.type: StorageCacheManager
focal_class.var_name: cacheMgr
focal_class.declarator: selector
focal_class.modifier: @Inject
      private
focal_class.original_string: @Inject
      private EndPointSelector selector;
focal_class.type: EndPointSelector
focal_class.var_name: selector
focal_class.file: server/src/main/java/com/cloud/template/TemplateManagerImpl.java
focal_class.identifier: TemplateManagerImpl
focal_class.interfaces: implements TemplateManager, TemplateApiService, Configurable
focal_class.class_method_signature: TemplateManagerImpl.getAdapter(final HypervisorType type)
focal_class.full_signature: private TemplateAdapter getAdapter(final HypervisorType type)
focal_class.identifier: getAdapter
focal_class.modifiers: private
focal_class.parameters: (final HypervisorType type)
focal_class.return: TemplateAdapter
focal_class.signature: TemplateAdapter getAdapter(final HypervisorType type)
focal_class.class_method_signature: TemplateManagerImpl.registerIso(final RegisterIsoCmd cmd)
focal_class.full_signature: @Override @ActionEvent(eventType = EventTypes.EVENT_ISO_CREATE, eventDescription = "creating iso") public VirtualMachineTemplate registerIso(final RegisterIsoCmd cmd)
focal_class.identifier: registerIso
focal_class.modifiers: @Override @ActionEvent(eventType = EventTypes.EVENT_ISO_CREATE, eventDescription = "creating iso") public
focal_class.parameters: (final RegisterIsoCmd cmd)
focal_class.return: VirtualMachineTemplate
focal_class.signature: VirtualMachineTemplate registerIso(final RegisterIsoCmd cmd)
focal_class.class_method_signature: TemplateManagerImpl.registerTemplate(final RegisterTemplateCmd cmd)
focal_class.full_signature: @Override @ActionEvent(eventType = EventTypes.EVENT_TEMPLATE_CREATE, eventDescription = "creating template") public VirtualMachineTemplate registerTemplate(final RegisterTemplateCmd cmd)
focal_class.identifier: registerTemplate
focal_class.modifiers: @Override @ActionEvent(eventType = EventTypes.EVENT_TEMPLATE_CREATE, eventDescription = "creating template") public
focal_class.parameters: (final RegisterTemplateCmd cmd)
focal_class.return: VirtualMachineTemplate
focal_class.signature: VirtualMachineTemplate registerTemplate(final RegisterTemplateCmd cmd)
focal_class.class_method_signature: TemplateManagerImpl.registerTemplateForPostUpload(final GetUploadParamsForTemplateCmd cmd)
focal_class.full_signature: @Override @ActionEvent(eventType = EventTypes.EVENT_TEMPLATE_CREATE, eventDescription = "creating post upload template") public GetUploadParamsResponse registerTemplateForPostUpload(final GetUploadParamsForTemplateCmd cmd)
focal_class.identifier: registerTemplateForPostUpload
focal_class.modifiers: @Override @ActionEvent(eventType = EventTypes.EVENT_TEMPLATE_CREATE, eventDescription = "creating post upload template") public
focal_class.parameters: (final GetUploadParamsForTemplateCmd cmd)
focal_class.return: GetUploadParamsResponse
focal_class.signature: GetUploadParamsResponse registerTemplateForPostUpload(final GetUploadParamsForTemplateCmd cmd)
focal_class.class_method_signature: TemplateManagerImpl.getImageStore(final String storeUuid, final Long zoneId)
focal_class.full_signature: @Override public DataStore getImageStore(final String storeUuid, final Long zoneId)
focal_class.identifier: getImageStore
focal_class.modifiers: @Override public
focal_class.parameters: (final String storeUuid, final Long zoneId)
focal_class.return: DataStore
focal_class.signature: DataStore getImageStore(final String storeUuid, final Long zoneId)
focal_class.class_method_signature: TemplateManagerImpl.extract(final ExtractIsoCmd cmd)
focal_class.full_signature: @Override @ActionEvent(eventType = EventTypes.EVENT_ISO_EXTRACT, eventDescription = "extracting ISO", async = true) public String extract(final ExtractIsoCmd cmd)
focal_class.identifier: extract
focal_class.modifiers: @Override @ActionEvent(eventType = EventTypes.EVENT_ISO_EXTRACT, eventDescription = "extracting ISO", async = true) public
focal_class.parameters: (final ExtractIsoCmd cmd)
focal_class.return: String
focal_class.signature: String extract(final ExtractIsoCmd cmd)
focal_class.class_method_signature: TemplateManagerImpl.extract(final ExtractTemplateCmd cmd)
focal_class.full_signature: @Override @ActionEvent(eventType = EventTypes.EVENT_TEMPLATE_EXTRACT, eventDescription = "extracting template", async = true) public String extract(final ExtractTemplateCmd cmd)
focal_class.identifier: extract
focal_class.modifiers: @Override @ActionEvent(eventType = EventTypes.EVENT_TEMPLATE_EXTRACT, eventDescription = "extracting template", async = true) public
focal_class.parameters: (final ExtractTemplateCmd cmd)
focal_class.return: String
focal_class.signature: String extract(final ExtractTemplateCmd cmd)
focal_class.class_method_signature: TemplateManagerImpl.prepareTemplate(final long templateId, final long zoneId, final Long storageId)
focal_class.full_signature: @Override public VirtualMachineTemplate prepareTemplate(final long templateId, final long zoneId, final Long storageId)
focal_class.identifier: prepareTemplate
focal_class.modifiers: @Override public
focal_class.parameters: (final long templateId, final long zoneId, final Long storageId)
focal_class.return: VirtualMachineTemplate
focal_class.signature: VirtualMachineTemplate prepareTemplate(final long templateId, final long zoneId, final Long storageId)
focal_class.class_method_signature: TemplateManagerImpl.extract(final Account caller, final Long templateId, final String url, final Long zoneId, final String mode, final Long eventId, final boolean isISO)
focal_class.full_signature: private String extract(final Account caller, final Long templateId, final String url, final Long zoneId, final String mode, final Long eventId, final boolean isISO)
focal_class.identifier: extract
focal_class.modifiers: private
focal_class.parameters: (final Account caller, final Long templateId, final String url, final Long zoneId, final String mode, final Long eventId, final boolean isISO)
focal_class.return: String
focal_class.signature: String extract(final Account caller, final Long templateId, final String url, final Long zoneId, final String mode, final Long eventId, final boolean isISO)
focal_class.class_method_signature: TemplateManagerImpl.prepareIsoForVmProfile(final VirtualMachineProfile profile)
focal_class.full_signature: @Override public void prepareIsoForVmProfile(final VirtualMachineProfile profile)
focal_class.identifier: prepareIsoForVmProfile
focal_class.modifiers: @Override public
focal_class.parameters: (final VirtualMachineProfile profile)
focal_class.return: void
focal_class.signature: void prepareIsoForVmProfile(final VirtualMachineProfile profile)
focal_class.class_method_signature: TemplateManagerImpl.prepareTemplateInOneStoragePool(final VMTemplateVO template, final StoragePoolVO pool)
focal_class.full_signature: private void prepareTemplateInOneStoragePool(final VMTemplateVO template, final StoragePoolVO pool)
focal_class.identifier: prepareTemplateInOneStoragePool
focal_class.modifiers: private
focal_class.parameters: (final VMTemplateVO template, final StoragePoolVO pool)
focal_class.return: void
focal_class.signature: void prepareTemplateInOneStoragePool(final VMTemplateVO template, final StoragePoolVO pool)
focal_class.class_method_signature: TemplateManagerImpl.prepareTemplateInAllStoragePools(final VMTemplateVO template, final long zoneId)
focal_class.full_signature: public void prepareTemplateInAllStoragePools(final VMTemplateVO template, final long zoneId)
focal_class.identifier: prepareTemplateInAllStoragePools
focal_class.modifiers: public
focal_class.parameters: (final VMTemplateVO template, final long zoneId)
focal_class.return: void
focal_class.signature: void prepareTemplateInAllStoragePools(final VMTemplateVO template, final long zoneId)
focal_class.class_method_signature: TemplateManagerImpl.prepareTemplateForCreate(final VMTemplateVO templ, final StoragePool pool)
focal_class.full_signature: @Override @DB public VMTemplateStoragePoolVO prepareTemplateForCreate(final VMTemplateVO templ, final StoragePool pool)
focal_class.identifier: prepareTemplateForCreate
focal_class.modifiers: @Override @DB public
focal_class.parameters: (final VMTemplateVO templ, final StoragePool pool)
focal_class.return: VMTemplateStoragePoolVO
focal_class.signature: VMTemplateStoragePoolVO prepareTemplateForCreate(final VMTemplateVO templ, final StoragePool pool)
focal_class.class_method_signature: TemplateManagerImpl.getChecksum(final DataStore store, final String templatePath)
focal_class.full_signature: @Override public String getChecksum(final DataStore store, final String templatePath)
focal_class.identifier: getChecksum
focal_class.modifiers: @Override public
focal_class.parameters: (final DataStore store, final String templatePath)
focal_class.return: String
focal_class.signature: String getChecksum(final DataStore store, final String templatePath)
focal_class.class_method_signature: TemplateManagerImpl.resetTemplateDownloadStateOnPool(final long templateStoragePoolRefId)
focal_class.full_signature: @Override @DB public boolean resetTemplateDownloadStateOnPool(final long templateStoragePoolRefId)
focal_class.identifier: resetTemplateDownloadStateOnPool
focal_class.modifiers: @Override @DB public
focal_class.parameters: (final long templateStoragePoolRefId)
focal_class.return: boolean
focal_class.signature: boolean resetTemplateDownloadStateOnPool(final long templateStoragePoolRefId)
focal_class.class_method_signature: TemplateManagerImpl.copy(final long userId, final VMTemplateVO template, final DataStore srcSecStore, final DataCenterVO dstZone)
focal_class.full_signature: @Override @DB public boolean copy(final long userId, final VMTemplateVO template, final DataStore srcSecStore, final DataCenterVO dstZone)
focal_class.identifier: copy
focal_class.modifiers: @Override @DB public
focal_class.parameters: (final long userId, final VMTemplateVO template, final DataStore srcSecStore, final DataCenterVO dstZone)
focal_class.return: boolean
focal_class.signature: boolean copy(final long userId, final VMTemplateVO template, final DataStore srcSecStore, final DataCenterVO dstZone)
focal_class.class_method_signature: TemplateManagerImpl.copyTemplate(final CopyTemplateCmd cmd)
focal_class.full_signature: @Override @ActionEvent(eventType = EventTypes.EVENT_TEMPLATE_COPY, eventDescription = "copying template", async = true) public VirtualMachineTemplate copyTemplate(final CopyTemplateCmd cmd)
focal_class.identifier: copyTemplate
focal_class.modifiers: @Override @ActionEvent(eventType = EventTypes.EVENT_TEMPLATE_COPY, eventDescription = "copying template", async = true) public
focal_class.parameters: (final CopyTemplateCmd cmd)
focal_class.return: VirtualMachineTemplate
focal_class.signature: VirtualMachineTemplate copyTemplate(final CopyTemplateCmd cmd)
focal_class.class_method_signature: TemplateManagerImpl.delete(final long userId, final long templateId, final Long zoneId)
focal_class.full_signature: @Override public boolean delete(final long userId, final long templateId, final Long zoneId)
focal_class.identifier: delete
focal_class.modifiers: @Override public
focal_class.parameters: (final long userId, final long templateId, final Long zoneId)
focal_class.return: boolean
focal_class.signature: boolean delete(final long userId, final long templateId, final Long zoneId)
focal_class.class_method_signature: TemplateManagerImpl.getUnusedTemplatesInPool(final StoragePoolVO pool)
focal_class.full_signature: @Override public List<VMTemplateStoragePoolVO> getUnusedTemplatesInPool(final StoragePoolVO pool)
focal_class.identifier: getUnusedTemplatesInPool
focal_class.modifiers: @Override public
focal_class.parameters: (final StoragePoolVO pool)
focal_class.return: List<VMTemplateStoragePoolVO>
focal_class.signature: List<VMTemplateStoragePoolVO> getUnusedTemplatesInPool(final StoragePoolVO pool)
focal_class.class_method_signature: TemplateManagerImpl.evictTemplateFromStoragePool(final VMTemplateStoragePoolVO templatePoolVO)
focal_class.full_signature: @Override @DB public void evictTemplateFromStoragePool(final VMTemplateStoragePoolVO templatePoolVO)
focal_class.identifier: evictTemplateFromStoragePool
focal_class.modifiers: @Override @DB public
focal_class.parameters: (final VMTemplateStoragePoolVO templatePoolVO)
focal_class.return: void
focal_class.signature: void evictTemplateFromStoragePool(final VMTemplateStoragePoolVO templatePoolVO)
focal_class.class_method_signature: TemplateManagerImpl.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: TemplateManagerImpl.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: TemplateManagerImpl.configure(final String name, final Map<String, Object> params)
focal_class.full_signature: @Override public boolean configure(final String name, final Map<String, Object> params)
focal_class.identifier: configure
focal_class.modifiers: @Override public
focal_class.parameters: (final String name, final Map<String, Object> params)
focal_class.return: boolean
focal_class.signature: boolean configure(final String name, final Map<String, Object> params)
focal_class.class_method_signature: TemplateManagerImpl.TemplateManagerImpl()
focal_class.full_signature: protected  TemplateManagerImpl()
focal_class.identifier: TemplateManagerImpl
focal_class.modifiers: protected
focal_class.parameters: ()
focal_class.signature:  TemplateManagerImpl()
focal_class.class_method_signature: TemplateManagerImpl.templateIsDeleteable(final VMTemplateHostVO templateHostRef)
focal_class.full_signature: @Override public boolean templateIsDeleteable(final VMTemplateHostVO templateHostRef)
focal_class.identifier: templateIsDeleteable
focal_class.modifiers: @Override public
focal_class.parameters: (final VMTemplateHostVO templateHostRef)
focal_class.return: boolean
focal_class.signature: boolean templateIsDeleteable(final VMTemplateHostVO templateHostRef)
focal_class.class_method_signature: TemplateManagerImpl.templateIsDeleteable(final long templateId)
focal_class.full_signature: @Override public boolean templateIsDeleteable(final long templateId)
focal_class.identifier: templateIsDeleteable
focal_class.modifiers: @Override public
focal_class.parameters: (final long templateId)
focal_class.return: boolean
focal_class.signature: boolean templateIsDeleteable(final long templateId)
focal_class.class_method_signature: TemplateManagerImpl.detachIso(final long vmId)
focal_class.full_signature: @Override @ActionEvent(eventType = EventTypes.EVENT_ISO_DETACH, eventDescription = "detaching ISO", async = true) public boolean detachIso(final long vmId)
focal_class.identifier: detachIso
focal_class.modifiers: @Override @ActionEvent(eventType = EventTypes.EVENT_ISO_DETACH, eventDescription = "detaching ISO", async = true) public
focal_class.parameters: (final long vmId)
focal_class.return: boolean
focal_class.signature: boolean detachIso(final long vmId)
focal_class.class_method_signature: TemplateManagerImpl.attachIso(final long isoId, final long vmId)
focal_class.full_signature: @Override @ActionEvent(eventType = EventTypes.EVENT_ISO_ATTACH, eventDescription = "attaching ISO", async = true) public boolean attachIso(final long isoId, final long vmId)
focal_class.identifier: attachIso
focal_class.modifiers: @Override @ActionEvent(eventType = EventTypes.EVENT_ISO_ATTACH, eventDescription = "attaching ISO", async = true) public
focal_class.parameters: (final long isoId, final long vmId)
focal_class.return: boolean
focal_class.signature: boolean attachIso(final long isoId, final long vmId)
focal_class.class_method_signature: TemplateManagerImpl.prepareIso(final long isoId, final long dcId)
focal_class.full_signature: @Override public TemplateInfo prepareIso(final long isoId, final long dcId)
focal_class.identifier: prepareIso
focal_class.modifiers: @Override public
focal_class.parameters: (final long isoId, final long dcId)
focal_class.return: TemplateInfo
focal_class.signature: TemplateInfo prepareIso(final long isoId, final long dcId)
focal_class.class_method_signature: TemplateManagerImpl.attachISOToVM(final long vmId, final long isoId, final boolean attach)
focal_class.full_signature: private boolean attachISOToVM(final long vmId, final long isoId, final boolean attach)
focal_class.identifier: attachISOToVM
focal_class.modifiers: private
focal_class.parameters: (final long vmId, final long isoId, final boolean attach)
focal_class.return: boolean
focal_class.signature: boolean attachISOToVM(final long vmId, final long isoId, final boolean attach)
focal_class.class_method_signature: TemplateManagerImpl.attachISOToVM(final long vmId, final long userId, final long isoId, final boolean attach)
focal_class.full_signature: private boolean attachISOToVM(final long vmId, final long userId, final long isoId, final boolean attach)
focal_class.identifier: attachISOToVM
focal_class.modifiers: private
focal_class.parameters: (final long vmId, final long userId, final long isoId, final boolean attach)
focal_class.return: boolean
focal_class.signature: boolean attachISOToVM(final long vmId, final long userId, final long isoId, final boolean attach)
focal_class.class_method_signature: TemplateManagerImpl.deleteTemplate(final DeleteTemplateCmd cmd)
focal_class.full_signature: @Override @ActionEvent(eventType = EventTypes.EVENT_TEMPLATE_DELETE, eventDescription = "deleting template", async = true) public boolean deleteTemplate(final DeleteTemplateCmd cmd)
focal_class.identifier: deleteTemplate
focal_class.modifiers: @Override @ActionEvent(eventType = EventTypes.EVENT_TEMPLATE_DELETE, eventDescription = "deleting template", async = true) public
focal_class.parameters: (final DeleteTemplateCmd cmd)
focal_class.return: boolean
focal_class.signature: boolean deleteTemplate(final DeleteTemplateCmd cmd)
focal_class.class_method_signature: TemplateManagerImpl.deleteIso(final DeleteIsoCmd cmd)
focal_class.full_signature: @Override @ActionEvent(eventType = EventTypes.EVENT_ISO_DELETE, eventDescription = "deleting iso", async = true) public boolean deleteIso(final DeleteIsoCmd cmd)
focal_class.identifier: deleteIso
focal_class.modifiers: @Override @ActionEvent(eventType = EventTypes.EVENT_ISO_DELETE, eventDescription = "deleting iso", async = true) public
focal_class.parameters: (final DeleteIsoCmd cmd)
focal_class.return: boolean
focal_class.signature: boolean deleteIso(final DeleteIsoCmd cmd)
focal_class.class_method_signature: TemplateManagerImpl.listTemplatePermissions(final BaseListTemplateOrIsoPermissionsCmd cmd)
focal_class.full_signature: @Override public List<String> listTemplatePermissions(final BaseListTemplateOrIsoPermissionsCmd cmd)
focal_class.identifier: listTemplatePermissions
focal_class.modifiers: @Override public
focal_class.parameters: (final BaseListTemplateOrIsoPermissionsCmd cmd)
focal_class.return: List<String>
focal_class.signature: List<String> listTemplatePermissions(final BaseListTemplateOrIsoPermissionsCmd cmd)
focal_class.class_method_signature: TemplateManagerImpl.updateTemplateOrIsoPermissions(final BaseUpdateTemplateOrIsoPermissionsCmd cmd)
focal_class.full_signature: @DB @Override public boolean updateTemplateOrIsoPermissions(final BaseUpdateTemplateOrIsoPermissionsCmd cmd)
focal_class.identifier: updateTemplateOrIsoPermissions
focal_class.modifiers: @DB @Override public
focal_class.parameters: (final BaseUpdateTemplateOrIsoPermissionsCmd cmd)
focal_class.return: boolean
focal_class.signature: boolean updateTemplateOrIsoPermissions(final BaseUpdateTemplateOrIsoPermissionsCmd cmd)
focal_class.class_method_signature: TemplateManagerImpl.createPrivateTemplate(final CreateTemplateCmd command)
focal_class.full_signature: @Override @DB @ActionEvent(eventType = EventTypes.EVENT_TEMPLATE_CREATE, eventDescription = "creating template", async = true) public VirtualMachineTemplate createPrivateTemplate(final CreateTemplateCmd command)
focal_class.identifier: createPrivateTemplate
focal_class.modifiers: @Override @DB @ActionEvent(eventType = EventTypes.EVENT_TEMPLATE_CREATE, eventDescription = "creating template", async = true) public
focal_class.parameters: (final CreateTemplateCmd command)
focal_class.return: VirtualMachineTemplate
focal_class.signature: VirtualMachineTemplate createPrivateTemplate(final CreateTemplateCmd command)
focal_class.class_method_signature: TemplateManagerImpl.createPrivateTemplateRecord(final CreateTemplateCmd cmd, final Account templateOwner)
focal_class.full_signature: @Override @ActionEvent(eventType = EventTypes.EVENT_TEMPLATE_CREATE, eventDescription = "creating template", create = true) public VMTemplateVO createPrivateTemplateRecord(final CreateTemplateCmd cmd, final Account templateOwner)
focal_class.identifier: createPrivateTemplateRecord
focal_class.modifiers: @Override @ActionEvent(eventType = EventTypes.EVENT_TEMPLATE_CREATE, eventDescription = "creating template", create = true) public
focal_class.parameters: (final CreateTemplateCmd cmd, final Account templateOwner)
focal_class.return: VMTemplateVO
focal_class.signature: VMTemplateVO createPrivateTemplateRecord(final CreateTemplateCmd cmd, final Account templateOwner)
focal_class.class_method_signature: TemplateManagerImpl.getAbsoluteIsoPath(final long templateId, final long dataCenterId)
focal_class.full_signature: @Override public Pair<String, String> getAbsoluteIsoPath(final long templateId, final long dataCenterId)
focal_class.identifier: getAbsoluteIsoPath
focal_class.modifiers: @Override public
focal_class.parameters: (final long templateId, final long dataCenterId)
focal_class.return: Pair<String, String>
focal_class.signature: Pair<String, String> getAbsoluteIsoPath(final long templateId, final long dataCenterId)
focal_class.class_method_signature: TemplateManagerImpl.getSecondaryStorageURL(final long zoneId)
focal_class.full_signature: @Override public String getSecondaryStorageURL(final long zoneId)
focal_class.identifier: getSecondaryStorageURL
focal_class.modifiers: @Override public
focal_class.parameters: (final long zoneId)
focal_class.return: String
focal_class.signature: String getSecondaryStorageURL(final long zoneId)
focal_class.class_method_signature: TemplateManagerImpl.getImageStore(final long zoneId, final long tmpltId)
focal_class.full_signature: @Override public DataStore getImageStore(final long zoneId, final long tmpltId)
focal_class.identifier: getImageStore
focal_class.modifiers: @Override public
focal_class.parameters: (final long zoneId, final long tmpltId)
focal_class.return: DataStore
focal_class.signature: DataStore getImageStore(final long zoneId, final long tmpltId)
focal_class.class_method_signature: TemplateManagerImpl.getImageStore(final long tmpltId)
focal_class.full_signature: @Override public DataStore getImageStore(final long tmpltId)
focal_class.identifier: getImageStore
focal_class.modifiers: @Override public
focal_class.parameters: (final long tmpltId)
focal_class.return: DataStore
focal_class.signature: DataStore getImageStore(final long tmpltId)
focal_class.class_method_signature: TemplateManagerImpl.getTemplateSize(final long templateId, final long zoneId)
focal_class.full_signature: @Override public Long getTemplateSize(final long templateId, final long zoneId)
focal_class.identifier: getTemplateSize
focal_class.modifiers: @Override public
focal_class.parameters: (final long templateId, final long zoneId)
focal_class.return: Long
focal_class.signature: Long getTemplateSize(final long templateId, final long zoneId)
focal_class.class_method_signature: TemplateManagerImpl.getImageStoreByTemplate(final long templateId, final Long zoneId)
focal_class.full_signature: @Override public List<DataStore> getImageStoreByTemplate(final long templateId, final Long zoneId)
focal_class.identifier: getImageStoreByTemplate
focal_class.modifiers: @Override public
focal_class.parameters: (final long templateId, final Long zoneId)
focal_class.return: List<DataStore>
focal_class.signature: List<DataStore> getImageStoreByTemplate(final long templateId, final Long zoneId)
focal_class.class_method_signature: TemplateManagerImpl.updateTemplate(final UpdateIsoCmd cmd)
focal_class.full_signature: @Override public VMTemplateVO updateTemplate(final UpdateIsoCmd cmd)
focal_class.identifier: updateTemplate
focal_class.modifiers: @Override public
focal_class.parameters: (final UpdateIsoCmd cmd)
focal_class.return: VMTemplateVO
focal_class.signature: VMTemplateVO updateTemplate(final UpdateIsoCmd cmd)
focal_class.class_method_signature: TemplateManagerImpl.updateTemplate(final UpdateTemplateCmd cmd)
focal_class.full_signature: @Override public VMTemplateVO updateTemplate(final UpdateTemplateCmd cmd)
focal_class.identifier: updateTemplate
focal_class.modifiers: @Override public
focal_class.parameters: (final UpdateTemplateCmd cmd)
focal_class.return: VMTemplateVO
focal_class.signature: VMTemplateVO updateTemplate(final UpdateTemplateCmd cmd)
focal_class.class_method_signature: TemplateManagerImpl.updateTemplateOrIso(final BaseUpdateTemplateOrIsoCmd cmd)
focal_class.full_signature: private VMTemplateVO updateTemplateOrIso(final BaseUpdateTemplateOrIsoCmd cmd)
focal_class.identifier: updateTemplateOrIso
focal_class.modifiers: private
focal_class.parameters: (final BaseUpdateTemplateOrIsoCmd cmd)
focal_class.return: VMTemplateVO
focal_class.signature: VMTemplateVO updateTemplateOrIso(final BaseUpdateTemplateOrIsoCmd cmd)
focal_class.class_method_signature: TemplateManagerImpl.verifyTemplateId(final Long id)
focal_class.full_signature:  void verifyTemplateId(final Long id)
focal_class.identifier: verifyTemplateId
focal_class.parameters: (final Long id)
focal_class.return: void
focal_class.signature: void verifyTemplateId(final Long id)
focal_class.class_method_signature: TemplateManagerImpl.getConfigComponentName()
focal_class.full_signature: @Override public String getConfigComponentName()
focal_class.identifier: getConfigComponentName
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String getConfigComponentName()
focal_class.class_method_signature: TemplateManagerImpl.getConfigKeys()
focal_class.full_signature: @Override public ConfigKey<?>[] getConfigKeys()
focal_class.identifier: getConfigKeys
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: ConfigKey<?>[]
focal_class.signature: ConfigKey<?>[] getConfigKeys()
focal_class.class_method_signature: TemplateManagerImpl.getTemplateAdapters()
focal_class.full_signature: public List<TemplateAdapter> getTemplateAdapters()
focal_class.identifier: getTemplateAdapters
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: List<TemplateAdapter>
focal_class.signature: List<TemplateAdapter> getTemplateAdapters()
focal_class.class_method_signature: TemplateManagerImpl.setTemplateAdapters(final List<TemplateAdapter> adapters)
focal_class.full_signature: @Inject public void setTemplateAdapters(final List<TemplateAdapter> adapters)
focal_class.identifier: setTemplateAdapters
focal_class.modifiers: @Inject public
focal_class.parameters: (final List<TemplateAdapter> adapters)
focal_class.return: void
focal_class.signature: void setTemplateAdapters(final List<TemplateAdapter> adapters)
focal_class.superclass: extends ManagerBase
focal_method.body: @Override
      public VirtualMachineTemplate prepareTemplate(final long templateId, final long zoneId, final Long storageId) {
  
          final VMTemplateVO vmTemplate = _tmpltDao.findById(templateId);
          if (vmTemplate == null) {
              throw new InvalidParameterValueException("Unable to find template id=" + templateId);
          }
  
          _accountMgr.checkAccess(CallContext.current().getCallingAccount(), AccessType.OperateEntry, true, vmTemplate);
  
          if (storageId != null) {
              final StoragePoolVO pool = _poolDao.findById(storageId);
              if (pool != null) {
                  if (pool.getStatus() == StoragePoolStatus.Up && pool.getDataCenterId() == zoneId) {
                      prepareTemplateInOneStoragePool(vmTemplate, pool);
                  } else {
                      s_logger.warn("Skip loading template " + vmTemplate.getId() + " into primary storage " + pool.getId() + " as either the pool zone "
                              + pool.getDataCenterId() + " is different from the requested zone " + zoneId + " or the pool is currently not available.");
                  }
              }
          } else {
              prepareTemplateInAllStoragePools(vmTemplate, zoneId);
          }
          return vmTemplate;
      }
focal_method.class_method_signature: TemplateManagerImpl.prepareTemplate(final long templateId, final long zoneId, final Long storageId)
focal_method.full_signature: @Override public VirtualMachineTemplate prepareTemplate(final long templateId, final long zoneId, final Long storageId)
focal_method.identifier: prepareTemplate
focal_method.invocations: findById checkAccess getCallingAccount current findById getStatus getDataCenterId prepareTemplateInOneStoragePool warn getId getId getDataCenterId prepareTemplateInAllStoragePools
focal_method.modifiers: @Override public
focal_method.parameters: (final long templateId, final long zoneId, final Long storageId)
focal_method.return: VirtualMachineTemplate
focal_method.signature: VirtualMachineTemplate prepareTemplate(final long templateId, final long zoneId, final Long storageId)