DaanHoogland commented on a change in pull request #5909:
URL: https://github.com/apache/cloudstack/pull/5909#discussion_r816026617



##########
File path: 
framework/quota/src/test/java/org/apache/cloudstack/quota/constant/QuotaTypesTest.java
##########
@@ -43,6 +43,6 @@ public void testQuotaTypesList() {
     @Test
     public void testQuotaTypeDescription() {
         assertNull(QuotaTypes.getDescription(-1));
-        assertNotNull(QuotaTypes.getDescription(QuotaTypes.MEMORY));
+        assertNotNull(QuotaTypes.getDescription(QuotaTypes.VOLUME));

Review comment:
       so `QuotaTypes.getDescription(QuotaTypes.MEMORY)` can now be `null`?

##########
File path: 
engine/api/src/main/java/org/apache/cloudstack/engine/subsystem/api/storage/SnapshotInfo.java
##########
@@ -18,10 +18,16 @@
 
 import java.util.List;
 
+import org.apache.cloudstack.framework.config.ConfigKey;
+
 import com.cloud.storage.Snapshot;
 import com.cloud.utils.exception.CloudRuntimeException;
 
 public interface SnapshotInfo extends DataObject, Snapshot {
+    ConfigKey<Boolean> BackupSnapshotAfterTakingSnapshot = new 
ConfigKey<Boolean>(Boolean.class, "snapshot.backup.to.secondary",  "Snapshots", 
"true", "Indicates whether to always"

Review comment:
       i think this should on a service - and not on a resource interface. I'd 
sugest `SnapshotManager`

##########
File path: 
server/src/main/java/com/cloud/storage/snapshot/SnapshotManagerImpl.java
##########
@@ -223,7 +223,7 @@ public String getConfigComponentName() {
     @Override
     public ConfigKey<?>[] getConfigKeys() {
         return new ConfigKey<?>[] {BackupRetryAttempts, BackupRetryInterval, 
SnapshotHourlyMax, SnapshotDailyMax, SnapshotMonthlyMax, SnapshotWeeklyMax, 
usageSnapshotSelection,
-                BackupSnapshotAfterTakingSnapshot};
+                SnapshotInfo.BackupSnapshotAfterTakingSnapshot};

Review comment:
       this does not feel good. I think this config value must be in an 
interface that this service implements.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to