mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
Fixed Primary typo
This commit is contained in:
parent
69b0c149d8
commit
95cbb790f3
@ -23,7 +23,7 @@ import java.util.UUID;
|
|||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
|
|
||||||
import org.apache.cloudstack.storage.to.ImageDataStoreTO;
|
import org.apache.cloudstack.storage.to.ImageDataStoreTO;
|
||||||
import org.apache.cloudstack.storage.to.ImageOnPrimayDataStoreTO;
|
import org.apache.cloudstack.storage.to.ImageOnPrimaryDataStoreTO;
|
||||||
import org.apache.cloudstack.storage.to.PrimaryDataStoreTO;
|
import org.apache.cloudstack.storage.to.PrimaryDataStoreTO;
|
||||||
import org.apache.cloudstack.storage.to.TemplateTO;
|
import org.apache.cloudstack.storage.to.TemplateTO;
|
||||||
import org.mockito.Mockito;
|
import org.mockito.Mockito;
|
||||||
@ -126,7 +126,7 @@ public class DirectAgentTest extends CloudStackTestNGBase {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testDownloadTemplate() {
|
public void testDownloadTemplate() {
|
||||||
ImageOnPrimayDataStoreTO image = Mockito.mock(ImageOnPrimayDataStoreTO.class);
|
ImageOnPrimaryDataStoreTO image = Mockito.mock(ImageOnPrimaryDataStoreTO.class);
|
||||||
PrimaryDataStoreTO primaryStore = Mockito.mock(PrimaryDataStoreTO.class);
|
PrimaryDataStoreTO primaryStore = Mockito.mock(PrimaryDataStoreTO.class);
|
||||||
Mockito.when(primaryStore.getUuid()).thenReturn(this.getLocalStorageUuid());
|
Mockito.when(primaryStore.getUuid()).thenReturn(this.getLocalStorageUuid());
|
||||||
Mockito.when(image.getPrimaryDataStore()).thenReturn(primaryStore);
|
Mockito.when(image.getPrimaryDataStore()).thenReturn(primaryStore);
|
||||||
|
|||||||
@ -18,14 +18,14 @@
|
|||||||
*/
|
*/
|
||||||
package org.apache.cloudstack.storage.command;
|
package org.apache.cloudstack.storage.command;
|
||||||
|
|
||||||
import org.apache.cloudstack.storage.to.ImageOnPrimayDataStoreTO;
|
import org.apache.cloudstack.storage.to.ImageOnPrimaryDataStoreTO;
|
||||||
import org.apache.cloudstack.storage.to.VolumeTO;
|
import org.apache.cloudstack.storage.to.VolumeTO;
|
||||||
|
|
||||||
import com.cloud.agent.api.Command;
|
import com.cloud.agent.api.Command;
|
||||||
|
|
||||||
public class CreateVolumeFromBaseImageCommand extends Command implements StorageSubSystemCommand {
|
public class CreateVolumeFromBaseImageCommand extends Command implements StorageSubSystemCommand {
|
||||||
private final VolumeTO volume;
|
private final VolumeTO volume;
|
||||||
private final ImageOnPrimayDataStoreTO image;
|
private final ImageOnPrimaryDataStoreTO image;
|
||||||
|
|
||||||
public CreateVolumeFromBaseImageCommand(VolumeTO volume, String image) {
|
public CreateVolumeFromBaseImageCommand(VolumeTO volume, String image) {
|
||||||
this.volume = volume;
|
this.volume = volume;
|
||||||
@ -36,7 +36,7 @@ public class CreateVolumeFromBaseImageCommand extends Command implements Storage
|
|||||||
return this.volume;
|
return this.volume;
|
||||||
}
|
}
|
||||||
|
|
||||||
public ImageOnPrimayDataStoreTO getImage() {
|
public ImageOnPrimaryDataStoreTO getImage() {
|
||||||
return this.image;
|
return this.image;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -64,7 +64,7 @@ public class DataStoreProviderManagerImpl extends ManagerBase implements DataSto
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<StorageProviderResponse> getPrimayrDataStoreProviders() {
|
public List<StorageProviderResponse> getPrimaryDataStoreProviders() {
|
||||||
List<StorageProviderResponse> providers = new ArrayList<StorageProviderResponse>();
|
List<StorageProviderResponse> providers = new ArrayList<StorageProviderResponse>();
|
||||||
for (DataStoreProvider provider : providerMap.values()) {
|
for (DataStoreProvider provider : providerMap.values()) {
|
||||||
if (provider instanceof PrimaryDataStoreProvider) {
|
if (provider instanceof PrimaryDataStoreProvider) {
|
||||||
@ -138,7 +138,7 @@ public class DataStoreProviderManagerImpl extends ManagerBase implements DataSto
|
|||||||
throw new InvalidParameterValueException("Invalid parameter, need to specify type: either primary or image");
|
throw new InvalidParameterValueException("Invalid parameter, need to specify type: either primary or image");
|
||||||
}
|
}
|
||||||
if (type.equalsIgnoreCase(DataStoreProvider.DataStoreProviderType.PRIMARY.toString())) {
|
if (type.equalsIgnoreCase(DataStoreProvider.DataStoreProviderType.PRIMARY.toString())) {
|
||||||
return this.getPrimayrDataStoreProviders();
|
return this.getPrimaryDataStoreProviders();
|
||||||
} else if (type.equalsIgnoreCase(DataStoreProvider.DataStoreProviderType.IMAGE.toString())) {
|
} else if (type.equalsIgnoreCase(DataStoreProvider.DataStoreProviderType.IMAGE.toString())) {
|
||||||
return this.getImageDataStoreProviders();
|
return this.getImageDataStoreProviders();
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@ -20,11 +20,11 @@ package org.apache.cloudstack.storage.to;
|
|||||||
|
|
||||||
import org.apache.cloudstack.storage.volume.TemplateOnPrimaryDataStoreInfo;
|
import org.apache.cloudstack.storage.volume.TemplateOnPrimaryDataStoreInfo;
|
||||||
|
|
||||||
public class ImageOnPrimayDataStoreTO {
|
public class ImageOnPrimaryDataStoreTO {
|
||||||
private final String pathOnPrimaryDataStore;
|
private final String pathOnPrimaryDataStore;
|
||||||
private PrimaryDataStoreTO dataStore;
|
private PrimaryDataStoreTO dataStore;
|
||||||
private final TemplateTO template;
|
private final TemplateTO template;
|
||||||
public ImageOnPrimayDataStoreTO(TemplateOnPrimaryDataStoreInfo template) {
|
public ImageOnPrimaryDataStoreTO(TemplateOnPrimaryDataStoreInfo template) {
|
||||||
this.pathOnPrimaryDataStore = template.getPath();
|
this.pathOnPrimaryDataStore = template.getPath();
|
||||||
//this.dataStore = template.getPrimaryDataStore().getDataStoreTO();
|
//this.dataStore = template.getPrimaryDataStore().getDataStoreTO();
|
||||||
this.template = new TemplateTO(template.getTemplate());
|
this.template = new TemplateTO(template.getTemplate());
|
||||||
@ -39,7 +39,7 @@ import org.apache.cloudstack.storage.command.CreatePrimaryDataStoreCmd;
|
|||||||
import org.apache.cloudstack.storage.command.CreateVolumeFromBaseImageCommand;
|
import org.apache.cloudstack.storage.command.CreateVolumeFromBaseImageCommand;
|
||||||
import org.apache.cloudstack.storage.command.StorageSubSystemCommand;
|
import org.apache.cloudstack.storage.command.StorageSubSystemCommand;
|
||||||
import org.apache.cloudstack.storage.datastore.protocol.DataStoreProtocol;
|
import org.apache.cloudstack.storage.datastore.protocol.DataStoreProtocol;
|
||||||
import org.apache.cloudstack.storage.to.ImageOnPrimayDataStoreTO;
|
import org.apache.cloudstack.storage.to.ImageOnPrimaryDataStoreTO;
|
||||||
import org.apache.cloudstack.storage.to.VolumeTO;
|
import org.apache.cloudstack.storage.to.VolumeTO;
|
||||||
import org.apache.http.HttpEntity;
|
import org.apache.http.HttpEntity;
|
||||||
import org.apache.http.HttpResponse;
|
import org.apache.http.HttpResponse;
|
||||||
@ -207,7 +207,7 @@ public class XenServerStorageResource {
|
|||||||
|
|
||||||
protected Answer execute(CreateVolumeFromBaseImageCommand cmd) {
|
protected Answer execute(CreateVolumeFromBaseImageCommand cmd) {
|
||||||
VolumeTO volume = cmd.getVolume();
|
VolumeTO volume = cmd.getVolume();
|
||||||
ImageOnPrimayDataStoreTO baseImage = cmd.getImage();
|
ImageOnPrimaryDataStoreTO baseImage = cmd.getImage();
|
||||||
Connection conn = hypervisorResource.getConnection();
|
Connection conn = hypervisorResource.getConnection();
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user