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: 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.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.file: server/src/test/java/com/cloud/storage/VolumeApiServiceImplTest.java
test_class.identifier: VolumeApiServiceImplTest
test_case.body: @Test(expected = InvalidParameterValueException.class)
      public void testDetachVolumeOfManagedDataStore() throws NoSuchFieldException, IllegalAccessException {
          Field dedicateIdField = _detachCmdClass.getDeclaredField("id");
          dedicateIdField.setAccessible(true);
          dedicateIdField.set(detachCmd, 4L);
          _svc.detachVolumeFromVM(detachCmd);
      }
test_case.class_method_signature: VolumeApiServiceImplTest.testDetachVolumeOfManagedDataStore()
test_case.full_signature: @Test(expected = InvalidParameterValueException.class) public void testDetachVolumeOfManagedDataStore()
test_case.identifier: testDetachVolumeOfManagedDataStore
test_case.invocations: getDeclaredField setAccessible set detachVolumeFromVM
test_case.modifiers: @Test(expected = InvalidParameterValueException.class) public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testDetachVolumeOfManagedDataStore()
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: 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: _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: 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: _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: _dcDao = null
focal_class.modifier: @Inject
    final
focal_class.original_string: @Inject
    final DataCenterDao _dcDao = null;
focal_class.type: DataCenterDao
focal_class.var_name: _dcDao
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: _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: _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: VmJobCheckInterval = new ConfigKey<Long>("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<Long>("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: _maxVolumeSizeInGb
focal_class.modifier: private
focal_class.original_string: private long _maxVolumeSizeInGb;
focal_class.type: long
focal_class.var_name: _maxVolumeSizeInGb
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.file: 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.uploadVolume(UploadVolumeCmd cmd)
focal_class.full_signature: @Override @DB @ActionEvent(eventType = EventTypes.EVENT_VOLUME_UPLOAD, eventDescription = "uploading volume", async = true) public VolumeVO uploadVolume(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: (UploadVolumeCmd cmd)
focal_class.return: VolumeVO
focal_class.signature: VolumeVO uploadVolume(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.validateVolume(Account caller, long ownerId, Long zoneId, String volumeName, String url,
        String format, Long diskOfferingId)
focal_class.full_signature: private boolean validateVolume(Account caller, long ownerId, Long zoneId, String volumeName, String url,
        String format, Long diskOfferingId)
focal_class.identifier: validateVolume
focal_class.modifiers: private
focal_class.parameters: (Account caller, long ownerId, Long zoneId, String volumeName, String url,
        String format, Long diskOfferingId)
focal_class.return: boolean
focal_class.signature: boolean validateVolume(Account caller, long ownerId, Long zoneId, String volumeName, String url,
        String format, Long diskOfferingId)
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.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.getVolumeNameFromCommand(CreateVolumeCmd cmd)
focal_class.full_signature: public String getVolumeNameFromCommand(CreateVolumeCmd cmd)
focal_class.identifier: getVolumeNameFromCommand
focal_class.modifiers: public
focal_class.parameters: (CreateVolumeCmd cmd)
focal_class.return: String
focal_class.signature: String getVolumeNameFromCommand(CreateVolumeCmd cmd)
focal_class.class_method_signature: VolumeApiServiceImpl.allocVolume(CreateVolumeCmd cmd)
focal_class.full_signature: @Override @DB @ActionEvent(eventType = EventTypes.EVENT_VOLUME_CREATE, eventDescription = "creating volume", create = true) public VolumeVO allocVolume(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: (CreateVolumeCmd cmd)
focal_class.return: VolumeVO
focal_class.signature: VolumeVO allocVolume(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 Storage.ProvisioningType provisioningType, final Long size, final Long minIops, final Long maxIops, final VolumeVO parentVolume,
        final String userSpecifiedName, final String uuid)
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 Storage.ProvisioningType provisioningType, final Long size, final Long minIops, final Long maxIops, final VolumeVO parentVolume,
        final String userSpecifiedName, final String uuid)
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 Storage.ProvisioningType provisioningType, final Long size, final Long minIops, final Long maxIops, final VolumeVO parentVolume,
        final String userSpecifiedName, final String uuid)
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 Storage.ProvisioningType provisioningType, final Long size, final Long minIops, final Long maxIops, final VolumeVO parentVolume,
        final String userSpecifiedName, final String uuid)
focal_class.class_method_signature: VolumeApiServiceImpl.validateVolumeSizeRange(long size)
focal_class.full_signature: public boolean validateVolumeSizeRange(long size)
focal_class.identifier: validateVolumeSizeRange
focal_class.modifiers: public
focal_class.parameters: (long size)
focal_class.return: boolean
focal_class.signature: boolean validateVolumeSizeRange(long size)
focal_class.class_method_signature: VolumeApiServiceImpl.createVolume(CreateVolumeCmd cmd)
focal_class.full_signature: @Override @DB @ActionEvent(eventType = EventTypes.EVENT_VOLUME_CREATE, eventDescription = "creating volume", async = true) public VolumeVO createVolume(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: (CreateVolumeCmd cmd)
focal_class.return: VolumeVO
focal_class.signature: VolumeVO createVolume(CreateVolumeCmd cmd)
focal_class.class_method_signature: VolumeApiServiceImpl.createVolumeFromSnapshot(VolumeVO volume, long snapshotId, Long vmId)
focal_class.full_signature: protected VolumeVO createVolumeFromSnapshot(VolumeVO volume, long snapshotId, Long vmId)
focal_class.identifier: createVolumeFromSnapshot
focal_class.modifiers: protected
focal_class.parameters: (VolumeVO volume, long snapshotId, Long vmId)
focal_class.return: VolumeVO
focal_class.signature: VolumeVO createVolumeFromSnapshot(VolumeVO volume, long snapshotId, Long vmId)
focal_class.class_method_signature: VolumeApiServiceImpl.resizeVolume(ResizeVolumeCmd cmd)
focal_class.full_signature: @Override @DB @ActionEvent(eventType = EventTypes.EVENT_VOLUME_RESIZE, eventDescription = "resizing volume", async = true) public VolumeVO resizeVolume(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: (ResizeVolumeCmd cmd)
focal_class.return: VolumeVO
focal_class.signature: VolumeVO resizeVolume(ResizeVolumeCmd cmd)
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.validateIops(Long minIops, Long maxIops)
focal_class.full_signature: private void validateIops(Long minIops, Long maxIops)
focal_class.identifier: validateIops
focal_class.modifiers: private
focal_class.parameters: (Long minIops, Long maxIops)
focal_class.return: void
focal_class.signature: void validateIops(Long minIops, Long maxIops)
focal_class.class_method_signature: VolumeApiServiceImpl.orchestrateResizeVolume(long volumeId, long currentSize, long newSize, Long newMinIops, Long newMaxIops, Long newDiskOfferingId, boolean shrinkOk)
focal_class.full_signature: private VolumeVO orchestrateResizeVolume(long volumeId, long currentSize, long newSize, Long newMinIops, Long newMaxIops, Long newDiskOfferingId, boolean shrinkOk)
focal_class.identifier: orchestrateResizeVolume
focal_class.modifiers: private
focal_class.parameters: (long volumeId, long currentSize, long newSize, Long newMinIops, Long newMaxIops, Long newDiskOfferingId, boolean shrinkOk)
focal_class.return: VolumeVO
focal_class.signature: VolumeVO orchestrateResizeVolume(long volumeId, long currentSize, long newSize, Long newMinIops, Long newMaxIops, Long newDiskOfferingId, boolean shrinkOk)
focal_class.class_method_signature: VolumeApiServiceImpl.deleteVolume(long volumeId, Account caller)
focal_class.full_signature: @Override @DB @ActionEvent(eventType = EventTypes.EVENT_VOLUME_DELETE, eventDescription = "deleting volume") public boolean deleteVolume(long volumeId, Account caller)
focal_class.identifier: deleteVolume
focal_class.modifiers: @Override @DB @ActionEvent(eventType = EventTypes.EVENT_VOLUME_DELETE, eventDescription = "deleting volume") public
focal_class.parameters: (long volumeId, Account caller)
focal_class.return: boolean
focal_class.signature: boolean deleteVolume(long volumeId, Account caller)
focal_class.class_method_signature: VolumeApiServiceImpl.stateTransitTo(Volume vol, Volume.Event event)
focal_class.full_signature: private boolean stateTransitTo(Volume vol, Volume.Event event)
focal_class.identifier: stateTransitTo
focal_class.modifiers: private
focal_class.parameters: (Volume vol, Volume.Event event)
focal_class.return: boolean
focal_class.signature: boolean stateTransitTo(Volume vol, Volume.Event event)
focal_class.class_method_signature: VolumeApiServiceImpl.attachVolumeToVM(AttachVolumeCmd command)
focal_class.full_signature: @Override @ActionEvent(eventType = EventTypes.EVENT_VOLUME_ATTACH, eventDescription = "attaching volume", async = true) public Volume attachVolumeToVM(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: (AttachVolumeCmd command)
focal_class.return: Volume
focal_class.signature: Volume attachVolumeToVM(AttachVolumeCmd command)
focal_class.class_method_signature: VolumeApiServiceImpl.orchestrateAttachVolumeToVM(Long vmId, Long volumeId, Long deviceId)
focal_class.full_signature: private Volume orchestrateAttachVolumeToVM(Long vmId, Long volumeId, Long deviceId)
focal_class.identifier: orchestrateAttachVolumeToVM
focal_class.modifiers: private
focal_class.parameters: (Long vmId, Long volumeId, Long deviceId)
focal_class.return: Volume
focal_class.signature: Volume orchestrateAttachVolumeToVM(Long vmId, Long volumeId, Long deviceId)
focal_class.class_method_signature: VolumeApiServiceImpl.attachVolumeToVM(Long vmId, Long volumeId, Long deviceId)
focal_class.full_signature: public Volume attachVolumeToVM(Long vmId, Long volumeId, Long deviceId)
focal_class.identifier: attachVolumeToVM
focal_class.modifiers: public
focal_class.parameters: (Long vmId, Long volumeId, Long deviceId)
focal_class.return: Volume
focal_class.signature: Volume attachVolumeToVM(Long vmId, Long volumeId, Long deviceId)
focal_class.class_method_signature: VolumeApiServiceImpl.updateVolume(long volumeId, String path, String state, Long storageId, Boolean displayVolume, String customId, long entityOwnerId, String chainInfo)
focal_class.full_signature: @Override @ActionEvent(eventType = EventTypes.EVENT_VOLUME_UPDATE, eventDescription = "updating volume", async = true) public Volume updateVolume(long volumeId, String path, String state, Long storageId, Boolean displayVolume, String customId, long entityOwnerId, String chainInfo)
focal_class.identifier: updateVolume
focal_class.modifiers: @Override @ActionEvent(eventType = EventTypes.EVENT_VOLUME_UPDATE, eventDescription = "updating volume", async = true) public
focal_class.parameters: (long volumeId, String path, String state, Long storageId, Boolean displayVolume, String customId, long entityOwnerId, String chainInfo)
focal_class.return: Volume
focal_class.signature: Volume updateVolume(long volumeId, String path, String state, Long storageId, Boolean displayVolume, String customId, long entityOwnerId, String chainInfo)
focal_class.class_method_signature: VolumeApiServiceImpl.updateDisplay(Volume volume, Boolean displayVolume)
focal_class.full_signature: @Override public void updateDisplay(Volume volume, Boolean displayVolume)
focal_class.identifier: updateDisplay
focal_class.modifiers: @Override public
focal_class.parameters: (Volume volume, Boolean displayVolume)
focal_class.return: void
focal_class.signature: void updateDisplay(Volume volume, Boolean displayVolume)
focal_class.class_method_signature: VolumeApiServiceImpl.updateResourceCount(Volume volume, Boolean displayVolume)
focal_class.full_signature: private void updateResourceCount(Volume volume, Boolean displayVolume)
focal_class.identifier: updateResourceCount
focal_class.modifiers: private
focal_class.parameters: (Volume volume, Boolean displayVolume)
focal_class.return: void
focal_class.signature: void updateResourceCount(Volume volume, Boolean displayVolume)
focal_class.class_method_signature: VolumeApiServiceImpl.saveUsageEvent(Volume volume, Boolean displayVolume)
focal_class.full_signature: private void saveUsageEvent(Volume volume, Boolean displayVolume)
focal_class.identifier: saveUsageEvent
focal_class.modifiers: private
focal_class.parameters: (Volume volume, Boolean displayVolume)
focal_class.return: void
focal_class.signature: void saveUsageEvent(Volume volume, Boolean displayVolume)
focal_class.class_method_signature: VolumeApiServiceImpl.isVolumeDestroyed(Volume volume)
focal_class.full_signature: private boolean isVolumeDestroyed(Volume volume)
focal_class.identifier: isVolumeDestroyed
focal_class.modifiers: private
focal_class.parameters: (Volume volume)
focal_class.return: boolean
focal_class.signature: boolean isVolumeDestroyed(Volume volume)
focal_class.class_method_signature: VolumeApiServiceImpl.detachVolumeFromVM(DetachVolumeCmd cmmd)
focal_class.full_signature: @Override @ActionEvent(eventType = EventTypes.EVENT_VOLUME_DETACH, eventDescription = "detaching volume", async = true) public Volume detachVolumeFromVM(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: (DetachVolumeCmd cmmd)
focal_class.return: Volume
focal_class.signature: Volume detachVolumeFromVM(DetachVolumeCmd cmmd)
focal_class.class_method_signature: VolumeApiServiceImpl.validateRootVolumeDetachAttach(VolumeVO volume, UserVmVO vm)
focal_class.full_signature: private void validateRootVolumeDetachAttach(VolumeVO volume, UserVmVO vm)
focal_class.identifier: validateRootVolumeDetachAttach
focal_class.modifiers: private
focal_class.parameters: (VolumeVO volume, UserVmVO vm)
focal_class.return: void
focal_class.signature: void validateRootVolumeDetachAttach(VolumeVO volume, UserVmVO vm)
focal_class.class_method_signature: VolumeApiServiceImpl.orchestrateDetachVolumeFromVM(long vmId, long volumeId)
focal_class.full_signature: private Volume orchestrateDetachVolumeFromVM(long vmId, long volumeId)
focal_class.identifier: orchestrateDetachVolumeFromVM
focal_class.modifiers: private
focal_class.parameters: (long vmId, long volumeId)
focal_class.return: Volume
focal_class.signature: Volume orchestrateDetachVolumeFromVM(long vmId, long volumeId)
focal_class.class_method_signature: VolumeApiServiceImpl.migrateVolume(MigrateVolumeCmd cmd)
focal_class.full_signature: @DB @Override @ActionEvent(eventType = EventTypes.EVENT_VOLUME_MIGRATE, eventDescription = "migrating volume", async = true) public Volume migrateVolume(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: (MigrateVolumeCmd cmd)
focal_class.return: Volume
focal_class.signature: Volume migrateVolume(MigrateVolumeCmd cmd)
focal_class.class_method_signature: VolumeApiServiceImpl.orchestrateMigrateVolume(long volumeId, long destPoolId, boolean liveMigrateVolume)
focal_class.full_signature: private Volume orchestrateMigrateVolume(long volumeId, long destPoolId, boolean liveMigrateVolume)
focal_class.identifier: orchestrateMigrateVolume
focal_class.modifiers: private
focal_class.parameters: (long volumeId, long destPoolId, boolean liveMigrateVolume)
focal_class.return: Volume
focal_class.signature: Volume orchestrateMigrateVolume(long volumeId, long destPoolId, boolean liveMigrateVolume)
focal_class.class_method_signature: VolumeApiServiceImpl.liveMigrateVolume(Volume volume, StoragePool destPool)
focal_class.full_signature: @DB protected Volume liveMigrateVolume(Volume volume, StoragePool destPool)
focal_class.identifier: liveMigrateVolume
focal_class.modifiers: @DB protected
focal_class.parameters: (Volume volume, StoragePool destPool)
focal_class.return: Volume
focal_class.signature: Volume liveMigrateVolume(Volume volume, StoragePool destPool)
focal_class.class_method_signature: VolumeApiServiceImpl.takeSnapshot(Long volumeId, Long policyId, Long snapshotId, Account account, boolean quiescevm)
focal_class.full_signature: @Override @ActionEvent(eventType = EventTypes.EVENT_SNAPSHOT_CREATE, eventDescription = "taking snapshot", async = true) public Snapshot takeSnapshot(Long volumeId, Long policyId, Long snapshotId, Account account, 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: (Long volumeId, Long policyId, Long snapshotId, Account account, boolean quiescevm)
focal_class.return: Snapshot
focal_class.signature: Snapshot takeSnapshot(Long volumeId, Long policyId, Long snapshotId, Account account, boolean quiescevm)
focal_class.class_method_signature: VolumeApiServiceImpl.orchestrateTakeVolumeSnapshot(Long volumeId, Long policyId, Long snapshotId, Account account, boolean quiescevm)
focal_class.full_signature: private Snapshot orchestrateTakeVolumeSnapshot(Long volumeId, Long policyId, Long snapshotId, Account account, boolean quiescevm)
focal_class.identifier: orchestrateTakeVolumeSnapshot
focal_class.modifiers: private
focal_class.parameters: (Long volumeId, Long policyId, Long snapshotId, Account account, boolean quiescevm)
focal_class.return: Snapshot
focal_class.signature: Snapshot orchestrateTakeVolumeSnapshot(Long volumeId, Long policyId, Long snapshotId, Account account, boolean quiescevm)
focal_class.class_method_signature: VolumeApiServiceImpl.allocSnapshot(Long volumeId, Long policyId, String snapshotName)
focal_class.full_signature: @Override @ActionEvent(eventType = EventTypes.EVENT_SNAPSHOT_CREATE, eventDescription = "allocating snapshot", create = true) public Snapshot allocSnapshot(Long volumeId, Long policyId, 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: (Long volumeId, Long policyId, String snapshotName)
focal_class.return: Snapshot
focal_class.signature: Snapshot allocSnapshot(Long volumeId, Long policyId, String snapshotName)
focal_class.class_method_signature: VolumeApiServiceImpl.extractVolume(ExtractVolumeCmd cmd)
focal_class.full_signature: @Override @ActionEvent(eventType = EventTypes.EVENT_VOLUME_EXTRACT, eventDescription = "extracting volume", async = true) public String extractVolume(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: (ExtractVolumeCmd cmd)
focal_class.return: String
focal_class.signature: String extractVolume(ExtractVolumeCmd cmd)
focal_class.class_method_signature: VolumeApiServiceImpl.orchestrateExtractVolume(long volumeId, long zoneId)
focal_class.full_signature: private String orchestrateExtractVolume(long volumeId, long zoneId)
focal_class.identifier: orchestrateExtractVolume
focal_class.modifiers: private
focal_class.parameters: (long volumeId, long zoneId)
focal_class.return: String
focal_class.signature: String orchestrateExtractVolume(long volumeId, long zoneId)
focal_class.class_method_signature: VolumeApiServiceImpl.isDisplayResourceEnabled(Long id)
focal_class.full_signature: @Override public boolean isDisplayResourceEnabled(Long id)
focal_class.identifier: isDisplayResourceEnabled
focal_class.modifiers: @Override public
focal_class.parameters: (Long id)
focal_class.return: boolean
focal_class.signature: boolean isDisplayResourceEnabled(Long id)
focal_class.class_method_signature: VolumeApiServiceImpl.getFormatForPool(StoragePool pool)
focal_class.full_signature: private String getFormatForPool(StoragePool pool)
focal_class.identifier: getFormatForPool
focal_class.modifiers: private
focal_class.parameters: (StoragePool pool)
focal_class.return: String
focal_class.signature: String getFormatForPool(StoragePool pool)
focal_class.class_method_signature: VolumeApiServiceImpl.needMoveVolume(VolumeVO existingVolume, VolumeInfo newVolume)
focal_class.full_signature: private boolean needMoveVolume(VolumeVO existingVolume, VolumeInfo newVolume)
focal_class.identifier: needMoveVolume
focal_class.modifiers: private
focal_class.parameters: (VolumeVO existingVolume, VolumeInfo newVolume)
focal_class.return: boolean
focal_class.signature: boolean needMoveVolume(VolumeVO existingVolume, VolumeInfo newVolume)
focal_class.class_method_signature: VolumeApiServiceImpl.sendAttachVolumeCommand(UserVmVO vm, VolumeVO volumeToAttach, Long deviceId)
focal_class.full_signature: private VolumeVO sendAttachVolumeCommand(UserVmVO vm, VolumeVO volumeToAttach, Long deviceId)
focal_class.identifier: sendAttachVolumeCommand
focal_class.modifiers: private
focal_class.parameters: (UserVmVO vm, VolumeVO volumeToAttach, Long deviceId)
focal_class.return: VolumeVO
focal_class.signature: VolumeVO sendAttachVolumeCommand(UserVmVO vm, VolumeVO volumeToAttach, Long deviceId)
focal_class.class_method_signature: VolumeApiServiceImpl.getMaxDataVolumesSupported(UserVmVO vm)
focal_class.full_signature: private int getMaxDataVolumesSupported(UserVmVO vm)
focal_class.identifier: getMaxDataVolumesSupported
focal_class.modifiers: private
focal_class.parameters: (UserVmVO vm)
focal_class.return: int
focal_class.signature: int getMaxDataVolumesSupported(UserVmVO vm)
focal_class.class_method_signature: VolumeApiServiceImpl.getDeviceId(long vmId, Long deviceId)
focal_class.full_signature: private Long getDeviceId(long vmId, Long deviceId)
focal_class.identifier: getDeviceId
focal_class.modifiers: private
focal_class.parameters: (long vmId, Long deviceId)
focal_class.return: Long
focal_class.signature: Long getDeviceId(long vmId, Long deviceId)
focal_class.class_method_signature: VolumeApiServiceImpl.configure(String name, Map<String, Object> params)
focal_class.full_signature: @Override public boolean configure(String name, Map<String, Object> params)
focal_class.identifier: configure
focal_class.modifiers: @Override public
focal_class.parameters: (String name, Map<String, Object> params)
focal_class.return: boolean
focal_class.signature: boolean configure(String name, 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(List<StoragePoolAllocator> storagePoolAllocators)
focal_class.full_signature: @Inject public void setStoragePoolAllocators(List<StoragePoolAllocator> storagePoolAllocators)
focal_class.identifier: setStoragePoolAllocators
focal_class.modifiers: @Inject public
focal_class.parameters: (List<StoragePoolAllocator> storagePoolAllocators)
focal_class.return: void
focal_class.signature: void setStoragePoolAllocators(List<StoragePoolAllocator> storagePoolAllocators)
focal_class.class_method_signature: VolumeApiServiceImpl.attachVolumeToVmThroughJobQueue(final Long vmId, final Long volumeId, final Long deviceId)
focal_class.full_signature: public Outcome<Volume> attachVolumeToVmThroughJobQueue(final Long vmId, final Long volumeId, final Long deviceId)
focal_class.identifier: attachVolumeToVmThroughJobQueue
focal_class.modifiers: public
focal_class.parameters: (final Long vmId, final Long volumeId, final Long deviceId)
focal_class.return: Outcome<Volume>
focal_class.signature: Outcome<Volume> attachVolumeToVmThroughJobQueue(final Long vmId, final Long volumeId, final Long deviceId)
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.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.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.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.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.orchestrateExtractVolume(VmWorkExtractVolume work)
focal_class.full_signature: @ReflectionUse private Pair<JobInfo.Status, String> orchestrateExtractVolume(VmWorkExtractVolume work)
focal_class.identifier: orchestrateExtractVolume
focal_class.modifiers: @ReflectionUse private
focal_class.parameters: (VmWorkExtractVolume work)
focal_class.return: Pair<JobInfo.Status, String>
focal_class.signature: Pair<JobInfo.Status, String> orchestrateExtractVolume(VmWorkExtractVolume work)
focal_class.class_method_signature: VolumeApiServiceImpl.orchestrateAttachVolumeToVM(VmWorkAttachVolume work)
focal_class.full_signature: @ReflectionUse private Pair<JobInfo.Status, String> orchestrateAttachVolumeToVM(VmWorkAttachVolume work)
focal_class.identifier: orchestrateAttachVolumeToVM
focal_class.modifiers: @ReflectionUse private
focal_class.parameters: (VmWorkAttachVolume work)
focal_class.return: Pair<JobInfo.Status, String>
focal_class.signature: Pair<JobInfo.Status, String> orchestrateAttachVolumeToVM(VmWorkAttachVolume work)
focal_class.class_method_signature: VolumeApiServiceImpl.orchestrateDetachVolumeFromVM(VmWorkDetachVolume work)
focal_class.full_signature: @ReflectionUse private Pair<JobInfo.Status, String> orchestrateDetachVolumeFromVM(VmWorkDetachVolume work)
focal_class.identifier: orchestrateDetachVolumeFromVM
focal_class.modifiers: @ReflectionUse private
focal_class.parameters: (VmWorkDetachVolume work)
focal_class.return: Pair<JobInfo.Status, String>
focal_class.signature: Pair<JobInfo.Status, String> orchestrateDetachVolumeFromVM(VmWorkDetachVolume work)
focal_class.class_method_signature: VolumeApiServiceImpl.orchestrateResizeVolume(VmWorkResizeVolume work)
focal_class.full_signature: @ReflectionUse private Pair<JobInfo.Status, String> orchestrateResizeVolume(VmWorkResizeVolume work)
focal_class.identifier: orchestrateResizeVolume
focal_class.modifiers: @ReflectionUse private
focal_class.parameters: (VmWorkResizeVolume work)
focal_class.return: Pair<JobInfo.Status, String>
focal_class.signature: Pair<JobInfo.Status, String> orchestrateResizeVolume(VmWorkResizeVolume work)
focal_class.class_method_signature: VolumeApiServiceImpl.orchestrateMigrateVolume(VmWorkMigrateVolume work)
focal_class.full_signature: @ReflectionUse private Pair<JobInfo.Status, String> orchestrateMigrateVolume(VmWorkMigrateVolume work)
focal_class.identifier: orchestrateMigrateVolume
focal_class.modifiers: @ReflectionUse private
focal_class.parameters: (VmWorkMigrateVolume work)
focal_class.return: Pair<JobInfo.Status, String>
focal_class.signature: Pair<JobInfo.Status, String> orchestrateMigrateVolume(VmWorkMigrateVolume work)
focal_class.class_method_signature: VolumeApiServiceImpl.orchestrateTakeVolumeSnapshot(VmWorkTakeVolumeSnapshot work)
focal_class.full_signature: @ReflectionUse private Pair<JobInfo.Status, String> orchestrateTakeVolumeSnapshot(VmWorkTakeVolumeSnapshot work)
focal_class.identifier: orchestrateTakeVolumeSnapshot
focal_class.modifiers: @ReflectionUse private
focal_class.parameters: (VmWorkTakeVolumeSnapshot work)
focal_class.return: Pair<JobInfo.Status, String>
focal_class.signature: Pair<JobInfo.Status, String> orchestrateTakeVolumeSnapshot(VmWorkTakeVolumeSnapshot work)
focal_class.class_method_signature: VolumeApiServiceImpl.handleVmWorkJob(VmWork work)
focal_class.full_signature: @Override public Pair<JobInfo.Status, String> handleVmWorkJob(VmWork work)
focal_class.identifier: handleVmWorkJob
focal_class.modifiers: @Override public
focal_class.parameters: (VmWork work)
focal_class.return: Pair<JobInfo.Status, String>
focal_class.signature: Pair<JobInfo.Status, String> handleVmWorkJob(VmWork work)
focal_class.class_method_signature: VolumeApiServiceImpl.createPlaceHolderWork(long instanceId)
focal_class.full_signature: private VmWorkJobVO createPlaceHolderWork(long instanceId)
focal_class.identifier: createPlaceHolderWork
focal_class.modifiers: private
focal_class.parameters: (long instanceId)
focal_class.return: VmWorkJobVO
focal_class.signature: VmWorkJobVO createPlaceHolderWork(long instanceId)
focal_class.superclass: extends ManagerBase
focal_method.body: @Override
    @ActionEvent(eventType = EventTypes.EVENT_VOLUME_DETACH, eventDescription = "detaching volume", async = true)
    public Volume detachVolumeFromVM(DetachVolumeCmd cmmd) {
      final Account caller = CallContext.current().getCallingAccount();
      if (cmmd.getId() == null && cmmd.getDeviceId() == null && cmmd.getVirtualMachineId() == null
          || cmmd.getId() != null && (cmmd.getDeviceId() != null || cmmd.getVirtualMachineId() != null)
          || cmmd.getId() == null && (cmmd.getDeviceId() == null || cmmd.getVirtualMachineId() == null)) {
        throw new InvalidParameterValueException("Please provide either a volume id, or a tuple(device id, instance id)");
      }
  
      final Long volumeId = cmmd.getId();
      VolumeVO volume = null;
  
      if (volumeId != null) {
        volume = _volsDao.findById(volumeId);
      } else {
        volume = _volsDao.findByInstanceAndDeviceId(cmmd.getVirtualMachineId(), cmmd.getDeviceId()).get(0);
      }
  
      // Check that the volume ID is valid
      if (volume == null) {
        throw new InvalidParameterValueException("Unable to find volume with ID: " + volumeId);
      }
  
      Long vmId = null;
  
      if (cmmd.getVirtualMachineId() == null) {
        vmId = volume.getInstanceId();
      } else {
        vmId = cmmd.getVirtualMachineId();
      }
  
      // Permissions check
      _accountMgr.checkAccess(caller, null, true, volume);
  
      // Check that the volume is currently attached to a VM
      if (vmId == null) {
        throw new InvalidParameterValueException("The specified volume is not attached to a VM.");
      }
  
      // Check that the VM is in the correct state
      final UserVmVO vm = _userVmDao.findById(vmId);
      if (vm.getState() != State.Running && vm.getState() != State.Stopped && vm.getState() != State.Destroyed) {
        throw new InvalidParameterValueException("Please specify a VM that is either running or stopped.");
      }
  
      // Check that the volume is a data/root volume
      if (!(volume.getVolumeType() == Volume.Type.ROOT || volume.getVolumeType() == Volume.Type.DATADISK)) {
        throw new InvalidParameterValueException("Please specify volume of type " + Volume.Type.DATADISK.toString() + " or " + Volume.Type.ROOT.toString());
      }
  
      // Root volume detach is allowed for following hypervisors: Xen/KVM/VmWare
      if (volume.getVolumeType() == Volume.Type.ROOT) {
        validateRootVolumeDetachAttach(volume, vm);
      }
  
      // Don't allow detach if target VM has associated VM snapshots
      final List<VMSnapshotVO> vmSnapshots = _vmSnapshotDao.findByVm(vmId);
      if (vmSnapshots.size() > 0) {
        throw new InvalidParameterValueException("Unable to detach volume, please specify a VM that does not have VM snapshots");
      }
  
      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");
        }
  
        _jobMgr.updateAsyncJobAttachment(job.getId(), "Volume", volumeId);
      }
  
      final AsyncJobExecutionContext jobContext = AsyncJobExecutionContext.getCurrentExecutionContext();
      if (jobContext.isJobDispatchedBy(VmWorkConstants.VM_WORK_JOB_DISPATCHER)) {
        // avoid re-entrance
        VmWorkJobVO placeHolder = null;
        placeHolder = createPlaceHolderWork(vmId);
        try {
          return orchestrateDetachVolumeFromVM(vmId, volumeId);
        } finally {
          _workJobDao.expunge(placeHolder.getId());
        }
      } else {
        final Outcome<Volume> outcome = detachVolumeFromVmThroughJobQueue(vmId, volumeId);
  
        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 = _jobMgr.unmarshallResultObject(outcome.getJob());
        if (jobResult != null) {
          if (jobResult instanceof ConcurrentOperationException) {
            throw (ConcurrentOperationException)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 = _volsDao.findById((Long) jobResult);
          }
        }
        return vol;
      }
    }
focal_method.class_method_signature: VolumeApiServiceImpl.detachVolumeFromVM(DetachVolumeCmd cmmd)
focal_method.full_signature: @Override @ActionEvent(eventType = EventTypes.EVENT_VOLUME_DETACH, eventDescription = "detaching volume", async = true) public Volume detachVolumeFromVM(DetachVolumeCmd cmmd)
focal_method.identifier: detachVolumeFromVM
focal_method.invocations: getCallingAccount current getId getDeviceId getVirtualMachineId getId getDeviceId getVirtualMachineId getId getDeviceId getVirtualMachineId getId findById get findByInstanceAndDeviceId getVirtualMachineId getDeviceId getVirtualMachineId getInstanceId getVirtualMachineId checkAccess findById getState getState getState getVolumeType getVolumeType toString toString getVolumeType validateRootVolumeDetachAttach findByVm size getCurrentExecutionContext getJob isInfoEnabled info getId getId updateAsyncJobAttachment getId getCurrentExecutionContext isJobDispatchedBy createPlaceHolderWork orchestrateDetachVolumeFromVM expunge getId detachVolumeFromVmThroughJobQueue get unmarshallResultObject getJob findById
focal_method.modifiers: @Override @ActionEvent(eventType = EventTypes.EVENT_VOLUME_DETACH, eventDescription = "detaching volume", async = true) public
focal_method.parameters: (DetachVolumeCmd cmmd)
focal_method.return: Volume
focal_method.signature: Volume detachVolumeFromVM(DetachVolumeCmd cmmd)