Search in sources :

Example 51 with StorageServerConnections

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

the class StorageServerConnectionTestCommon method testISCSIInvalidPortWithCharacters.

@Test
public void testISCSIInvalidPortWithCharacters() {
    StorageServerConnections newISCSIConnection = createISCSIConnection("10.35.16.25", StorageType.ISCSI, "iqn.2013-04.myhat.com:aaa-target1", "abc", "user1", "mypassword123");
    parameters.setStorageServerConnection(newISCSIConnection);
    parameters.setVdsId(Guid.Empty);
    ValidateTestUtils.runAndAssertValidateFailure(command, EngineMessage.VALIDATION_STORAGE_CONNECTION_INVALID_PORT);
}
Also used : StorageServerConnections(org.ovirt.engine.core.common.businessentities.StorageServerConnections) Test(org.junit.Test) BaseCommandTest(org.ovirt.engine.core.bll.BaseCommandTest)

Example 52 with StorageServerConnections

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

the class StorageServerConnectionTestCommon method createNFSConnection.

protected StorageServerConnections createNFSConnection(String connection, StorageType type, NfsVersion version, int timeout, int retrans) {
    Guid id = getConnectionId();
    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 53 with StorageServerConnections

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

the class StorageServerConnectionTestCommon method testPosixEmptyVFSType.

@Test
public void testPosixEmptyVFSType() {
    StorageServerConnections newPosixConnection = createPosixConnection("multipass.my.domain.tlv.company.com:/export/allstorage/data1", StorageType.POSIXFS, null, "timeo=30");
    parameters.setStorageServerConnection(newPosixConnection);
    ValidateTestUtils.runAndAssertValidateFailure(command, EngineMessage.VALIDATION_STORAGE_CONNECTION_EMPTY_VFSTYPE);
}
Also used : StorageServerConnections(org.ovirt.engine.core.common.businessentities.StorageServerConnections) Test(org.junit.Test) BaseCommandTest(org.ovirt.engine.core.bll.BaseCommandTest)

Example 54 with StorageServerConnections

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

the class StorageServerConnectionTestCommon method createPosixConnection.

protected StorageServerConnections createPosixConnection(String connection, StorageType type, String vfsType, String mountOptions) {
    Guid id = getConnectionId();
    StorageServerConnections connectionDetails = populateBasicConnectionDetails(id, connection, type);
    connectionDetails.setVfsType(vfsType);
    connectionDetails.setMountOptions(mountOptions);
    return connectionDetails;
}
Also used : StorageServerConnections(org.ovirt.engine.core.common.businessentities.StorageServerConnections) Guid(org.ovirt.engine.core.compat.Guid)

Example 55 with StorageServerConnections

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

the class UpdateStorageServerConnectionCommandTest method updateConnectionOfUnattachedFileDomain.

@Test
public void updateConnectionOfUnattachedFileDomain() {
    StorageServerConnections newNFSConnection = createNFSConnection("multipass.my.domain.tlv.company.com:/export/allstorage/data2", StorageType.NFS, NfsVersion.V4, 300, 0);
    StorageDomain domain1 = new StorageDomain();
    domain1.setStorage(newNFSConnection.getConnection());
    domain1.setStatus(StorageDomainStatus.Unknown);
    domain1.setStorageDomainSharedStatus(StorageDomainSharedStatus.Unattached);
    initDomainListForConnection(newNFSConnection.getId(), domain1);
    parameters.setStorageServerConnection(newNFSConnection);
    when(storageConnDao.get(newNFSConnection.getId())).thenReturn(oldNFSConnection);
    doReturn(false).when(command).isConnWithSameDetailsExists(newNFSConnection, null);
    ValidateTestUtils.runAndAssertValidateSuccess(command);
}
Also used : StorageDomain(org.ovirt.engine.core.common.businessentities.StorageDomain) StorageServerConnections(org.ovirt.engine.core.common.businessentities.StorageServerConnections) Test(org.junit.Test)

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