Search in sources :

Example 71 with VNXeCommandJob

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

the class FileSystemActionRequestTest method modifyFileSystem.

// @Test
public void modifyFileSystem() {
    ModifyFileSystemParam parm = new ModifyFileSystemParam();
    NfsShareCreateParam nfsShareParm = new NfsShareCreateParam();
    nfsShareParm.setName("fs-21-share-1");
    nfsShareParm.setPath("/");
    NfsShareParam shareParm = new NfsShareParam();
    List<VNXeBase> hosts = new ArrayList<VNXeBase>();
    VNXeBase host = new VNXeBase();
    host.setId("Host_1");
    hosts.add(host);
    shareParm.setReadWriteHosts(hosts);
    nfsShareParm.setNfsShareParameters(shareParm);
    List<NfsShareCreateParam> nfsList = new ArrayList<NfsShareCreateParam>();
    nfsList.add(nfsShareParm);
    parm.setNfsShareCreate(nfsList);
    FileSystemActionRequest req = new FileSystemActionRequest(_client);
    VNXeCommandJob job = req.modifyFileSystemAsync(parm, "res_4");
    System.out.println(job.getId());
}
Also used : VNXeCommandJob(com.emc.storageos.vnxe.models.VNXeCommandJob) VNXeBase(com.emc.storageos.vnxe.models.VNXeBase) ArrayList(java.util.ArrayList) NfsShareParam(com.emc.storageos.vnxe.models.NfsShareParam) ModifyFileSystemParam(com.emc.storageos.vnxe.models.ModifyFileSystemParam) NfsShareCreateParam(com.emc.storageos.vnxe.models.NfsShareCreateParam)

Example 72 with VNXeCommandJob

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

the class FileSystemSnapRequestsTest method deleteSnap.

/*
     * @Test
     * public void getFileSystemSnap() {
     * 
     * FileSystemSnapRequests req = new FileSystemSnapRequests(_client);
     * 
     * VNXeFileSystemSnap response = null;
     * try {
     * response = req.getByName("test-file-01-snap");
     * } catch (VNXeException e) {
     * // TODO Auto-generated catch block
     * logger.error("VNXeException occured", e);
     * }
     * 
     * System.out.println(response.getId());
     * 
     * 
     * }
     */
// @Test
public void deleteSnap() {
    FileSystemSnapRequests req = new FileSystemSnapRequests(_client);
    VNXeCommandJob response = null;
    try {
        response = req.deleteFileSystemSnap("98784247867", "3.1.0");
    } catch (VNXeException e) {
        logger.error("VNXeException occured", e);
    }
    System.out.println(response.getId());
}
Also used : VNXeCommandJob(com.emc.storageos.vnxe.models.VNXeCommandJob) VNXeException(com.emc.storageos.vnxe.VNXeException)

Example 73 with VNXeCommandJob

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

the class FileSystemSnapRequestsTest method restoreSnap.

@Test
public void restoreSnap() {
    FileSystemSnapRequests req = new FileSystemSnapRequests(_client);
    VNXeCommandJob response = null;
    try {
        response = req.restoreFileSystemSnap("98784247833", null, "3.1.0");
    } catch (VNXeException e) {
        logger.error("VNXeException occured", e);
    }
    System.out.println(response.getId());
}
Also used : VNXeCommandJob(com.emc.storageos.vnxe.models.VNXeCommandJob) VNXeException(com.emc.storageos.vnxe.VNXeException) Test(org.junit.Test)

Aggregations

VNXeCommandJob (com.emc.storageos.vnxe.models.VNXeCommandJob)73 VNXeApiClient (com.emc.storageos.vnxe.VNXeApiClient)48 DeviceControllerException (com.emc.storageos.exceptions.DeviceControllerException)41 ServiceError (com.emc.storageos.svcs.errorhandling.model.ServiceError)40 VNXeException (com.emc.storageos.vnxe.VNXeException)40 QueueJob (com.emc.storageos.volumecontroller.impl.job.QueueJob)40 ControllerException (com.emc.storageos.volumecontroller.ControllerException)30 BlockSnapshot (com.emc.storageos.db.client.model.BlockSnapshot)24 Snapshot (com.emc.storageos.db.client.model.Snapshot)18 VNXeFileTaskCompleter (com.emc.storageos.volumecontroller.impl.vnxe.job.VNXeFileTaskCompleter)18 ArrayList (java.util.ArrayList)18 FileShare (com.emc.storageos.db.client.model.FileShare)17 SMBFileShare (com.emc.storageos.db.client.model.SMBFileShare)16 DatabaseException (com.emc.storageos.db.exceptions.DatabaseException)16 Volume (com.emc.storageos.db.client.model.Volume)13 URI (java.net.URI)10 VNXeBase (com.emc.storageos.vnxe.models.VNXeBase)9 FileExport (com.emc.storageos.db.client.model.FileExport)8 FileShareExport (com.emc.storageos.volumecontroller.FileShareExport)8 DbClient (com.emc.storageos.db.client.DbClient)7