mirror of
https://github.com/apache/cloudstack.git
synced 2025-11-02 20:02:29 +01:00
bug 5370: copy Template/Iso - generating the started and completed events.
status 5370: resolved fixed
This commit is contained in:
parent
16803387c6
commit
56ce65710d
@ -36,6 +36,7 @@ import com.cloud.exception.ResourceAllocationException;
|
||||
import com.cloud.exception.StorageUnavailableException;
|
||||
import com.cloud.template.VirtualMachineTemplate;
|
||||
import com.cloud.user.Account;
|
||||
import com.cloud.user.UserContext;
|
||||
|
||||
@Implementation(description="Copies a template from one zone to another.", responseObject=TemplateResponse.class)
|
||||
public class CopyTemplateCmd extends BaseAsyncCmd {
|
||||
@ -117,6 +118,7 @@ public class CopyTemplateCmd extends BaseAsyncCmd {
|
||||
@Override
|
||||
public void execute() throws ResourceAllocationException{
|
||||
try {
|
||||
UserContext.current().setEventDetails(getEventDescription());
|
||||
VirtualMachineTemplate template = _templateService.copyTemplate(this);
|
||||
|
||||
if (template != null){
|
||||
|
||||
@ -588,6 +588,7 @@ public class TemplateManagerImpl implements TemplateManager, Manager, TemplateSe
|
||||
|
||||
|
||||
@Override
|
||||
@ActionEvent(eventType = EventTypes.EVENT_TEMPLATE_COPY, eventDescription = "copying template", async = true)
|
||||
public VirtualMachineTemplate copyTemplate(CopyTemplateCmd cmd) throws StorageUnavailableException, ResourceAllocationException {
|
||||
Long templateId = cmd.getId();
|
||||
Long userId = UserContext.current().getCallerUserId();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user