You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
bug 7046 : extracting templates should allow for exclusion of some templates. An attribute "extractable" would be set on templates by the template owner at upload time. It would specify if we allow the template to be extracted from the system. Default would be true ie "allow extraction". If set to false, it would not be possible to extract the template or any derivatives of the template. For example, volumes, snapshots or templates from that template.
Copy file name to clipboardExpand all lines: api/src/com/cloud/api/commands/RegisterTemplateCmd.java
+7Lines changed: 7 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -67,6 +67,9 @@ public class RegisterTemplateCmd extends BaseCmd {
67
67
68
68
@Parameter(name=ApiConstants.PASSWORD_ENABLED, type=CommandType.BOOLEAN, description="true if the template supports the password reset feature; default is false")
69
69
privateBooleanpasswordEnabled;
70
+
71
+
@Parameter(name=ApiConstants.IS_EXTRACTABLE, type=CommandType.BOOLEAN, description="true if the template or its derivatives are extractable; default is true")
72
+
privateBooleanextractable;
70
73
71
74
@Parameter(name=ApiConstants.REQUIRES_HVM, type=CommandType.BOOLEAN, description="true if this template requires HVM")
72
75
privateBooleanrequiresHvm;
@@ -123,6 +126,10 @@ public Boolean isPasswordEnabled() {
Copy file name to clipboardExpand all lines: server/src/com/cloud/server/ManagementServerImpl.java
+6Lines changed: 6 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -5197,6 +5197,12 @@ public Long extractVolume(ExtractVolumeCmd cmd) throws URISyntaxException {
5197
5197
thrownewPermissionDeniedException("Invalid state of the volume with ID: " + volumeId + ". It should be either detached or the VM should be in stopped state.");
0 commit comments