sureshanaparti commented on a change in pull request #4230:
URL: https://github.com/apache/cloudstack/pull/4230#discussion_r599579603



##########
File path: 
api/src/main/java/org/apache/cloudstack/api/command/admin/config/ResetCfgCmd.java
##########
@@ -0,0 +1,164 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+package org.apache.cloudstack.api.command.admin.config;
+
+import org.apache.cloudstack.api.response.ImageStoreResponse;
+import org.apache.log4j.Logger;
+
+import org.apache.cloudstack.api.APICommand;
+import org.apache.cloudstack.api.ApiConstants;
+import org.apache.cloudstack.api.ApiErrorCode;
+import org.apache.cloudstack.api.BaseCmd;
+import org.apache.cloudstack.api.Parameter;
+import org.apache.cloudstack.api.ServerApiException;
+import org.apache.cloudstack.api.response.AccountResponse;
+import org.apache.cloudstack.api.response.ClusterResponse;
+import org.apache.cloudstack.api.response.ConfigurationResponse;
+import org.apache.cloudstack.api.response.DomainResponse;
+import org.apache.cloudstack.api.response.StoragePoolResponse;
+import org.apache.cloudstack.api.response.ZoneResponse;
+import org.apache.cloudstack.config.Configuration;
+
+import com.cloud.user.Account;
+import com.cloud.utils.Pair;
+
+@APICommand(name = "resetConfiguration", description = "Resets a 
configuration. The configuration will be set to default value for global 
setting, and removed from account_details or domain_details for Account/Domain 
settings", responseObject = ConfigurationResponse.class,
+        requestHasSensitiveInfo = false, responseHasSensitiveInfo = false)
+public class ResetCfgCmd extends BaseCmd {
+    public static final Logger s_logger = 
Logger.getLogger(ResetCfgCmd.class.getName());
+    private static final String s_name = "resetconfigurationresponse";
+
+    /////////////////////////////////////////////////////
+    //////////////// API parameters /////////////////////
+    /////////////////////////////////////////////////////
+
+    @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, required = 
true, description = "the name of the configuration")
+    private String cfgName;
+
+    @Parameter(name = ApiConstants.ZONE_ID,
+               type = CommandType.UUID,
+               entityType = ZoneResponse.class,
+               description = "the ID of the Zone to reset the parameter value 
for corresponding zone")
+    private Long zoneId;
+
+    @Parameter(name = ApiConstants.CLUSTER_ID,
+               type = CommandType.UUID,
+               entityType = ClusterResponse.class,
+               description = "the ID of the Cluster to reset the parameter 
value for corresponding cluster")
+    private Long clusterId;
+
+    @Parameter(name = ApiConstants.STORAGE_ID,
+               type = CommandType.UUID,
+               entityType = StoragePoolResponse.class,
+               description = "the ID of the Storage pool to reset the 
parameter value for corresponding storage pool")
+    private Long storagePoolId;
+
+    @Parameter(name = ApiConstants.DOMAIN_ID,
+            type = CommandType.UUID,
+            entityType = DomainResponse.class,
+            description = "the ID of the Domain to reset the parameter value 
for corresponding domain")
+    private Long domainId;
+
+    @Parameter(name = ApiConstants.ACCOUNT_ID,
+               type = CommandType.UUID,
+               entityType = AccountResponse.class,
+               description = "the ID of the Account to reset the parameter 
value for corresponding account")
+    private Long accountId;
+
+    @Parameter(name = ApiConstants.IMAGE_STORE_UUID,

Review comment:
       IMAGE_STORE_ID, in sync with other params ?




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

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to