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);
}
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;
}
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);
}
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;
}
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);
}
Aggregations