Search in sources :

Example 46 with StorageServerConnections

use of org.ovirt.engine.core.common.businessentities.StorageServerConnections in project ovirt-engine by oVirt.

the class ConnectStorageToVdsCommandTest method createConnection.

private StorageServerConnections createConnection(StorageType storageType, String mountOptions) {
    StorageServerConnections conn = new StorageServerConnections();
    conn.setStorageType(storageType);
    conn.setMountOptions(mountOptions);
    return conn;
}
Also used : StorageServerConnections(org.ovirt.engine.core.common.businessentities.StorageServerConnections)

Example 47 with StorageServerConnections

use of org.ovirt.engine.core.common.businessentities.StorageServerConnections in project ovirt-engine by oVirt.

the class RemoveStorageServerConnectionCommandTest method populateBasicConnectionDetails.

private static StorageServerConnections populateBasicConnectionDetails(Guid id, String connection, StorageType type) {
    StorageServerConnections connectionDetails = new StorageServerConnections();
    connectionDetails.setId(id.toString());
    connectionDetails.setConnection(connection);
    connectionDetails.setStorageType(type);
    return connectionDetails;
}
Also used : StorageServerConnections(org.ovirt.engine.core.common.businessentities.StorageServerConnections)

Example 48 with StorageServerConnections

use of org.ovirt.engine.core.common.businessentities.StorageServerConnections in project ovirt-engine by oVirt.

the class RemoveStorageServerConnectionCommandTest method createNFSConnection.

private static StorageServerConnections createNFSConnection(String connection, StorageType type, NfsVersion version, int timeout, int retrans) {
    Guid id = Guid.newGuid();
    StorageServerConnections connectionDetails = populateBasicConnectionDetails(id, connection, type);
    connectionDetails.setNfsVersion(version);
    connectionDetails.setNfsTimeo((short) timeout);
    connectionDetails.setNfsRetrans((short) retrans);
    return connectionDetails;
}
Also used : StorageServerConnections(org.ovirt.engine.core.common.businessentities.StorageServerConnections) Guid(org.ovirt.engine.core.compat.Guid)

Example 49 with StorageServerConnections

use of org.ovirt.engine.core.common.businessentities.StorageServerConnections in project ovirt-engine by oVirt.

the class RemoveStorageServerConnectionCommandTest method createIscsiConnection.

private static StorageServerConnections createIscsiConnection(String connection, StorageType type, String iqn, String userName, String password, String portal) {
    Guid id = Guid.newGuid();
    StorageServerConnections connectionDetails = populateBasicConnectionDetails(id, connection, type);
    connectionDetails.setIqn(iqn);
    connectionDetails.setUserName(userName);
    connectionDetails.setPassword(password);
    connectionDetails.setPortal(portal);
    return connectionDetails;
}
Also used : StorageServerConnections(org.ovirt.engine.core.common.businessentities.StorageServerConnections) Guid(org.ovirt.engine.core.compat.Guid)

Example 50 with StorageServerConnections

use of org.ovirt.engine.core.common.businessentities.StorageServerConnections in project ovirt-engine by oVirt.

the class StorageServerConnectionTestCommon method testISCSIEmptyIqn.

@Test
public void testISCSIEmptyIqn() {
    StorageServerConnections newISCSIConnection = createISCSIConnection("10.35.16.25", StorageType.ISCSI, "", "3650", "user1", "mypassword123");
    parameters.setStorageServerConnection(newISCSIConnection);
    parameters.setVdsId(Guid.Empty);
    ValidateTestUtils.runAndAssertValidateFailure(command, EngineMessage.VALIDATION_STORAGE_CONNECTION_EMPTY_IQN);
}
Also used : StorageServerConnections(org.ovirt.engine.core.common.businessentities.StorageServerConnections) Test(org.junit.Test) BaseCommandTest(org.ovirt.engine.core.bll.BaseCommandTest)

Aggregations

StorageServerConnections (org.ovirt.engine.core.common.businessentities.StorageServerConnections)181 Test (org.junit.Test)83 ArrayList (java.util.ArrayList)43 Guid (org.ovirt.engine.core.compat.Guid)39 LUNs (org.ovirt.engine.core.common.businessentities.storage.LUNs)33 StorageDomain (org.ovirt.engine.core.common.businessentities.StorageDomain)32 StorageDomainStatic (org.ovirt.engine.core.common.businessentities.StorageDomainStatic)19 List (java.util.List)18 StorageType (org.ovirt.engine.core.common.businessentities.storage.StorageType)17 VDS (org.ovirt.engine.core.common.businessentities.VDS)16 StorageServerConnectionParametersBase (org.ovirt.engine.core.common.action.StorageServerConnectionParametersBase)15 QueryReturnValue (org.ovirt.engine.core.common.queries.QueryReturnValue)15 StoragePool (org.ovirt.engine.core.common.businessentities.StoragePool)14 HashSet (java.util.HashSet)13 ActionReturnValue (org.ovirt.engine.core.common.action.ActionReturnValue)11 ActionType (org.ovirt.engine.core.common.action.ActionType)11 Set (java.util.Set)10 StorageConnection (org.ovirt.engine.api.model.StorageConnection)10 StorageDomainType (org.ovirt.engine.core.common.businessentities.StorageDomainType)10 QueryType (org.ovirt.engine.core.common.queries.QueryType)10