You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by bh...@apache.org on 2012/12/06 20:14:32 UTC
[6/14] git commit: api_refactor: move cfg admin apis
api_refactor: move cfg admin apis
Signed-off-by: Rohit Yadav <bh...@apache.org>
Project: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/commit/ecc82493
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/ecc82493
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/ecc82493
Branch: refs/heads/api_refactoring
Commit: ecc8249365e73d9ba982704423a4dd8ee88b7af4
Parents: ab4fac5
Author: Rohit Yadav <bh...@apache.org>
Authored: Thu Dec 6 10:50:26 2012 -0800
Committer: Rohit Yadav <bh...@apache.org>
Committed: Thu Dec 6 10:50:26 2012 -0800
----------------------------------------------------------------------
api/src/com/cloud/api/commands/ListCfgsByCmd.java | 95 --------------
.../commands/ListHypervisorCapabilitiesCmd.java | 94 --------------
api/src/com/cloud/api/commands/UpdateCfgCmd.java | 82 ------------
.../commands/UpdateHypervisorCapabilitiesCmd.java | 96 ---------------
.../cloud/configuration/ConfigurationService.java | 2 +-
api/src/com/cloud/server/ManagementService.java | 4 +-
.../api/admin/config/command/ListCfgsByCmd.java | 95 ++++++++++++++
.../command/ListHypervisorCapabilitiesCmd.java | 94 ++++++++++++++
.../api/admin/config/command/UpdateCfgCmd.java | 82 ++++++++++++
.../command/UpdateHypervisorCapabilitiesCmd.java | 96 +++++++++++++++
.../user/config/command/ListCapabilitiesCmd.java | 59 +++++++++
.../user/resource/command/ListCapabilitiesCmd.java | 59 ---------
client/tomcatconf/commands.properties.in | 10 +-
.../configuration/ConfigurationManagerImpl.java | 2 +-
.../src/com/cloud/server/ManagementServerImpl.java | 4 +-
.../cloud/vpc/MockConfigurationManagerImpl.java | 2 +-
16 files changed, 438 insertions(+), 438 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/ecc82493/api/src/com/cloud/api/commands/ListCfgsByCmd.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/api/commands/ListCfgsByCmd.java b/api/src/com/cloud/api/commands/ListCfgsByCmd.java
deleted file mode 100644
index e539338..0000000
--- a/api/src/com/cloud/api/commands/ListCfgsByCmd.java
+++ /dev/null
@@ -1,95 +0,0 @@
-// 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 com.cloud.api.commands;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.apache.log4j.Logger;
-
-import org.apache.cloudstack.api.ApiConstants;
-import org.apache.cloudstack.api.BaseListCmd;
-import org.apache.cloudstack.api.Implementation;
-import org.apache.cloudstack.api.Parameter;
-import com.cloud.api.response.ConfigurationResponse;
-import com.cloud.api.response.ListResponse;
-import com.cloud.configuration.Configuration;
-import com.cloud.utils.Pair;
-
-@Implementation(description = "Lists all configurations.", responseObject = ConfigurationResponse.class)
-public class ListCfgsByCmd extends BaseListCmd {
- public static final Logger s_logger = Logger.getLogger(ListCfgsByCmd.class.getName());
-
- private static final String s_name = "listconfigurationsresponse";
-
- // ///////////////////////////////////////////////////
- // ////////////// API parameters /////////////////////
- // ///////////////////////////////////////////////////
-
- @Parameter(name = ApiConstants.CATEGORY, type = CommandType.STRING, description = "lists configurations by category")
- private String category;
-
- @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, description = "lists configuration by name")
- private String configName;
-
- // ///////////////////////////////////////////////////
- // ///////////////// Accessors ///////////////////////
- // ///////////////////////////////////////////////////
-
- public String getCategory() {
- return category;
- }
-
- public String getConfigName() {
- return configName;
- }
-
- @Override
- public Long getPageSizeVal() {
- Long pageSizeVal = 500L;
- Integer pageSize = getPageSize();
- if (pageSize != null) {
- pageSizeVal = pageSize.longValue();
- }
- return pageSizeVal;
- }
-
- // ///////////////////////////////////////////////////
- // ///////////// API Implementation///////////////////
- // ///////////////////////////////////////////////////
-
- @Override
- public String getCommandName() {
- return s_name;
- }
-
- @Override
- public void execute() {
- Pair<List<? extends Configuration>, Integer> result = _mgr.searchForConfigurations(this);
- ListResponse<ConfigurationResponse> response = new ListResponse<ConfigurationResponse>();
- List<ConfigurationResponse> configResponses = new ArrayList<ConfigurationResponse>();
- for (Configuration cfg : result.first()) {
- ConfigurationResponse cfgResponse = _responseGenerator.createConfigurationResponse(cfg);
- cfgResponse.setObjectName("configuration");
- configResponses.add(cfgResponse);
- }
-
- response.setResponses(configResponses, result.second());
- response.setResponseName(getCommandName());
- this.setResponseObject(response);
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/ecc82493/api/src/com/cloud/api/commands/ListHypervisorCapabilitiesCmd.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/api/commands/ListHypervisorCapabilitiesCmd.java b/api/src/com/cloud/api/commands/ListHypervisorCapabilitiesCmd.java
deleted file mode 100644
index 29a56a3..0000000
--- a/api/src/com/cloud/api/commands/ListHypervisorCapabilitiesCmd.java
+++ /dev/null
@@ -1,94 +0,0 @@
-// 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 com.cloud.api.commands;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.apache.log4j.Logger;
-
-import org.apache.cloudstack.api.ApiConstants;
-import org.apache.cloudstack.api.BaseListCmd;
-import org.apache.cloudstack.api.IdentityMapper;
-import org.apache.cloudstack.api.Implementation;
-import org.apache.cloudstack.api.Parameter;
-import com.cloud.api.response.HypervisorCapabilitiesResponse;
-import com.cloud.api.response.ListResponse;
-import com.cloud.hypervisor.Hypervisor.HypervisorType;
-import com.cloud.hypervisor.HypervisorCapabilities;
-import com.cloud.utils.Pair;
-
-@Implementation(description="Lists all hypervisor capabilities.", responseObject=HypervisorCapabilitiesResponse.class, since="3.0.0")
-public class ListHypervisorCapabilitiesCmd extends BaseListCmd {
- public static final Logger s_logger = Logger.getLogger(ListHypervisorCapabilitiesCmd.class.getName());
-
- private static final String s_name = "listhypervisorcapabilitiesresponse";
-
- /////////////////////////////////////////////////////
- //////////////// API parameters /////////////////////
- /////////////////////////////////////////////////////
-
- @IdentityMapper(entityTableName="hypervisor_capabilities")
- @Parameter(name=ApiConstants.ID, type=CommandType.LONG, description="ID of the hypervisor capability")
- private Long id;
-
- @Parameter(name=ApiConstants.HYPERVISOR, type=CommandType.STRING, description="the hypervisor for which to restrict the search")
- private String hypervisor;
-
-
- /////////////////////////////////////////////////////
- /////////////////// Accessors ///////////////////////
- /////////////////////////////////////////////////////
-
- public Long getId() {
- return id;
- }
-
- public HypervisorType getHypervisor() {
- if(hypervisor != null){
- return HypervisorType.getType(hypervisor);
- }else{
- return null;
- }
- }
-
- /////////////////////////////////////////////////////
- /////////////// API Implementation///////////////////
- /////////////////////////////////////////////////////
-
- @Override
- public String getCommandName() {
- return s_name;
- }
-
- @Override
- public void execute(){
- Pair<List<? extends HypervisorCapabilities>, Integer> hpvCapabilities = _mgr.listHypervisorCapabilities(getId(),
- getHypervisor(), getKeyword(), this.getStartIndex(), this.getPageSizeVal());
- ListResponse<HypervisorCapabilitiesResponse> response = new ListResponse<HypervisorCapabilitiesResponse>();
- List<HypervisorCapabilitiesResponse> hpvCapabilitiesResponses = new ArrayList<HypervisorCapabilitiesResponse>();
- for (HypervisorCapabilities capability : hpvCapabilities.first()) {
- HypervisorCapabilitiesResponse hpvCapabilityResponse = _responseGenerator.createHypervisorCapabilitiesResponse(capability);
- hpvCapabilityResponse.setObjectName("hypervisorCapabilities");
- hpvCapabilitiesResponses.add(hpvCapabilityResponse);
- }
-
- response.setResponses(hpvCapabilitiesResponses, hpvCapabilities.second());
- response.setResponseName(getCommandName());
- this.setResponseObject(response);
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/ecc82493/api/src/com/cloud/api/commands/UpdateCfgCmd.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/api/commands/UpdateCfgCmd.java b/api/src/com/cloud/api/commands/UpdateCfgCmd.java
deleted file mode 100644
index ea5e877..0000000
--- a/api/src/com/cloud/api/commands/UpdateCfgCmd.java
+++ /dev/null
@@ -1,82 +0,0 @@
-// 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 com.cloud.api.commands;
-
-import org.apache.log4j.Logger;
-
-import org.apache.cloudstack.api.ApiConstants;
-import org.apache.cloudstack.api.BaseCmd;
-import org.apache.cloudstack.api.Implementation;
-import org.apache.cloudstack.api.Parameter;
-import org.apache.cloudstack.api.ServerApiException;
-import com.cloud.api.response.ConfigurationResponse;
-import com.cloud.configuration.Configuration;
-import com.cloud.user.Account;
-
-@Implementation(description="Updates a configuration.", responseObject=ConfigurationResponse.class)
-public class UpdateCfgCmd extends BaseCmd {
- public static final Logger s_logger = Logger.getLogger(UpdateCfgCmd.class.getName());
- private static final String s_name = "updateconfigurationresponse";
-
- /////////////////////////////////////////////////////
- //////////////// API parameters /////////////////////
- /////////////////////////////////////////////////////
-
- @Parameter(name=ApiConstants.NAME, type=CommandType.STRING, required=true, description="the name of the configuration")
- private String cfgName;
-
- @Parameter(name=ApiConstants.VALUE, type=CommandType.STRING, description="the value of the configuration", length=4095)
- private String value;
-
- /////////////////////////////////////////////////////
- /////////////////// Accessors ///////////////////////
- /////////////////////////////////////////////////////
-
- public String getCfgName() {
- return cfgName;
- }
-
- public String getValue() {
- return value;
- }
-
- /////////////////////////////////////////////////////
- /////////////// API Implementation///////////////////
- /////////////////////////////////////////////////////
-
- @Override
- public String getCommandName() {
- return s_name;
- }
-
- @Override
- public long getEntityOwnerId() {
- return Account.ACCOUNT_ID_SYSTEM;
- }
-
- @Override
- public void execute(){
- Configuration cfg = _configService.updateConfiguration(this);
- if (cfg != null) {
- ConfigurationResponse response = _responseGenerator.createConfigurationResponse(cfg);
- response.setResponseName(getCommandName());
- this.setResponseObject(response);
- } else {
- throw new ServerApiException(BaseCmd.INTERNAL_ERROR, "Failed to update config");
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/ecc82493/api/src/com/cloud/api/commands/UpdateHypervisorCapabilitiesCmd.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/api/commands/UpdateHypervisorCapabilitiesCmd.java b/api/src/com/cloud/api/commands/UpdateHypervisorCapabilitiesCmd.java
deleted file mode 100644
index 4f47f48..0000000
--- a/api/src/com/cloud/api/commands/UpdateHypervisorCapabilitiesCmd.java
+++ /dev/null
@@ -1,96 +0,0 @@
-// 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 com.cloud.api.commands;
-
-import org.apache.log4j.Logger;
-
-import org.apache.cloudstack.api.ApiConstants;
-import org.apache.cloudstack.api.BaseCmd;
-import org.apache.cloudstack.api.IdentityMapper;
-import org.apache.cloudstack.api.Implementation;
-import org.apache.cloudstack.api.Parameter;
-import org.apache.cloudstack.api.ServerApiException;
-import com.cloud.api.response.HypervisorCapabilitiesResponse;
-import com.cloud.api.response.ServiceOfferingResponse;
-import com.cloud.hypervisor.HypervisorCapabilities;
-import com.cloud.user.Account;
-
-
-@Implementation(description="Updates a hypervisor capabilities.", responseObject=ServiceOfferingResponse.class, since="3.0.0")
-public class UpdateHypervisorCapabilitiesCmd extends BaseCmd {
- public static final Logger s_logger = Logger.getLogger(UpdateHypervisorCapabilitiesCmd.class.getName());
- private static final String s_name = "updatehypervisorcapabilitiesresponse";
-
- /////////////////////////////////////////////////////
- //////////////// API parameters /////////////////////
- /////////////////////////////////////////////////////
-
- @IdentityMapper(entityTableName="hypervisor_capabilities")
- @Parameter(name=ApiConstants.ID, type=CommandType.LONG, description="ID of the hypervisor capability")
- private Long id;
-
- @Parameter(name=ApiConstants.SECURITY_GROUP_EANBLED, type=CommandType.BOOLEAN, description="set true to enable security group for this hypervisor.")
- private Boolean securityGroupEnabled;
-
- @Parameter(name=ApiConstants.MAX_GUESTS_LIMIT, type=CommandType.LONG, description="the max number of Guest VMs per host for this hypervisor.")
- private Long maxGuestsLimit;
-
- /////////////////////////////////////////////////////
- /////////////////// Accessors ///////////////////////
- /////////////////////////////////////////////////////
-
- public Boolean getSecurityGroupEnabled() {
- return securityGroupEnabled;
- }
-
- public Long getId() {
- return id;
- }
-
- public Long getMaxGuestsLimit() {
- return maxGuestsLimit;
- }
-
-
-
- /////////////////////////////////////////////////////
- /////////////// API Implementation///////////////////
- /////////////////////////////////////////////////////
-
-
- @Override
- public String getCommandName() {
- return s_name;
- }
-
- @Override
- public long getEntityOwnerId() {
- return Account.ACCOUNT_ID_SYSTEM;
- }
-
- @Override
- public void execute(){
- HypervisorCapabilities result = _mgr.updateHypervisorCapabilities(getId(), getMaxGuestsLimit(), getSecurityGroupEnabled());
- if (result != null){
- HypervisorCapabilitiesResponse response = _responseGenerator.createHypervisorCapabilitiesResponse(result);
- response.setResponseName(getCommandName());
- this.setResponseObject(response);
- } else {
- throw new ServerApiException(BaseCmd.INTERNAL_ERROR, "Failed to update hypervisor capabilities");
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/ecc82493/api/src/com/cloud/configuration/ConfigurationService.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/configuration/ConfigurationService.java b/api/src/com/cloud/configuration/ConfigurationService.java
index f807297..be50981 100644
--- a/api/src/com/cloud/configuration/ConfigurationService.java
+++ b/api/src/com/cloud/configuration/ConfigurationService.java
@@ -34,7 +34,7 @@ import org.apache.cloudstack.api.admin.zone.command.DeleteZoneCmd;
import com.cloud.api.commands.LDAPConfigCmd;
import com.cloud.api.commands.LDAPRemoveCmd;
import org.apache.cloudstack.api.user.network.command.ListNetworkOfferingsCmd;
-import com.cloud.api.commands.UpdateCfgCmd;
+import org.apache.cloudstack.api.admin.config.command.UpdateCfgCmd;
import com.cloud.api.commands.UpdateDiskOfferingCmd;
import org.apache.cloudstack.api.admin.network.command.UpdateNetworkOfferingCmd;
import com.cloud.api.commands.UpdatePodCmd;
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/ecc82493/api/src/com/cloud/server/ManagementService.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/server/ManagementService.java b/api/src/com/cloud/server/ManagementService.java
index e77fe15..8b20f31 100755
--- a/api/src/com/cloud/server/ManagementService.java
+++ b/api/src/com/cloud/server/ManagementService.java
@@ -28,7 +28,7 @@ import org.apache.cloudstack.api.admin.host.command.ListHostsCmd;
import org.apache.cloudstack.api.admin.host.command.UpdateHostPasswordCmd;
import org.apache.cloudstack.api.admin.router.command.ListRoutersCmd;
import org.apache.cloudstack.api.user.address.command.ListPublicIpAddressesCmd;
-import org.apache.cloudstack.api.user.resource.command.ListCapabilitiesCmd;
+import org.apache.cloudstack.api.user.config.command.ListCapabilitiesCmd;
import org.apache.cloudstack.api.user.guest.command.ListGuestOsCmd;
import org.apache.cloudstack.api.user.offering.command.ListDiskOfferingsCmd;
import org.apache.cloudstack.api.user.offering.command.ListServiceOfferingsCmd;
@@ -42,7 +42,7 @@ import org.apache.cloudstack.api.user.vm.command.GetVMPasswordCmd;
import com.cloud.api.commands.ListAlertsCmd;
import org.apache.cloudstack.api.user.job.command.ListAsyncJobsCmd;
import com.cloud.api.commands.ListCapacityCmd;
-import com.cloud.api.commands.ListCfgsByCmd;
+import org.apache.cloudstack.api.admin.config.command.ListCfgsByCmd;
import com.cloud.api.commands.ListClustersCmd;
import org.apache.cloudstack.api.user.event.command.ListEventsCmd;
import org.apache.cloudstack.api.user.guest.command.ListGuestOsCategoriesCmd;
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/ecc82493/api/src/org/apache/cloudstack/api/admin/config/command/ListCfgsByCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/admin/config/command/ListCfgsByCmd.java b/api/src/org/apache/cloudstack/api/admin/config/command/ListCfgsByCmd.java
new file mode 100644
index 0000000..70990ba
--- /dev/null
+++ b/api/src/org/apache/cloudstack/api/admin/config/command/ListCfgsByCmd.java
@@ -0,0 +1,95 @@
+// 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.admin.config.command;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.log4j.Logger;
+
+import org.apache.cloudstack.api.ApiConstants;
+import org.apache.cloudstack.api.BaseListCmd;
+import org.apache.cloudstack.api.Implementation;
+import org.apache.cloudstack.api.Parameter;
+import com.cloud.api.response.ConfigurationResponse;
+import com.cloud.api.response.ListResponse;
+import com.cloud.configuration.Configuration;
+import com.cloud.utils.Pair;
+
+@Implementation(description = "Lists all configurations.", responseObject = ConfigurationResponse.class)
+public class ListCfgsByCmd extends BaseListCmd {
+ public static final Logger s_logger = Logger.getLogger(ListCfgsByCmd.class.getName());
+
+ private static final String s_name = "listconfigurationsresponse";
+
+ // ///////////////////////////////////////////////////
+ // ////////////// API parameters /////////////////////
+ // ///////////////////////////////////////////////////
+
+ @Parameter(name = ApiConstants.CATEGORY, type = CommandType.STRING, description = "lists configurations by category")
+ private String category;
+
+ @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, description = "lists configuration by name")
+ private String configName;
+
+ // ///////////////////////////////////////////////////
+ // ///////////////// Accessors ///////////////////////
+ // ///////////////////////////////////////////////////
+
+ public String getCategory() {
+ return category;
+ }
+
+ public String getConfigName() {
+ return configName;
+ }
+
+ @Override
+ public Long getPageSizeVal() {
+ Long pageSizeVal = 500L;
+ Integer pageSize = getPageSize();
+ if (pageSize != null) {
+ pageSizeVal = pageSize.longValue();
+ }
+ return pageSizeVal;
+ }
+
+ // ///////////////////////////////////////////////////
+ // ///////////// API Implementation///////////////////
+ // ///////////////////////////////////////////////////
+
+ @Override
+ public String getCommandName() {
+ return s_name;
+ }
+
+ @Override
+ public void execute() {
+ Pair<List<? extends Configuration>, Integer> result = _mgr.searchForConfigurations(this);
+ ListResponse<ConfigurationResponse> response = new ListResponse<ConfigurationResponse>();
+ List<ConfigurationResponse> configResponses = new ArrayList<ConfigurationResponse>();
+ for (Configuration cfg : result.first()) {
+ ConfigurationResponse cfgResponse = _responseGenerator.createConfigurationResponse(cfg);
+ cfgResponse.setObjectName("configuration");
+ configResponses.add(cfgResponse);
+ }
+
+ response.setResponses(configResponses, result.second());
+ response.setResponseName(getCommandName());
+ this.setResponseObject(response);
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/ecc82493/api/src/org/apache/cloudstack/api/admin/config/command/ListHypervisorCapabilitiesCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/admin/config/command/ListHypervisorCapabilitiesCmd.java b/api/src/org/apache/cloudstack/api/admin/config/command/ListHypervisorCapabilitiesCmd.java
new file mode 100644
index 0000000..e0cd04f
--- /dev/null
+++ b/api/src/org/apache/cloudstack/api/admin/config/command/ListHypervisorCapabilitiesCmd.java
@@ -0,0 +1,94 @@
+// 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.admin.config.command;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.log4j.Logger;
+
+import org.apache.cloudstack.api.ApiConstants;
+import org.apache.cloudstack.api.BaseListCmd;
+import org.apache.cloudstack.api.IdentityMapper;
+import org.apache.cloudstack.api.Implementation;
+import org.apache.cloudstack.api.Parameter;
+import com.cloud.api.response.HypervisorCapabilitiesResponse;
+import com.cloud.api.response.ListResponse;
+import com.cloud.hypervisor.Hypervisor.HypervisorType;
+import com.cloud.hypervisor.HypervisorCapabilities;
+import com.cloud.utils.Pair;
+
+@Implementation(description="Lists all hypervisor capabilities.", responseObject=HypervisorCapabilitiesResponse.class, since="3.0.0")
+public class ListHypervisorCapabilitiesCmd extends BaseListCmd {
+ public static final Logger s_logger = Logger.getLogger(ListHypervisorCapabilitiesCmd.class.getName());
+
+ private static final String s_name = "listhypervisorcapabilitiesresponse";
+
+ /////////////////////////////////////////////////////
+ //////////////// API parameters /////////////////////
+ /////////////////////////////////////////////////////
+
+ @IdentityMapper(entityTableName="hypervisor_capabilities")
+ @Parameter(name=ApiConstants.ID, type=CommandType.LONG, description="ID of the hypervisor capability")
+ private Long id;
+
+ @Parameter(name=ApiConstants.HYPERVISOR, type=CommandType.STRING, description="the hypervisor for which to restrict the search")
+ private String hypervisor;
+
+
+ /////////////////////////////////////////////////////
+ /////////////////// Accessors ///////////////////////
+ /////////////////////////////////////////////////////
+
+ public Long getId() {
+ return id;
+ }
+
+ public HypervisorType getHypervisor() {
+ if(hypervisor != null){
+ return HypervisorType.getType(hypervisor);
+ }else{
+ return null;
+ }
+ }
+
+ /////////////////////////////////////////////////////
+ /////////////// API Implementation///////////////////
+ /////////////////////////////////////////////////////
+
+ @Override
+ public String getCommandName() {
+ return s_name;
+ }
+
+ @Override
+ public void execute(){
+ Pair<List<? extends HypervisorCapabilities>, Integer> hpvCapabilities = _mgr.listHypervisorCapabilities(getId(),
+ getHypervisor(), getKeyword(), this.getStartIndex(), this.getPageSizeVal());
+ ListResponse<HypervisorCapabilitiesResponse> response = new ListResponse<HypervisorCapabilitiesResponse>();
+ List<HypervisorCapabilitiesResponse> hpvCapabilitiesResponses = new ArrayList<HypervisorCapabilitiesResponse>();
+ for (HypervisorCapabilities capability : hpvCapabilities.first()) {
+ HypervisorCapabilitiesResponse hpvCapabilityResponse = _responseGenerator.createHypervisorCapabilitiesResponse(capability);
+ hpvCapabilityResponse.setObjectName("hypervisorCapabilities");
+ hpvCapabilitiesResponses.add(hpvCapabilityResponse);
+ }
+
+ response.setResponses(hpvCapabilitiesResponses, hpvCapabilities.second());
+ response.setResponseName(getCommandName());
+ this.setResponseObject(response);
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/ecc82493/api/src/org/apache/cloudstack/api/admin/config/command/UpdateCfgCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/admin/config/command/UpdateCfgCmd.java b/api/src/org/apache/cloudstack/api/admin/config/command/UpdateCfgCmd.java
new file mode 100644
index 0000000..62d4011
--- /dev/null
+++ b/api/src/org/apache/cloudstack/api/admin/config/command/UpdateCfgCmd.java
@@ -0,0 +1,82 @@
+// 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.admin.config.command;
+
+import org.apache.log4j.Logger;
+
+import org.apache.cloudstack.api.ApiConstants;
+import org.apache.cloudstack.api.BaseCmd;
+import org.apache.cloudstack.api.Implementation;
+import org.apache.cloudstack.api.Parameter;
+import org.apache.cloudstack.api.ServerApiException;
+import com.cloud.api.response.ConfigurationResponse;
+import com.cloud.configuration.Configuration;
+import com.cloud.user.Account;
+
+@Implementation(description="Updates a configuration.", responseObject=ConfigurationResponse.class)
+public class UpdateCfgCmd extends BaseCmd {
+ public static final Logger s_logger = Logger.getLogger(UpdateCfgCmd.class.getName());
+ private static final String s_name = "updateconfigurationresponse";
+
+ /////////////////////////////////////////////////////
+ //////////////// API parameters /////////////////////
+ /////////////////////////////////////////////////////
+
+ @Parameter(name=ApiConstants.NAME, type=CommandType.STRING, required=true, description="the name of the configuration")
+ private String cfgName;
+
+ @Parameter(name=ApiConstants.VALUE, type=CommandType.STRING, description="the value of the configuration", length=4095)
+ private String value;
+
+ /////////////////////////////////////////////////////
+ /////////////////// Accessors ///////////////////////
+ /////////////////////////////////////////////////////
+
+ public String getCfgName() {
+ return cfgName;
+ }
+
+ public String getValue() {
+ return value;
+ }
+
+ /////////////////////////////////////////////////////
+ /////////////// API Implementation///////////////////
+ /////////////////////////////////////////////////////
+
+ @Override
+ public String getCommandName() {
+ return s_name;
+ }
+
+ @Override
+ public long getEntityOwnerId() {
+ return Account.ACCOUNT_ID_SYSTEM;
+ }
+
+ @Override
+ public void execute(){
+ Configuration cfg = _configService.updateConfiguration(this);
+ if (cfg != null) {
+ ConfigurationResponse response = _responseGenerator.createConfigurationResponse(cfg);
+ response.setResponseName(getCommandName());
+ this.setResponseObject(response);
+ } else {
+ throw new ServerApiException(BaseCmd.INTERNAL_ERROR, "Failed to update config");
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/ecc82493/api/src/org/apache/cloudstack/api/admin/config/command/UpdateHypervisorCapabilitiesCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/admin/config/command/UpdateHypervisorCapabilitiesCmd.java b/api/src/org/apache/cloudstack/api/admin/config/command/UpdateHypervisorCapabilitiesCmd.java
new file mode 100644
index 0000000..47a9980
--- /dev/null
+++ b/api/src/org/apache/cloudstack/api/admin/config/command/UpdateHypervisorCapabilitiesCmd.java
@@ -0,0 +1,96 @@
+// 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.admin.config.command;
+
+import org.apache.log4j.Logger;
+
+import org.apache.cloudstack.api.ApiConstants;
+import org.apache.cloudstack.api.BaseCmd;
+import org.apache.cloudstack.api.IdentityMapper;
+import org.apache.cloudstack.api.Implementation;
+import org.apache.cloudstack.api.Parameter;
+import org.apache.cloudstack.api.ServerApiException;
+import com.cloud.api.response.HypervisorCapabilitiesResponse;
+import com.cloud.api.response.ServiceOfferingResponse;
+import com.cloud.hypervisor.HypervisorCapabilities;
+import com.cloud.user.Account;
+
+
+@Implementation(description="Updates a hypervisor capabilities.", responseObject=ServiceOfferingResponse.class, since="3.0.0")
+public class UpdateHypervisorCapabilitiesCmd extends BaseCmd {
+ public static final Logger s_logger = Logger.getLogger(UpdateHypervisorCapabilitiesCmd.class.getName());
+ private static final String s_name = "updatehypervisorcapabilitiesresponse";
+
+ /////////////////////////////////////////////////////
+ //////////////// API parameters /////////////////////
+ /////////////////////////////////////////////////////
+
+ @IdentityMapper(entityTableName="hypervisor_capabilities")
+ @Parameter(name=ApiConstants.ID, type=CommandType.LONG, description="ID of the hypervisor capability")
+ private Long id;
+
+ @Parameter(name=ApiConstants.SECURITY_GROUP_EANBLED, type=CommandType.BOOLEAN, description="set true to enable security group for this hypervisor.")
+ private Boolean securityGroupEnabled;
+
+ @Parameter(name=ApiConstants.MAX_GUESTS_LIMIT, type=CommandType.LONG, description="the max number of Guest VMs per host for this hypervisor.")
+ private Long maxGuestsLimit;
+
+ /////////////////////////////////////////////////////
+ /////////////////// Accessors ///////////////////////
+ /////////////////////////////////////////////////////
+
+ public Boolean getSecurityGroupEnabled() {
+ return securityGroupEnabled;
+ }
+
+ public Long getId() {
+ return id;
+ }
+
+ public Long getMaxGuestsLimit() {
+ return maxGuestsLimit;
+ }
+
+
+
+ /////////////////////////////////////////////////////
+ /////////////// API Implementation///////////////////
+ /////////////////////////////////////////////////////
+
+
+ @Override
+ public String getCommandName() {
+ return s_name;
+ }
+
+ @Override
+ public long getEntityOwnerId() {
+ return Account.ACCOUNT_ID_SYSTEM;
+ }
+
+ @Override
+ public void execute(){
+ HypervisorCapabilities result = _mgr.updateHypervisorCapabilities(getId(), getMaxGuestsLimit(), getSecurityGroupEnabled());
+ if (result != null){
+ HypervisorCapabilitiesResponse response = _responseGenerator.createHypervisorCapabilitiesResponse(result);
+ response.setResponseName(getCommandName());
+ this.setResponseObject(response);
+ } else {
+ throw new ServerApiException(BaseCmd.INTERNAL_ERROR, "Failed to update hypervisor capabilities");
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/ecc82493/api/src/org/apache/cloudstack/api/user/config/command/ListCapabilitiesCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/user/config/command/ListCapabilitiesCmd.java b/api/src/org/apache/cloudstack/api/user/config/command/ListCapabilitiesCmd.java
new file mode 100644
index 0000000..3b235ee
--- /dev/null
+++ b/api/src/org/apache/cloudstack/api/user/config/command/ListCapabilitiesCmd.java
@@ -0,0 +1,59 @@
+// 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.user.config.command;
+
+import java.util.Map;
+
+import org.apache.log4j.Logger;
+
+import org.apache.cloudstack.api.BaseCmd;
+import org.apache.cloudstack.api.Implementation;
+import com.cloud.api.response.CapabilitiesResponse;
+import com.cloud.user.Account;
+
+@Implementation(description="Lists capabilities", responseObject=CapabilitiesResponse.class)
+public class ListCapabilitiesCmd extends BaseCmd {
+ public static final Logger s_logger = Logger.getLogger(ListCapabilitiesCmd.class.getName());
+
+ private static final String s_name = "listcapabilitiesresponse";
+
+ @Override
+ public String getCommandName() {
+ return s_name;
+ }
+
+ @Override
+ public long getEntityOwnerId() {
+ return Account.ACCOUNT_ID_SYSTEM;
+ }
+
+ @Override
+ public void execute(){
+ Map<String, Object> capabilities = _mgr.listCapabilities(this);
+ CapabilitiesResponse response = new CapabilitiesResponse();
+ response.setSecurityGroupsEnabled((Boolean)capabilities.get("securityGroupsEnabled"));
+ response.setCloudStackVersion((String)capabilities.get("cloudStackVersion"));
+ response.setUserPublicTemplateEnabled((Boolean)capabilities.get("userPublicTemplateEnabled"));
+ response.setSupportELB((String)capabilities.get("supportELB"));
+ response.setProjectInviteRequired((Boolean)capabilities.get("projectInviteRequired"));
+ response.setAllowUsersCreateProjects((Boolean)capabilities.get("allowusercreateprojects"));
+ response.setDiskOffMaxSize((Long)capabilities.get("customDiskOffMaxSize"));
+ response.setObjectName("capability");
+ response.setResponseName(getCommandName());
+ this.setResponseObject(response);
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/ecc82493/api/src/org/apache/cloudstack/api/user/resource/command/ListCapabilitiesCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/user/resource/command/ListCapabilitiesCmd.java b/api/src/org/apache/cloudstack/api/user/resource/command/ListCapabilitiesCmd.java
deleted file mode 100644
index 7fd69c7..0000000
--- a/api/src/org/apache/cloudstack/api/user/resource/command/ListCapabilitiesCmd.java
+++ /dev/null
@@ -1,59 +0,0 @@
-// 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.user.resource.command;
-
-import java.util.Map;
-
-import org.apache.log4j.Logger;
-
-import org.apache.cloudstack.api.BaseCmd;
-import org.apache.cloudstack.api.Implementation;
-import com.cloud.api.response.CapabilitiesResponse;
-import com.cloud.user.Account;
-
-@Implementation(description="Lists capabilities", responseObject=CapabilitiesResponse.class)
-public class ListCapabilitiesCmd extends BaseCmd {
- public static final Logger s_logger = Logger.getLogger(ListCapabilitiesCmd.class.getName());
-
- private static final String s_name = "listcapabilitiesresponse";
-
- @Override
- public String getCommandName() {
- return s_name;
- }
-
- @Override
- public long getEntityOwnerId() {
- return Account.ACCOUNT_ID_SYSTEM;
- }
-
- @Override
- public void execute(){
- Map<String, Object> capabilities = _mgr.listCapabilities(this);
- CapabilitiesResponse response = new CapabilitiesResponse();
- response.setSecurityGroupsEnabled((Boolean)capabilities.get("securityGroupsEnabled"));
- response.setCloudStackVersion((String)capabilities.get("cloudStackVersion"));
- response.setUserPublicTemplateEnabled((Boolean)capabilities.get("userPublicTemplateEnabled"));
- response.setSupportELB((String)capabilities.get("supportELB"));
- response.setProjectInviteRequired((Boolean)capabilities.get("projectInviteRequired"));
- response.setAllowUsersCreateProjects((Boolean)capabilities.get("allowusercreateprojects"));
- response.setDiskOffMaxSize((Long)capabilities.get("customDiskOffMaxSize"));
- response.setObjectName("capability");
- response.setResponseName(getCommandName());
- this.setResponseObject(response);
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/ecc82493/client/tomcatconf/commands.properties.in
----------------------------------------------------------------------
diff --git a/client/tomcatconf/commands.properties.in b/client/tomcatconf/commands.properties.in
index 822d344..a00118e 100755
--- a/client/tomcatconf/commands.properties.in
+++ b/client/tomcatconf/commands.properties.in
@@ -196,11 +196,11 @@ migrateSystemVm=org.apache.cloudstack.api.admin.systemvm.command.MigrateSystemVM
changeServiceForSystemVm=org.apache.cloudstack.api.admin.systemvm.command.UpgradeSystemVMCmd;1
#### configuration commands
-updateConfiguration=com.cloud.api.commands.UpdateCfgCmd;1
-listConfigurations=com.cloud.api.commands.ListCfgsByCmd;1
+updateConfiguration=org.apache.cloudstack.api.admin.config.command.UpdateCfgCmd;1
+listConfigurations=org.apache.cloudstack.api.admin.config.command.ListCfgsByCmd;1
ldapConfig=com.cloud.api.commands.LDAPConfigCmd;1
ldapRemove=com.cloud.api.commands.LDAPRemoveCmd;1
-listCapabilities=org.apache.cloudstack.api.user.resource.command.ListCapabilitiesCmd;15
+listCapabilities=org.apache.cloudstack.api.user.config.command.ListCapabilitiesCmd;15
#### pod commands
createPod=com.cloud.api.commands.CreatePodCmd;1
@@ -341,8 +341,8 @@ deleteFirewallRule=org.apache.cloudstack.api.user.firewall.command.DeleteFirewal
listFirewallRules=org.apache.cloudstack.api.user.firewall.command.ListFirewallRulesCmd;15
#### hypervisor capabilities commands
-updateHypervisorCapabilities=com.cloud.api.commands.UpdateHypervisorCapabilitiesCmd;1
-listHypervisorCapabilities=com.cloud.api.commands.ListHypervisorCapabilitiesCmd;1
+updateHypervisorCapabilities=org.apache.cloudstack.api.admin.config.command.UpdateHypervisorCapabilitiesCmd;1
+listHypervisorCapabilities=org.apache.cloudstack.api.admin.config.command.ListHypervisorCapabilitiesCmd;1
#### Physical Network commands
createPhysicalNetwork=org.apache.cloudstack.api.admin.network.command.CreatePhysicalNetworkCmd;1
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/ecc82493/server/src/com/cloud/configuration/ConfigurationManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/configuration/ConfigurationManagerImpl.java b/server/src/com/cloud/configuration/ConfigurationManagerImpl.java
index f3b1e2f..ac5ac68 100755
--- a/server/src/com/cloud/configuration/ConfigurationManagerImpl.java
+++ b/server/src/com/cloud/configuration/ConfigurationManagerImpl.java
@@ -38,6 +38,7 @@ import javax.naming.NamingException;
import javax.naming.directory.DirContext;
import javax.naming.directory.InitialDirContext;
+import org.apache.cloudstack.api.admin.config.command.UpdateCfgCmd;
import org.apache.cloudstack.api.admin.network.command.DeleteNetworkOfferingCmd;
import org.apache.cloudstack.api.admin.network.command.UpdateNetworkOfferingCmd;
import org.apache.cloudstack.api.admin.zone.command.CreateZoneCmd;
@@ -60,7 +61,6 @@ import org.apache.cloudstack.api.admin.zone.command.DeleteZoneCmd;
import com.cloud.api.commands.LDAPConfigCmd;
import com.cloud.api.commands.LDAPRemoveCmd;
import org.apache.cloudstack.api.user.network.command.ListNetworkOfferingsCmd;
-import com.cloud.api.commands.UpdateCfgCmd;
import com.cloud.api.commands.UpdateDiskOfferingCmd;
import com.cloud.api.commands.UpdatePodCmd;
import com.cloud.api.commands.UpdateServiceOfferingCmd;
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/ecc82493/server/src/com/cloud/server/ManagementServerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/server/ManagementServerImpl.java b/server/src/com/cloud/server/ManagementServerImpl.java
index ecaa8cb..ec4b580 100755
--- a/server/src/com/cloud/server/ManagementServerImpl.java
+++ b/server/src/com/cloud/server/ManagementServerImpl.java
@@ -42,8 +42,9 @@ import java.util.concurrent.TimeUnit;
import javax.crypto.Mac;
import javax.crypto.spec.SecretKeySpec;
+import org.apache.cloudstack.api.admin.config.command.ListCfgsByCmd;
import org.apache.cloudstack.api.admin.router.command.ListRoutersCmd;
-import org.apache.cloudstack.api.user.resource.command.ListCapabilitiesCmd;
+import org.apache.cloudstack.api.user.config.command.ListCapabilitiesCmd;
import org.apache.cloudstack.api.user.guest.command.ListGuestOsCategoriesCmd;
import org.apache.cloudstack.api.user.guest.command.ListGuestOsCmd;
import org.apache.cloudstack.api.user.iso.command.ListIsosCmd;
@@ -78,7 +79,6 @@ import org.apache.cloudstack.api.user.volume.command.ExtractVolumeCmd;
import org.apache.cloudstack.api.user.vm.command.GetVMPasswordCmd;
import com.cloud.api.commands.ListAlertsCmd;
import com.cloud.api.commands.ListCapacityCmd;
-import com.cloud.api.commands.ListCfgsByCmd;
import com.cloud.api.commands.ListClustersCmd;
import org.apache.cloudstack.api.user.event.command.ListEventsCmd;
import org.apache.cloudstack.api.admin.host.command.ListHostsCmd;
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/ecc82493/server/test/com/cloud/vpc/MockConfigurationManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/test/com/cloud/vpc/MockConfigurationManagerImpl.java b/server/test/com/cloud/vpc/MockConfigurationManagerImpl.java
index 1fd10d0..e77536e 100644
--- a/server/test/com/cloud/vpc/MockConfigurationManagerImpl.java
+++ b/server/test/com/cloud/vpc/MockConfigurationManagerImpl.java
@@ -25,6 +25,7 @@ import javax.naming.ConfigurationException;
import javax.naming.NamingException;
import com.cloud.api.commands.CreateDiskOfferingCmd;
+import org.apache.cloudstack.api.admin.config.command.UpdateCfgCmd;
import org.apache.cloudstack.api.admin.network.command.CreateNetworkOfferingCmd;
import com.cloud.api.commands.CreateServiceOfferingCmd;
import com.cloud.api.commands.CreateVlanIpRangeCmd;
@@ -39,7 +40,6 @@ import com.cloud.api.commands.LDAPConfigCmd;
import com.cloud.api.commands.LDAPRemoveCmd;
import org.apache.cloudstack.api.admin.zone.command.UpdateZoneCmd;
import org.apache.cloudstack.api.user.network.command.ListNetworkOfferingsCmd;
-import com.cloud.api.commands.UpdateCfgCmd;
import com.cloud.api.commands.UpdateDiskOfferingCmd;
import org.apache.cloudstack.api.admin.network.command.UpdateNetworkOfferingCmd;
import com.cloud.api.commands.UpdatePodCmd;