Search in sources :

Example 1 with FileSystemSnapCreateParam

use of com.emc.storageos.vnxe.models.FileSystemSnapCreateParam in project coprhd-controller by CoprHD.

the class FileSystemSnapRequestsTest method createFileSystemSnap.

// @Test
public void createFileSystemSnap() {
    FileSystemSnapCreateParam parm = new FileSystemSnapCreateParam();
    VNXeBase resource = new VNXeBase();
    resource.setId("res_12");
    parm.setStorageResource(resource);
    parm.setName("test-snap");
    parm.setIsReadOnly(false);
    FileSystemSnapRequests req = new FileSystemSnapRequests(_client);
    VNXeCommandJob response = null;
    try {
        response = req.createFileSystemSnap(parm);
    } catch (VNXeException e) {
        // TODO Auto-generated catch block
        logger.error("VNXeException occured", e);
    }
    System.out.println(response.getId() + "state: " + response.getState());
}
Also used : VNXeCommandJob(com.emc.storageos.vnxe.models.VNXeCommandJob) VNXeBase(com.emc.storageos.vnxe.models.VNXeBase) VNXeException(com.emc.storageos.vnxe.VNXeException) FileSystemSnapCreateParam(com.emc.storageos.vnxe.models.FileSystemSnapCreateParam)

Example 2 with FileSystemSnapCreateParam

use of com.emc.storageos.vnxe.models.FileSystemSnapCreateParam in project coprhd-controller by CoprHD.

the class VNXeApiClient method createFileSystemSnap.

/**
 * Create file system snapshot
 *
 * @param fsId
 *            file system id
 * @param name
 *            snapshot name
 * @return VNXeCommandJob
 */
public VNXeCommandJob createFileSystemSnap(String fsId, String name) {
    _logger.info("creating file system snap:" + fsId);
    String resourceId = getStorageResourceId(fsId);
    FileSystemSnapCreateParam parm = new FileSystemSnapCreateParam();
    VNXeBase resource = new VNXeBase();
    resource.setId(resourceId);
    parm.setStorageResource(resource);
    parm.setName(name);
    parm.setIsReadOnly(false);
    parm.setIsAutoDelete(false);
    FileSystemSnapRequests req = new FileSystemSnapRequests(_khClient, getBasicSystemInfo().getSoftwareVersion());
    return req.createFileSystemSnap(parm);
}
Also used : VNXeBase(com.emc.storageos.vnxe.models.VNXeBase) FileSystemSnapRequests(com.emc.storageos.vnxe.requests.FileSystemSnapRequests) FileSystemSnapCreateParam(com.emc.storageos.vnxe.models.FileSystemSnapCreateParam)

Aggregations

FileSystemSnapCreateParam (com.emc.storageos.vnxe.models.FileSystemSnapCreateParam)2 VNXeBase (com.emc.storageos.vnxe.models.VNXeBase)2 VNXeException (com.emc.storageos.vnxe.VNXeException)1 VNXeCommandJob (com.emc.storageos.vnxe.models.VNXeCommandJob)1 FileSystemSnapRequests (com.emc.storageos.vnxe.requests.FileSystemSnapRequests)1