test_class.declarator: thrown = ExpectedException.none()
test_class.modifier: @Rule
      public
test_class.original_string: @Rule
      public ExpectedException thrown = ExpectedException.none();
test_class.type: ExpectedException
test_class.var_name: thrown
test_class.declarator: _svc = new VolumeApiServiceImpl()
test_class.modifier: @Inject
test_class.original_string: @Inject
      VolumeApiServiceImpl _svc = new VolumeApiServiceImpl();
test_class.type: VolumeApiServiceImpl
test_class.var_name: _svc
test_class.declarator: _volumeDao
test_class.modifier: @Mock
test_class.original_string: @Mock
      VolumeDao _volumeDao;
test_class.type: VolumeDao
test_class.var_name: _volumeDao
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: _userVmDao
test_class.modifier: @Mock
test_class.original_string: @Mock
      UserVmDao _userVmDao;
test_class.type: UserVmDao
test_class.var_name: _userVmDao
test_class.declarator: _storagePoolDao
test_class.modifier: @Mock
test_class.original_string: @Mock
      PrimaryDataStoreDao _storagePoolDao;
test_class.type: PrimaryDataStoreDao
test_class.var_name: _storagePoolDao
test_class.declarator: _vmSnapshotDao
test_class.modifier: @Mock
test_class.original_string: @Mock
      VMSnapshotDao _vmSnapshotDao;
test_class.type: VMSnapshotDao
test_class.var_name: _vmSnapshotDao
test_class.declarator: _jobMgr
test_class.modifier: @Mock
test_class.original_string: @Mock
      AsyncJobManager _jobMgr;
test_class.type: AsyncJobManager
test_class.var_name: _jobMgr
test_class.declarator: _joinMapDao
test_class.modifier: @Mock
test_class.original_string: @Mock
      AsyncJobJoinMapDao _joinMapDao;
test_class.type: AsyncJobJoinMapDao
test_class.var_name: _joinMapDao
test_class.declarator: _volFactory
test_class.modifier: @Mock
test_class.original_string: @Mock
      VolumeDataFactory _volFactory;
test_class.type: VolumeDataFactory
test_class.var_name: _volFactory
test_class.declarator: _vmInstanceDao
test_class.modifier: @Mock
test_class.original_string: @Mock
      VMInstanceDao _vmInstanceDao;
test_class.type: VMInstanceDao
test_class.var_name: _vmInstanceDao
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: _resourceLimitMgr
test_class.modifier: @Mock
test_class.original_string: @Mock
      ResourceLimitService _resourceLimitMgr;
test_class.type: ResourceLimitService
test_class.var_name: _resourceLimitMgr
test_class.declarator: _accountDao
test_class.modifier: @Mock
test_class.original_string: @Mock
      AccountDao _accountDao;
test_class.type: AccountDao
test_class.var_name: _accountDao
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: volumeInfoMock
test_class.modifier: @Mock
test_class.original_string: @Mock
      VolumeInfo volumeInfoMock;
test_class.type: VolumeInfo
test_class.var_name: volumeInfoMock
test_class.declarator: snapshotInfoMock
test_class.modifier: @Mock
test_class.original_string: @Mock
      SnapshotInfo snapshotInfoMock;
test_class.type: SnapshotInfo
test_class.var_name: snapshotInfoMock
test_class.declarator: volService
test_class.modifier: @Mock
test_class.original_string: @Mock
      VolumeService volService;
test_class.type: VolumeService
test_class.var_name: volService
test_class.declarator: createVol
test_class.modifier: @Mock
test_class.original_string: @Mock
      CreateVolumeCmd createVol;
test_class.type: CreateVolumeCmd
test_class.var_name: createVol
test_class.declarator: detachCmd = new DetachVolumeCmd()
test_class.original_string: DetachVolumeCmd detachCmd = new DetachVolumeCmd();
test_class.type: DetachVolumeCmd
test_class.var_name: detachCmd
test_class.declarator: _detachCmdClass = detachCmd.getClass()
test_class.original_string: Class<?> _detachCmdClass = detachCmd.getClass();
test_class.type: Class<?>
test_class.var_name: _detachCmdClass
test_class.file: cosmic-core/server/src/test/java/com/cloud/storage/VolumeApiServiceImplTest.java
test_class.identifier: VolumeApiServiceImplTest
test_case.body: @Test
      public void testResourceLimitCheckForUploadedVolume() throws NoSuchFieldException, IllegalAccessException, ResourceAllocationException {
          doThrow(new ResourceAllocationException("primary storage resource limit check failed", Resource.ResourceType.primary_storage)).when(_svc._resourceLimitMgr)
                                                                                                                                        .checkResourceLimit(any(AccountVO
                                                                                                                                                        .class),
                                                                                                                                                any(Resource.ResourceType.class),
                                                                                                                                                any(Long.class));
          final UserVmVO vm = Mockito.mock(UserVmVO.class);
          final VolumeInfo volumeToAttach = Mockito.mock(VolumeInfo.class);
          when(volumeToAttach.getId()).thenReturn(9L);
          when(volumeToAttach.getDataCenterId()).thenReturn(34L);
          when(volumeToAttach.getVolumeType()).thenReturn(VolumeType.DATADISK);
          when(volumeToAttach.getInstanceId()).thenReturn(null);
          when(_userVmDao.findById(anyLong())).thenReturn(vm);
          when(vm.getType()).thenReturn(VirtualMachineType.User);
          when(vm.getState()).thenReturn(State.Running);
          when(vm.getDataCenterId()).thenReturn(34L);
          when(_svc._volsDao.findByInstanceAndType(anyLong(), any(VolumeType.class))).thenReturn(new ArrayList(10));
          when(_svc.volFactory.getVolume(9L)).thenReturn(volumeToAttach);
          when(volumeToAttach.getState()).thenReturn(Volume.State.Uploaded);
          final DataCenterVO zoneWithDisabledLocalStorage = Mockito.mock(DataCenterVO.class);
          when(_svc._dcDao.findById(anyLong())).thenReturn(zoneWithDisabledLocalStorage);
          try {
              _svc.attachVolumeToVM(2L, 9L, null);
          } catch (final InvalidParameterValueException e) {
              Assert.assertEquals(e.getMessage(), ("primary storage resource limit check failed"));
          }
      }
test_case.class_method_signature: VolumeApiServiceImplTest.testResourceLimitCheckForUploadedVolume()
test_case.full_signature: @Test public void testResourceLimitCheckForUploadedVolume()
test_case.identifier: testResourceLimitCheckForUploadedVolume
test_case.invocations: checkResourceLimit when doThrow any any any mock mock thenReturn when getId thenReturn when getDataCenterId thenReturn when getVolumeType thenReturn when getInstanceId thenReturn when findById anyLong thenReturn when getType thenReturn when getState thenReturn when getDataCenterId thenReturn when findByInstanceAndType anyLong any thenReturn when getVolume thenReturn when getState mock thenReturn when findById anyLong attachVolumeToVM assertEquals getMessage
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testResourceLimitCheckForUploadedVolume()
focal_class.declarator: VM_WORK_JOB_HANDLER = VolumeApiServiceImpl.class.getSimpleName()
focal_class.modifier: public static final
focal_class.original_string: public static final String VM_WORK_JOB_HANDLER = VolumeApiServiceImpl.class.getSimpleName();
focal_class.type: String
focal_class.var_name: VM_WORK_JOB_HANDLER
focal_class.declarator: VmJobCheckInterval = new ConfigKey<>("Advanced", Long.class, "vm.job.check.interval", "3000",
              "Interval in milliseconds to check if the job is complete", false)
focal_class.modifier: static final
focal_class.original_string: static final ConfigKey<Long> VmJobCheckInterval = new ConfigKey<>("Advanced", Long.class, "vm.job.check.interval", "3000",
              "Interval in milliseconds to check if the job is complete", false);
focal_class.type: ConfigKey<Long>
focal_class.var_name: VmJobCheckInterval
focal_class.declarator: DefaultDiskControllerName = new ConfigKey<>("Advanced", String.class, "vm.default.disk.controller", "SCSI",
              "Default disk controller type for routers, systemVMs and ", false)
focal_class.modifier: static final
focal_class.original_string: static final ConfigKey<String> DefaultDiskControllerName = new ConfigKey<>("Advanced", String.class, "vm.default.disk.controller", "SCSI",
              "Default disk controller type for routers, systemVMs and ", false);
focal_class.type: ConfigKey<String>
focal_class.var_name: DefaultDiskControllerName
focal_class.declarator: s_logger = LoggerFactory.getLogger(VolumeApiServiceImpl.class)
focal_class.modifier: private final static
focal_class.original_string: private final static Logger s_logger = LoggerFactory.getLogger(VolumeApiServiceImpl.class);
focal_class.type: Logger
focal_class.var_name: s_logger
focal_class.declarator: _dcDao = null
focal_class.modifier: @Inject
focal_class.original_string: @Inject
      DataCenterDao _dcDao = null;
focal_class.type: DataCenterDao
focal_class.var_name: _dcDao
focal_class.declarator: _volStateMachine
focal_class.modifier: private final
focal_class.original_string: private final StateMachine2<Volume.State, Volume.Event, Volume> _volStateMachine;
focal_class.type: StateMachine2<Volume.State, Volume.Event, Volume>
focal_class.var_name: _volStateMachine
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: _entityMgr
focal_class.modifier: @Inject
focal_class.original_string: @Inject
      EntityManager _entityMgr;
focal_class.type: EntityManager
focal_class.var_name: _entityMgr
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: _tmpltMgr
focal_class.modifier: @Inject
focal_class.original_string: @Inject
      TemplateManager _tmpltMgr;
focal_class.type: TemplateManager
focal_class.var_name: _tmpltMgr
focal_class.declarator: _snapshotMgr
focal_class.modifier: @Inject
focal_class.original_string: @Inject
      SnapshotManager _snapshotMgr;
focal_class.type: SnapshotManager
focal_class.var_name: _snapshotMgr
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: _configMgr
focal_class.modifier: @Inject
focal_class.original_string: @Inject
      ConfigurationManager _configMgr;
focal_class.type: ConfigurationManager
focal_class.var_name: _configMgr
focal_class.declarator: _volsDao
focal_class.modifier: @Inject
focal_class.original_string: @Inject
      VolumeDao _volsDao;
focal_class.type: VolumeDao
focal_class.var_name: _volsDao
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: _snapshotDao
focal_class.modifier: @Inject
focal_class.original_string: @Inject
      SnapshotDao _snapshotDao;
focal_class.type: SnapshotDao
focal_class.var_name: _snapshotDao
focal_class.declarator: _serviceOfferingDetailsDao
focal_class.modifier: @Inject
focal_class.original_string: @Inject
      ServiceOfferingDetailsDao _serviceOfferingDetailsDao;
focal_class.type: ServiceOfferingDetailsDao
focal_class.var_name: _serviceOfferingDetailsDao
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: storagePoolDetailsDao
focal_class.modifier: @Inject
focal_class.original_string: @Inject
      StoragePoolDetailsDao storagePoolDetailsDao;
focal_class.type: StoragePoolDetailsDao
focal_class.var_name: storagePoolDetailsDao
focal_class.declarator: _userVmDao
focal_class.modifier: @Inject
focal_class.original_string: @Inject
      UserVmDao _userVmDao;
focal_class.type: UserVmDao
focal_class.var_name: _userVmDao
focal_class.declarator: _volumeStoreDao
focal_class.modifier: @Inject
focal_class.original_string: @Inject
      VolumeDataStoreDao _volumeStoreDao;
focal_class.type: VolumeDataStoreDao
focal_class.var_name: _volumeStoreDao
focal_class.declarator: _vmInstanceDao
focal_class.modifier: @Inject
focal_class.original_string: @Inject
      VMInstanceDao _vmInstanceDao;
focal_class.type: VMInstanceDao
focal_class.var_name: _vmInstanceDao
focal_class.declarator: _storagePoolDao
focal_class.modifier: @Inject
focal_class.original_string: @Inject
      PrimaryDataStoreDao _storagePoolDao;
focal_class.type: PrimaryDataStoreDao
focal_class.var_name: _storagePoolDao
focal_class.declarator: _storagePoolJoinDao
focal_class.modifier: @Inject
focal_class.original_string: @Inject
      StoragePoolJoinDao _storagePoolJoinDao;
focal_class.type: StoragePoolJoinDao
focal_class.var_name: _storagePoolJoinDao
focal_class.declarator: _diskOfferingDao
focal_class.modifier: @Inject
focal_class.original_string: @Inject
      DiskOfferingDao _diskOfferingDao;
focal_class.type: DiskOfferingDao
focal_class.var_name: _diskOfferingDao
focal_class.declarator: _accountDao
focal_class.modifier: @Inject
focal_class.original_string: @Inject
      AccountDao _accountDao;
focal_class.type: AccountDao
focal_class.var_name: _accountDao
focal_class.declarator: _templateDao
focal_class.modifier: @Inject
focal_class.original_string: @Inject
      VMTemplateDao _templateDao;
focal_class.type: VMTemplateDao
focal_class.var_name: _templateDao
focal_class.declarator: _resourceLimitMgr
focal_class.modifier: @Inject
focal_class.original_string: @Inject
      ResourceLimitService _resourceLimitMgr;
focal_class.type: ResourceLimitService
focal_class.var_name: _resourceLimitMgr
focal_class.declarator: _vmDiskStatsDao
focal_class.modifier: @Inject
focal_class.original_string: @Inject
      VmDiskStatisticsDao _vmDiskStatsDao;
focal_class.type: VmDiskStatisticsDao
focal_class.var_name: _vmDiskStatsDao
focal_class.declarator: _vmSnapshotDao
focal_class.modifier: @Inject
focal_class.original_string: @Inject
      VMSnapshotDao _vmSnapshotDao;
focal_class.type: VMSnapshotDao
focal_class.var_name: _vmSnapshotDao
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: dataStoreMgr
focal_class.modifier: @Inject
focal_class.original_string: @Inject
      DataStoreManager dataStoreMgr;
focal_class.type: DataStoreManager
focal_class.var_name: dataStoreMgr
focal_class.declarator: volService
focal_class.modifier: @Inject
focal_class.original_string: @Inject
      VolumeService volService;
focal_class.type: VolumeService
focal_class.var_name: volService
focal_class.declarator: volFactory
focal_class.modifier: @Inject
focal_class.original_string: @Inject
      VolumeDataFactory volFactory;
focal_class.type: VolumeDataFactory
focal_class.var_name: volFactory
focal_class.declarator: snapshotMgr
focal_class.modifier: @Inject
focal_class.original_string: @Inject
      SnapshotApiService snapshotMgr;
focal_class.type: SnapshotApiService
focal_class.var_name: snapshotMgr
focal_class.declarator: _uuidMgr
focal_class.modifier: @Inject
focal_class.original_string: @Inject
      UUIDManager _uuidMgr;
focal_class.type: UUIDManager
focal_class.var_name: _uuidMgr
focal_class.declarator: _hypervisorCapabilitiesDao
focal_class.modifier: @Inject
focal_class.original_string: @Inject
      HypervisorCapabilitiesDao _hypervisorCapabilitiesDao;
focal_class.type: HypervisorCapabilitiesDao
focal_class.var_name: _hypervisorCapabilitiesDao
focal_class.declarator: _jobMgr
focal_class.modifier: @Inject
focal_class.original_string: @Inject
      AsyncJobManager _jobMgr;
focal_class.type: AsyncJobManager
focal_class.var_name: _jobMgr
focal_class.declarator: _workJobDao
focal_class.modifier: @Inject
focal_class.original_string: @Inject
      VmWorkJobDao _workJobDao;
focal_class.type: VmWorkJobDao
focal_class.var_name: _workJobDao
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: _volumeDao
focal_class.modifier: @Inject
focal_class.original_string: @Inject
      VolumeDao _volumeDao;
focal_class.type: VolumeDao
focal_class.var_name: _volumeDao
focal_class.declarator: _capacityMgr
focal_class.modifier: @Inject
focal_class.original_string: @Inject
      CapacityManager _capacityMgr;
focal_class.type: CapacityManager
focal_class.var_name: _capacityMgr
focal_class.declarator: _jobHandlerProxy = new VmWorkJobHandlerProxy(this)
focal_class.original_string: VmWorkJobHandlerProxy _jobHandlerProxy = new VmWorkJobHandlerProxy(this);
focal_class.type: VmWorkJobHandlerProxy
focal_class.var_name: _jobHandlerProxy
focal_class.declarator: _storagePoolAllocators
focal_class.modifier: private
focal_class.original_string: private List<StoragePoolAllocator> _storagePoolAllocators;
focal_class.type: List<StoragePoolAllocator>
focal_class.var_name: _storagePoolAllocators
focal_class.declarator: _maxVolumeSizeInGb
focal_class.modifier: private
focal_class.original_string: private long _maxVolumeSizeInGb;
focal_class.type: long
focal_class.var_name: _maxVolumeSizeInGb
focal_class.file: cosmic-core/server/src/main/java/com/cloud/storage/VolumeApiServiceImpl.java
focal_class.identifier: VolumeApiServiceImpl
focal_class.interfaces: implements VolumeApiService, VmWorkJobHandler
focal_class.class_method_signature: VolumeApiServiceImpl.VolumeApiServiceImpl()
focal_class.full_signature: protected  VolumeApiServiceImpl()
focal_class.identifier: VolumeApiServiceImpl
focal_class.modifiers: protected
focal_class.parameters: ()
focal_class.signature:  VolumeApiServiceImpl()
focal_class.class_method_signature: VolumeApiServiceImpl.allocVolume(final CreateVolumeCmd cmd)
focal_class.full_signature: @Override @DB @ActionEvent(eventType = EventTypes.EVENT_VOLUME_CREATE, eventDescription = "creating volume", create = true) public VolumeVO allocVolume(final CreateVolumeCmd cmd)
focal_class.identifier: allocVolume
focal_class.modifiers: @Override @DB @ActionEvent(eventType = EventTypes.EVENT_VOLUME_CREATE, eventDescription = "creating volume", create = true) public
focal_class.parameters: (final CreateVolumeCmd cmd)
focal_class.return: VolumeVO
focal_class.signature: VolumeVO allocVolume(final CreateVolumeCmd cmd)
focal_class.class_method_signature: VolumeApiServiceImpl.getDiskControllerType()
focal_class.full_signature: private DiskControllerType getDiskControllerType()
focal_class.identifier: getDiskControllerType
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: DiskControllerType
focal_class.signature: DiskControllerType getDiskControllerType()
focal_class.class_method_signature: VolumeApiServiceImpl.validateVolumeSizeRange(final long size)
focal_class.full_signature: public boolean validateVolumeSizeRange(final long size)
focal_class.identifier: validateVolumeSizeRange
focal_class.modifiers: public
focal_class.parameters: (final long size)
focal_class.return: boolean
focal_class.signature: boolean validateVolumeSizeRange(final long size)
focal_class.class_method_signature: VolumeApiServiceImpl.getVolumeNameFromCommand(final CreateVolumeCmd cmd)
focal_class.full_signature: public String getVolumeNameFromCommand(final CreateVolumeCmd cmd)
focal_class.identifier: getVolumeNameFromCommand
focal_class.modifiers: public
focal_class.parameters: (final CreateVolumeCmd cmd)
focal_class.return: String
focal_class.signature: String getVolumeNameFromCommand(final CreateVolumeCmd cmd)
focal_class.class_method_signature: VolumeApiServiceImpl.commitVolume(final CreateVolumeCmd cmd, final Account caller, final Account owner, final Boolean displayVolume, final Long zoneId, final Long diskOfferingId,
                                    final StorageProvisioningType provisioningType, final Long size, final Long minIops, final Long maxIops, final VolumeVO parentVolume,
                                    final String userSpecifiedName, final String uuid, final DiskControllerType diskController, final ImageFormat diskFormat)
focal_class.full_signature: private VolumeVO commitVolume(final CreateVolumeCmd cmd, final Account caller, final Account owner, final Boolean displayVolume, final Long zoneId, final Long diskOfferingId,
                                    final StorageProvisioningType provisioningType, final Long size, final Long minIops, final Long maxIops, final VolumeVO parentVolume,
                                    final String userSpecifiedName, final String uuid, final DiskControllerType diskController, final ImageFormat diskFormat)
focal_class.identifier: commitVolume
focal_class.modifiers: private
focal_class.parameters: (final CreateVolumeCmd cmd, final Account caller, final Account owner, final Boolean displayVolume, final Long zoneId, final Long diskOfferingId,
                                    final StorageProvisioningType provisioningType, final Long size, final Long minIops, final Long maxIops, final VolumeVO parentVolume,
                                    final String userSpecifiedName, final String uuid, final DiskControllerType diskController, final ImageFormat diskFormat)
focal_class.return: VolumeVO
focal_class.signature: VolumeVO commitVolume(final CreateVolumeCmd cmd, final Account caller, final Account owner, final Boolean displayVolume, final Long zoneId, final Long diskOfferingId,
                                    final StorageProvisioningType provisioningType, final Long size, final Long minIops, final Long maxIops, final VolumeVO parentVolume,
                                    final String userSpecifiedName, final String uuid, final DiskControllerType diskController, final ImageFormat diskFormat)
focal_class.class_method_signature: VolumeApiServiceImpl.getRandomVolumeName()
focal_class.full_signature: public String getRandomVolumeName()
focal_class.identifier: getRandomVolumeName
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String getRandomVolumeName()
focal_class.class_method_signature: VolumeApiServiceImpl.createVolume(final CreateVolumeCmd cmd)
focal_class.full_signature: @Override @DB @ActionEvent(eventType = EventTypes.EVENT_VOLUME_CREATE, eventDescription = "creating volume", async = true) public VolumeVO createVolume(final CreateVolumeCmd cmd)
focal_class.identifier: createVolume
focal_class.modifiers: @Override @DB @ActionEvent(eventType = EventTypes.EVENT_VOLUME_CREATE, eventDescription = "creating volume", async = true) public
focal_class.parameters: (final CreateVolumeCmd cmd)
focal_class.return: VolumeVO
focal_class.signature: VolumeVO createVolume(final CreateVolumeCmd cmd)
focal_class.class_method_signature: VolumeApiServiceImpl.createVolumeFromSnapshot(final VolumeVO volume, final long snapshotId, final Long vmId)
focal_class.full_signature: protected VolumeVO createVolumeFromSnapshot(final VolumeVO volume, final long snapshotId, final Long vmId)
focal_class.identifier: createVolumeFromSnapshot
focal_class.modifiers: protected
focal_class.parameters: (final VolumeVO volume, final long snapshotId, final Long vmId)
focal_class.return: VolumeVO
focal_class.signature: VolumeVO createVolumeFromSnapshot(final VolumeVO volume, final long snapshotId, final Long vmId)
focal_class.class_method_signature: VolumeApiServiceImpl.attachVolumeToVM(final Long vmId, final Long volumeId, final Long deviceId)
focal_class.full_signature: public Volume attachVolumeToVM(final Long vmId, final Long volumeId, final Long deviceId)
focal_class.identifier: attachVolumeToVM
focal_class.modifiers: public
focal_class.parameters: (final Long vmId, final Long volumeId, final Long deviceId)
focal_class.return: Volume
focal_class.signature: Volume attachVolumeToVM(final Long vmId, final Long volumeId, final Long deviceId)
focal_class.class_method_signature: VolumeApiServiceImpl.validateRootVolumeDetachAttach(final VolumeVO volume, final UserVmVO vm)
focal_class.full_signature: private void validateRootVolumeDetachAttach(final VolumeVO volume, final UserVmVO vm)
focal_class.identifier: validateRootVolumeDetachAttach
focal_class.modifiers: private
focal_class.parameters: (final VolumeVO volume, final UserVmVO vm)
focal_class.return: void
focal_class.signature: void validateRootVolumeDetachAttach(final VolumeVO volume, final UserVmVO vm)
focal_class.class_method_signature: VolumeApiServiceImpl.getMaxDataVolumesSupported(final UserVmVO vm)
focal_class.full_signature: private int getMaxDataVolumesSupported(final UserVmVO vm)
focal_class.identifier: getMaxDataVolumesSupported
focal_class.modifiers: private
focal_class.parameters: (final UserVmVO vm)
focal_class.return: int
focal_class.signature: int getMaxDataVolumesSupported(final UserVmVO vm)
focal_class.class_method_signature: VolumeApiServiceImpl.createPlaceHolderWork(final long instanceId)
focal_class.full_signature: private VmWorkJobVO createPlaceHolderWork(final long instanceId)
focal_class.identifier: createPlaceHolderWork
focal_class.modifiers: private
focal_class.parameters: (final long instanceId)
focal_class.return: VmWorkJobVO
focal_class.signature: VmWorkJobVO createPlaceHolderWork(final long instanceId)
focal_class.class_method_signature: VolumeApiServiceImpl.findStoragePoolToCreateVolumeOn(final VolumeInfo volumeInfo, final UserVmVO virtualMachine)
focal_class.full_signature: private StoragePool findStoragePoolToCreateVolumeOn(final VolumeInfo volumeInfo, final UserVmVO virtualMachine)
focal_class.identifier: findStoragePoolToCreateVolumeOn
focal_class.modifiers: private
focal_class.parameters: (final VolumeInfo volumeInfo, final UserVmVO virtualMachine)
focal_class.return: StoragePool
focal_class.signature: StoragePool findStoragePoolToCreateVolumeOn(final VolumeInfo volumeInfo, final UserVmVO virtualMachine)
focal_class.class_method_signature: VolumeApiServiceImpl.findAllStoragePoolsInScopeWithVirtualMachine(final UserVmVO virtualMachine)
focal_class.full_signature: private List<StoragePoolVO> findAllStoragePoolsInScopeWithVirtualMachine(final UserVmVO virtualMachine)
focal_class.identifier: findAllStoragePoolsInScopeWithVirtualMachine
focal_class.modifiers: private
focal_class.parameters: (final UserVmVO virtualMachine)
focal_class.return: List<StoragePoolVO>
focal_class.signature: List<StoragePoolVO> findAllStoragePoolsInScopeWithVirtualMachine(final UserVmVO virtualMachine)
focal_class.class_method_signature: VolumeApiServiceImpl.findMostSpecificStoragePoolForVirtualMachine(final UserVm userVm)
focal_class.full_signature: private StoragePoolVO findMostSpecificStoragePoolForVirtualMachine(final UserVm userVm)
focal_class.identifier: findMostSpecificStoragePoolForVirtualMachine
focal_class.modifiers: private
focal_class.parameters: (final UserVm userVm)
focal_class.return: StoragePoolVO
focal_class.signature: StoragePoolVO findMostSpecificStoragePoolForVirtualMachine(final UserVm userVm)
focal_class.class_method_signature: VolumeApiServiceImpl.listAllStoragePoolsReachableByHost(final Host host)
focal_class.full_signature: private List<StoragePoolVO> listAllStoragePoolsReachableByHost(final Host host)
focal_class.identifier: listAllStoragePoolsReachableByHost
focal_class.modifiers: private
focal_class.parameters: (final Host host)
focal_class.return: List<StoragePoolVO>
focal_class.signature: List<StoragePoolVO> listAllStoragePoolsReachableByHost(final Host host)
focal_class.class_method_signature: VolumeApiServiceImpl.listStoragePoolsInScopeWithStoragePool(final StoragePoolVO storagePoolVO)
focal_class.full_signature: private List<StoragePoolVO> listStoragePoolsInScopeWithStoragePool(final StoragePoolVO storagePoolVO)
focal_class.identifier: listStoragePoolsInScopeWithStoragePool
focal_class.modifiers: private
focal_class.parameters: (final StoragePoolVO storagePoolVO)
focal_class.return: List<StoragePoolVO>
focal_class.signature: List<StoragePoolVO> listStoragePoolsInScopeWithStoragePool(final StoragePoolVO storagePoolVO)
focal_class.class_method_signature: VolumeApiServiceImpl.getStoragePoolLeastResourcesUsed(final List<StoragePoolVO> storagePoolVOList)
focal_class.full_signature: private StoragePoolVO getStoragePoolLeastResourcesUsed(final List<StoragePoolVO> storagePoolVOList)
focal_class.identifier: getStoragePoolLeastResourcesUsed
focal_class.modifiers: private
focal_class.parameters: (final List<StoragePoolVO> storagePoolVOList)
focal_class.return: StoragePoolVO
focal_class.signature: StoragePoolVO getStoragePoolLeastResourcesUsed(final List<StoragePoolVO> storagePoolVOList)
focal_class.class_method_signature: VolumeApiServiceImpl.checkIfStoragePoolWithMatchingTags(final List<StoragePoolVO> storagePoolVOList, final List<String> tags)
focal_class.full_signature: private List<StoragePoolVO> checkIfStoragePoolWithMatchingTags(final List<StoragePoolVO> storagePoolVOList, final List<String> tags)
focal_class.identifier: checkIfStoragePoolWithMatchingTags
focal_class.modifiers: private
focal_class.parameters: (final List<StoragePoolVO> storagePoolVOList, final List<String> tags)
focal_class.return: List<StoragePoolVO>
focal_class.signature: List<StoragePoolVO> checkIfStoragePoolWithMatchingTags(final List<StoragePoolVO> storagePoolVOList, final List<String> tags)
focal_class.class_method_signature: VolumeApiServiceImpl.checkIfStoragePoolHasSufficientResources(final List<StoragePoolVO> storagePoolVOList, final VolumeInfo volumeInfo)
focal_class.full_signature: private List<StoragePoolVO> checkIfStoragePoolHasSufficientResources(final List<StoragePoolVO> storagePoolVOList, final VolumeInfo volumeInfo)
focal_class.identifier: checkIfStoragePoolHasSufficientResources
focal_class.modifiers: private
focal_class.parameters: (final List<StoragePoolVO> storagePoolVOList, final VolumeInfo volumeInfo)
focal_class.return: List<StoragePoolVO>
focal_class.signature: List<StoragePoolVO> checkIfStoragePoolHasSufficientResources(final List<StoragePoolVO> storagePoolVOList, final VolumeInfo volumeInfo)
focal_class.class_method_signature: VolumeApiServiceImpl.getTotalOverProvCapacity(final StoragePoolVO storagePoolVO)
focal_class.full_signature: private long getTotalOverProvCapacity(final StoragePoolVO storagePoolVO)
focal_class.identifier: getTotalOverProvCapacity
focal_class.modifiers: private
focal_class.parameters: (final StoragePoolVO storagePoolVO)
focal_class.return: long
focal_class.signature: long getTotalOverProvCapacity(final StoragePoolVO storagePoolVO)
focal_class.class_method_signature: VolumeApiServiceImpl.canVolumeBeAttachedToVirtualMachine(final VolumeInfo volumeInfo, final UserVmVO userVmVO)
focal_class.full_signature: private boolean canVolumeBeAttachedToVirtualMachine(final VolumeInfo volumeInfo, final UserVmVO userVmVO)
focal_class.identifier: canVolumeBeAttachedToVirtualMachine
focal_class.modifiers: private
focal_class.parameters: (final VolumeInfo volumeInfo, final UserVmVO userVmVO)
focal_class.return: boolean
focal_class.signature: boolean canVolumeBeAttachedToVirtualMachine(final VolumeInfo volumeInfo, final UserVmVO userVmVO)
focal_class.class_method_signature: VolumeApiServiceImpl.orchestrateAttachVolumeToVM(final Long vmId, final Long volumeId, final Long deviceId, final DiskControllerType diskController)
focal_class.full_signature: private Volume orchestrateAttachVolumeToVM(final Long vmId, final Long volumeId, final Long deviceId, final DiskControllerType diskController)
focal_class.identifier: orchestrateAttachVolumeToVM
focal_class.modifiers: private
focal_class.parameters: (final Long vmId, final Long volumeId, final Long deviceId, final DiskControllerType diskController)
focal_class.return: Volume
focal_class.signature: Volume orchestrateAttachVolumeToVM(final Long vmId, final Long volumeId, final Long deviceId, final DiskControllerType diskController)
focal_class.class_method_signature: VolumeApiServiceImpl.attachVolumeToVmThroughJobQueue(final Long vmId, final Long volumeId, final Long deviceId, final DiskControllerType diskController)
focal_class.full_signature: public Outcome<Volume> attachVolumeToVmThroughJobQueue(final Long vmId, final Long volumeId, final Long deviceId, final DiskControllerType diskController)
focal_class.identifier: attachVolumeToVmThroughJobQueue
focal_class.modifiers: public
focal_class.parameters: (final Long vmId, final Long volumeId, final Long deviceId, final DiskControllerType diskController)
focal_class.return: Outcome<Volume>
focal_class.signature: Outcome<Volume> attachVolumeToVmThroughJobQueue(final Long vmId, final Long volumeId, final Long deviceId, final DiskControllerType diskController)
focal_class.class_method_signature: VolumeApiServiceImpl.sendAttachVolumeCommand(final UserVmVO vm, VolumeVO volumeToAttach, Long deviceId, final DiskControllerType diskController)
focal_class.full_signature: private VolumeVO sendAttachVolumeCommand(final UserVmVO vm, VolumeVO volumeToAttach, Long deviceId, final DiskControllerType diskController)
focal_class.identifier: sendAttachVolumeCommand
focal_class.modifiers: private
focal_class.parameters: (final UserVmVO vm, VolumeVO volumeToAttach, Long deviceId, final DiskControllerType diskController)
focal_class.return: VolumeVO
focal_class.signature: VolumeVO sendAttachVolumeCommand(final UserVmVO vm, VolumeVO volumeToAttach, Long deviceId, final DiskControllerType diskController)
focal_class.class_method_signature: VolumeApiServiceImpl.getDeviceId(final UserVmVO vm, Long deviceId)
focal_class.full_signature: private Long getDeviceId(final UserVmVO vm, Long deviceId)
focal_class.identifier: getDeviceId
focal_class.modifiers: private
focal_class.parameters: (final UserVmVO vm, Long deviceId)
focal_class.return: Long
focal_class.signature: Long getDeviceId(final UserVmVO vm, Long deviceId)
focal_class.class_method_signature: VolumeApiServiceImpl.resizeVolume(final ResizeVolumeCmd cmd)
focal_class.full_signature: @Override @DB @ActionEvent(eventType = EventTypes.EVENT_VOLUME_RESIZE, eventDescription = "resizing volume", async = true) public VolumeVO resizeVolume(final ResizeVolumeCmd cmd)
focal_class.identifier: resizeVolume
focal_class.modifiers: @Override @DB @ActionEvent(eventType = EventTypes.EVENT_VOLUME_RESIZE, eventDescription = "resizing volume", async = true) public
focal_class.parameters: (final ResizeVolumeCmd cmd)
focal_class.return: VolumeVO
focal_class.signature: VolumeVO resizeVolume(final ResizeVolumeCmd cmd)
focal_class.class_method_signature: VolumeApiServiceImpl.validateIops(final Long minIops, final Long maxIops)
focal_class.full_signature: private void validateIops(final Long minIops, final Long maxIops)
focal_class.identifier: validateIops
focal_class.modifiers: private
focal_class.parameters: (final Long minIops, final Long maxIops)
focal_class.return: void
focal_class.signature: void validateIops(final Long minIops, final Long maxIops)
focal_class.class_method_signature: VolumeApiServiceImpl.areIntegersEqual(Integer i1, Integer i2)
focal_class.full_signature: private static boolean areIntegersEqual(Integer i1, Integer i2)
focal_class.identifier: areIntegersEqual
focal_class.modifiers: private static
focal_class.parameters: (Integer i1, Integer i2)
focal_class.return: boolean
focal_class.signature: boolean areIntegersEqual(Integer i1, Integer i2)
focal_class.class_method_signature: VolumeApiServiceImpl.orchestrateResizeVolume(final long volumeId, final long currentSize, final long newSize, final Long newMinIops, final Long newMaxIops, final Long
              newDiskOfferingId, final boolean shrinkOk)
focal_class.full_signature: private VolumeVO orchestrateResizeVolume(final long volumeId, final long currentSize, final long newSize, final Long newMinIops, final Long newMaxIops, final Long
              newDiskOfferingId, final boolean shrinkOk)
focal_class.identifier: orchestrateResizeVolume
focal_class.modifiers: private
focal_class.parameters: (final long volumeId, final long currentSize, final long newSize, final Long newMinIops, final Long newMaxIops, final Long
              newDiskOfferingId, final boolean shrinkOk)
focal_class.return: VolumeVO
focal_class.signature: VolumeVO orchestrateResizeVolume(final long volumeId, final long currentSize, final long newSize, final Long newMinIops, final Long newMaxIops, final Long
              newDiskOfferingId, final boolean shrinkOk)
focal_class.class_method_signature: VolumeApiServiceImpl.resizeVolumeThroughJobQueue(final Long vmId, final long volumeId,
                                                         final long currentSize, final long newSize, final Long newMinIops, final Long newMaxIops, final Long newServiceOfferingId,
                                                         final boolean shrinkOk)
focal_class.full_signature: public Outcome<Volume> resizeVolumeThroughJobQueue(final Long vmId, final long volumeId,
                                                         final long currentSize, final long newSize, final Long newMinIops, final Long newMaxIops, final Long newServiceOfferingId,
                                                         final boolean shrinkOk)
focal_class.identifier: resizeVolumeThroughJobQueue
focal_class.modifiers: public
focal_class.parameters: (final Long vmId, final long volumeId,
                                                         final long currentSize, final long newSize, final Long newMinIops, final Long newMaxIops, final Long newServiceOfferingId,
                                                         final boolean shrinkOk)
focal_class.return: Outcome<Volume>
focal_class.signature: Outcome<Volume> resizeVolumeThroughJobQueue(final Long vmId, final long volumeId,
                                                         final long currentSize, final long newSize, final Long newMinIops, final Long newMaxIops, final Long newServiceOfferingId,
                                                         final boolean shrinkOk)
focal_class.class_method_signature: VolumeApiServiceImpl.migrateVolume(final MigrateVolumeCmd cmd)
focal_class.full_signature: @DB @Override @ActionEvent(eventType = EventTypes.EVENT_VOLUME_MIGRATE, eventDescription = "migrating volume", async = true) public Volume migrateVolume(final MigrateVolumeCmd cmd)
focal_class.identifier: migrateVolume
focal_class.modifiers: @DB @Override @ActionEvent(eventType = EventTypes.EVENT_VOLUME_MIGRATE, eventDescription = "migrating volume", async = true) public
focal_class.parameters: (final MigrateVolumeCmd cmd)
focal_class.return: Volume
focal_class.signature: Volume migrateVolume(final MigrateVolumeCmd cmd)
focal_class.class_method_signature: VolumeApiServiceImpl.uploadVolume(final UploadVolumeCmd cmd)
focal_class.full_signature: @Override @DB @ActionEvent(eventType = EventTypes.EVENT_VOLUME_UPLOAD, eventDescription = "uploading volume", async = true) public VolumeVO uploadVolume(final UploadVolumeCmd cmd)
focal_class.identifier: uploadVolume
focal_class.modifiers: @Override @DB @ActionEvent(eventType = EventTypes.EVENT_VOLUME_UPLOAD, eventDescription = "uploading volume", async = true) public
focal_class.parameters: (final UploadVolumeCmd cmd)
focal_class.return: VolumeVO
focal_class.signature: VolumeVO uploadVolume(final UploadVolumeCmd cmd)
focal_class.class_method_signature: VolumeApiServiceImpl.uploadVolume(final GetUploadParamsForVolumeCmd cmd)
focal_class.full_signature: @Override @ActionEvent(eventType = EventTypes.EVENT_VOLUME_UPLOAD, eventDescription = "uploading volume for post upload", async = true) public GetUploadParamsResponse uploadVolume(final GetUploadParamsForVolumeCmd cmd)
focal_class.identifier: uploadVolume
focal_class.modifiers: @Override @ActionEvent(eventType = EventTypes.EVENT_VOLUME_UPLOAD, eventDescription = "uploading volume for post upload", async = true) public
focal_class.parameters: (final GetUploadParamsForVolumeCmd cmd)
focal_class.return: GetUploadParamsResponse
focal_class.signature: GetUploadParamsResponse uploadVolume(final GetUploadParamsForVolumeCmd cmd)
focal_class.class_method_signature: VolumeApiServiceImpl.deleteVolume(final long volumeId, final Account caller)
focal_class.full_signature: @Override @DB @ActionEvent(eventType = EventTypes.EVENT_VOLUME_DELETE, eventDescription = "deleting volume") public boolean deleteVolume(final long volumeId, final Account caller)
focal_class.identifier: deleteVolume
focal_class.modifiers: @Override @DB @ActionEvent(eventType = EventTypes.EVENT_VOLUME_DELETE, eventDescription = "deleting volume") public
focal_class.parameters: (final long volumeId, final Account caller)
focal_class.return: boolean
focal_class.signature: boolean deleteVolume(final long volumeId, final Account caller)
focal_class.class_method_signature: VolumeApiServiceImpl.stateTransitTo(final Volume vol, final Volume.Event event)
focal_class.full_signature: private boolean stateTransitTo(final Volume vol, final Volume.Event event)
focal_class.identifier: stateTransitTo
focal_class.modifiers: private
focal_class.parameters: (final Volume vol, final Volume.Event event)
focal_class.return: boolean
focal_class.signature: boolean stateTransitTo(final Volume vol, final Volume.Event event)
focal_class.class_method_signature: VolumeApiServiceImpl.attachVolumeToVM(final AttachVolumeCmd command)
focal_class.full_signature: @Override @ActionEvent(eventType = EventTypes.EVENT_VOLUME_ATTACH, eventDescription = "attaching volume", async = true) public Volume attachVolumeToVM(final AttachVolumeCmd command)
focal_class.identifier: attachVolumeToVM
focal_class.modifiers: @Override @ActionEvent(eventType = EventTypes.EVENT_VOLUME_ATTACH, eventDescription = "attaching volume", async = true) public
focal_class.parameters: (final AttachVolumeCmd command)
focal_class.return: Volume
focal_class.signature: Volume attachVolumeToVM(final AttachVolumeCmd command)
focal_class.class_method_signature: VolumeApiServiceImpl.detachVolumeFromVM(final DetachVolumeCmd cmmd)
focal_class.full_signature: @Override @ActionEvent(eventType = EventTypes.EVENT_VOLUME_DETACH, eventDescription = "detaching volume", async = true) public Volume detachVolumeFromVM(final DetachVolumeCmd cmmd)
focal_class.identifier: detachVolumeFromVM
focal_class.modifiers: @Override @ActionEvent(eventType = EventTypes.EVENT_VOLUME_DETACH, eventDescription = "detaching volume", async = true) public
focal_class.parameters: (final DetachVolumeCmd cmmd)
focal_class.return: Volume
focal_class.signature: Volume detachVolumeFromVM(final DetachVolumeCmd cmmd)
focal_class.class_method_signature: VolumeApiServiceImpl.orchestrateDetachVolumeFromVM(final long vmId, final long volumeId)
focal_class.full_signature: private Volume orchestrateDetachVolumeFromVM(final long vmId, final long volumeId)
focal_class.identifier: orchestrateDetachVolumeFromVM
focal_class.modifiers: private
focal_class.parameters: (final long vmId, final long volumeId)
focal_class.return: Volume
focal_class.signature: Volume orchestrateDetachVolumeFromVM(final long vmId, final long volumeId)
focal_class.class_method_signature: VolumeApiServiceImpl.detachVolumeFromVmThroughJobQueue(final Long vmId, final Long volumeId)
focal_class.full_signature: public Outcome<Volume> detachVolumeFromVmThroughJobQueue(final Long vmId, final Long volumeId)
focal_class.identifier: detachVolumeFromVmThroughJobQueue
focal_class.modifiers: public
focal_class.parameters: (final Long vmId, final Long volumeId)
focal_class.return: Outcome<Volume>
focal_class.signature: Outcome<Volume> detachVolumeFromVmThroughJobQueue(final Long vmId, final Long volumeId)
focal_class.class_method_signature: VolumeApiServiceImpl.takeSnapshot(final Long volumeId, final Long policyId, final Long snapshotId, final Account account, final boolean quiescevm)
focal_class.full_signature: @Override @ActionEvent(eventType = EventTypes.EVENT_SNAPSHOT_CREATE, eventDescription = "taking snapshot", async = true) public Snapshot takeSnapshot(final Long volumeId, final Long policyId, final Long snapshotId, final Account account, final boolean quiescevm)
focal_class.identifier: takeSnapshot
focal_class.modifiers: @Override @ActionEvent(eventType = EventTypes.EVENT_SNAPSHOT_CREATE, eventDescription = "taking snapshot", async = true) public
focal_class.parameters: (final Long volumeId, final Long policyId, final Long snapshotId, final Account account, final boolean quiescevm)
focal_class.return: Snapshot
focal_class.signature: Snapshot takeSnapshot(final Long volumeId, final Long policyId, final Long snapshotId, final Account account, final boolean quiescevm)
focal_class.class_method_signature: VolumeApiServiceImpl.orchestrateTakeVolumeSnapshot(final Long volumeId, final Long policyId, final Long snapshotId, final Account account, final boolean quiescevm)
focal_class.full_signature: private Snapshot orchestrateTakeVolumeSnapshot(final Long volumeId, final Long policyId, final Long snapshotId, final Account account, final boolean quiescevm)
focal_class.identifier: orchestrateTakeVolumeSnapshot
focal_class.modifiers: private
focal_class.parameters: (final Long volumeId, final Long policyId, final Long snapshotId, final Account account, final boolean quiescevm)
focal_class.return: Snapshot
focal_class.signature: Snapshot orchestrateTakeVolumeSnapshot(final Long volumeId, final Long policyId, final Long snapshotId, final Account account, final boolean quiescevm)
focal_class.class_method_signature: VolumeApiServiceImpl.takeVolumeSnapshotThroughJobQueue(final Long vmId, final Long volumeId,
                                                                 final Long policyId, final Long snapshotId, final Long accountId, final boolean quiesceVm)
focal_class.full_signature: public Outcome<Snapshot> takeVolumeSnapshotThroughJobQueue(final Long vmId, final Long volumeId,
                                                                 final Long policyId, final Long snapshotId, final Long accountId, final boolean quiesceVm)
focal_class.identifier: takeVolumeSnapshotThroughJobQueue
focal_class.modifiers: public
focal_class.parameters: (final Long vmId, final Long volumeId,
                                                                 final Long policyId, final Long snapshotId, final Long accountId, final boolean quiesceVm)
focal_class.return: Outcome<Snapshot>
focal_class.signature: Outcome<Snapshot> takeVolumeSnapshotThroughJobQueue(final Long vmId, final Long volumeId,
                                                                 final Long policyId, final Long snapshotId, final Long accountId, final boolean quiesceVm)
focal_class.class_method_signature: VolumeApiServiceImpl.allocSnapshot(final Long volumeId, final Long policyId, final String snapshotName)
focal_class.full_signature: @Override @ActionEvent(eventType = EventTypes.EVENT_SNAPSHOT_CREATE, eventDescription = "allocating snapshot", create = true) public Snapshot allocSnapshot(final Long volumeId, final Long policyId, final String snapshotName)
focal_class.identifier: allocSnapshot
focal_class.modifiers: @Override @ActionEvent(eventType = EventTypes.EVENT_SNAPSHOT_CREATE, eventDescription = "allocating snapshot", create = true) public
focal_class.parameters: (final Long volumeId, final Long policyId, final String snapshotName)
focal_class.return: Snapshot
focal_class.signature: Snapshot allocSnapshot(final Long volumeId, final Long policyId, final String snapshotName)
focal_class.class_method_signature: VolumeApiServiceImpl.allocSnapshotForVm(final Long vmId, final Long volumeId, final String snapshotName)
focal_class.full_signature: @Override public Snapshot allocSnapshotForVm(final Long vmId, final Long volumeId, final String snapshotName)
focal_class.identifier: allocSnapshotForVm
focal_class.modifiers: @Override public
focal_class.parameters: (final Long vmId, final Long volumeId, final String snapshotName)
focal_class.return: Snapshot
focal_class.signature: Snapshot allocSnapshotForVm(final Long vmId, final Long volumeId, final String snapshotName)
focal_class.class_method_signature: VolumeApiServiceImpl.updateVolume(final long volumeId, final String name, final String path, final String state, final Long storageId, final Boolean displayVolume, final String customId, final long
              entityOwnerId, final String chainInfo, final DiskControllerType diskControllerType)
focal_class.full_signature: @Override @ActionEvent(eventType = EventTypes.EVENT_VOLUME_UPDATE, eventDescription = "updating volume", async = true) public Volume updateVolume(final long volumeId, final String name, final String path, final String state, final Long storageId, final Boolean displayVolume, final String customId, final long
              entityOwnerId, final String chainInfo, final DiskControllerType diskControllerType)
focal_class.identifier: updateVolume
focal_class.modifiers: @Override @ActionEvent(eventType = EventTypes.EVENT_VOLUME_UPDATE, eventDescription = "updating volume", async = true) public
focal_class.parameters: (final long volumeId, final String name, final String path, final String state, final Long storageId, final Boolean displayVolume, final String customId, final long
              entityOwnerId, final String chainInfo, final DiskControllerType diskControllerType)
focal_class.return: Volume
focal_class.signature: Volume updateVolume(final long volumeId, final String name, final String path, final String state, final Long storageId, final Boolean displayVolume, final String customId, final long
              entityOwnerId, final String chainInfo, final DiskControllerType diskControllerType)
focal_class.class_method_signature: VolumeApiServiceImpl.updateResourceCount(final Volume volume, final Boolean displayVolume)
focal_class.full_signature: private void updateResourceCount(final Volume volume, final Boolean displayVolume)
focal_class.identifier: updateResourceCount
focal_class.modifiers: private
focal_class.parameters: (final Volume volume, final Boolean displayVolume)
focal_class.return: void
focal_class.signature: void updateResourceCount(final Volume volume, final Boolean displayVolume)
focal_class.class_method_signature: VolumeApiServiceImpl.isVolumeDestroyed(final Volume volume)
focal_class.full_signature: private boolean isVolumeDestroyed(final Volume volume)
focal_class.identifier: isVolumeDestroyed
focal_class.modifiers: private
focal_class.parameters: (final Volume volume)
focal_class.return: boolean
focal_class.signature: boolean isVolumeDestroyed(final Volume volume)
focal_class.class_method_signature: VolumeApiServiceImpl.extractVolume(final ExtractVolumeCmd cmd)
focal_class.full_signature: @Override @ActionEvent(eventType = EventTypes.EVENT_VOLUME_EXTRACT, eventDescription = "extracting volume", async = true) public String extractVolume(final ExtractVolumeCmd cmd)
focal_class.identifier: extractVolume
focal_class.modifiers: @Override @ActionEvent(eventType = EventTypes.EVENT_VOLUME_EXTRACT, eventDescription = "extracting volume", async = true) public
focal_class.parameters: (final ExtractVolumeCmd cmd)
focal_class.return: String
focal_class.signature: String extractVolume(final ExtractVolumeCmd cmd)
focal_class.class_method_signature: VolumeApiServiceImpl.orchestrateExtractVolume(final long volumeId, final long zoneId)
focal_class.full_signature: private String orchestrateExtractVolume(final long volumeId, final long zoneId)
focal_class.identifier: orchestrateExtractVolume
focal_class.modifiers: private
focal_class.parameters: (final long volumeId, final long zoneId)
focal_class.return: String
focal_class.signature: String orchestrateExtractVolume(final long volumeId, final long zoneId)
focal_class.class_method_signature: VolumeApiServiceImpl.extractVolumeThroughJobQueue(final Long vmId, final long volumeId,
                                                          final long zoneId)
focal_class.full_signature: public Outcome<String> extractVolumeThroughJobQueue(final Long vmId, final long volumeId,
                                                          final long zoneId)
focal_class.identifier: extractVolumeThroughJobQueue
focal_class.modifiers: public
focal_class.parameters: (final Long vmId, final long volumeId,
                                                          final long zoneId)
focal_class.return: Outcome<String>
focal_class.signature: Outcome<String> extractVolumeThroughJobQueue(final Long vmId, final long volumeId,
                                                          final long zoneId)
focal_class.class_method_signature: VolumeApiServiceImpl.isDisplayResourceEnabled(final Long id)
focal_class.full_signature: @Override public boolean isDisplayResourceEnabled(final Long id)
focal_class.identifier: isDisplayResourceEnabled
focal_class.modifiers: @Override public
focal_class.parameters: (final Long id)
focal_class.return: boolean
focal_class.signature: boolean isDisplayResourceEnabled(final Long id)
focal_class.class_method_signature: VolumeApiServiceImpl.updateDisplay(final Volume volume, final Boolean displayVolume)
focal_class.full_signature: @Override public void updateDisplay(final Volume volume, final Boolean displayVolume)
focal_class.identifier: updateDisplay
focal_class.modifiers: @Override public
focal_class.parameters: (final Volume volume, final Boolean displayVolume)
focal_class.return: void
focal_class.signature: void updateDisplay(final Volume volume, final Boolean displayVolume)
focal_class.class_method_signature: VolumeApiServiceImpl.validateVolume(final Account caller, final long ownerId, final Long zoneId, final String volumeName, final String url,
                                     final String format, final Long diskOfferingId)
focal_class.full_signature: private boolean validateVolume(final Account caller, final long ownerId, final Long zoneId, final String volumeName, final String url,
                                     final String format, final Long diskOfferingId)
focal_class.identifier: validateVolume
focal_class.modifiers: private
focal_class.parameters: (final Account caller, final long ownerId, final Long zoneId, final String volumeName, final String url,
                                     final String format, final Long diskOfferingId)
focal_class.return: boolean
focal_class.signature: boolean validateVolume(final Account caller, final long ownerId, final Long zoneId, final String volumeName, final String url,
                                     final String format, final Long diskOfferingId)
focal_class.class_method_signature: VolumeApiServiceImpl.persistVolume(final Account owner, final Long zoneId, final String volumeName, final String url,
                                       final String format, final Long diskOfferingId, final Volume.State state)
focal_class.full_signature: @DB protected VolumeVO persistVolume(final Account owner, final Long zoneId, final String volumeName, final String url,
                                       final String format, final Long diskOfferingId, final Volume.State state)
focal_class.identifier: persistVolume
focal_class.modifiers: @DB protected
focal_class.parameters: (final Account owner, final Long zoneId, final String volumeName, final String url,
                                       final String format, final Long diskOfferingId, final Volume.State state)
focal_class.return: VolumeVO
focal_class.signature: VolumeVO persistVolume(final Account owner, final Long zoneId, final String volumeName, final String url,
                                       final String format, final Long diskOfferingId, final Volume.State state)
focal_class.class_method_signature: VolumeApiServiceImpl.orchestrateMigrateVolume(final long volumeId, final long destPoolId, final boolean liveMigrateVolume)
focal_class.full_signature: private Volume orchestrateMigrateVolume(final long volumeId, final long destPoolId, final boolean liveMigrateVolume)
focal_class.identifier: orchestrateMigrateVolume
focal_class.modifiers: private
focal_class.parameters: (final long volumeId, final long destPoolId, final boolean liveMigrateVolume)
focal_class.return: Volume
focal_class.signature: Volume orchestrateMigrateVolume(final long volumeId, final long destPoolId, final boolean liveMigrateVolume)
focal_class.class_method_signature: VolumeApiServiceImpl.migrateVolumeThroughJobQueue(final Long vmId, final long volumeId,
                                                          final long destPoolId, final boolean liveMigrate)
focal_class.full_signature: public Outcome<Volume> migrateVolumeThroughJobQueue(final Long vmId, final long volumeId,
                                                          final long destPoolId, final boolean liveMigrate)
focal_class.identifier: migrateVolumeThroughJobQueue
focal_class.modifiers: public
focal_class.parameters: (final Long vmId, final long volumeId,
                                                          final long destPoolId, final boolean liveMigrate)
focal_class.return: Outcome<Volume>
focal_class.signature: Outcome<Volume> migrateVolumeThroughJobQueue(final Long vmId, final long volumeId,
                                                          final long destPoolId, final boolean liveMigrate)
focal_class.class_method_signature: VolumeApiServiceImpl.liveMigrateVolume(final Volume volume, final StoragePool destPool)
focal_class.full_signature: @DB protected Volume liveMigrateVolume(final Volume volume, final StoragePool destPool)
focal_class.identifier: liveMigrateVolume
focal_class.modifiers: @DB protected
focal_class.parameters: (final Volume volume, final StoragePool destPool)
focal_class.return: Volume
focal_class.signature: Volume liveMigrateVolume(final Volume volume, final StoragePool destPool)
focal_class.class_method_signature: VolumeApiServiceImpl.getFormatForPool(final StoragePool pool)
focal_class.full_signature: private String getFormatForPool(final StoragePool pool)
focal_class.identifier: getFormatForPool
focal_class.modifiers: private
focal_class.parameters: (final StoragePool pool)
focal_class.return: String
focal_class.signature: String getFormatForPool(final StoragePool pool)
focal_class.class_method_signature: VolumeApiServiceImpl.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: VolumeApiServiceImpl.getStoragePoolAllocators()
focal_class.full_signature: public List<StoragePoolAllocator> getStoragePoolAllocators()
focal_class.identifier: getStoragePoolAllocators
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: List<StoragePoolAllocator>
focal_class.signature: List<StoragePoolAllocator> getStoragePoolAllocators()
focal_class.class_method_signature: VolumeApiServiceImpl.setStoragePoolAllocators(final List<StoragePoolAllocator> storagePoolAllocators)
focal_class.full_signature: @Inject public void setStoragePoolAllocators(final List<StoragePoolAllocator> storagePoolAllocators)
focal_class.identifier: setStoragePoolAllocators
focal_class.modifiers: @Inject public
focal_class.parameters: (final List<StoragePoolAllocator> storagePoolAllocators)
focal_class.return: void
focal_class.signature: void setStoragePoolAllocators(final List<StoragePoolAllocator> storagePoolAllocators)
focal_class.class_method_signature: VolumeApiServiceImpl.orchestrateExtractVolume(final VmWorkExtractVolume work)
focal_class.full_signature: @ReflectionUse private Pair<JobInfo.Status, String> orchestrateExtractVolume(final VmWorkExtractVolume work)
focal_class.identifier: orchestrateExtractVolume
focal_class.modifiers: @ReflectionUse private
focal_class.parameters: (final VmWorkExtractVolume work)
focal_class.return: Pair<JobInfo.Status, String>
focal_class.signature: Pair<JobInfo.Status, String> orchestrateExtractVolume(final VmWorkExtractVolume work)
focal_class.class_method_signature: VolumeApiServiceImpl.orchestrateAttachVolumeToVM(final VmWorkAttachVolume work)
focal_class.full_signature: @ReflectionUse private Pair<JobInfo.Status, String> orchestrateAttachVolumeToVM(final VmWorkAttachVolume work)
focal_class.identifier: orchestrateAttachVolumeToVM
focal_class.modifiers: @ReflectionUse private
focal_class.parameters: (final VmWorkAttachVolume work)
focal_class.return: Pair<JobInfo.Status, String>
focal_class.signature: Pair<JobInfo.Status, String> orchestrateAttachVolumeToVM(final VmWorkAttachVolume work)
focal_class.class_method_signature: VolumeApiServiceImpl.orchestrateDetachVolumeFromVM(final VmWorkDetachVolume work)
focal_class.full_signature: @ReflectionUse private Pair<JobInfo.Status, String> orchestrateDetachVolumeFromVM(final VmWorkDetachVolume work)
focal_class.identifier: orchestrateDetachVolumeFromVM
focal_class.modifiers: @ReflectionUse private
focal_class.parameters: (final VmWorkDetachVolume work)
focal_class.return: Pair<JobInfo.Status, String>
focal_class.signature: Pair<JobInfo.Status, String> orchestrateDetachVolumeFromVM(final VmWorkDetachVolume work)
focal_class.class_method_signature: VolumeApiServiceImpl.orchestrateResizeVolume(final VmWorkResizeVolume work)
focal_class.full_signature: @ReflectionUse private Pair<JobInfo.Status, String> orchestrateResizeVolume(final VmWorkResizeVolume work)
focal_class.identifier: orchestrateResizeVolume
focal_class.modifiers: @ReflectionUse private
focal_class.parameters: (final VmWorkResizeVolume work)
focal_class.return: Pair<JobInfo.Status, String>
focal_class.signature: Pair<JobInfo.Status, String> orchestrateResizeVolume(final VmWorkResizeVolume work)
focal_class.class_method_signature: VolumeApiServiceImpl.orchestrateMigrateVolume(final VmWorkMigrateVolume work)
focal_class.full_signature: @ReflectionUse private Pair<JobInfo.Status, String> orchestrateMigrateVolume(final VmWorkMigrateVolume work)
focal_class.identifier: orchestrateMigrateVolume
focal_class.modifiers: @ReflectionUse private
focal_class.parameters: (final VmWorkMigrateVolume work)
focal_class.return: Pair<JobInfo.Status, String>
focal_class.signature: Pair<JobInfo.Status, String> orchestrateMigrateVolume(final VmWorkMigrateVolume work)
focal_class.class_method_signature: VolumeApiServiceImpl.orchestrateTakeVolumeSnapshot(final VmWorkTakeVolumeSnapshot work)
focal_class.full_signature: @ReflectionUse private Pair<JobInfo.Status, String> orchestrateTakeVolumeSnapshot(final VmWorkTakeVolumeSnapshot work)
focal_class.identifier: orchestrateTakeVolumeSnapshot
focal_class.modifiers: @ReflectionUse private
focal_class.parameters: (final VmWorkTakeVolumeSnapshot work)
focal_class.return: Pair<JobInfo.Status, String>
focal_class.signature: Pair<JobInfo.Status, String> orchestrateTakeVolumeSnapshot(final VmWorkTakeVolumeSnapshot work)
focal_class.class_method_signature: VolumeApiServiceImpl.handleVmWorkJob(final VmWork work)
focal_class.full_signature: @Override public Pair<JobInfo.Status, String> handleVmWorkJob(final VmWork work)
focal_class.identifier: handleVmWorkJob
focal_class.modifiers: @Override public
focal_class.parameters: (final VmWork work)
focal_class.return: Pair<JobInfo.Status, String>
focal_class.signature: Pair<JobInfo.Status, String> handleVmWorkJob(final VmWork work)
focal_class.superclass: extends ManagerBase
focal_method.body: public Volume attachVolumeToVM(final Long vmId, final Long volumeId, final Long deviceId) {
          final Account caller = CallContext.current().getCallingAccount();
  
          // Check that the volume ID is valid
          final VolumeInfo volumeToAttach = this.volFactory.getVolume(volumeId);
          // Check that the volume is a data volume
          if (volumeToAttach == null || !(volumeToAttach.getVolumeType() == VolumeType.DATADISK || volumeToAttach.getVolumeType() == VolumeType.ROOT)) {
              throw new InvalidParameterValueException("Please specify a volume with the valid type: " + VolumeType.ROOT.toString() + " or " + VolumeType.DATADISK.toString());
          }
  
          // Check that the volume is not currently attached to any VM
          if (volumeToAttach.getInstanceId() != null) {
              throw new InvalidParameterValueException("Please specify a volume that is not attached to any VM.");
          }
  
          // Check that the volume is not destroyed
          if (volumeToAttach.getState() == Volume.State.Destroy) {
              throw new InvalidParameterValueException("Please specify a volume that is not destroyed.");
          }
  
          // Check that the virtual machine ID is valid and it's a user vm
          final UserVmVO vm = this._userVmDao.findById(vmId);
          if (vm == null || vm.getType() != VirtualMachineType.User) {
              throw new InvalidParameterValueException("Please specify a valid User VM.");
          }
  
          // Check that the VM is in the correct state
          if (vm.getState() != State.Running && vm.getState() != State.Stopped) {
              throw new InvalidParameterValueException("Please specify a VM that is either running or stopped.");
          }
  
          // Check that the VM and the volume are in the same zone
          if (vm.getDataCenterId() != volumeToAttach.getDataCenterId()) {
              throw new InvalidParameterValueException("Please specify a VM that is in the same zone as the volume.");
          }
  
          // Check that the device ID is valid
          if (deviceId != null) {
              // validate ROOT volume type
              if (deviceId.longValue() == 0) {
                  validateRootVolumeDetachAttach(this._volsDao.findById(volumeToAttach.getId()), vm);
                  // vm shouldn't have any volume with deviceId 0
                  if (!this._volsDao.findByInstanceAndDeviceId(vm.getId(), 0).isEmpty()) {
                      throw new InvalidParameterValueException("Vm already has root volume attached to it");
                  }
                  // volume can't be in Uploaded state
                  if (volumeToAttach.getState() == Volume.State.Uploaded) {
                      throw new InvalidParameterValueException("No support for Root volume attach in state " + Volume.State.Uploaded);
                  }
              }
          }
  
          // Check that the number of data volumes attached to VM is less than
          // that supported by hypervisor
          if (deviceId == null || deviceId.longValue() != 0) {
              final List<VolumeVO> existingDataVolumes = this._volsDao.findByInstanceAndType(vmId, VolumeType.DATADISK);
              final int maxDataVolumesSupported = getMaxDataVolumesSupported(vm);
              if (existingDataVolumes.size() >= maxDataVolumesSupported) {
                  throw new InvalidParameterValueException("The specified VM already has the maximum number of data disks (" + maxDataVolumesSupported + "). Please specify another" +
                          " VM.");
              }
          }
  
          // if target VM has associated VM snapshots
          final List<VMSnapshotVO> vmSnapshots = this._vmSnapshotDao.findByVm(vmId);
          if (vmSnapshots.size() > 0) {
              throw new InvalidParameterValueException("Unable to attach volume, please specify a VM that does not have VM snapshots");
          }
  
          // permission check
          this._accountMgr.checkAccess(caller, null, true, volumeToAttach, vm);
  
          if (!(Volume.State.Allocated.equals(volumeToAttach.getState()) || Volume.State.Ready.equals(volumeToAttach.getState()) || Volume.State.Uploaded.equals(volumeToAttach
                  .getState()))) {
              throw new InvalidParameterValueException("Volume state must be in Allocated, Ready or in Uploaded state");
          }
  
          final Account owner = this._accountDao.findById(volumeToAttach.getAccountId());
  
          if (!(volumeToAttach.getState() == Volume.State.Allocated || volumeToAttach.getState() == Volume.State.Ready)) {
              try {
                  this._resourceLimitMgr.checkResourceLimit(owner, ResourceType.primary_storage, volumeToAttach.getSize());
              } catch (final ResourceAllocationException e) {
                  s_logger.error("primary storage resource limit check failed", e);
                  throw new InvalidParameterValueException(e.getMessage());
              }
          }
  
          final HypervisorType rootDiskHyperType = vm.getHypervisorType();
          final HypervisorType volumeToAttachHyperType = this._volsDao.getHypervisorType(volumeToAttach.getId());
  
          final StoragePoolVO volumeToAttachStoragePool = this._storagePoolDao.findById(volumeToAttach.getPoolId());
  
          // managed storage can be used for different types of hypervisors
          // only perform this check if the volume's storage pool is not null and not managed
          if (volumeToAttachStoragePool != null && !volumeToAttachStoragePool.isManaged()) {
              if (volumeToAttachHyperType != HypervisorType.None && rootDiskHyperType != volumeToAttachHyperType) {
                  throw new InvalidParameterValueException("Can't attach a volume created by: " + volumeToAttachHyperType + " to a " + rootDiskHyperType + " vm");
              }
          }
  
          final AsyncJobExecutionContext asyncExecutionContext = AsyncJobExecutionContext.getCurrentExecutionContext();
  
          if (asyncExecutionContext != null) {
              final AsyncJob job = asyncExecutionContext.getJob();
  
              if (s_logger.isInfoEnabled()) {
                  s_logger.info("Trying to attaching volume " + volumeId + " to vm instance:" + vm.getId() + ", update async job-" + job.getId() + " progress status");
              }
  
              this._jobMgr.updateAsyncJobAttachment(job.getId(), "Volume", volumeId);
          }
  
          final AsyncJobExecutionContext jobContext = AsyncJobExecutionContext.getCurrentExecutionContext();
          if (jobContext.isJobDispatchedBy(VmWorkConstants.VM_WORK_JOB_DISPATCHER)) {
              // avoid re-entrance
  
              final VmWorkJobVO placeHolder;
              placeHolder = createPlaceHolderWork(vmId);
              try {
                  return orchestrateAttachVolumeToVM(vmId, volumeId, deviceId, volumeToAttach.getDiskController());
              } finally {
                  this._workJobDao.expunge(placeHolder.getId());
              }
          } else {
              final Outcome<Volume> outcome = attachVolumeToVmThroughJobQueue(vmId, volumeId, deviceId, volumeToAttach.getDiskController());
  
              Volume vol = null;
              try {
                  outcome.get();
              } catch (final InterruptedException e) {
                  throw new RuntimeException("Operation is interrupted", e);
              } catch (final java.util.concurrent.ExecutionException e) {
                  throw new RuntimeException("Execution excetion", e);
              }
  
              final Object jobResult = this._jobMgr.unmarshallResultObject(outcome.getJob());
              if (jobResult != null) {
                  if (jobResult instanceof ConcurrentOperationException) {
                      throw (ConcurrentOperationException) jobResult;
                  } else if (jobResult instanceof InvalidParameterValueException) {
                      throw (InvalidParameterValueException) jobResult;
                  } else if (jobResult instanceof RuntimeException) {
                      throw (RuntimeException) jobResult;
                  } else if (jobResult instanceof Throwable) {
                      throw new RuntimeException("Unexpected exception", (Throwable) jobResult);
                  } else if (jobResult instanceof Long) {
                      vol = this._volsDao.findById((Long) jobResult);
                  }
              }
              return vol;
          }
      }
focal_method.class_method_signature: VolumeApiServiceImpl.attachVolumeToVM(final Long vmId, final Long volumeId, final Long deviceId)
focal_method.full_signature: public Volume attachVolumeToVM(final Long vmId, final Long volumeId, final Long deviceId)
focal_method.identifier: attachVolumeToVM
focal_method.invocations: getCallingAccount current getVolume getVolumeType getVolumeType toString toString getInstanceId getState findById getType getState getState getDataCenterId getDataCenterId longValue validateRootVolumeDetachAttach findById getId isEmpty findByInstanceAndDeviceId getId getState longValue findByInstanceAndType getMaxDataVolumesSupported size findByVm size checkAccess equals getState equals getState equals getState findById getAccountId getState getState checkResourceLimit getSize error getMessage getHypervisorType getHypervisorType getId findById getPoolId isManaged getCurrentExecutionContext getJob isInfoEnabled info getId getId updateAsyncJobAttachment getId getCurrentExecutionContext isJobDispatchedBy createPlaceHolderWork orchestrateAttachVolumeToVM getDiskController expunge getId attachVolumeToVmThroughJobQueue getDiskController get unmarshallResultObject getJob findById
focal_method.modifiers: public
focal_method.parameters: (final Long vmId, final Long volumeId, final Long deviceId)
focal_method.return: Volume
focal_method.signature: Volume attachVolumeToVM(final Long vmId, final Long volumeId, final Long deviceId)