mirror of https://github.com/apache/cloudstack.git
SWIFT: disable copy template in API level in Swift setup
This commit is contained in:
parent
99ee2b9cbd
commit
23f22259ed
|
|
@ -23,7 +23,6 @@ import java.net.URI;
|
|||
import java.net.URISyntaxException;
|
||||
import java.net.UnknownHostException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
|
@ -750,6 +749,9 @@ public class TemplateManagerImpl implements TemplateManager, Manager, TemplateSe
|
|||
Long destZoneId = cmd.getDestinationZoneId();
|
||||
Account caller = UserContext.current().getCaller();
|
||||
|
||||
if (_swiftMgr.isSwiftEnabled()) {
|
||||
throw new CloudRuntimeException("copytemplate API is disabled in Swift setup, templates in Swift can be accessed by all Zones");
|
||||
}
|
||||
//Verify parameters
|
||||
if (sourceZoneId == destZoneId) {
|
||||
throw new InvalidParameterValueException("Please specify different source and destination zones.");
|
||||
|
|
|
|||
Loading…
Reference in New Issue