weizhouapache commented on code in PR #6918:
URL: https://github.com/apache/cloudstack/pull/6918#discussion_r1363561434


##########
api/src/main/java/org/apache/cloudstack/api/command/admin/config/ResetCfgCmd.java:
##########
@@ -86,6 +87,12 @@ public class ResetCfgCmd extends BaseCmd {
             description = "the ID of the Image Store to reset the parameter 
value for corresponding image store")
     private Long imageStoreId;
 
+    @Parameter(name = ApiConstants.NETWORK_ID,
+               type = CommandType.UUID,
+               entityType = NetworkResponse.class,
+               description = "the ID of the Network to update the parameter 
value for corresponding network")

Review Comment:
   add `since` ?



##########
api/src/main/java/org/apache/cloudstack/api/command/admin/config/ListCfgsByCmd.java:
##########
@@ -105,6 +106,12 @@ public class ListCfgsByCmd extends BaseListCmd {
     @Parameter(name = ApiConstants.PARENT, type = CommandType.STRING, 
description = "lists configuration by parent name (primarily used for UI)", 
since = "4.18.0")
     private String parentName;
 
+    @Parameter(name = ApiConstants.NETWORK_ID,
+               type = CommandType.UUID,
+               entityType = NetworkResponse.class,
+               description = "the ID of the Network to update the parameter 
value for corresponding network")

Review Comment:
   add `since` ?



##########
api/src/main/java/org/apache/cloudstack/api/command/admin/config/ResetCfgCmd.java:
##########
@@ -86,6 +87,12 @@ public class ResetCfgCmd extends BaseCmd {
             description = "the ID of the Image Store to reset the parameter 
value for corresponding image store")
     private Long imageStoreId;
 
+    @Parameter(name = ApiConstants.NETWORK_ID,
+               type = CommandType.UUID,
+               entityType = NetworkResponse.class,
+               description = "the ID of the Network to update the parameter 
value for corresponding network")

Review Comment:
   update -> reset ?



##########
framework/config/src/main/java/org/apache/cloudstack/framework/config/impl/ConfigDepotImpl.java:
##########
@@ -101,9 +101,10 @@ protected void createEmptyScopeLevelMappings() {
         _scopeLevelConfigsMap.put(ConfigKey.Scope.Cluster, new 
HashSet<ConfigKey<?>>());
         _scopeLevelConfigsMap.put(ConfigKey.Scope.StoragePool, new 
HashSet<ConfigKey<?>>());
         _scopeLevelConfigsMap.put(ConfigKey.Scope.Account, new 
HashSet<ConfigKey<?>>());
-        _scopeLevelConfigsMap.put(ConfigKey.Scope.ImageStore, new 
HashSet<ConfigKey<?>>());
+        _scopeLevelConfigsMap.put(ConfigKey.Scope.ImageStore, new HashSet<>());

Review Comment:
   you can remove `ConfigKey` from other lines as well



##########
api/src/main/java/org/apache/cloudstack/api/command/admin/config/ListCfgsByCmd.java:
##########
@@ -105,6 +106,12 @@ public class ListCfgsByCmd extends BaseListCmd {
     @Parameter(name = ApiConstants.PARENT, type = CommandType.STRING, 
description = "lists configuration by parent name (primarily used for UI)", 
since = "4.18.0")
     private String parentName;
 
+    @Parameter(name = ApiConstants.NETWORK_ID,
+               type = CommandType.UUID,
+               entityType = NetworkResponse.class,
+               description = "the ID of the Network to update the parameter 
value for corresponding network")

Review Comment:
   update -> list ?



##########
engine/schema/src/main/java/com/cloud/network/dao/NetworkDetailsDao.java:
##########
@@ -16,10 +16,26 @@
 // under the License.
 package com.cloud.network.dao;
 
+import java.util.Map;
+import java.util.List;
+
 import org.apache.cloudstack.resourcedetail.ResourceDetailsDao;
 
 import com.cloud.utils.db.GenericDao;
 
 public interface NetworkDetailsDao extends GenericDao<NetworkDetailVO, Long>, 
ResourceDetailsDao<NetworkDetailVO> {

Review Comment:
   could extend `ResourceDetailsDaoBase` instead of `ResourceDetailsDao`



##########
engine/schema/src/main/java/com/cloud/network/dao/NetworkDetailsDao.java:
##########
@@ -16,10 +16,26 @@
 // under the License.
 package com.cloud.network.dao;
 
+import java.util.Map;
+import java.util.List;
+
 import org.apache.cloudstack.resourcedetail.ResourceDetailsDao;
 
 import com.cloud.utils.db.GenericDao;
 
 public interface NetworkDetailsDao extends GenericDao<NetworkDetailVO, Long>, 
ResourceDetailsDao<NetworkDetailVO> {
+
     boolean isNetworkUsageHidden(long networkId);
+
+    Map<String, String> findDetails(long networkId);

Review Comment:
   this can be replaced by ResourceDetailsDaoBase.listDetailsKeyPairs



##########
api/src/main/java/org/apache/cloudstack/api/command/admin/config/UpdateCfgCmd.java:
##########
@@ -90,6 +91,12 @@ public class UpdateCfgCmd extends BaseCmd {
             validations = ApiArgValidator.PositiveNumber)
     private Long imageStoreId;
 
+    @Parameter(name = ApiConstants.NETWORK_ID,
+               type = CommandType.UUID,
+               entityType = NetworkResponse.class,
+               description = "the ID of the Network to update the parameter 
value for corresponding network")

Review Comment:
   also here



-- 
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