cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mlsoren...@apache.org
Subject [29/52] [partial] Summary: Fixes for api_refactoring
Date Thu, 10 Jan 2013 00:48:36 GMT
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/c4c9d2d8/api/src/com/cloud/api/commands/UpdateVMCmd.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/api/commands/UpdateVMCmd.java b/api/src/com/cloud/api/commands/UpdateVMCmd.java
deleted file mode 100644
index 462fe19..0000000
--- a/api/src/com/cloud/api/commands/UpdateVMCmd.java
+++ /dev/null
@@ -1,131 +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 com.cloud.api.ApiConstants;
-import com.cloud.api.BaseCmd;
-import com.cloud.api.IdentityMapper;
-import com.cloud.api.Implementation;
-import com.cloud.api.Parameter;
-import com.cloud.api.ServerApiException;
-import com.cloud.api.response.UserVmResponse;
-import com.cloud.exception.InsufficientCapacityException;
-import com.cloud.exception.ResourceUnavailableException;
-import com.cloud.user.Account;
-import com.cloud.user.UserContext;
-import com.cloud.uservm.UserVm;
-
-
-@Implementation(description="Updates properties of a virtual machine. The VM has to be stopped and restarted for the " +
-        "new properties to take effect. UpdateVirtualMachine does not first check whether the VM is stopped. " +
-        "Therefore, stop the VM manually before issuing this call.", responseObject=UserVmResponse.class)
-public class UpdateVMCmd extends BaseCmd{
-    public static final Logger s_logger = Logger.getLogger(UpdateVMCmd.class.getName());
-    private static final String s_name = "updatevirtualmachineresponse";
-
-    /////////////////////////////////////////////////////
-    //////////////// API parameters /////////////////////
-    /////////////////////////////////////////////////////
-
-    @Parameter(name=ApiConstants.DISPLAY_NAME, type=CommandType.STRING, description="user generated name")
-    private String displayName;
-
-    @Parameter(name=ApiConstants.GROUP, type=CommandType.STRING, description="group of the virtual machine")
-    private String group;
-
-    @Parameter(name=ApiConstants.HA_ENABLE, type=CommandType.BOOLEAN, description="true if high-availability is enabled for the virtual machine, false otherwise")
-    private Boolean haEnable;
-
-    @IdentityMapper(entityTableName="vm_instance")
-    @Parameter(name=ApiConstants.ID, type=CommandType.LONG, required=true, description="The ID of the virtual machine")
-    private Long id;
-    
-    @IdentityMapper(entityTableName="guest_os")
-    @Parameter(name=ApiConstants.OS_TYPE_ID, type=CommandType.LONG, description="the ID of the OS type that best represents this VM.")
-    private Long osTypeId;
-    
-    @Parameter(name=ApiConstants.USER_DATA, type=CommandType.STRING, description="an optional binary data that can be sent to the virtual machine upon a successful deployment. This binary data must be base64 encoded before adding it to the request. Currently only HTTP GET is supported. Using HTTP GET (via querystring), you can send up to 2KB of data after base64 encoding.", length=2048)
-    private String userData;
-    
-
-    /////////////////////////////////////////////////////
-    /////////////////// Accessors ///////////////////////
-    /////////////////////////////////////////////////////
-
-    public String getDisplayName() {
-        return displayName;
-    }
-
-    public String getGroup() {
-        return group;
-    }
-
-    public Boolean getHaEnable() {
-        return haEnable;
-    }
-
-    public Long getId() {
-        return id;
-    }
-    
-    public String getUserData() {
-        return userData;
-    }
-
-    /////////////////////////////////////////////////////
-    /////////////// API Implementation///////////////////
-    /////////////////////////////////////////////////////
-
-    public Long getOsTypeId() {
-        return osTypeId;
-    }
-
-    @Override
-    public String getCommandName() {
-        return s_name;
-    }
-    
-    public static String getResultObjectName() {
-    	return "virtualmachine";
-    }
-    
-    @Override
-    public long getEntityOwnerId() {
-        UserVm userVm = _entityMgr.findById(UserVm.class, getId());
-        if (userVm != null) {
-            return userVm.getAccountId();
-        }
-
-        return Account.ACCOUNT_ID_SYSTEM; // no account info given, parent this command to SYSTEM so ERROR events are tracked
-    }
-
-    @Override
-    public void execute() throws ResourceUnavailableException,
-            InsufficientCapacityException, ServerApiException {
-        UserContext.current().setEventDetails("Vm Id: "+getId());
-        UserVm result = _userVmService.updateVirtualMachine(this);
-        if (result != null){
-            UserVmResponse response = _responseGenerator.createUserVmResponse("virtualmachine", result).get(0);
-            response.setResponseName(getCommandName());
-            this.setResponseObject(response);
-        } else {
-            throw new ServerApiException(BaseCmd.INTERNAL_ERROR, "Failed to update vm");
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/c4c9d2d8/api/src/com/cloud/api/commands/UpdateVMGroupCmd.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/api/commands/UpdateVMGroupCmd.java b/api/src/com/cloud/api/commands/UpdateVMGroupCmd.java
deleted file mode 100644
index 27057d4..0000000
--- a/api/src/com/cloud/api/commands/UpdateVMGroupCmd.java
+++ /dev/null
@@ -1,90 +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 com.cloud.api.ApiConstants;
-import com.cloud.api.BaseCmd;
-import com.cloud.api.IdentityMapper;
-import com.cloud.api.Implementation;
-import com.cloud.api.Parameter;
-import com.cloud.api.ServerApiException;
-import com.cloud.api.response.InstanceGroupResponse;
-import com.cloud.user.Account;
-import com.cloud.vm.InstanceGroup;
-
-@Implementation(description="Updates a vm group", responseObject=InstanceGroupResponse.class)
-public class UpdateVMGroupCmd extends BaseCmd{
-
-    private static final String s_name = "updateinstancegroupresponse";
-    public static final Logger s_logger = Logger.getLogger(UpdateVMGroupCmd.class.getName());
-
-    /////////////////////////////////////////////////////
-    //////////////// API parameters /////////////////////
-    /////////////////////////////////////////////////////
-
-	@IdentityMapper(entityTableName="instance_group")
-    @Parameter(name=ApiConstants.ID, type=CommandType.LONG, required=true, description="Instance group ID")
-    private Long id;
-
-    @Parameter(name=ApiConstants.NAME, type=CommandType.STRING, description="new instance group name")
-    private String groupName;
-
-    /////////////////////////////////////////////////////
-    /////////////////// Accessors ///////////////////////
-    /////////////////////////////////////////////////////
-
-    public Long getId() {
-        return id;
-    }
-
-    public String getGroupName() {
-        return groupName;
-    }
-
-    /////////////////////////////////////////////////////
-    /////////////// API Implementation///////////////////
-    /////////////////////////////////////////////////////
-
-    @Override
-    public String getCommandName() {
-        return s_name;
-    }
-    
-    @Override
-    public long getEntityOwnerId() {
-        InstanceGroup group = _entityMgr.findById(InstanceGroup.class, getId());
-        if (group != null) {
-            return group.getAccountId();
-        }
-
-        return Account.ACCOUNT_ID_SYSTEM; // no account info given, parent this command to SYSTEM so ERROR events are tracked
-    }
-
-    @Override
-    public void execute(){
-        InstanceGroup result = _mgr.updateVmGroup(this);
-        if (result != null){
-            InstanceGroupResponse response = _responseGenerator.createInstanceGroupResponse(result);
-            response.setResponseName(getCommandName());
-            this.setResponseObject(response);
-        } else {
-            throw new ServerApiException(BaseCmd.INTERNAL_ERROR, "Failed to update vm instance group");
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/c4c9d2d8/api/src/com/cloud/api/commands/UpdateVPCCmd.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/api/commands/UpdateVPCCmd.java b/api/src/com/cloud/api/commands/UpdateVPCCmd.java
deleted file mode 100644
index 0331be6..0000000
--- a/api/src/com/cloud/api/commands/UpdateVPCCmd.java
+++ /dev/null
@@ -1,109 +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 com.cloud.api.ApiConstants;
-import com.cloud.api.BaseAsyncCmd;
-import com.cloud.api.BaseCmd;
-import com.cloud.api.IdentityMapper;
-import com.cloud.api.Implementation;
-import com.cloud.api.Parameter;
-import com.cloud.api.ServerApiException;
-import com.cloud.api.response.VpcResponse;
-import com.cloud.event.EventTypes;
-import com.cloud.network.vpc.Vpc;
-import com.cloud.user.Account;
-
-@Implementation(description="Updates a VPC", responseObject=VpcResponse.class)
-public class UpdateVPCCmd extends BaseAsyncCmd{
-    public static final Logger s_logger = Logger.getLogger(UpdateVPCCmd.class.getName());
-    private static final String _name = "updatevpcresponse";
-
-    /////////////////////////////////////////////////////
-    //////////////// API parameters /////////////////////
-    /////////////////////////////////////////////////////
-    
-    @IdentityMapper(entityTableName="vpc")
-    @Parameter(name=ApiConstants.ID, type=CommandType.LONG, description="the id of the VPC")
-    private Long id;
-
-    @Parameter(name=ApiConstants.NAME, type=CommandType.STRING, description="the name of the VPC")
-    private String vpcName;
-    
-    @Parameter(name=ApiConstants.DISPLAY_TEXT, type=CommandType.STRING, description="the display text of the VPC")
-    private String displayText;
-
-
-    /////////////////////////////////////////////////////
-    /////////////////// Accessors ///////////////////////
-    /////////////////////////////////////////////////////
-    
-    public String getVpcName() {
-        return vpcName;
-    }
-    
-    public String getDisplayText() {
-        return displayText;
-    }
-    
-    public Long getId() {
-        return id;
-    }
-    
-
-    /////////////////////////////////////////////////////
-    /////////////// API Implementation///////////////////
-    /////////////////////////////////////////////////////
-    @Override
-    public String getCommandName() {
-        return _name;
-    }
-    
-    @Override
-    public long getEntityOwnerId() {
-        Vpc vpc = _entityMgr.findById(Vpc.class, getId());
-        if (vpc != null) {
-            return vpc.getAccountId();
-        }
-
-        return Account.ACCOUNT_ID_SYSTEM; // no account info given, parent this command to SYSTEM so ERROR events are tracked
-    }
-
-    @Override
-    public void execute(){
-        Vpc result = _vpcService.updateVpc(getId(), getVpcName(), getDisplayText());
-        if (result != null) {
-            VpcResponse response = _responseGenerator.createVpcResponse(result);
-            response.setResponseName(getCommandName());
-            this.setResponseObject(response);
-        } else {
-            throw new ServerApiException(BaseCmd.INTERNAL_ERROR, "Failed to update VPC");
-        }
-    }
-
-    @Override
-    public String getEventType() {
-        return EventTypes.EVENT_VPC_UPDATE;
-    }
-
-    @Override
-    public String getEventDescription() {
-        return "updating VPC id=" + getId();
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/c4c9d2d8/api/src/com/cloud/api/commands/UpdateVPCOfferingCmd.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/api/commands/UpdateVPCOfferingCmd.java b/api/src/com/cloud/api/commands/UpdateVPCOfferingCmd.java
deleted file mode 100644
index 77f2c03..0000000
--- a/api/src/com/cloud/api/commands/UpdateVPCOfferingCmd.java
+++ /dev/null
@@ -1,111 +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 com.cloud.api.ApiConstants;
-import com.cloud.api.BaseAsyncCmd;
-import com.cloud.api.BaseCmd;
-import com.cloud.api.IdentityMapper;
-import com.cloud.api.Implementation;
-import com.cloud.api.Parameter;
-import com.cloud.api.ServerApiException;
-import com.cloud.api.response.VpcOfferingResponse;
-import com.cloud.event.EventTypes;
-import com.cloud.network.vpc.VpcOffering;
-import com.cloud.user.Account;
-
-@Implementation(description="Updates VPC offering", responseObject=VpcOfferingResponse.class)
-public class UpdateVPCOfferingCmd extends BaseAsyncCmd{
-    public static final Logger s_logger = Logger.getLogger(UpdateVPCOfferingCmd.class.getName());
-    private static final String _name = "updatevpcofferingresponse";
-
-    /////////////////////////////////////////////////////
-    //////////////// API parameters /////////////////////
-    /////////////////////////////////////////////////////
-    
-    @IdentityMapper(entityTableName="vpc_offerings")
-    @Parameter(name=ApiConstants.ID, type=CommandType.LONG, description="the id of the VPC offering")
-    private Long id;
-
-    @Parameter(name=ApiConstants.NAME, type=CommandType.STRING, description="the name of the VPC offering")
-    private String vpcOffName;
-    
-    @Parameter(name=ApiConstants.DISPLAY_TEXT, type=CommandType.STRING, description="the display text of the VPC offering")
-    private String displayText;
-   
-    @Parameter(name=ApiConstants.STATE, type=CommandType.STRING, description="update state for the VPC offering; " +
-    		"supported states - Enabled/Disabled")
-    private String state;
-
-    /////////////////////////////////////////////////////
-    /////////////////// Accessors ///////////////////////
-    /////////////////////////////////////////////////////
-    
-    public String getVpcOfferingName() {
-        return vpcOffName;
-    }
-    
-    public String getDisplayText() {
-        return displayText;
-    }
-    
-    public Long getId() {
-        return id;
-    }
-
-    public String getState() {
-        return state;
-    }
-    
-
-    /////////////////////////////////////////////////////
-    /////////////// API Implementation///////////////////
-    /////////////////////////////////////////////////////
-    @Override
-    public String getCommandName() {
-        return _name;
-    }
-    
-    @Override
-    public long getEntityOwnerId() {
-        return Account.ACCOUNT_ID_SYSTEM;
-    }
-
-    @Override
-    public void execute(){
-        VpcOffering result = _vpcService.updateVpcOffering(getId(), getVpcOfferingName(), getDisplayText(), getState());
-        if (result != null) {
-            VpcOfferingResponse response = _responseGenerator.createVpcOfferingResponse(result);
-            response.setResponseName(getCommandName());
-            this.setResponseObject(response);
-        } else {
-            throw new ServerApiException(BaseCmd.INTERNAL_ERROR, "Failed to update VPC offering");
-        }
-    }
-
-    @Override
-    public String getEventType() {
-        return EventTypes.EVENT_VPC_OFFERING_UPDATE;
-    }
-
-    @Override
-    public String getEventDescription() {
-        return "Updating VPC offering id=" + getId();
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/c4c9d2d8/api/src/com/cloud/api/commands/UpdateVpnCustomerGatewayCmd.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/api/commands/UpdateVpnCustomerGatewayCmd.java b/api/src/com/cloud/api/commands/UpdateVpnCustomerGatewayCmd.java
deleted file mode 100644
index 491c1f6..0000000
--- a/api/src/com/cloud/api/commands/UpdateVpnCustomerGatewayCmd.java
+++ /dev/null
@@ -1,170 +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 com.cloud.api.ApiConstants;
-import com.cloud.api.BaseAsyncCmd;
-import com.cloud.api.BaseCmd;
-import com.cloud.api.IdentityMapper;
-import com.cloud.api.Implementation;
-import com.cloud.api.Parameter;
-import com.cloud.api.ServerApiException;
-import com.cloud.api.response.Site2SiteCustomerGatewayResponse;
-import com.cloud.event.EventTypes;
-import com.cloud.network.Site2SiteCustomerGateway;
-import com.cloud.user.Account;
-import com.cloud.user.UserContext;
-
-@Implementation(description="Update site to site vpn customer gateway", responseObject=Site2SiteCustomerGatewayResponse.class)
-public class UpdateVpnCustomerGatewayCmd extends BaseAsyncCmd {
-    public static final Logger s_logger = Logger.getLogger(UpdateVpnCustomerGatewayCmd.class.getName());
-
-    private static final String s_name = "updatevpncustomergatewayresponse";
-
-    /////////////////////////////////////////////////////
-    //////////////// API parameters /////////////////////
-    /////////////////////////////////////////////////////
-    @IdentityMapper(entityTableName="s2s_customer_gateway")
-    @Parameter(name=ApiConstants.ID, type=CommandType.LONG, required=true, description="id of customer gateway")
-    private Long id;
-    
-    @Parameter(name=ApiConstants.NAME, type=CommandType.STRING, required=false, description="name of this customer gateway")
-    private String name;
-    
-    @Parameter(name=ApiConstants.GATEWAY, type=CommandType.STRING, required=true, description="public ip address id of the customer gateway")
-    private String gatewayIp;
-
-    @Parameter(name=ApiConstants.CIDR_LIST, type=CommandType.STRING, required=true, description="guest cidr of the customer gateway")
-    private String guestCidrList;
-
-    @Parameter(name=ApiConstants.IPSEC_PSK, type=CommandType.STRING, required=true, description="IPsec Preshared-Key of the customer gateway")
-    private String ipsecPsk;
-
-    @Parameter(name=ApiConstants.IKE_POLICY, type=CommandType.STRING, required=true, description="IKE policy of the customer gateway")
-    private String ikePolicy;
-
-    @Parameter(name=ApiConstants.ESP_POLICY, type=CommandType.STRING, required=true, description="ESP policy of the customer gateway")
-    private String espPolicy;
-
-    @Parameter(name=ApiConstants.IKE_LIFETIME, type=CommandType.LONG, required=false, description="Lifetime of phase 1 VPN connection to the customer gateway, in seconds")
-    private Long ikeLifetime;
-    
-    @Parameter(name=ApiConstants.ESP_LIFETIME, type=CommandType.LONG, required=false, description="Lifetime of phase 2 VPN connection to the customer gateway, in seconds")
-    private Long espLifetime;
-
-    @Parameter(name=ApiConstants.DPD, type=CommandType.BOOLEAN, required=false, description="If DPD is enabled for VPN connection")
-    private Boolean dpd;
-
-    @Parameter(name=ApiConstants.ACCOUNT, type=CommandType.STRING, description="the account associated with the gateway. Must be used with the domainId parameter.")
-    private String accountName;
-    
-    @IdentityMapper(entityTableName="domain")
-    @Parameter(name=ApiConstants.DOMAIN_ID, type=CommandType.LONG, description="the domain ID associated with the gateway. " +
-    		"If used with the account parameter returns the gateway associated with the account for the specified domain.")
-    private Long domainId;
-    
-    /////////////////////////////////////////////////////
-    /////////////////// Accessors ///////////////////////
-    /////////////////////////////////////////////////////
-
-    public String getEntityTable() {
-    	return "s2s_customer_gateway";
-    }
-    
-    public Long getId() {
-        return id;
-    }
-    
-    public String getName() {
-        return name;
-    }
-
-    public String getIpsecPsk() {
-        return ipsecPsk;
-    }
-
-    public String getGuestCidrList() {
-        return guestCidrList;
-    }
-
-    public String getGatewayIp() {
-        return gatewayIp;
-    }
-
-    public String getIkePolicy() {
-        return ikePolicy;
-    }
-
-    public String getEspPolicy() {
-        return espPolicy;
-    }
-
-    public Long getIkeLifetime() {
-        return ikeLifetime;
-    }
-
-    public Long getEspLifetime() {
-        return espLifetime;
-    }
-
-    public Boolean getDpd() {
-        return dpd;
-    }
-
-    /////////////////////////////////////////////////////
-    /////////////// API Implementation///////////////////
-    /////////////////////////////////////////////////////
-
-
-    @Override
-    public String getCommandName() {
-        return s_name;
-    }
-
-	@Override
-	public long getEntityOwnerId() {
-        Long accountId = finalyzeAccountId(accountName, domainId, null, true);
-        if (accountId == null) {
-            accountId = UserContext.current().getCaller().getId();
-        }
-        return accountId;
-    }
-
-	@Override
-	public String getEventDescription() {
-		return "Update site-to-site VPN customer gateway";
-	}
-
-	@Override
-	public String getEventType() {
-		return EventTypes.EVENT_S2S_VPN_CUSTOMER_GATEWAY_UPDATE;
-	}
-	
-    @Override
-    public void execute(){
-        Site2SiteCustomerGateway result = _s2sVpnService.updateCustomerGateway(this);
-        if (result != null) {
-            Site2SiteCustomerGatewayResponse response = _responseGenerator.createSite2SiteCustomerGatewayResponse(result);
-            response.setResponseName(getCommandName());
-            this.setResponseObject(response);
-        } else {
-            throw new ServerApiException(BaseCmd.INTERNAL_ERROR, "Failed to update customer VPN gateway");
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/c4c9d2d8/api/src/com/cloud/api/commands/UpdateZoneCmd.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/api/commands/UpdateZoneCmd.java b/api/src/com/cloud/api/commands/UpdateZoneCmd.java
deleted file mode 100755
index 1fa0f79..0000000
--- a/api/src/com/cloud/api/commands/UpdateZoneCmd.java
+++ /dev/null
@@ -1,174 +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.List;
-import java.util.Map;
-
-import org.apache.log4j.Logger;
-
-import com.cloud.api.ApiConstants;
-import com.cloud.api.BaseCmd;
-import com.cloud.api.IdentityMapper;
-import com.cloud.api.Implementation;
-import com.cloud.api.Parameter;
-import com.cloud.api.ServerApiException;
-import com.cloud.api.response.ZoneResponse;
-import com.cloud.dc.DataCenter;
-import com.cloud.user.Account;
-import com.cloud.user.UserContext;
-
-@Implementation(description="Updates a Zone.", responseObject=ZoneResponse.class)
-public class UpdateZoneCmd extends BaseCmd {
-    public static final Logger s_logger = Logger.getLogger(UpdateZoneCmd.class.getName());
-
-    private static final String s_name = "updatezoneresponse";
-
-    /////////////////////////////////////////////////////
-    //////////////// API parameters /////////////////////
-    /////////////////////////////////////////////////////
-
-    @Parameter(name=ApiConstants.DNS1, type=CommandType.STRING, description="the first DNS for the Zone")
-    private String dns1;
-
-    @Parameter(name=ApiConstants.DNS2, type=CommandType.STRING, description="the second DNS for the Zone")
-    private String dns2;
-
-    @Parameter(name=ApiConstants.GUEST_CIDR_ADDRESS, type=CommandType.STRING, description="the guest CIDR address for the Zone")
-    private String guestCidrAddress;
-
-    @IdentityMapper(entityTableName="data_center")
-    @Parameter(name=ApiConstants.ID, type=CommandType.LONG, required=true, description="the ID of the Zone")
-    private Long id;
-
-    @Parameter(name=ApiConstants.INTERNAL_DNS1, type=CommandType.STRING, description="the first internal DNS for the Zone")
-    private String internalDns1;
-
-    @Parameter(name=ApiConstants.INTERNAL_DNS2, type=CommandType.STRING, description="the second internal DNS for the Zone")
-    private String internalDns2;
-
-    @Parameter(name=ApiConstants.NAME, type=CommandType.STRING, description="the name of the Zone")
-    private String zoneName;
-
-    @Parameter(name=ApiConstants.IS_PUBLIC, type=CommandType.BOOLEAN, description="updates a private zone to public if set, but not vice-versa")
-    private Boolean isPublic;
-    
-    @Parameter(name=ApiConstants.ALLOCATION_STATE, type=CommandType.STRING, description="Allocation state of this cluster for allocation of new resources")
-    private String allocationState;
-    
-    @Parameter(name=ApiConstants.DETAILS, type=CommandType.MAP, description="the details for the Zone")
-    private Map details;
-    
-    @Parameter(name=ApiConstants.DHCP_PROVIDER, type=CommandType.STRING, description="the dhcp Provider for the Zone")
-    private String dhcpProvider;
-    
-    @Parameter(name=ApiConstants.DOMAIN, type=CommandType.STRING, description="Network domain name for the networks in the zone; empty string will update domain with NULL value")
-    private String domain;
-    
-    @Parameter(name=ApiConstants.DNS_SEARCH_ORDER, type=CommandType.LIST, collectionType = CommandType.STRING, description="the dns search order list")
-    private List<String> dnsSearchOrder;   
-
-    @Parameter(name=ApiConstants.LOCAL_STORAGE_ENABLED, type=CommandType.BOOLEAN, description="true if local storage offering enabled, false otherwise")
-    private Boolean localStorageEnabled;
-
-    /////////////////////////////////////////////////////
-    /////////////////// Accessors ///////////////////////
-    /////////////////////////////////////////////////////
-
-    public String getDns1() {
-        return dns1;
-    }
-
-    public String getDns2() {
-        return dns2;
-    }
-
-    public String getGuestCidrAddress() {
-        return guestCidrAddress;
-    }
-
-    public Long getId() {
-        return id;
-    }
-
-    public String getInternalDns1() {
-        return internalDns1;
-    }
-
-    public String getInternalDns2() {
-        return internalDns2;
-    }
-
-    public String getZoneName() {
-        return zoneName;
-    }
-
-    public Boolean isPublic() {
-        return isPublic;
-    }
-    
-    public String getAllocationState() {
-    	return allocationState;
-    }
-    
-    public Map getDetails() {
-        return details;
-    }
-    
-    public String getDhcpProvider() {
-        return dhcpProvider;
-    }
-    
-    public String getDomain() {
-        return domain;
-    }
-
-    public List<String> getDnsSearchOrder() {
-        return dnsSearchOrder;
-    }   
-
-    public Boolean getLocalStorageEnabled() {
-        return localStorageEnabled;
-    }
-
-    /////////////////////////////////////////////////////
-    /////////////// API Implementation///////////////////
-    /////////////////////////////////////////////////////
-
-    @Override
-    public String getCommandName() {
-        return s_name;
-    }
-    
-    @Override
-    public long getEntityOwnerId() {
-        return Account.ACCOUNT_ID_SYSTEM;
-    }
-    
-    @Override
-    public void execute(){
-    	UserContext.current().setEventDetails("Zone Id: "+getId());
-    	DataCenter result = _configService.editZone(this);
-        if (result != null) {
-            ZoneResponse response = _responseGenerator.createZoneResponse(result, false);
-            response.setResponseName(getCommandName());
-            this.setResponseObject(response);
-        } else {
-            throw new ServerApiException(BaseCmd.INTERNAL_ERROR, "Failed to update zone; internal error.");
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/c4c9d2d8/api/src/com/cloud/api/commands/UpgradeRouterCmd.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/api/commands/UpgradeRouterCmd.java b/api/src/com/cloud/api/commands/UpgradeRouterCmd.java
deleted file mode 100644
index a516876..0000000
--- a/api/src/com/cloud/api/commands/UpgradeRouterCmd.java
+++ /dev/null
@@ -1,90 +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 com.cloud.api.ApiConstants;
-import com.cloud.api.BaseCmd;
-import com.cloud.api.IdentityMapper;
-import com.cloud.api.Implementation;
-import com.cloud.api.Parameter;
-import com.cloud.api.ServerApiException;
-import com.cloud.api.response.DomainRouterResponse;
-import com.cloud.network.router.VirtualRouter;
-import com.cloud.user.Account;
-
-@Implementation(description="Upgrades domain router to a new service offering", responseObject=DomainRouterResponse.class)
-public class UpgradeRouterCmd extends BaseCmd {
-	public static final Logger s_logger = Logger.getLogger(UpgradeRouterCmd.class.getName());
-	private static final String s_name = "changeserviceforrouterresponse";
-
-    /////////////////////////////////////////////////////
-    //////////////// API parameters /////////////////////
-    /////////////////////////////////////////////////////
-
-    @IdentityMapper(entityTableName="vm_instance")
-    @Parameter(name=ApiConstants.ID, type=CommandType.LONG, required=true, description="The ID of the router")
-    private Long id;
-
-    @IdentityMapper(entityTableName="disk_offering")
-    @Parameter(name=ApiConstants.SERVICE_OFFERING_ID, type=CommandType.LONG, required=true, description="the service offering ID to apply to the domain router")
-    private Long serviceOfferingId;
-
-    /////////////////////////////////////////////////////
-    /////////////////// Accessors ///////////////////////
-    /////////////////////////////////////////////////////
-
-    public Long getId() {
-        return id;
-    }
-
-    public Long getServiceOfferingId() {
-        return serviceOfferingId;
-    }
-
-    /////////////////////////////////////////////////////
-    /////////////// API Implementation///////////////////
-    /////////////////////////////////////////////////////
-
-	@Override
-	public String getCommandName() {
-		 return s_name;
-	}
-	
-    @Override
-    public long getEntityOwnerId() {
-        VirtualRouter router = _entityMgr.findById(VirtualRouter.class, getId());
-        if (router != null) {
-            return router.getAccountId();
-        }
-
-        return Account.ACCOUNT_ID_SYSTEM; // no account info given, parent this command to SYSTEM so ERROR events are tracked
-    }
-	
-    @Override
-    public void execute(){
-        VirtualRouter router = _routerService.upgradeRouter(this);
-        if (router != null){
-            DomainRouterResponse routerResponse = _responseGenerator.createDomainRouterResponse(router);
-            routerResponse.setResponseName(getCommandName());
-            this.setResponseObject(routerResponse);
-        } else {
-            throw new ServerApiException(BaseCmd.INTERNAL_ERROR, "Failed to upgrade router");
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/c4c9d2d8/api/src/com/cloud/api/commands/UpgradeSystemVMCmd.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/api/commands/UpgradeSystemVMCmd.java b/api/src/com/cloud/api/commands/UpgradeSystemVMCmd.java
deleted file mode 100644
index a36844a..0000000
--- a/api/src/com/cloud/api/commands/UpgradeSystemVMCmd.java
+++ /dev/null
@@ -1,103 +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 com.cloud.api.ApiConstants;
-import com.cloud.api.BaseCmd;
-import com.cloud.api.IdentityMapper;
-import com.cloud.api.Implementation;
-import com.cloud.api.Parameter;
-import com.cloud.api.ServerApiException;
-import com.cloud.api.response.SystemVmResponse;
-import com.cloud.exception.InvalidParameterValueException;
-import com.cloud.offering.ServiceOffering;
-import com.cloud.user.Account;
-import com.cloud.user.UserContext;
-import com.cloud.vm.VirtualMachine;
-
-@Implementation(responseObject=SystemVmResponse.class, description="Changes the service offering for a system vm (console proxy or secondary storage). " +
-                                                                                            "The system vm must be in a \"Stopped\" state for " +
-                                                                                            "this command to take effect.")
-public class UpgradeSystemVMCmd extends BaseCmd {
-    public static final Logger s_logger = Logger.getLogger(UpgradeVMCmd.class.getName());
-    private static final String s_name = "changeserviceforsystemvmresponse";
-
-    /////////////////////////////////////////////////////
-    //////////////// API parameters /////////////////////
-    /////////////////////////////////////////////////////
-
-    @IdentityMapper(entityTableName="vm_instance")
-    @Parameter(name=ApiConstants.ID, type=CommandType.LONG, required=true, description="The ID of the system vm")
-    private Long id;
-
-    @IdentityMapper(entityTableName="disk_offering")
-    @Parameter(name=ApiConstants.SERVICE_OFFERING_ID, type=CommandType.LONG, required=true, 
-                description="the service offering ID to apply to the system vm")
-    private Long serviceOfferingId;
-
-    /////////////////////////////////////////////////////
-    /////////////////// Accessors ///////////////////////
-    /////////////////////////////////////////////////////
-
-    public Long getId() {
-        return id;
-    }
-
-    public Long getServiceOfferingId() {
-        return serviceOfferingId;
-    }
-
-    /////////////////////////////////////////////////////
-    /////////////// API Implementation///////////////////
-    /////////////////////////////////////////////////////
-
-    @Override
-    public String getCommandName() {
-        return s_name;
-    }
-    
-    @Override
-    public long getEntityOwnerId() {
-        Account account = UserContext.current().getCaller();
-        if (account != null) {
-            return account.getId();
-        }
-
-        return Account.ACCOUNT_ID_SYSTEM; // no account info given, parent this command to SYSTEM so ERROR events are tracked
-    }
-    
-    @Override
-    public void execute(){
-        UserContext.current().setEventDetails("Vm Id: "+getId());
-        
-        ServiceOffering serviceOffering = _configService.getServiceOffering(serviceOfferingId);
-        if (serviceOffering == null) {
-            throw new InvalidParameterValueException("Unable to find service offering: " + serviceOfferingId);
-        }
-        
-        VirtualMachine result = _mgr.upgradeSystemVM(this);
-        if (result != null) {
-            SystemVmResponse response = _responseGenerator.createSystemVmResponse(result);
-            response.setResponseName(getCommandName());
-            this.setResponseObject(response);
-        } else {
-            throw new ServerApiException(BaseCmd.INTERNAL_ERROR, "Fail to reboot system vm");
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/c4c9d2d8/api/src/com/cloud/api/commands/UpgradeVMCmd.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/api/commands/UpgradeVMCmd.java b/api/src/com/cloud/api/commands/UpgradeVMCmd.java
deleted file mode 100644
index 56ddb82..0000000
--- a/api/src/com/cloud/api/commands/UpgradeVMCmd.java
+++ /dev/null
@@ -1,106 +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 com.cloud.api.ApiConstants;
-import com.cloud.api.BaseCmd;
-import com.cloud.api.IdentityMapper;
-import com.cloud.api.Implementation;
-import com.cloud.api.Parameter;
-import com.cloud.api.ServerApiException;
-import com.cloud.api.response.UserVmResponse;
-import com.cloud.exception.InvalidParameterValueException;
-import com.cloud.offering.ServiceOffering;
-import com.cloud.user.Account;
-import com.cloud.user.UserContext;
-import com.cloud.uservm.UserVm;
-
-@Implementation(responseObject=UserVmResponse.class, description="Changes the service offering for a virtual machine. " +
-																							"The virtual machine must be in a \"Stopped\" state for " +
-																							"this command to take effect.")
-public class UpgradeVMCmd extends BaseCmd {
-    public static final Logger s_logger = Logger.getLogger(UpgradeVMCmd.class.getName());
-    private static final String s_name = "changeserviceforvirtualmachineresponse";
-
-    /////////////////////////////////////////////////////
-    //////////////// API parameters /////////////////////
-    /////////////////////////////////////////////////////
-
-    @IdentityMapper(entityTableName="vm_instance")
-    @Parameter(name=ApiConstants.ID, type=CommandType.LONG, required=true, description="The ID of the virtual machine")
-    private Long id;
-
-    @IdentityMapper(entityTableName="disk_offering")
-    @Parameter(name=ApiConstants.SERVICE_OFFERING_ID, type=CommandType.LONG, required=true, description="the service offering ID to apply to the virtual machine")
-    private Long serviceOfferingId;
-
-    /////////////////////////////////////////////////////
-    /////////////////// Accessors ///////////////////////
-    /////////////////////////////////////////////////////
-
-    public Long getId() {
-        return id;
-    }
-
-    public Long getServiceOfferingId() {
-        return serviceOfferingId;
-    }
-
-    /////////////////////////////////////////////////////
-    /////////////// API Implementation///////////////////
-    /////////////////////////////////////////////////////
-
-    @Override
-    public String getCommandName() {
-        return s_name;
-    }
-
-    public static String getResultObjectName() {
-    	return "virtualmachine";
-    }
-    
-    @Override
-    public long getEntityOwnerId() {
-        UserVm userVm = _entityMgr.findById(UserVm.class, getId());
-        if (userVm != null) {
-            return userVm.getAccountId();
-        }
-
-        return Account.ACCOUNT_ID_SYSTEM; // no account info given, parent this command to SYSTEM so ERROR events are tracked
-    }
-    
-    @Override
-    public void execute(){
-        UserContext.current().setEventDetails("Vm Id: "+getId());
-        
-        ServiceOffering serviceOffering = _configService.getServiceOffering(serviceOfferingId);
-        if (serviceOffering == null) {
-            throw new InvalidParameterValueException("Unable to find service offering: " + serviceOfferingId);
-        }
-        
-        UserVm result = _userVmService.upgradeVirtualMachine(this);
-        if (result != null){
-            UserVmResponse response = _responseGenerator.createUserVmResponse("virtualmachine", result).get(0);
-            response.setResponseName(getCommandName());
-            this.setResponseObject(response);
-        } else {
-            throw new ServerApiException(BaseCmd.INTERNAL_ERROR, "Failed to upgrade vm");
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/c4c9d2d8/api/src/com/cloud/api/commands/UploadCustomCertificateCmd.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/api/commands/UploadCustomCertificateCmd.java b/api/src/com/cloud/api/commands/UploadCustomCertificateCmd.java
deleted file mode 100644
index d6eca30..0000000
--- a/api/src/com/cloud/api/commands/UploadCustomCertificateCmd.java
+++ /dev/null
@@ -1,110 +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 com.cloud.api.ApiConstants;
-import com.cloud.api.BaseAsyncCmd;
-import com.cloud.api.BaseCmd;
-import com.cloud.api.Implementation;
-import com.cloud.api.Parameter;
-import com.cloud.api.ServerApiException;
-import com.cloud.api.response.CustomCertificateResponse;
-import com.cloud.event.EventTypes;
-import com.cloud.user.Account;
-
-@Implementation(responseObject=CustomCertificateResponse.class, description="Uploads a custom certificate for the console proxy VMs to use for SSL. Can be used to upload a single certificate signed by a known CA. Can also be used, through multiple calls, to upload a chain of certificates from CA to the custom certificate itself.")
-public class UploadCustomCertificateCmd extends BaseAsyncCmd {
-    public static final Logger s_logger = Logger.getLogger(UploadCustomCertificateCmd.class.getName());
-
-    private static final String s_name = "uploadcustomcertificateresponse";
-
-    @Parameter(name=ApiConstants.CERTIFICATE,type=CommandType.STRING,required=true,description="The certificate to be uploaded.", length=65535)
-    private String certificate;
-    
-    @Parameter(name=ApiConstants.ID,type=CommandType.INTEGER,required=false,description="An integer providing the location in a chain that the certificate will hold. Usually, this can be left empty. When creating a chain, the top level certificate should have an ID of 1, with each step in the chain incrementing by one. Example, CA with id = 1, Intermediate CA with id = 2, Site certificate with ID = 3")
-    private Integer index;
-    
-    @Parameter(name=ApiConstants.NAME,type=CommandType.STRING,required=false,description="A name / alias for the certificate.")
-    private String alias;
-
-    @Parameter(name=ApiConstants.PRIVATE_KEY,type=CommandType.STRING,required=false,description="The private key for the attached certificate.", length=65535)
-    private String privateKey;
-
-    @Parameter(name=ApiConstants.DOMAIN_SUFFIX,type=CommandType.STRING,required=true,description="DNS domain suffix that the certificate is granted for.")
-    private String domainSuffix;
-    
-    public String getCertificate() {
-        return certificate;
-    }
-    
-    public String getPrivateKey() {
-    	return privateKey;
-    }
-    
-    public String getDomainSuffix() {
-    	return domainSuffix;
-    }
-    
-    public Integer getCertIndex() {
-    	return index;
-    }
-    
-    public String getAlias() {
-    	return alias;
-    }
-
-    @Override
-    public String getEventType() {
-        return EventTypes.EVENT_UPLOAD_CUSTOM_CERTIFICATE;
-    }
-
-    @Override
-    public String getEventDescription() {
-        return  ("Uploading custom certificate to the db, and applying it to all the cpvms in the system");
-    }
-    
-    @Override
-    public String getCommandName() {
-        return s_name;
-    }
-    
-    public static String getResultObjectName() {
-    	return "certificate";
-    }
-
-    @Override
-    public long getEntityOwnerId() {
-        return Account.ACCOUNT_ID_SYSTEM; // no account info given, parent this command to SYSTEM so ERROR events are tracked
-    }
-    
-    @Override
-    public void execute(){
-        String result = _mgr.uploadCertificate(this);
-        if (result != null) {
-            CustomCertificateResponse response = new CustomCertificateResponse();
-            response.setResponseName(getCommandName());
-            response.setResultMessage(result);
-            response.setObjectName("customcertificate");
-            this.setResponseObject(response);
-        } else {
-            throw new ServerApiException(BaseCmd.INTERNAL_ERROR, "Failed to upload custom certificate");
-        }
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/c4c9d2d8/api/src/com/cloud/api/commands/UploadVolumeCmd.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/api/commands/UploadVolumeCmd.java b/api/src/com/cloud/api/commands/UploadVolumeCmd.java
deleted file mode 100755
index 299b04d..0000000
--- a/api/src/com/cloud/api/commands/UploadVolumeCmd.java
+++ /dev/null
@@ -1,147 +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 com.cloud.api.ApiConstants;
-import com.cloud.api.BaseAsyncCmd;
-import com.cloud.api.BaseCmd;
-import com.cloud.api.IdentityMapper;
-import com.cloud.api.Implementation;
-import com.cloud.api.Parameter;
-import com.cloud.api.ServerApiException;
-import com.cloud.api.response.VolumeResponse;
-import com.cloud.event.EventTypes;
-import com.cloud.exception.ConcurrentOperationException;
-import com.cloud.exception.InsufficientCapacityException;
-import com.cloud.exception.NetworkRuleConflictException;
-import com.cloud.exception.ResourceAllocationException;
-import com.cloud.exception.ResourceUnavailableException;
-import com.cloud.storage.Volume;
-import com.cloud.user.UserContext;
-
-@Implementation(description="Uploads a data disk.", responseObject=VolumeResponse.class)
-public class UploadVolumeCmd extends BaseAsyncCmd {
-	public static final Logger s_logger = Logger.getLogger(UploadVolumeCmd.class.getName());
-    private static final String s_name = "uploadvolumeresponse";
-	
-    /////////////////////////////////////////////////////
-    //////////////// API parameters /////////////////////
-    /////////////////////////////////////////////////////
-
-    @Parameter(name=ApiConstants.FORMAT, type=CommandType.STRING, required=true, description="the format for the volume. Possible values include QCOW2, OVA, and VHD.")
-    private String format;
-
-    @Parameter(name=ApiConstants.NAME, type=CommandType.STRING, required=true, description="the name of the volume")
-    private String volumeName;
-
-    @Parameter(name=ApiConstants.URL, type=CommandType.STRING, required=true, description="the URL of where the volume is hosted. Possible URL include http:// and https://")
-    private String url;
-
-    @IdentityMapper(entityTableName="data_center")
-    @Parameter(name=ApiConstants.ZONE_ID, type=CommandType.LONG, required=true, description="the ID of the zone the volume is to be hosted on")
-    private Long zoneId;
-
-    @IdentityMapper(entityTableName="domain")
-    @Parameter(name=ApiConstants.DOMAIN_ID, type=CommandType.LONG, description="an optional domainId. If the account parameter is used, domainId must also be used.")
-    private Long domainId;
-
-    @Parameter(name=ApiConstants.ACCOUNT, type=CommandType.STRING, description="an optional accountName. Must be used with domainId.")
-    private String accountName;
-
-    @Parameter(name=ApiConstants.CHECKSUM, type=CommandType.STRING, description="the MD5 checksum value of this volume")
-    private String checksum;
-
-    /////////////////////////////////////////////////////
-    /////////////////// Accessors ///////////////////////
-    /////////////////////////////////////////////////////
-
-    public String getFormat() {
-        return format;
-    }
-
-    public String getVolumeName() {
-        return volumeName;
-    }
-      
-    public String getUrl() {
-        return url;
-    }
-
-    public Long getZoneId() {
-        return zoneId;
-    }
-
-    public Long getDomainId() {
-        return domainId;
-    }
-
-    public String getAccountName() {
-        return accountName;
-    }
-
-    public String getChecksum() {
-        return checksum;
-    }	
-      
-    /////////////////////////////////////////////////////
-    /////////////// API Implementation///////////////////
-    /////////////////////////////////////////////////////
-
-	@Override
-	public void execute() throws ResourceUnavailableException,
-			InsufficientCapacityException, ServerApiException,
-			ConcurrentOperationException, ResourceAllocationException,
-			NetworkRuleConflictException {
-
-	        Volume volume = _storageService.uploadVolume(this);
-	        if (volume != null){	            
-	            VolumeResponse response = _responseGenerator.createVolumeResponse(volume);
-	            response.setResponseName(getCommandName());              
-	            this.setResponseObject(response);
-	        } else {
-	            throw new ServerApiException(BaseCmd.INTERNAL_ERROR, "Failed to upload volume");
-	        }
-	}
-
-	@Override
-	public String getCommandName() {
-		   return s_name;
-	}
-
-	@Override
-	public long getEntityOwnerId() {
-		Long accountId = finalyzeAccountId(accountName, domainId, null, true);
-        if (accountId == null) {
-            return UserContext.current().getCaller().getId();
-        }
-        
-        return accountId;
-	}
-
-	@Override
-	public String getEventDescription() {
-		return  "uploading volume: " + getVolumeName() + " in the zone " + getZoneId(); 		
-	}
-
-	@Override
-	public String getEventType() {
-        return EventTypes.EVENT_VOLUME_UPLOAD;
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/c4c9d2d8/api/src/com/cloud/api/commands/listStorageNetworkIpRangeCmd.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/api/commands/listStorageNetworkIpRangeCmd.java b/api/src/com/cloud/api/commands/listStorageNetworkIpRangeCmd.java
deleted file mode 100755
index f0b3a53..0000000
--- a/api/src/com/cloud/api/commands/listStorageNetworkIpRangeCmd.java
+++ /dev/null
@@ -1,108 +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 com.cloud.api.ApiConstants;
-import com.cloud.api.BaseCmd;
-import com.cloud.api.BaseListCmd;
-import com.cloud.api.IdentityMapper;
-import com.cloud.api.Implementation;
-import com.cloud.api.Parameter;
-import com.cloud.api.ServerApiException;
-import com.cloud.api.response.ListResponse;
-import com.cloud.api.response.StorageNetworkIpRangeResponse;
-import com.cloud.dc.StorageNetworkIpRange;
-import com.cloud.exception.ConcurrentOperationException;
-import com.cloud.exception.InsufficientCapacityException;
-import com.cloud.exception.ResourceAllocationException;
-import com.cloud.exception.ResourceUnavailableException;
-import com.cloud.user.Account;
-
-@Implementation(description="List a storage network IP range.", responseObject=StorageNetworkIpRangeResponse.class, since="3.0.0")
-public class listStorageNetworkIpRangeCmd extends BaseListCmd {
-	public static final Logger s_logger = Logger.getLogger(listStorageNetworkIpRangeCmd.class);
-	
-	String s_name = "liststoragenetworkiprangeresponse";
-
-    /////////////////////////////////////////////////////
-    //////////////// API parameters /////////////////////
-    /////////////////////////////////////////////////////   
-	
-    @IdentityMapper(entityTableName="dc_storage_network_ip_range")
-    @Parameter(name=ApiConstants.ID, type=CommandType.LONG, description="optional parameter. Storaget network IP range uuid, if specicied, using it to search the range.")
-    private Long rangeId;
-    
-    @IdentityMapper(entityTableName="host_pod_ref")
-    @Parameter(name=ApiConstants.POD_ID, type=CommandType.LONG, description="optional parameter. Pod uuid, if specicied and range uuid is absent, using it to search the range.")
-    private Long podId;
-    
-    @IdentityMapper(entityTableName="data_center")
-    @Parameter(name=ApiConstants.ZONE_ID, type=CommandType.LONG, description="optional parameter. Zone uuid, if specicied and both pod uuid and range uuid are absent, using it to search the range.")
-    private Long zoneId;
-    
-    /////////////////////////////////////////////////////
-    /////////////////// Accessors ///////////////////////
-    /////////////////////////////////////////////////////
-    
-    public Long getRangeId() {
-    	return rangeId;
-    }
-    
-    public Long getPodId() {
-    	return podId;
-    }
-    
-    public Long getZoneId() {
-    	return zoneId;
-    }
-
-	@Override
-	public void execute() throws ResourceUnavailableException, InsufficientCapacityException, ServerApiException, ConcurrentOperationException,
-	        ResourceAllocationException {
-		try {
-			List<StorageNetworkIpRange> results = _storageNetworkService.listIpRange(this);
-			ListResponse<StorageNetworkIpRangeResponse> response = new ListResponse<StorageNetworkIpRangeResponse>();
-			List<StorageNetworkIpRangeResponse> resList = new ArrayList<StorageNetworkIpRangeResponse>(results.size());
-			for (StorageNetworkIpRange r : results) {
-				StorageNetworkIpRangeResponse resp = _responseGenerator.createStorageNetworkIpRangeResponse(r);
-				resList.add(resp);
-			}
-			response.setResponses(resList);
-			response.setResponseName(getCommandName());
-			this.setResponseObject(response);
-		} catch (Exception e) {
-			s_logger.warn("Failed to list storage network ip range for rangeId=" + getRangeId() + " podId=" + getPodId() + " zoneId=" + getZoneId());
-			throw new ServerApiException(BaseCmd.INTERNAL_ERROR, e.getMessage());
-		}
-	}
-
-	@Override
-	public String getCommandName() {
-		return s_name;
-	}
-
-	@Override
-	public long getEntityOwnerId() {
-		return Account.ACCOUNT_ID_SYSTEM;
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/c4c9d2d8/api/src/com/cloud/api/response/AccountResponse.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/api/response/AccountResponse.java b/api/src/com/cloud/api/response/AccountResponse.java
deleted file mode 100755
index dd69024..0000000
--- a/api/src/com/cloud/api/response/AccountResponse.java
+++ /dev/null
@@ -1,290 +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.response;
-
-import java.util.List;
-import java.util.Map;
-
-import com.cloud.api.ApiConstants;
-import com.cloud.serializer.Param;
-import com.cloud.utils.IdentityProxy;
-import com.google.gson.annotations.SerializedName;
-
-@SuppressWarnings("unused")
-public class AccountResponse extends BaseResponse {
-    @SerializedName(ApiConstants.ID) @Param(description="the id of the account")
-    private IdentityProxy id = new IdentityProxy("account");
-
-    @SerializedName(ApiConstants.NAME) @Param(description="the name of the account")
-    private String name;
-
-    @SerializedName(ApiConstants.ACCOUNT_TYPE) @Param(description="account type (admin, domain-admin, user)")
-    private Short accountType;
-
-    @SerializedName(ApiConstants.DOMAIN_ID) @Param(description="id of the Domain the account belongs too")
-    private IdentityProxy domainId = new IdentityProxy("domain");
-
-    @SerializedName(ApiConstants.DOMAIN) @Param(description="name of the Domain the account belongs too")
-    private String domainName;
-    
-    @SerializedName(ApiConstants.DEFAULT_ZONE_ID) @Param(description="the default zone of the account")
-    private IdentityProxy defaultZoneId = new IdentityProxy("data_center");
-
-    @SerializedName(ApiConstants.RECEIVED_BYTES) @Param(description="the total number of network traffic bytes received")
-    private Long bytesReceived;
-
-    @SerializedName(ApiConstants.SENT_BYTES) @Param(description="the total number of network traffic bytes sent")
-    private Long bytesSent;
-
-    @SerializedName(ApiConstants.VM_LIMIT) @Param(description="the total number of virtual machines that can be deployed by this account")
-    private String vmLimit;
-
-    @SerializedName(ApiConstants.VM_TOTAL) @Param(description="the total number of virtual machines deployed by this account")
-    private Long vmTotal;
-
-    @SerializedName(ApiConstants.VM_AVAILABLE) @Param(description="the total number of virtual machines available for this account to acquire")
-    private String vmAvailable;
-
-    @SerializedName(ApiConstants.IP_LIMIT) @Param(description="the total number of public ip addresses this account can acquire")
-    private String ipLimit;
-
-    @SerializedName(ApiConstants.IP_TOTAL) @Param(description="the total number of public ip addresses allocated for this account")
-    private Long ipTotal;
-
-    @SerializedName(ApiConstants.IP_AVAILABLE) @Param(description="the total number of public ip addresses available for this account to acquire")
-    private String ipAvailable;
-
-    @SerializedName("volumelimit") @Param(description="the total volume which can be used by this account")
-    private String volumeLimit;
-
-    @SerializedName("volumetotal") @Param(description="the total volume being used by this account")
-    private Long volumeTotal;
-
-    @SerializedName("volumeavailable") @Param(description="the total volume available for this account")
-    private String volumeAvailable;
-
-    @SerializedName("snapshotlimit") @Param(description="the total number of snapshots which can be stored by this account")
-    private String snapshotLimit;
-
-    @SerializedName("snapshottotal") @Param(description="the total number of snapshots stored by this account")
-    private Long snapshotTotal;
-
-    @SerializedName("snapshotavailable") @Param(description="the total number of snapshots available for this account")
-    private String snapshotAvailable;
-
-    @SerializedName("templatelimit") @Param(description="the total number of templates which can be created by this account")
-    private String templateLimit;
-
-    @SerializedName("templatetotal") @Param(description="the total number of templates which have been created by this account")
-    private Long templateTotal;
-
-    @SerializedName("templateavailable") @Param(description="the total number of templates available to be created by this account")
-    private String templateAvailable;
-
-    @SerializedName("vmstopped") @Param(description="the total number of virtual machines stopped for this account")
-    private Integer vmStopped;
-
-    @SerializedName("vmrunning") @Param(description="the total number of virtual machines running for this account")
-    private Integer vmRunning;
-    
-    @SerializedName("projectlimit") @Param(description="the total number of projects the account can own", since="3.0.1")
-    private String projectLimit;
-
-    @SerializedName("projecttotal") @Param(description="the total number of projects being administrated by this account", since="3.0.1")
-    private Long projectTotal;
-
-    @SerializedName("projectavailable") @Param(description="the total number of projects available for administration by this account", since="3.0.1")
-    private String projectAvailable;
-    
-    @SerializedName("networklimit") @Param(description="the total number of networks the account can own", since="3.0.1")
-    private String networkLimit;
-
-    @SerializedName("networktotal") @Param(description="the total number of networks owned by account", since="3.0.1")
-    private Long networkTotal;
-
-    @SerializedName("networkavailable") @Param(description="the total number of networks available to be created for this account", since="3.0.1")
-    private String networkAvailable;
-    
-    @SerializedName("vpclimit") @Param(description="the total number of vpcs the account can own", since="3.0.5")
-    private String vpcLimit;
-
-    @SerializedName("vpctotal") @Param(description="the total number of vpcs owned by account", since="3.0.5")
-    private Long vpcTotal;
-
-    @SerializedName("vpcavailable") @Param(description="the total number of vpcs available to be created for this account", since="3.0.5")
-    private String vpcAvailable;
-    
-
-    @SerializedName(ApiConstants.STATE) @Param(description="the state of the account")
-    private String state;
-
-    @SerializedName(ApiConstants.IS_CLEANUP_REQUIRED) @Param(description="true if the account requires cleanup")
-    private Boolean cleanupRequired;
-    
-    @SerializedName("user")  @Param(description="the list of users associated with account", responseObject = UserResponse.class)
-    private List<UserResponse> users;
-    
-    @SerializedName(ApiConstants.NETWORK_DOMAIN) @Param(description="the network domain")
-    private String networkDomain;
-    
-    @SerializedName(ApiConstants.ACCOUNT_DETAILS) @Param(description="details for the account")
-    private Map<String, String> details;
-
-    public void setId(Long id) {
-        this.id.setValue(id);
-    }
-
-    public void setName(String name) {
-        this.name = name;
-    }
-
-    public void setAccountType(Short accountType) {
-        this.accountType = accountType;
-    }
-
-    public void setDomainId(Long domainId) {
-        this.domainId.setValue(domainId);
-    }
-
-    public void setDomainName(String domainName) {
-        this.domainName = domainName;
-    }
-
-    public void setBytesReceived(Long bytesReceived) {
-        this.bytesReceived = bytesReceived;
-    }
-
-    public void setBytesSent(Long bytesSent) {
-        this.bytesSent = bytesSent;
-    }
-
-    public void setVmLimit(String vmLimit) {
-        this.vmLimit = vmLimit;
-    }
-
-    public void setVmTotal(Long vmTotal) {
-        this.vmTotal = vmTotal;
-    }
-
-    public void setVmAvailable(String vmAvailable) {
-        this.vmAvailable = vmAvailable;
-    }
-
-    public void setIpLimit(String ipLimit) {
-        this.ipLimit = ipLimit;
-    }
-
-    public void setIpTotal(Long ipTotal) {
-        this.ipTotal = ipTotal;
-    }
-
-    public void setIpAvailable(String ipAvailable) {
-        this.ipAvailable = ipAvailable;
-    }
-
-    public void setVolumeLimit(String volumeLimit) {
-        this.volumeLimit = volumeLimit;
-    }
-
-    public void setVolumeTotal(Long volumeTotal) {
-        this.volumeTotal = volumeTotal;
-    }
-
-    public void setVolumeAvailable(String volumeAvailable) {
-        this.volumeAvailable = volumeAvailable;
-    }
-
-    public void setSnapshotLimit(String snapshotLimit) {
-        this.snapshotLimit = snapshotLimit;
-    }
-
-    public void setSnapshotTotal(Long snapshotTotal) {
-        this.snapshotTotal = snapshotTotal;
-    }
-
-    public void setSnapshotAvailable(String snapshotAvailable) {
-        this.snapshotAvailable = snapshotAvailable;
-    }
-
-    public void setTemplateLimit(String templateLimit) {
-        this.templateLimit = templateLimit;
-    }
-
-    public void setTemplateTotal(Long templateTotal) {
-        this.templateTotal = templateTotal;
-    }
-
-    public void setTemplateAvailable(String templateAvailable) {
-        this.templateAvailable = templateAvailable;
-    }
-
-    public void setVmStopped(Integer vmStopped) {
-        this.vmStopped = vmStopped;
-    }
-
-    public void setVmRunning(Integer vmRunning) {
-        this.vmRunning = vmRunning;
-    }
-
-    public void setState(String state) {
-        this.state = state;
-    }
-
-    public void setCleanupRequired(Boolean cleanupRequired) {
-        this.cleanupRequired = cleanupRequired;
-    }
-    
-    public void setUsers(List<UserResponse> users) {
-        this.users = users;
-    }
-
-    public void setNetworkDomain(String networkDomain) {
-        this.networkDomain = networkDomain;
-    }
-    
-    public void setDetails(Map<String, String> details) {
-    	this.details = details;
-    }
-
-    public void setProjectLimit(String projectLimit) {
-        this.projectLimit = projectLimit;
-    }
-
-    public void setProjectTotal(Long projectTotal) {
-        this.projectTotal = projectTotal;
-    }
-
-    public void setProjectAvailable(String projectAvailable) {
-        this.projectAvailable = projectAvailable;
-    }
-
-    public void setNetworkLimit(String networkLimit) {
-        this.networkLimit = networkLimit;
-    }
-
-    public void setNetworkTotal(Long networkTotal) {
-        this.networkTotal = networkTotal;
-    }
-
-    public void setNetworkAvailable(String networkAvailable) {
-        this.networkAvailable = networkAvailable;
-    }
-    
-    public void setDefaultZone(Long defaultZoneId) {
-    	this.defaultZoneId.setValue(defaultZoneId);
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/c4c9d2d8/api/src/com/cloud/api/response/AlertResponse.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/api/response/AlertResponse.java b/api/src/com/cloud/api/response/AlertResponse.java
deleted file mode 100644
index c54919e..0000000
--- a/api/src/com/cloud/api/response/AlertResponse.java
+++ /dev/null
@@ -1,63 +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.response;
-
-import java.util.Date;
-import java.util.List;
-
-import com.cloud.api.ApiConstants;
-import com.cloud.utils.IdentityProxy;
-import com.cloud.serializer.Param;
-import com.google.gson.annotations.SerializedName;
-
-@SuppressWarnings("unused")
-public class AlertResponse extends BaseResponse {
-    @SerializedName(ApiConstants.ID) @Param(description="the id of the alert")
-    private IdentityProxy id = new IdentityProxy("alert");
-
-    @SerializedName(ApiConstants.TYPE) @Param(description="One of the following alert types: " +
-      "MEMORY = 0, CPU = 1, STORAGE = 2, STORAGE_ALLOCATED = 3, PUBLIC_IP = 4, PRIVATE_IP = 5, HOST = 6, USERVM = 7, " +
-      "DOMAIN_ROUTER = 8, CONSOLE_PROXY = 9, ROUTING = 10: lost connection to default route (to the gateway), " +
-      "STORAGE_MISC = 11: lost connection to default route (to the gateway), " +
-      "USAGE_SERVER = 12: lost connection to default route (to the gateway), " +
-      "MANAGMENT_NODE = 13: lost connection to default route (to the gateway), " +
-      "DOMAIN_ROUTER_MIGRATE = 14, CONSOLE_PROXY_MIGRATE = 15, USERVM_MIGRATE = 16, VLAN = 17, SSVM = 18, " +
-      "USAGE_SERVER_RESULT = 19")
-    private Short alertType;
-
-    @SerializedName(ApiConstants.DESCRIPTION) @Param(description="description of the alert")
-    private String description;
-
-    @SerializedName(ApiConstants.SENT) @Param(description="the date and time the alert was sent")
-    private Date lastSent;
-
-    public void setId(Long id) {
-        this.id.setValue(id);
-    }
-
-    public void setAlertType(Short alertType) {
-        this.alertType = alertType;
-    }
-
-    public void setDescription(String description) {
-        this.description = description;
-    }
-
-    public void setLastSent(Date lastSent) {
-        this.lastSent = lastSent;
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/c4c9d2d8/api/src/com/cloud/api/response/AsyncJobResponse.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/api/response/AsyncJobResponse.java b/api/src/com/cloud/api/response/AsyncJobResponse.java
deleted file mode 100644
index 45aee12..0000000
--- a/api/src/com/cloud/api/response/AsyncJobResponse.java
+++ /dev/null
@@ -1,159 +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.response;
-
-import java.util.Date;
-
-import com.cloud.api.ApiConstants;
-import com.cloud.api.ResponseObject;
-import com.cloud.async.AsyncJob;
-import com.cloud.serializer.Param;
-import com.cloud.utils.IdentityProxy;
-import com.google.gson.annotations.SerializedName;
-
-@SuppressWarnings("unused")
-public class AsyncJobResponse extends BaseResponse {
-
-    @SerializedName("accountid") @Param(description="the account that executed the async command")
-    private IdentityProxy accountId = new IdentityProxy("account");
-
-    @SerializedName(ApiConstants.USER_ID) @Param(description="the user that executed the async command")
-    private IdentityProxy userId = new IdentityProxy("user");
-
-    @SerializedName("cmd") @Param(description="the async command executed")
-    private String cmd;
-
-    @SerializedName("jobstatus") @Param(description="the current job status-should be 0 for PENDING")
-    private Integer jobStatus;
-
-    @SerializedName("jobprocstatus") @Param(description="the progress information of the PENDING job")
-    private Integer jobProcStatus;
-
-    @SerializedName("jobresultcode") @Param(description="the result code for the job")
-    private Integer jobResultCode;
-
-    @SerializedName("jobresulttype") @Param(description="the result type")
-    private String jobResultType;
-
-    @SerializedName("jobresult") @Param(description="the result reason")
-    private ResponseObject jobResult;
- 
-    @SerializedName("jobinstancetype") @Param(description="the instance/entity object related to the job")
-    private String jobInstanceType;
-
-    @SerializedName("jobinstanceid") @Param(description="the unique ID of the instance/entity object related to the job")
-    private IdentityProxy jobInstanceId = new IdentityProxy();
-
-    @SerializedName(ApiConstants.CREATED) @Param(description="	the created date of the job")
-    private Date created;
-
-    public void setAccountId(Long accountId) {
-        this.accountId.setValue(accountId);
-    }
-
-    public void setUserId(Long userId) {
-        this.userId.setValue(userId);
-    }
-
-    public void setCmd(String cmd) {
-        this.cmd = cmd;
-    }
-
-    @Override
-    public void setJobStatus(Integer jobStatus) {
-        this.jobStatus = jobStatus;
-    }
-
-    public void setJobProcStatus(Integer jobProcStatus) {
-        this.jobProcStatus = jobProcStatus;
-    }
-
-    public void setJobResultCode(Integer jobResultCode) {
-        this.jobResultCode = jobResultCode;
-    }
-
-    public void setJobResultType(String jobResultType) {
-        this.jobResultType = jobResultType;
-    }
-
-    public void setJobResult(ResponseObject jobResult) {
-        this.jobResult = jobResult;
-    }
-
-    public void setJobInstanceType(String jobInstanceType) {
-        this.jobInstanceType = jobInstanceType;
-
-        if(jobInstanceType != null) {
-        	if(jobInstanceType.equalsIgnoreCase(AsyncJob.Type.Volume.toString())) {
-        		this.jobInstanceId.setTableName("volumes");
-        	} else if (jobInstanceType.equalsIgnoreCase(AsyncJob.Type.Template.toString())) {
-        		this.jobInstanceId.setTableName("vm_template");
-        	} else if (jobInstanceType.equalsIgnoreCase(AsyncJob.Type.Iso.toString())) {
-        		this.jobInstanceId.setTableName("vm_template");
-        	} else if (jobInstanceType.equalsIgnoreCase(AsyncJob.Type.VirtualMachine.toString()) || jobInstanceType.equalsIgnoreCase(AsyncJob.Type.ConsoleProxy.toString()) || jobInstanceType.equalsIgnoreCase(AsyncJob.Type.SystemVm.toString()) || jobInstanceType.equalsIgnoreCase(AsyncJob.Type.DomainRouter.toString()) ) {
-        		this.jobInstanceId.setTableName("vm_instance");
-        	} else if (jobInstanceType.equalsIgnoreCase(AsyncJob.Type.Snapshot.toString())) {
-        		this.jobInstanceId.setTableName("snapshots");
-        	} else if (jobInstanceType.equalsIgnoreCase(AsyncJob.Type.Host.toString())) {
-        		this.jobInstanceId.setTableName("host");
-        	} else if (jobInstanceType.equalsIgnoreCase(AsyncJob.Type.StoragePool.toString())) {
-        		this.jobInstanceId.setTableName("storage_pool");
-        	} else if (jobInstanceType.equalsIgnoreCase(AsyncJob.Type.IpAddress.toString())) {
-        		this.jobInstanceId.setTableName("user_ip_address");
-        	} else if (jobInstanceType.equalsIgnoreCase(AsyncJob.Type.SecurityGroup.toString())) {
-        		this.jobInstanceId.setTableName("security_group");
-        	} else if (jobInstanceType.equalsIgnoreCase(AsyncJob.Type.PhysicalNetwork.toString())) {
-        		this.jobInstanceId.setTableName("physical_network");
-        	} else if (jobInstanceType.equalsIgnoreCase(AsyncJob.Type.TrafficType.toString())) {
-                this.jobInstanceId.setTableName("physical_network_traffic_types");
-            } else if (jobInstanceType.equalsIgnoreCase(AsyncJob.Type.PhysicalNetworkServiceProvider.toString())) {
-                this.jobInstanceId.setTableName("physical_network_service_providers");
-        	} else if (jobInstanceType.equalsIgnoreCase(AsyncJob.Type.FirewallRule.toString())) {
-        	    this.jobInstanceId.setTableName("firewall_rules");
-        	} else if (jobInstanceType.equalsIgnoreCase(AsyncJob.Type.Account.toString())) {
-                this.jobInstanceId.setTableName("account");
-            } else if (jobInstanceType.equalsIgnoreCase(AsyncJob.Type.User.toString())) {
-                this.jobInstanceId.setTableName("user");
-            } else if (jobInstanceType.equalsIgnoreCase(AsyncJob.Type.StaticRoute.toString())) {
-                this.jobInstanceId.setTableName("static_routes");
-            } else if (jobInstanceType.equalsIgnoreCase(AsyncJob.Type.PrivateGateway.toString())) {
-                this.jobInstanceId.setTableName("vpc_gateways");
-            }else if (jobInstanceType.equalsIgnoreCase(AsyncJob.Type.Counter.toString())) {
-                this.jobInstanceId.setTableName("counter");
-            } else if (jobInstanceType.equalsIgnoreCase(AsyncJob.Type.Condition.toString())) {
-                this.jobInstanceId.setTableName("conditions");
-            } else if (jobInstanceType.equalsIgnoreCase(AsyncJob.Type.AutoScalePolicy.toString())) {
-                this.jobInstanceId.setTableName("autoscale_policies");
-            } else if (jobInstanceType.equalsIgnoreCase(AsyncJob.Type.AutoScaleVmProfile.toString())) {
-                this.jobInstanceId.setTableName("autoscale_vmprofiles");
-            } else if (jobInstanceType.equalsIgnoreCase(AsyncJob.Type.AutoScaleVmGroup.toString())) {
-                this.jobInstanceId.setTableName("autoscale_vmgroups");
-            } else if (!jobInstanceType.equalsIgnoreCase(AsyncJob.Type.None.toString())){
-        		// TODO : when we hit here, we need to add instanceType -> UUID entity table mapping
-        		assert(false);
-        	}
-        }
-    }
-
-    public void setJobInstanceId(Long jobInstanceId) {
-    	this.jobInstanceId.setValue(jobInstanceId);
-    }
-
-    public void setCreated(Date created) {
-        this.created = created;
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/c4c9d2d8/api/src/com/cloud/api/response/AutoScalePolicyResponse.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/api/response/AutoScalePolicyResponse.java b/api/src/com/cloud/api/response/AutoScalePolicyResponse.java
deleted file mode 100644
index 2fa3ad3..0000000
--- a/api/src/com/cloud/api/response/AutoScalePolicyResponse.java
+++ /dev/null
@@ -1,107 +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.response;
-
-import com.cloud.api.ApiConstants;
-import com.cloud.utils.IdentityProxy;
-import com.cloud.serializer.Param;
-import com.google.gson.annotations.SerializedName;
-
-import java.util.List;
-
-public class AutoScalePolicyResponse extends BaseResponse implements ControlledEntityResponse {
-
-    @SerializedName(ApiConstants.ID)
-    @Param(description = "the autoscale policy ID")
-    private IdentityProxy id = new IdentityProxy("autoscale_policies");
-
-    @SerializedName(ApiConstants.ACTION)
-    @Param(description = "the action to be executed if all the conditions evaluate to true for the specified duration.")
-    private String action;
-
-    @SerializedName(ApiConstants.DURATION)
-    @Param(description = "the duration for which the conditions have to be true before action is taken")
-    private Integer duration;
-
-    @SerializedName(ApiConstants.QUIETTIME)
-    @Param(description = "the cool down period for which the policy should not be evaluated after the action has been taken")
-    private Integer quietTime;
-
-    @SerializedName("conditions")
-    @Param(description = "the list of IDs of the conditions that are being evaluated on every interval")
-    private List<ConditionResponse> conditions;
-
-    @SerializedName(ApiConstants.ACCOUNT) @Param(description="the account owning the autoscale policy")
-    private String accountName;
-
-    @SerializedName(ApiConstants.PROJECT_ID) @Param(description="the project id autoscale policy")
-    private IdentityProxy projectId = new IdentityProxy("projects");
-
-    @SerializedName(ApiConstants.PROJECT) @Param(description="the project name of the autoscale policy")
-    private String projectName;
-
-    @SerializedName(ApiConstants.DOMAIN_ID) @Param(description="the domain ID of the autoscale policy")
-    private IdentityProxy domainId = new IdentityProxy("domain");
-
-    @SerializedName(ApiConstants.DOMAIN) @Param(description="the domain name of the autoscale policy")
-    private String domainName;
-
-    public void setId(Long id) {
-        this.id.setValue(id);
-    }
-
-    public void setDuration(Integer duration) {
-        this.duration = duration;
-    }
-
-    public void setQuietTime(Integer quietTime) {
-        this.quietTime = quietTime;
-    }
-
-    public void setAction(String action) {
-        this.action = action;
-    }
-
-    public void setConditions(List<ConditionResponse> conditions) {
-        this.conditions = conditions;
-    }
-
-    @Override
-    public void setAccountName(String accountName) {
-        this.accountName = accountName;
-    }
-
-    @Override
-    public void setDomainId(Long domainId) {
-        this.domainId.setValue(domainId);
-    }
-
-    @Override
-    public void setDomainName(String domainName) {
-        this.domainName = domainName;
-    }
-
-    @Override
-    public void setProjectId(Long projectId) {
-        this.projectId.setValue(projectId);
-    }
-
-    @Override
-    public void setProjectName(String projectName) {
-        this.projectName = projectName;
-    }
-}


Mime
View raw message