mirror of https://github.com/apache/cloudstack.git
bug 12899: mgt server needs to pass down the storage pool uuid when creating template from volume
status 12899: resolved fixed
This commit is contained in:
parent
c802971cce
commit
1648bd800c
|
|
@ -31,7 +31,7 @@ public class CreatePrivateTemplateFromVolumeCommand extends SnapshotCommand {
|
|||
public CreatePrivateTemplateFromVolumeCommand() {
|
||||
}
|
||||
|
||||
public CreatePrivateTemplateFromVolumeCommand(String secondaryStorageUrl, long templateId, long accountId, String userSpecifiedName, String uniqueName, String volumePath, String vmName, int wait) {
|
||||
public CreatePrivateTemplateFromVolumeCommand(String StoragePoolUUID, String secondaryStorageUrl, long templateId, long accountId, String userSpecifiedName, String uniqueName, String volumePath, String vmName, int wait) {
|
||||
_secondaryStorageUrl = secondaryStorageUrl;
|
||||
_templateId = templateId;
|
||||
_accountId = accountId;
|
||||
|
|
@ -39,6 +39,7 @@ public class CreatePrivateTemplateFromVolumeCommand extends SnapshotCommand {
|
|||
_uniqueName = uniqueName;
|
||||
_volumePath = volumePath;
|
||||
_vmName = vmName;
|
||||
primaryStoragePoolNameLabel = StoragePoolUUID;
|
||||
setWait(wait);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ package com.cloud.agent.api;
|
|||
* This currently assumes that both primary and secondary storage are mounted on the XenServer.
|
||||
*/
|
||||
public class SnapshotCommand extends Command {
|
||||
private String primaryStoragePoolNameLabel;
|
||||
protected String primaryStoragePoolNameLabel;
|
||||
private String snapshotUuid;
|
||||
private String snapshotName;
|
||||
private String secondaryStorageUrl;
|
||||
|
|
|
|||
|
|
@ -1553,7 +1553,7 @@ public class UserVmManagerImpl implements UserVmManager, UserVmService, Manager
|
|||
secondaryStorageURL = secondaryStorageHost.getStorageUrl();
|
||||
|
||||
pool = _storagePoolDao.findById(volume.getPoolId());
|
||||
cmd = new CreatePrivateTemplateFromVolumeCommand(secondaryStorageURL, templateId, accountId, command.getTemplateName(), uniqueName, volume.getPath(), vmName, _createprivatetemplatefromvolumewait);
|
||||
cmd = new CreatePrivateTemplateFromVolumeCommand(pool.getUuid(), secondaryStorageURL, templateId, accountId, command.getTemplateName(), uniqueName, volume.getPath(), vmName, _createprivatetemplatefromvolumewait);
|
||||
|
||||
} else {
|
||||
throw new CloudRuntimeException("Creating private Template need to specify snapshotId or volumeId");
|
||||
|
|
|
|||
Loading…
Reference in New Issue