Examples of stateTransit()


Examples of org.apache.cloudstack.engine.subsystem.api.storage.VolumeInfo.stateTransit()

        ;
        volume.setPoolId(store.getId());

        volume = volumeDao.persist(volume);
        VolumeInfo volumeInfo = volumeDataFactory.getVolume(volume.getId(), store);
        volumeInfo.stateTransit(Volume.Event.CreateRequested);
        volumeInfo.stateTransit(Volume.Event.OperationSucceeded);
        return volumeInfo;
    }
    private DataStore createDataStore() throws URISyntaxException {
        StoragePoolVO pool = new StoragePoolVO();
View Full Code Here

Examples of org.apache.cloudstack.engine.subsystem.api.storage.VolumeInfo.stateTransit()

        volume.setPoolId(store.getId());

        volume = volumeDao.persist(volume);
        VolumeInfo volumeInfo = volumeDataFactory.getVolume(volume.getId(), store);
        volumeInfo.stateTransit(Volume.Event.CreateRequested);
        volumeInfo.stateTransit(Volume.Event.OperationSucceeded);
        return volumeInfo;
    }
    private DataStore createDataStore() throws URISyntaxException {
        StoragePoolVO pool = new StoragePoolVO();
        pool.setClusterId(clusterId);
View Full Code Here

Examples of org.apache.cloudstack.engine.subsystem.api.storage.VolumeInfo.stateTransit()

    @Override
    @DB
    public boolean destroyVolume(long volumeId) throws ConcurrentOperationException {
        // mark volume entry in volumes table as destroy state
        VolumeInfo vol = volFactory.getVolume(volumeId);
        vol.stateTransit(Volume.Event.DestroyRequested);
        snapshotMgr.deletePoliciesForVolume(volumeId);

        vol.stateTransit(Volume.Event.OperationSucceeded);

        return true;
View Full Code Here

Examples of org.apache.cloudstack.engine.subsystem.api.storage.VolumeInfo.stateTransit()

        // mark volume entry in volumes table as destroy state
        VolumeInfo vol = volFactory.getVolume(volumeId);
        vol.stateTransit(Volume.Event.DestroyRequested);
        snapshotMgr.deletePoliciesForVolume(volumeId);

        vol.stateTransit(Volume.Event.OperationSucceeded);

        return true;
    }

    @Override
View Full Code Here

Examples of org.apache.cloudstack.engine.subsystem.api.storage.VolumeInfo.stateTransit()

    @Override
    @DB
    public boolean destroyVolume(long volumeId) throws ConcurrentOperationException {
        // mark volume entry in volumes table as destroy state
        VolumeInfo vol = volFactory.getVolume(volumeId);
        vol.stateTransit(Volume.Event.DestroyRequested);
        snapshotMgr.deletePoliciesForVolume(volumeId);

        vol.stateTransit(Volume.Event.OperationSucceeded);

        return true;
View Full Code Here

Examples of org.apache.cloudstack.engine.subsystem.api.storage.VolumeInfo.stateTransit()

        // mark volume entry in volumes table as destroy state
        VolumeInfo vol = volFactory.getVolume(volumeId);
        vol.stateTransit(Volume.Event.DestroyRequested);
        snapshotMgr.deletePoliciesForVolume(volumeId);

        vol.stateTransit(Volume.Event.OperationSucceeded);

        return true;
    }

    @Override
View Full Code Here

Examples of org.apache.cloudstack.engine.subsystem.api.storage.VolumeInfo.stateTransit()

            throw new CloudRuntimeException("Failed to get lock on snapshot:" + snapshot.getId());
        }

        try {
            VolumeInfo volumeInfo = snapshot.getBaseVolume();
            volumeInfo.stateTransit(Volume.Event.SnapshotRequested);
            SnapshotResult result = null;
            try {
                result = snapshotSvr.takeSnapshot(snapshot);
                if (result.isFailed()) {
                    s_logger.debug("Failed to take snapshot: " + result.getResult());
View Full Code Here

Examples of org.apache.cloudstack.engine.subsystem.api.storage.VolumeInfo.stateTransit()

                    s_logger.debug("Failed to take snapshot: " + result.getResult());
                    throw new CloudRuntimeException(result.getResult());
                }
            } finally {
                if (result != null && result.isSuccess()) {
                    volumeInfo.stateTransit(Volume.Event.OperationSucceeded);
                } else {
                    volumeInfo.stateTransit(Volume.Event.OperationFailed);
                }
            }
View Full Code Here

Examples of org.apache.cloudstack.engine.subsystem.api.storage.VolumeInfo.stateTransit()

                }
            } finally {
                if (result != null && result.isSuccess()) {
                    volumeInfo.stateTransit(Volume.Event.OperationSucceeded);
                } else {
                    volumeInfo.stateTransit(Volume.Event.OperationFailed);
                }
            }

            snapshot = result.getSnashot();
            DataStore primaryStore = snapshot.getDataStore();
View Full Code Here

Examples of org.apache.cloudstack.engine.subsystem.api.storage.VolumeInfo.stateTransit()

        ;
        volume.setPoolId(store.getId());

        volume = volumeDao.persist(volume);
        VolumeInfo volumeInfo = volumeDataFactory.getVolume(volume.getId(), store);
        volumeInfo.stateTransit(Volume.Event.CreateRequested);
        volumeInfo.stateTransit(Volume.Event.OperationSucceeded);
        return volumeInfo;
    }

    private DataStore createDataStore() throws URISyntaxException {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.