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 2013/01/09 05:37:25 UTC

[17/50] [abbrv] git commit: CLOUDSTACK-212: Move api response classes to cloud-api under org.apache.cloudstack

CLOUDSTACK-212: Move api response classes to cloud-api under org.apache.cloudstack

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/63481ecb
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/63481ecb
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/63481ecb

Branch: refs/heads/master
Commit: 63481ecb34d60746fadd65d7edc0dc49844cf0e2
Parents: c5abc18
Author: Rohit Yadav <bh...@apache.org>
Authored: Sat Jan 5 16:27:36 2013 -0800
Committer: Rohit Yadav <bh...@apache.org>
Committed: Sat Jan 5 16:27:36 2013 -0800

----------------------------------------------------------------------
 .../api/response/ExternalFirewallResponse.java     |  146 +++++++++++
 .../api/response/ExternalLoadBalancerResponse.java |  103 ++++++++
 .../api/response/TrafficMonitorResponse.java       |   80 ++++++
 .../api/response/UsageRecordResponse.java          |  199 +++++++++++++++
 .../cloudstack/api/response/UsageTypeResponse.java |   55 ++++
 .../api/commands/AddExternalLoadBalancerCmd.java   |    2 +-
 .../api/commands/ListExternalLoadBalancersCmd.java |    2 +-
 .../element/F5ExternalLoadBalancerElement.java     |    2 +-
 .../F5ExternalLoadBalancerElementService.java      |    2 +-
 .../cloud/api/commands/AddExternalFirewallCmd.java |    2 +-
 .../api/commands/ListExternalFirewallsCmd.java     |    2 +-
 .../element/JuniperSRXExternalFirewallElement.java |    2 +-
 .../element/JuniperSRXFirewallElementService.java  |    2 +-
 .../cloud/api/commands/AddTrafficMonitorCmd.java   |    8 +-
 .../com/cloud/api/commands/GetUsageRecordsCmd.java |    2 +-
 .../cloud/api/commands/ListTrafficMonitorsCmd.java |    4 +-
 .../com/cloud/api/commands/ListUsageTypesCmd.java  |    2 +-
 .../network/ExternalFirewallDeviceManagerImpl.java |    7 +-
 .../ExternalLoadBalancerDeviceManagerImpl.java     |    8 +-
 .../src/com/cloud/network/NetworkUsageManager.java |    2 +-
 .../com/cloud/network/NetworkUsageManagerImpl.java |    2 +-
 .../src/com/cloud/server/ManagementServerExt.java  |    2 +-
 .../com/cloud/server/ManagementServerExtImpl.java  |    2 +-
 .../api/response/ExternalFirewallResponse.java     |  146 -----------
 .../api/response/ExternalLoadBalancerResponse.java |  103 --------
 .../api/response/TrafficMonitorResponse.java       |   80 ------
 .../server/api/response/UsageRecordResponse.java   |  199 ---------------
 .../server/api/response/UsageTypeResponse.java     |   55 ----
 server/src/com/cloud/usage/UsageTypes.java         |    2 +-
 29 files changed, 606 insertions(+), 617 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/63481ecb/api/src/org/apache/cloudstack/api/response/ExternalFirewallResponse.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/response/ExternalFirewallResponse.java b/api/src/org/apache/cloudstack/api/response/ExternalFirewallResponse.java
new file mode 100644
index 0000000..30fe86f
--- /dev/null
+++ b/api/src/org/apache/cloudstack/api/response/ExternalFirewallResponse.java
@@ -0,0 +1,146 @@
+// 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.response;
+
+import org.apache.cloudstack.api.ApiConstants;
+import com.cloud.serializer.Param;
+import com.google.gson.annotations.SerializedName;
+import org.apache.cloudstack.api.response.NetworkDeviceResponse;
+
+public class ExternalFirewallResponse extends NetworkDeviceResponse {
+
+    @SerializedName(ApiConstants.ID) @Param(description="the ID of the external firewall")
+    private String id;
+
+    @SerializedName(ApiConstants.ZONE_ID) @Param(description="the zone ID of the external firewall")
+    private String zoneId;
+
+    @SerializedName(ApiConstants.IP_ADDRESS) @Param(description="the management IP address of the external firewall")
+    private String ipAddress;
+
+    @SerializedName(ApiConstants.USERNAME) @Param(description="the username that's used to log in to the external firewall")
+    private String username;
+
+    @SerializedName(ApiConstants.PUBLIC_INTERFACE) @Param(description="the public interface of the external firewall")
+    private String publicInterface;
+
+    @SerializedName(ApiConstants.USAGE_INTERFACE) @Param(description="the usage interface of the external firewall")
+    private String usageInterface;
+
+    @SerializedName(ApiConstants.PRIVATE_INTERFACE) @Param(description="the private interface of the external firewall")
+    private String privateInterface;
+
+    @SerializedName(ApiConstants.PUBLIC_ZONE) @Param(description="the public security zone of the external firewall")
+    private String publicZone;
+
+    @SerializedName(ApiConstants.PRIVATE_ZONE) @Param(description="the private security zone of the external firewall")
+    private String privateZone;
+
+    @SerializedName(ApiConstants.NUM_RETRIES) @Param(description="the number of times to retry requests to the external firewall")
+    private String numRetries;
+
+    @SerializedName(ApiConstants.TIMEOUT) @Param(description="the timeout (in seconds) for requests to the external firewall")
+    private String timeout;
+
+    public String getId() {
+    	return id;
+    }
+
+    public void setId(String id) {
+    	this.id = id;
+    }
+
+    public String getZoneId() {
+    	return zoneId;
+    }
+
+    public void setZoneId(String zoneId) {
+    	this.zoneId = zoneId;
+    }
+
+    public String getIpAddress() {
+    	return ipAddress;
+    }
+
+    public void setIpAddress(String ipAddress) {
+    	this.ipAddress = ipAddress;
+    }
+
+    public String getUsername() {
+    	return username;
+    }
+
+    public void setUsername(String username) {
+    	this.username = username;
+    }
+
+    public String getPublicInterface() {
+    	return publicInterface;
+    }
+
+    public void setPublicInterface(String publicInterface) {
+    	this.publicInterface = publicInterface;
+    }
+
+    public String getUsageInterface() {
+    	return usageInterface;
+    }
+
+    public void setUsageInterface(String usageInterface) {
+    	this.usageInterface = usageInterface;
+    }
+
+    public String getPrivateInterface() {
+    	return privateInterface;
+    }
+
+    public void setPrivateInterface(String privateInterface) {
+    	this.privateInterface = privateInterface;
+    }
+
+    public String getPublicZone() {
+    	return publicZone;
+    }
+
+    public void setPublicZone(String publicZone) {
+    	this.publicZone = publicZone;
+    }
+
+    public String getPrivateZone() {
+    	return privateZone;
+    }
+
+    public void setPrivateZone(String privateZone) {
+    	this.privateZone = privateZone;
+    }
+
+    public String getNumRetries() {
+    	return numRetries;
+    }
+
+    public void setNumRetries(String numRetries) {
+    	this.numRetries = numRetries;
+    }
+
+    public String getTimeout() {
+    	return timeout;
+    }
+
+    public void setTimeout(String timeout) {
+    	this.timeout = timeout;
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/63481ecb/api/src/org/apache/cloudstack/api/response/ExternalLoadBalancerResponse.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/response/ExternalLoadBalancerResponse.java b/api/src/org/apache/cloudstack/api/response/ExternalLoadBalancerResponse.java
new file mode 100644
index 0000000..6f80c10
--- /dev/null
+++ b/api/src/org/apache/cloudstack/api/response/ExternalLoadBalancerResponse.java
@@ -0,0 +1,103 @@
+// 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.response;
+
+import org.apache.cloudstack.api.ApiConstants;
+import com.cloud.serializer.Param;
+import com.google.gson.annotations.SerializedName;
+import org.apache.cloudstack.api.response.NetworkDeviceResponse;
+
+public class ExternalLoadBalancerResponse extends NetworkDeviceResponse {
+
+	@SerializedName(ApiConstants.ID) @Param(description="the ID of the external load balancer")
+    private String id;
+
+    @SerializedName(ApiConstants.ZONE_ID) @Param(description="the zone ID of the external load balancer")
+    private String zoneId;
+
+    @SerializedName(ApiConstants.IP_ADDRESS) @Param(description="the management IP address of the external load balancer")
+    private String ipAddress;
+
+    @SerializedName(ApiConstants.USERNAME) @Param(description="the username that's used to log in to the external load balancer")
+    private String username;
+
+    @SerializedName(ApiConstants.PUBLIC_INTERFACE) @Param(description="the public interface of the external load balancer")
+    private String publicInterface;
+
+    @SerializedName(ApiConstants.PRIVATE_INTERFACE) @Param(description="the private interface of the external load balancer")
+    private String privateInterface;
+
+    @SerializedName(ApiConstants.NUM_RETRIES) @Param(description="the number of times to retry requests to the external load balancer")
+    private String numRetries;
+
+	public String getId() {
+    	return id;
+    }
+
+    public void setId(String id) {
+    	this.id = id;
+    }
+
+    public String getZoneId() {
+    	return zoneId;
+    }
+
+    public void setZoneId(String zoneId) {
+    	this.zoneId = zoneId;
+    }
+
+    public String getIpAddress() {
+    	return ipAddress;
+    }
+
+    public void setIpAddress(String ipAddress) {
+    	this.ipAddress = ipAddress;
+    }
+
+    public String getUsername() {
+    	return username;
+    }
+
+    public void setUsername(String username) {
+    	this.username = username;
+    }
+
+    public String getPublicInterface() {
+    	return publicInterface;
+    }
+
+    public void setPublicInterface(String publicInterface) {
+    	this.publicInterface = publicInterface;
+    }
+
+    public String getPrivateInterface() {
+    	return privateInterface;
+    }
+
+    public void setPrivateInterface(String privateInterface) {
+    	this.privateInterface = privateInterface;
+    }
+
+    public String getNumRetries() {
+    	return numRetries;
+    }
+
+    public void setNumRetries(String numRetries) {
+    	this.numRetries = numRetries;
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/63481ecb/api/src/org/apache/cloudstack/api/response/TrafficMonitorResponse.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/response/TrafficMonitorResponse.java b/api/src/org/apache/cloudstack/api/response/TrafficMonitorResponse.java
new file mode 100644
index 0000000..366e5d6
--- /dev/null
+++ b/api/src/org/apache/cloudstack/api/response/TrafficMonitorResponse.java
@@ -0,0 +1,80 @@
+// 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.response;
+
+import org.apache.cloudstack.api.ApiConstants;
+import org.apache.cloudstack.api.BaseResponse;
+import com.cloud.serializer.Param;
+import com.google.gson.annotations.SerializedName;
+
+public class TrafficMonitorResponse extends BaseResponse {
+
+    @SerializedName(ApiConstants.ID) @Param(description="the ID of the external firewall")
+    private String id;
+
+    @SerializedName(ApiConstants.ZONE_ID) @Param(description="the zone ID of the external firewall")
+    private String zoneId;
+
+    @SerializedName(ApiConstants.IP_ADDRESS) @Param(description="the management IP address of the external firewall")
+    private String ipAddress;
+
+    @SerializedName(ApiConstants.NUM_RETRIES) @Param(description="the number of times to retry requests to the external firewall")
+    private String numRetries;
+
+    @SerializedName(ApiConstants.TIMEOUT) @Param(description="the timeout (in seconds) for requests to the external firewall")
+    private String timeout;
+
+    public String getId() {
+    	return id;
+    }
+
+    public void setId(String id) {
+    	this.id = id;
+    }
+
+    public String getZoneId() {
+    	return zoneId;
+    }
+
+    public void setZoneId(String zoneId) {
+    	this.zoneId = zoneId;
+    }
+
+    public String getIpAddress() {
+    	return ipAddress;
+    }
+
+    public void setIpAddress(String ipAddress) {
+    	this.ipAddress = ipAddress;
+    }
+
+    public String getNumRetries() {
+    	return numRetries;
+    }
+
+    public void setNumRetries(String numRetries) {
+    	this.numRetries = numRetries;
+    }
+
+    public String getTimeout() {
+    	return timeout;
+    }
+
+    public void setTimeout(String timeout) {
+    	this.timeout = timeout;
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/63481ecb/api/src/org/apache/cloudstack/api/response/UsageRecordResponse.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/response/UsageRecordResponse.java b/api/src/org/apache/cloudstack/api/response/UsageRecordResponse.java
new file mode 100644
index 0000000..9679575
--- /dev/null
+++ b/api/src/org/apache/cloudstack/api/response/UsageRecordResponse.java
@@ -0,0 +1,199 @@
+// 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.response;
+
+import org.apache.cloudstack.api.ApiConstants;
+import org.apache.cloudstack.api.BaseResponse;
+import org.apache.cloudstack.api.response.ControlledEntityResponse;
+import com.cloud.serializer.Param;
+import com.google.gson.annotations.SerializedName;
+
+@SuppressWarnings("unused")
+public class UsageRecordResponse extends BaseResponse implements ControlledEntityResponse{
+    @SerializedName(ApiConstants.ACCOUNT) @Param(description="the user account name")
+    private String accountName;
+
+    @SerializedName(ApiConstants.ACCOUNT_ID) @Param(description="the user account Id")
+    private String accountId;
+
+    @SerializedName(ApiConstants.PROJECT_ID) @Param(description="the project id of the resource")
+    private String projectId;
+
+    @SerializedName(ApiConstants.PROJECT) @Param(description="the project name of the resource")
+    private String projectName;
+
+    @SerializedName(ApiConstants.DOMAIN_ID) @Param(description="the domain ID")
+    private String domainId;
+
+    @SerializedName(ApiConstants.DOMAIN) @Param(description="the domain the resource is associated with")
+    private String domainName;
+
+    @SerializedName(ApiConstants.ZONE_ID) @Param(description="the zone ID")
+    private String zoneId;
+
+    @SerializedName(ApiConstants.DESCRIPTION) @Param(description="description of the usage record")
+    private String description;
+
+    @SerializedName("usage") @Param(description="usage in hours")
+    private String usage;
+
+    @SerializedName("usagetype") @Param(description="usage type ID")
+    private Integer usageType;
+
+    @SerializedName("rawusage") @Param(description="raw usage in hours")
+    private String rawUsage;
+
+    @SerializedName(ApiConstants.VIRTUAL_MACHINE_ID) @Param(description="virtual machine ID")
+    private String virtualMachineId;
+
+    @SerializedName(ApiConstants.NAME) @Param(description="virtual machine name")
+    private String vmName;
+
+    @SerializedName("offeringid") @Param(description="offering ID")
+    private String  offeringId;
+
+    @SerializedName(ApiConstants.TEMPLATE_ID) @Param(description="template ID")
+    private String templateId;
+
+    @SerializedName("usageid") @Param(description="id of the resource")
+    private String usageId;
+
+    @SerializedName(ApiConstants.TYPE) @Param(description="resource type")
+    private String type;
+
+    @SerializedName(ApiConstants.SIZE) @Param(description="resource size")
+    private Long size;
+
+    @SerializedName(ApiConstants.START_DATE) @Param(description="start date of the usage record")
+    private String startDate;
+
+    @SerializedName(ApiConstants.END_DATE) @Param(description="end date of the usage record")
+    private String endDate;
+
+    @SerializedName("issourcenat") @Param(description="True if the IPAddress is source NAT")
+    private Boolean isSourceNat;
+
+    @SerializedName(ApiConstants.IS_SYSTEM) @Param(description="True if the IPAddress is system IP - allocated during vm deploy or lb rule create")
+    private Boolean isSystem;
+
+    @SerializedName("networkid") @Param(description="id of the network")
+    private String networkId;
+
+    @SerializedName("isdefault") @Param(description="True if the resource is default")
+    private Boolean isDefault;
+
+    @Override
+    public void setAccountName(String accountName) {
+        this.accountName = accountName;
+    }
+
+    public void setAccountId(String accountId) {
+        this.accountId = accountId;
+    }
+
+    @Override
+    public void setDomainId(String domainId) {
+        this.domainId = domainId;
+    }
+
+    public void setZoneId(String zoneId) {
+        this.zoneId = zoneId;
+    }
+
+    public void setDescription(String description) {
+        this.description = description;
+    }
+
+    public void setUsage(String usage) {
+        this.usage = usage;
+    }
+
+    public void setUsageType(Integer usageType) {
+        this.usageType = usageType;
+    }
+
+    public void setRawUsage(String rawUsage) {
+        this.rawUsage = rawUsage;
+    }
+
+    public void setVirtualMachineId(String virtualMachineId) {
+        this.virtualMachineId = virtualMachineId;
+    }
+
+    public void setVmName(String vmName) {
+        this.vmName = vmName;
+    }
+
+    public void setOfferingId(String offeringId) {
+        this.offeringId =  offeringId;
+    }
+
+    public void setTemplateId(String templateId) {
+        this.templateId = templateId;
+    }
+
+    public void setUsageId(String usageId) {
+        this.usageId = usageId;
+    }
+
+    public void setType(String type) {
+        this.type = type;
+    }
+
+    public void setSize(Long size) {
+        this.size = size;
+    }
+
+    public void setStartDate(String startDate) {
+        this.startDate = startDate;
+    }
+
+    public void setEndDate(String endDate) {
+        this.endDate = endDate;
+    }
+
+    public void setSourceNat(Boolean isSourceNat) {
+        this.isSourceNat = isSourceNat;
+    }
+
+    public void setSystem(Boolean isSystem) {
+        this.isSystem = isSystem;
+    }
+
+    @Override
+    public void setProjectId(String projectId) {
+        this.projectId = projectId;
+    }
+
+    @Override
+    public void setProjectName(String projectName) {
+        this.projectName = projectName;
+    }
+
+    @Override
+    public void setDomainName(String domainName) {
+        this.domainName = domainName;
+    }
+
+    public void setNetworkId(String networkId) {
+        this.networkId =  networkId;
+    }
+
+    public void setDefault(Boolean isDefault) {
+        this.isDefault = isDefault;
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/63481ecb/api/src/org/apache/cloudstack/api/response/UsageTypeResponse.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/response/UsageTypeResponse.java b/api/src/org/apache/cloudstack/api/response/UsageTypeResponse.java
new file mode 100644
index 0000000..b21d26f
--- /dev/null
+++ b/api/src/org/apache/cloudstack/api/response/UsageTypeResponse.java
@@ -0,0 +1,55 @@
+// 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.response;
+
+import org.apache.cloudstack.api.ApiConstants;
+import org.apache.cloudstack.api.BaseResponse;
+import com.cloud.serializer.Param;
+import com.google.gson.annotations.SerializedName;
+
+public class UsageTypeResponse extends BaseResponse {
+
+    @SerializedName("usagetypeid") @Param(description="usage type")
+    private Integer usageType;
+
+    @SerializedName(ApiConstants.DESCRIPTION) @Param(description="description of usage type")
+    private String description;
+
+    
+    public String getDescription() {
+        return description;
+    }
+
+    public void setDescription(String description) {
+        this.description = description;
+    }
+
+    public Integer getUsageType() {
+        return usageType;
+    }
+
+    public void setUsageType(Integer usageType) {
+        this.usageType = usageType;
+    }
+
+    public UsageTypeResponse(Integer usageType, String description){
+    	this.usageType = usageType;
+    	this.description = description;
+    	setObjectName("usagetype");
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/63481ecb/plugins/network-elements/f5/src/com/cloud/api/commands/AddExternalLoadBalancerCmd.java
----------------------------------------------------------------------
diff --git a/plugins/network-elements/f5/src/com/cloud/api/commands/AddExternalLoadBalancerCmd.java b/plugins/network-elements/f5/src/com/cloud/api/commands/AddExternalLoadBalancerCmd.java
index 5b931e1..69a21fc 100644
--- a/plugins/network-elements/f5/src/com/cloud/api/commands/AddExternalLoadBalancerCmd.java
+++ b/plugins/network-elements/f5/src/com/cloud/api/commands/AddExternalLoadBalancerCmd.java
@@ -29,7 +29,7 @@ import org.apache.cloudstack.api.ServerApiException;
 import com.cloud.exception.InvalidParameterValueException;
 import com.cloud.host.Host;
 import com.cloud.network.element.F5ExternalLoadBalancerElementService;
-import com.cloud.server.api.response.ExternalLoadBalancerResponse;
+import org.apache.cloudstack.api.response.ExternalLoadBalancerResponse;
 import com.cloud.user.Account;
 import com.cloud.utils.exception.CloudRuntimeException;
 

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/63481ecb/plugins/network-elements/f5/src/com/cloud/api/commands/ListExternalLoadBalancersCmd.java
----------------------------------------------------------------------
diff --git a/plugins/network-elements/f5/src/com/cloud/api/commands/ListExternalLoadBalancersCmd.java b/plugins/network-elements/f5/src/com/cloud/api/commands/ListExternalLoadBalancersCmd.java
index 029c502..3ee8d48 100644
--- a/plugins/network-elements/f5/src/com/cloud/api/commands/ListExternalLoadBalancersCmd.java
+++ b/plugins/network-elements/f5/src/com/cloud/api/commands/ListExternalLoadBalancersCmd.java
@@ -28,7 +28,7 @@ import org.apache.cloudstack.api.response.HostResponse;
 import org.apache.cloudstack.api.response.ListResponse;
 import com.cloud.host.Host;
 import com.cloud.network.element.F5ExternalLoadBalancerElementService;
-import com.cloud.server.api.response.ExternalLoadBalancerResponse;
+import org.apache.cloudstack.api.response.ExternalLoadBalancerResponse;
 
 @APICommand(name = "listExternalLoadBalancers", description="Lists F5 external load balancer appliances added in a zone.", responseObject = HostResponse.class)
 @Deprecated // API supported for backward compatibility.

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/63481ecb/plugins/network-elements/f5/src/com/cloud/network/element/F5ExternalLoadBalancerElement.java
----------------------------------------------------------------------
diff --git a/plugins/network-elements/f5/src/com/cloud/network/element/F5ExternalLoadBalancerElement.java b/plugins/network-elements/f5/src/com/cloud/network/element/F5ExternalLoadBalancerElement.java
index ef6d197..735814c 100644
--- a/plugins/network-elements/f5/src/com/cloud/network/element/F5ExternalLoadBalancerElement.java
+++ b/plugins/network-elements/f5/src/com/cloud/network/element/F5ExternalLoadBalancerElement.java
@@ -80,7 +80,7 @@ import com.cloud.network.rules.LbStickinessMethod;
 import com.cloud.network.rules.LbStickinessMethod.StickinessMethodType;
 import com.cloud.offering.NetworkOffering;
 import com.cloud.resource.ServerResource;
-import com.cloud.server.api.response.ExternalLoadBalancerResponse;
+import org.apache.cloudstack.api.response.ExternalLoadBalancerResponse;
 import com.cloud.utils.NumbersUtil;
 import com.cloud.utils.component.Inject;
 import com.cloud.utils.exception.CloudRuntimeException;

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/63481ecb/plugins/network-elements/f5/src/com/cloud/network/element/F5ExternalLoadBalancerElementService.java
----------------------------------------------------------------------
diff --git a/plugins/network-elements/f5/src/com/cloud/network/element/F5ExternalLoadBalancerElementService.java b/plugins/network-elements/f5/src/com/cloud/network/element/F5ExternalLoadBalancerElementService.java
index 24c7675..951bc3c 100644
--- a/plugins/network-elements/f5/src/com/cloud/network/element/F5ExternalLoadBalancerElementService.java
+++ b/plugins/network-elements/f5/src/com/cloud/network/element/F5ExternalLoadBalancerElementService.java
@@ -30,7 +30,7 @@ import com.cloud.api.response.F5LoadBalancerResponse;
 import com.cloud.host.Host;
 import com.cloud.network.ExternalLoadBalancerDeviceVO;
 import com.cloud.network.Network;
-import com.cloud.server.api.response.ExternalLoadBalancerResponse;
+import org.apache.cloudstack.api.response.ExternalLoadBalancerResponse;
 import com.cloud.utils.component.PluggableService;
 
 @SuppressWarnings("deprecation")

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/63481ecb/plugins/network-elements/juniper-srx/src/com/cloud/api/commands/AddExternalFirewallCmd.java
----------------------------------------------------------------------
diff --git a/plugins/network-elements/juniper-srx/src/com/cloud/api/commands/AddExternalFirewallCmd.java b/plugins/network-elements/juniper-srx/src/com/cloud/api/commands/AddExternalFirewallCmd.java
index c2f8f03..cda27fb 100644
--- a/plugins/network-elements/juniper-srx/src/com/cloud/api/commands/AddExternalFirewallCmd.java
+++ b/plugins/network-elements/juniper-srx/src/com/cloud/api/commands/AddExternalFirewallCmd.java
@@ -28,7 +28,7 @@ import org.apache.cloudstack.api.ServerApiException;
 import com.cloud.exception.InvalidParameterValueException;
 import com.cloud.host.Host;
 import com.cloud.network.element.JuniperSRXFirewallElementService;
-import com.cloud.server.api.response.ExternalFirewallResponse;
+import org.apache.cloudstack.api.response.ExternalFirewallResponse;
 import com.cloud.user.Account;
 import com.cloud.utils.exception.CloudRuntimeException;
 

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/63481ecb/plugins/network-elements/juniper-srx/src/com/cloud/api/commands/ListExternalFirewallsCmd.java
----------------------------------------------------------------------
diff --git a/plugins/network-elements/juniper-srx/src/com/cloud/api/commands/ListExternalFirewallsCmd.java b/plugins/network-elements/juniper-srx/src/com/cloud/api/commands/ListExternalFirewallsCmd.java
index f2c33bc..65aa92b 100644
--- a/plugins/network-elements/juniper-srx/src/com/cloud/api/commands/ListExternalFirewallsCmd.java
+++ b/plugins/network-elements/juniper-srx/src/com/cloud/api/commands/ListExternalFirewallsCmd.java
@@ -31,7 +31,7 @@ import org.apache.cloudstack.api.PlugService;
 import org.apache.cloudstack.api.response.ListResponse;
 import com.cloud.host.Host;
 import com.cloud.network.element.JuniperSRXFirewallElementService;
-import com.cloud.server.api.response.ExternalFirewallResponse;
+import org.apache.cloudstack.api.response.ExternalFirewallResponse;
 
 @APICommand(name = "listExternalFirewalls", description="List external firewall appliances.", responseObject = ExternalFirewallResponse.class)
 public class ListExternalFirewallsCmd extends BaseListCmd {

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/63481ecb/plugins/network-elements/juniper-srx/src/com/cloud/network/element/JuniperSRXExternalFirewallElement.java
----------------------------------------------------------------------
diff --git a/plugins/network-elements/juniper-srx/src/com/cloud/network/element/JuniperSRXExternalFirewallElement.java b/plugins/network-elements/juniper-srx/src/com/cloud/network/element/JuniperSRXExternalFirewallElement.java
index 9853f7e..0479648 100644
--- a/plugins/network-elements/juniper-srx/src/com/cloud/network/element/JuniperSRXExternalFirewallElement.java
+++ b/plugins/network-elements/juniper-srx/src/com/cloud/network/element/JuniperSRXExternalFirewallElement.java
@@ -82,7 +82,7 @@ import com.cloud.network.rules.StaticNat;
 import com.cloud.offering.NetworkOffering;
 import com.cloud.offerings.dao.NetworkOfferingDao;
 import com.cloud.resource.ServerResource;
-import com.cloud.server.api.response.ExternalFirewallResponse;
+import org.apache.cloudstack.api.response.ExternalFirewallResponse;
 import com.cloud.utils.NumbersUtil;
 import com.cloud.utils.component.Inject;
 import com.cloud.utils.exception.CloudRuntimeException;

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/63481ecb/plugins/network-elements/juniper-srx/src/com/cloud/network/element/JuniperSRXFirewallElementService.java
----------------------------------------------------------------------
diff --git a/plugins/network-elements/juniper-srx/src/com/cloud/network/element/JuniperSRXFirewallElementService.java b/plugins/network-elements/juniper-srx/src/com/cloud/network/element/JuniperSRXFirewallElementService.java
index 6d07d30..d5f5384 100644
--- a/plugins/network-elements/juniper-srx/src/com/cloud/network/element/JuniperSRXFirewallElementService.java
+++ b/plugins/network-elements/juniper-srx/src/com/cloud/network/element/JuniperSRXFirewallElementService.java
@@ -30,7 +30,7 @@ import com.cloud.api.response.SrxFirewallResponse;
 import com.cloud.host.Host;
 import com.cloud.network.ExternalFirewallDeviceVO;
 import com.cloud.network.Network;
-import com.cloud.server.api.response.ExternalFirewallResponse;
+import org.apache.cloudstack.api.response.ExternalFirewallResponse;
 import com.cloud.utils.component.PluggableService;
 
 public interface JuniperSRXFirewallElementService  extends PluggableService {

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/63481ecb/server/src/com/cloud/api/commands/AddTrafficMonitorCmd.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/api/commands/AddTrafficMonitorCmd.java b/server/src/com/cloud/api/commands/AddTrafficMonitorCmd.java
index f20e5b9..98e893e 100644
--- a/server/src/com/cloud/api/commands/AddTrafficMonitorCmd.java
+++ b/server/src/com/cloud/api/commands/AddTrafficMonitorCmd.java
@@ -25,8 +25,8 @@ import com.cloud.exception.InvalidParameterValueException;
 import com.cloud.host.Host;
 import com.cloud.network.NetworkUsageManager;
 import com.cloud.server.ManagementService;
-import com.cloud.server.api.response.ExternalFirewallResponse;
-import com.cloud.server.api.response.TrafficMonitorResponse;
+import org.apache.cloudstack.api.response.ExternalFirewallResponse;
+import org.apache.cloudstack.api.response.TrafficMonitorResponse;
 import com.cloud.user.Account;
 import com.cloud.utils.component.ComponentLocator;
 import com.cloud.utils.exception.CloudRuntimeException;
@@ -92,8 +92,8 @@ public class AddTrafficMonitorCmd extends BaseCmd {
 		try {
 		    ComponentLocator locator = ComponentLocator.getLocator(ManagementService.Name);
 		    NetworkUsageManager networkUsageMgr = locator.getManager(NetworkUsageManager.class);
-			Host trafficMoinitor = networkUsageMgr.addTrafficMonitor(this);
-			TrafficMonitorResponse response = networkUsageMgr.getApiResponse(trafficMoinitor);
+			Host trafficMonitor = networkUsageMgr.addTrafficMonitor(this);
+			TrafficMonitorResponse response = networkUsageMgr.getApiResponse(trafficMonitor);
 			response.setObjectName("trafficmonitor");
 			response.setResponseName(getCommandName());
 			this.setResponseObject(response);

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/63481ecb/server/src/com/cloud/api/commands/GetUsageRecordsCmd.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/api/commands/GetUsageRecordsCmd.java b/server/src/com/cloud/api/commands/GetUsageRecordsCmd.java
index 434d81c..60afbd0 100644
--- a/server/src/com/cloud/api/commands/GetUsageRecordsCmd.java
+++ b/server/src/com/cloud/api/commands/GetUsageRecordsCmd.java
@@ -39,7 +39,7 @@ import org.apache.cloudstack.api.Parameter;
 import org.apache.cloudstack.api.response.ListResponse;
 import com.cloud.projects.Project;
 import com.cloud.server.ManagementServerExt;
-import com.cloud.server.api.response.UsageRecordResponse;
+import org.apache.cloudstack.api.response.UsageRecordResponse;
 import com.cloud.storage.VMTemplateVO;
 import com.cloud.usage.UsageTypes;
 import com.cloud.usage.UsageVO;

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/63481ecb/server/src/com/cloud/api/commands/ListTrafficMonitorsCmd.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/api/commands/ListTrafficMonitorsCmd.java b/server/src/com/cloud/api/commands/ListTrafficMonitorsCmd.java
index aba9ffd..ccbcec9 100644
--- a/server/src/com/cloud/api/commands/ListTrafficMonitorsCmd.java
+++ b/server/src/com/cloud/api/commands/ListTrafficMonitorsCmd.java
@@ -31,8 +31,8 @@ import org.apache.cloudstack.api.response.ListResponse;
 import com.cloud.host.Host;
 import com.cloud.network.NetworkUsageManager;
 import com.cloud.server.ManagementService;
-import com.cloud.server.api.response.ExternalFirewallResponse;
-import com.cloud.server.api.response.TrafficMonitorResponse;
+import org.apache.cloudstack.api.response.ExternalFirewallResponse;
+import org.apache.cloudstack.api.response.TrafficMonitorResponse;
 import com.cloud.utils.component.ComponentLocator;
 
 @APICommand(name = "listTrafficMonitors", description="List traffic monitor Hosts.", responseObject = ExternalFirewallResponse.class)

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/63481ecb/server/src/com/cloud/api/commands/ListUsageTypesCmd.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/api/commands/ListUsageTypesCmd.java b/server/src/com/cloud/api/commands/ListUsageTypesCmd.java
index 97526fb..dfa5dc1 100644
--- a/server/src/com/cloud/api/commands/ListUsageTypesCmd.java
+++ b/server/src/com/cloud/api/commands/ListUsageTypesCmd.java
@@ -24,7 +24,7 @@ import org.apache.log4j.Logger;
 import org.apache.cloudstack.api.BaseCmd;
 import org.apache.cloudstack.api.response.ListResponse;
 import com.cloud.server.ManagementServerExt;
-import com.cloud.server.api.response.UsageTypeResponse;
+import org.apache.cloudstack.api.response.UsageTypeResponse;
 import com.cloud.user.Account;
 
 @APICommand(name = "listUsageTypes", description = "List Usage Types", responseObject = UsageTypeResponse.class)

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/63481ecb/server/src/com/cloud/network/ExternalFirewallDeviceManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/ExternalFirewallDeviceManagerImpl.java b/server/src/com/cloud/network/ExternalFirewallDeviceManagerImpl.java
index 1ad5fdc..42cdc74 100644
--- a/server/src/com/cloud/network/ExternalFirewallDeviceManagerImpl.java
+++ b/server/src/com/cloud/network/ExternalFirewallDeviceManagerImpl.java
@@ -50,7 +50,6 @@ import com.cloud.dc.Vlan;
 import com.cloud.dc.VlanVO;
 import com.cloud.dc.dao.DataCenterDao;
 import com.cloud.dc.dao.VlanDao;
-import com.cloud.exception.AgentUnavailableException;
 import com.cloud.exception.InsufficientCapacityException;
 import com.cloud.exception.InsufficientNetworkCapacityException;
 import com.cloud.exception.InvalidParameterValueException;
@@ -75,10 +74,8 @@ import com.cloud.network.dao.PhysicalNetworkServiceProviderDao;
 import com.cloud.network.dao.PhysicalNetworkServiceProviderVO;
 import com.cloud.network.dao.VpnUserDao;
 import com.cloud.network.rules.FirewallRule;
-import com.cloud.network.rules.FirewallRule.Purpose;
 import com.cloud.network.rules.PortForwardingRule;
 import com.cloud.network.rules.StaticNat;
-import com.cloud.network.rules.StaticNatRule;
 import com.cloud.network.rules.dao.PortForwardingRulesDao;
 import com.cloud.offering.NetworkOffering;
 import com.cloud.offerings.dao.NetworkOfferingDao;
@@ -87,8 +84,7 @@ import com.cloud.resource.ResourceState;
 import com.cloud.resource.ResourceStateAdapter;
 import com.cloud.resource.ServerResource;
 import com.cloud.resource.UnableDeleteHostException;
-import com.cloud.resource.ResourceStateAdapter.DeleteHostAnswer;
-import com.cloud.server.api.response.ExternalFirewallResponse;
+import org.apache.cloudstack.api.response.ExternalFirewallResponse;
 import com.cloud.user.Account;
 import com.cloud.user.AccountManager;
 import com.cloud.user.dao.AccountDao;
@@ -100,7 +96,6 @@ import com.cloud.utils.db.DB;
 import com.cloud.utils.db.GlobalLock;
 import com.cloud.utils.db.Transaction;
 import com.cloud.utils.exception.CloudRuntimeException;
-import com.cloud.utils.net.Ip;
 import com.cloud.utils.net.NetUtils;
 import com.cloud.utils.net.UrlUtil;
 import com.cloud.vm.Nic.ReservationStrategy;

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/63481ecb/server/src/com/cloud/network/ExternalLoadBalancerDeviceManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/ExternalLoadBalancerDeviceManagerImpl.java b/server/src/com/cloud/network/ExternalLoadBalancerDeviceManagerImpl.java
index d9c4fd1..4f9404e 100644
--- a/server/src/com/cloud/network/ExternalLoadBalancerDeviceManagerImpl.java
+++ b/server/src/com/cloud/network/ExternalLoadBalancerDeviceManagerImpl.java
@@ -36,10 +36,8 @@ import com.cloud.agent.api.routing.DestroyLoadBalancerApplianceCommand;
 import com.cloud.agent.api.routing.IpAssocCommand;
 import com.cloud.agent.api.routing.LoadBalancerConfigCommand;
 import com.cloud.agent.api.routing.NetworkElementCommand;
-import com.cloud.agent.api.routing.SetStaticNatRulesCommand;
 import com.cloud.agent.api.to.IpAddressTO;
 import com.cloud.agent.api.to.LoadBalancerTO;
-import com.cloud.agent.api.to.StaticNatRuleTO;
 import org.apache.cloudstack.api.ApiConstants;
 import com.cloud.configuration.Config;
 import com.cloud.configuration.dao.ConfigurationDao;
@@ -48,7 +46,6 @@ import com.cloud.dc.DataCenterIpAddressVO;
 import com.cloud.dc.DataCenterVO;
 import com.cloud.dc.Pod;
 import com.cloud.dc.Vlan.VlanType;
-import com.cloud.dc.VlanVO;
 import com.cloud.dc.dao.DataCenterDao;
 import com.cloud.dc.dao.HostPodDao;
 import com.cloud.dc.dao.VlanDao;
@@ -89,11 +86,8 @@ import com.cloud.network.resource.CreateLoadBalancerApplianceAnswer;
 import com.cloud.network.resource.DestroyLoadBalancerApplianceAnswer;
 import com.cloud.network.rules.FirewallRule;
 import com.cloud.network.rules.FirewallRule.Purpose;
-import com.cloud.network.rules.FirewallRuleVO;
 import com.cloud.network.rules.StaticNat;
 import com.cloud.network.rules.StaticNatImpl;
-import com.cloud.network.rules.StaticNatRule;
-import com.cloud.network.rules.StaticNatRuleImpl;
 import com.cloud.network.rules.dao.PortForwardingRulesDao;
 import com.cloud.offerings.NetworkOfferingVO;
 import com.cloud.offerings.dao.NetworkOfferingDao;
@@ -102,7 +96,7 @@ import com.cloud.resource.ResourceState;
 import com.cloud.resource.ResourceStateAdapter;
 import com.cloud.resource.ServerResource;
 import com.cloud.resource.UnableDeleteHostException;
-import com.cloud.server.api.response.ExternalLoadBalancerResponse;
+import org.apache.cloudstack.api.response.ExternalLoadBalancerResponse;
 import com.cloud.user.Account;
 import com.cloud.user.AccountManager;
 import com.cloud.user.dao.AccountDao;

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/63481ecb/server/src/com/cloud/network/NetworkUsageManager.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/NetworkUsageManager.java b/server/src/com/cloud/network/NetworkUsageManager.java
index 10264b8..3d4577b 100644
--- a/server/src/com/cloud/network/NetworkUsageManager.java
+++ b/server/src/com/cloud/network/NetworkUsageManager.java
@@ -23,7 +23,7 @@ import com.cloud.api.commands.DeleteTrafficMonitorCmd;
 import com.cloud.api.commands.ListTrafficMonitorsCmd;
 import com.cloud.host.Host;
 import com.cloud.host.HostVO;
-import com.cloud.server.api.response.TrafficMonitorResponse;
+import org.apache.cloudstack.api.response.TrafficMonitorResponse;
 import com.cloud.utils.component.Manager;
 
 public interface NetworkUsageManager extends Manager {

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/63481ecb/server/src/com/cloud/network/NetworkUsageManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/NetworkUsageManagerImpl.java b/server/src/com/cloud/network/NetworkUsageManagerImpl.java
index b30f185..2485a8c 100755
--- a/server/src/com/cloud/network/NetworkUsageManagerImpl.java
+++ b/server/src/com/cloud/network/NetworkUsageManagerImpl.java
@@ -67,7 +67,7 @@ import com.cloud.resource.ResourceManager;
 import com.cloud.resource.ResourceStateAdapter;
 import com.cloud.resource.ServerResource;
 import com.cloud.resource.UnableDeleteHostException;
-import com.cloud.server.api.response.TrafficMonitorResponse;
+import org.apache.cloudstack.api.response.TrafficMonitorResponse;
 import com.cloud.usage.UsageIPAddressVO;
 import com.cloud.user.AccountManager;
 import com.cloud.user.AccountVO;

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/63481ecb/server/src/com/cloud/server/ManagementServerExt.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/server/ManagementServerExt.java b/server/src/com/cloud/server/ManagementServerExt.java
index 0804e4f..4e506a3 100644
--- a/server/src/com/cloud/server/ManagementServerExt.java
+++ b/server/src/com/cloud/server/ManagementServerExt.java
@@ -21,7 +21,7 @@ import java.util.TimeZone;
 
 import com.cloud.api.commands.GenerateUsageRecordsCmd;
 import com.cloud.api.commands.GetUsageRecordsCmd;
-import com.cloud.server.api.response.UsageTypeResponse;
+import org.apache.cloudstack.api.response.UsageTypeResponse;
 import com.cloud.usage.UsageVO;
 public interface ManagementServerExt extends ManagementServer {
     /**

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/63481ecb/server/src/com/cloud/server/ManagementServerExtImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/server/ManagementServerExtImpl.java b/server/src/com/cloud/server/ManagementServerExtImpl.java
index fbd517d..b732027 100644
--- a/server/src/com/cloud/server/ManagementServerExtImpl.java
+++ b/server/src/com/cloud/server/ManagementServerExtImpl.java
@@ -29,7 +29,7 @@ import com.cloud.domain.dao.DomainDao;
 import com.cloud.exception.InvalidParameterValueException;
 import com.cloud.exception.PermissionDeniedException;
 import com.cloud.projects.Project;
-import com.cloud.server.api.response.UsageTypeResponse;
+import org.apache.cloudstack.api.response.UsageTypeResponse;
 import com.cloud.usage.UsageJobVO;
 import com.cloud.usage.UsageTypes;
 import com.cloud.usage.UsageVO;

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/63481ecb/server/src/com/cloud/server/api/response/ExternalFirewallResponse.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/server/api/response/ExternalFirewallResponse.java b/server/src/com/cloud/server/api/response/ExternalFirewallResponse.java
deleted file mode 100644
index c6c7c4b..0000000
--- a/server/src/com/cloud/server/api/response/ExternalFirewallResponse.java
+++ /dev/null
@@ -1,146 +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.server.api.response;
-
-import org.apache.cloudstack.api.ApiConstants;
-import com.cloud.serializer.Param;
-import com.google.gson.annotations.SerializedName;
-import org.apache.cloudstack.api.response.NetworkDeviceResponse;
-
-public class ExternalFirewallResponse extends NetworkDeviceResponse {
-
-    @SerializedName(ApiConstants.ID) @Param(description="the ID of the external firewall")
-    private String id;
-
-    @SerializedName(ApiConstants.ZONE_ID) @Param(description="the zone ID of the external firewall")
-    private String zoneId;
-
-    @SerializedName(ApiConstants.IP_ADDRESS) @Param(description="the management IP address of the external firewall")
-    private String ipAddress;
-
-    @SerializedName(ApiConstants.USERNAME) @Param(description="the username that's used to log in to the external firewall")
-    private String username;
-
-    @SerializedName(ApiConstants.PUBLIC_INTERFACE) @Param(description="the public interface of the external firewall")
-    private String publicInterface;
-
-    @SerializedName(ApiConstants.USAGE_INTERFACE) @Param(description="the usage interface of the external firewall")
-    private String usageInterface;
-
-    @SerializedName(ApiConstants.PRIVATE_INTERFACE) @Param(description="the private interface of the external firewall")
-    private String privateInterface;
-
-    @SerializedName(ApiConstants.PUBLIC_ZONE) @Param(description="the public security zone of the external firewall")
-    private String publicZone;
-
-    @SerializedName(ApiConstants.PRIVATE_ZONE) @Param(description="the private security zone of the external firewall")
-    private String privateZone;
-
-    @SerializedName(ApiConstants.NUM_RETRIES) @Param(description="the number of times to retry requests to the external firewall")
-    private String numRetries;
-
-    @SerializedName(ApiConstants.TIMEOUT) @Param(description="the timeout (in seconds) for requests to the external firewall")
-    private String timeout;
-
-    public String getId() {
-    	return id;
-    }
-
-    public void setId(String id) {
-    	this.id = id;
-    }
-
-    public String getZoneId() {
-    	return zoneId;
-    }
-
-    public void setZoneId(String zoneId) {
-    	this.zoneId = zoneId;
-    }
-
-    public String getIpAddress() {
-    	return ipAddress;
-    }
-
-    public void setIpAddress(String ipAddress) {
-    	this.ipAddress = ipAddress;
-    }
-
-    public String getUsername() {
-    	return username;
-    }
-
-    public void setUsername(String username) {
-    	this.username = username;
-    }
-
-    public String getPublicInterface() {
-    	return publicInterface;
-    }
-
-    public void setPublicInterface(String publicInterface) {
-    	this.publicInterface = publicInterface;
-    }
-
-    public String getUsageInterface() {
-    	return usageInterface;
-    }
-
-    public void setUsageInterface(String usageInterface) {
-    	this.usageInterface = usageInterface;
-    }
-
-    public String getPrivateInterface() {
-    	return privateInterface;
-    }
-
-    public void setPrivateInterface(String privateInterface) {
-    	this.privateInterface = privateInterface;
-    }
-
-    public String getPublicZone() {
-    	return publicZone;
-    }
-
-    public void setPublicZone(String publicZone) {
-    	this.publicZone = publicZone;
-    }
-
-    public String getPrivateZone() {
-    	return privateZone;
-    }
-
-    public void setPrivateZone(String privateZone) {
-    	this.privateZone = privateZone;
-    }
-
-    public String getNumRetries() {
-    	return numRetries;
-    }
-
-    public void setNumRetries(String numRetries) {
-    	this.numRetries = numRetries;
-    }
-
-    public String getTimeout() {
-    	return timeout;
-    }
-
-    public void setTimeout(String timeout) {
-    	this.timeout = timeout;
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/63481ecb/server/src/com/cloud/server/api/response/ExternalLoadBalancerResponse.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/server/api/response/ExternalLoadBalancerResponse.java b/server/src/com/cloud/server/api/response/ExternalLoadBalancerResponse.java
deleted file mode 100644
index ccda410..0000000
--- a/server/src/com/cloud/server/api/response/ExternalLoadBalancerResponse.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.server.api.response;
-
-import org.apache.cloudstack.api.ApiConstants;
-import com.cloud.serializer.Param;
-import com.google.gson.annotations.SerializedName;
-import org.apache.cloudstack.api.response.NetworkDeviceResponse;
-
-public class ExternalLoadBalancerResponse extends NetworkDeviceResponse {
-
-	@SerializedName(ApiConstants.ID) @Param(description="the ID of the external load balancer")
-    private String id;
-
-    @SerializedName(ApiConstants.ZONE_ID) @Param(description="the zone ID of the external load balancer")
-    private String zoneId;
-
-    @SerializedName(ApiConstants.IP_ADDRESS) @Param(description="the management IP address of the external load balancer")
-    private String ipAddress;
-
-    @SerializedName(ApiConstants.USERNAME) @Param(description="the username that's used to log in to the external load balancer")
-    private String username;
-
-    @SerializedName(ApiConstants.PUBLIC_INTERFACE) @Param(description="the public interface of the external load balancer")
-    private String publicInterface;
-
-    @SerializedName(ApiConstants.PRIVATE_INTERFACE) @Param(description="the private interface of the external load balancer")
-    private String privateInterface;
-
-    @SerializedName(ApiConstants.NUM_RETRIES) @Param(description="the number of times to retry requests to the external load balancer")
-    private String numRetries;
-
-	public String getId() {
-    	return id;
-    }
-
-    public void setId(String id) {
-    	this.id = id;
-    }
-
-    public String getZoneId() {
-    	return zoneId;
-    }
-
-    public void setZoneId(String zoneId) {
-    	this.zoneId = zoneId;
-    }
-
-    public String getIpAddress() {
-    	return ipAddress;
-    }
-
-    public void setIpAddress(String ipAddress) {
-    	this.ipAddress = ipAddress;
-    }
-
-    public String getUsername() {
-    	return username;
-    }
-
-    public void setUsername(String username) {
-    	this.username = username;
-    }
-
-    public String getPublicInterface() {
-    	return publicInterface;
-    }
-
-    public void setPublicInterface(String publicInterface) {
-    	this.publicInterface = publicInterface;
-    }
-
-    public String getPrivateInterface() {
-    	return privateInterface;
-    }
-
-    public void setPrivateInterface(String privateInterface) {
-    	this.privateInterface = privateInterface;
-    }
-
-    public String getNumRetries() {
-    	return numRetries;
-    }
-
-    public void setNumRetries(String numRetries) {
-    	this.numRetries = numRetries;
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/63481ecb/server/src/com/cloud/server/api/response/TrafficMonitorResponse.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/server/api/response/TrafficMonitorResponse.java b/server/src/com/cloud/server/api/response/TrafficMonitorResponse.java
deleted file mode 100644
index 95ab445..0000000
--- a/server/src/com/cloud/server/api/response/TrafficMonitorResponse.java
+++ /dev/null
@@ -1,80 +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.server.api.response;
-
-import org.apache.cloudstack.api.ApiConstants;
-import org.apache.cloudstack.api.BaseResponse;
-import com.cloud.serializer.Param;
-import com.google.gson.annotations.SerializedName;
-
-public class TrafficMonitorResponse extends BaseResponse {
-
-    @SerializedName(ApiConstants.ID) @Param(description="the ID of the external firewall")
-    private String id;
-
-    @SerializedName(ApiConstants.ZONE_ID) @Param(description="the zone ID of the external firewall")
-    private String zoneId;
-
-    @SerializedName(ApiConstants.IP_ADDRESS) @Param(description="the management IP address of the external firewall")
-    private String ipAddress;
-
-    @SerializedName(ApiConstants.NUM_RETRIES) @Param(description="the number of times to retry requests to the external firewall")
-    private String numRetries;
-
-    @SerializedName(ApiConstants.TIMEOUT) @Param(description="the timeout (in seconds) for requests to the external firewall")
-    private String timeout;
-
-    public String getId() {
-    	return id;
-    }
-
-    public void setId(String id) {
-    	this.id = id;
-    }
-
-    public String getZoneId() {
-    	return zoneId;
-    }
-
-    public void setZoneId(String zoneId) {
-    	this.zoneId = zoneId;
-    }
-
-    public String getIpAddress() {
-    	return ipAddress;
-    }
-
-    public void setIpAddress(String ipAddress) {
-    	this.ipAddress = ipAddress;
-    }
-
-    public String getNumRetries() {
-    	return numRetries;
-    }
-
-    public void setNumRetries(String numRetries) {
-    	this.numRetries = numRetries;
-    }
-
-    public String getTimeout() {
-    	return timeout;
-    }
-
-    public void setTimeout(String timeout) {
-    	this.timeout = timeout;
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/63481ecb/server/src/com/cloud/server/api/response/UsageRecordResponse.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/server/api/response/UsageRecordResponse.java b/server/src/com/cloud/server/api/response/UsageRecordResponse.java
deleted file mode 100644
index 29c81a7..0000000
--- a/server/src/com/cloud/server/api/response/UsageRecordResponse.java
+++ /dev/null
@@ -1,199 +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.server.api.response;
-
-import org.apache.cloudstack.api.ApiConstants;
-import org.apache.cloudstack.api.BaseResponse;
-import org.apache.cloudstack.api.response.ControlledEntityResponse;
-import com.cloud.serializer.Param;
-import com.google.gson.annotations.SerializedName;
-
-@SuppressWarnings("unused")
-public class UsageRecordResponse extends BaseResponse implements ControlledEntityResponse{
-    @SerializedName(ApiConstants.ACCOUNT) @Param(description="the user account name")
-    private String accountName;
-
-    @SerializedName(ApiConstants.ACCOUNT_ID) @Param(description="the user account Id")
-    private String accountId;
-
-    @SerializedName(ApiConstants.PROJECT_ID) @Param(description="the project id of the resource")
-    private String projectId;
-
-    @SerializedName(ApiConstants.PROJECT) @Param(description="the project name of the resource")
-    private String projectName;
-
-    @SerializedName(ApiConstants.DOMAIN_ID) @Param(description="the domain ID")
-    private String domainId;
-
-    @SerializedName(ApiConstants.DOMAIN) @Param(description="the domain the resource is associated with")
-    private String domainName;
-
-    @SerializedName(ApiConstants.ZONE_ID) @Param(description="the zone ID")
-    private String zoneId;
-
-    @SerializedName(ApiConstants.DESCRIPTION) @Param(description="description of the usage record")
-    private String description;
-
-    @SerializedName("usage") @Param(description="usage in hours")
-    private String usage;
-
-    @SerializedName("usagetype") @Param(description="usage type ID")
-    private Integer usageType;
-
-    @SerializedName("rawusage") @Param(description="raw usage in hours")
-    private String rawUsage;
-
-    @SerializedName(ApiConstants.VIRTUAL_MACHINE_ID) @Param(description="virtual machine ID")
-    private String virtualMachineId;
-
-    @SerializedName(ApiConstants.NAME) @Param(description="virtual machine name")
-    private String vmName;
-
-    @SerializedName("offeringid") @Param(description="offering ID")
-    private String  offeringId;
-
-    @SerializedName(ApiConstants.TEMPLATE_ID) @Param(description="template ID")
-    private String templateId;
-
-    @SerializedName("usageid") @Param(description="id of the resource")
-    private String usageId;
-
-    @SerializedName(ApiConstants.TYPE) @Param(description="resource type")
-    private String type;
-
-    @SerializedName(ApiConstants.SIZE) @Param(description="resource size")
-    private Long size;
-
-    @SerializedName(ApiConstants.START_DATE) @Param(description="start date of the usage record")
-    private String startDate;
-
-    @SerializedName(ApiConstants.END_DATE) @Param(description="end date of the usage record")
-    private String endDate;
-
-    @SerializedName("issourcenat") @Param(description="True if the IPAddress is source NAT")
-    private Boolean isSourceNat;
-
-    @SerializedName(ApiConstants.IS_SYSTEM) @Param(description="True if the IPAddress is system IP - allocated during vm deploy or lb rule create")
-    private Boolean isSystem;
-
-    @SerializedName("networkid") @Param(description="id of the network")
-    private String networkId;
-
-    @SerializedName("isdefault") @Param(description="True if the resource is default")
-    private Boolean isDefault;
-
-    @Override
-    public void setAccountName(String accountName) {
-        this.accountName = accountName;
-    }
-
-    public void setAccountId(String accountId) {
-        this.accountId = accountId;
-    }
-
-    @Override
-    public void setDomainId(String domainId) {
-        this.domainId = domainId;
-    }
-
-    public void setZoneId(String zoneId) {
-        this.zoneId = zoneId;
-    }
-
-    public void setDescription(String description) {
-        this.description = description;
-    }
-
-    public void setUsage(String usage) {
-        this.usage = usage;
-    }
-
-    public void setUsageType(Integer usageType) {
-        this.usageType = usageType;
-    }
-
-    public void setRawUsage(String rawUsage) {
-        this.rawUsage = rawUsage;
-    }
-
-    public void setVirtualMachineId(String virtualMachineId) {
-        this.virtualMachineId = virtualMachineId;
-    }
-
-    public void setVmName(String vmName) {
-        this.vmName = vmName;
-    }
-
-    public void setOfferingId(String offeringId) {
-        this.offeringId =  offeringId;
-    }
-
-    public void setTemplateId(String templateId) {
-        this.templateId = templateId;
-    }
-
-    public void setUsageId(String usageId) {
-        this.usageId = usageId;
-    }
-
-    public void setType(String type) {
-        this.type = type;
-    }
-
-    public void setSize(Long size) {
-        this.size = size;
-    }
-
-    public void setStartDate(String startDate) {
-        this.startDate = startDate;
-    }
-
-    public void setEndDate(String endDate) {
-        this.endDate = endDate;
-    }
-
-    public void setSourceNat(Boolean isSourceNat) {
-        this.isSourceNat = isSourceNat;
-    }
-
-    public void setSystem(Boolean isSystem) {
-        this.isSystem = isSystem;
-    }
-
-    @Override
-    public void setProjectId(String projectId) {
-        this.projectId = projectId;
-    }
-
-    @Override
-    public void setProjectName(String projectName) {
-        this.projectName = projectName;
-    }
-
-    @Override
-    public void setDomainName(String domainName) {
-        this.domainName = domainName;
-    }
-
-    public void setNetworkId(String networkId) {
-        this.networkId =  networkId;
-    }
-
-    public void setDefault(Boolean isDefault) {
-        this.isDefault = isDefault;
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/63481ecb/server/src/com/cloud/server/api/response/UsageTypeResponse.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/server/api/response/UsageTypeResponse.java b/server/src/com/cloud/server/api/response/UsageTypeResponse.java
deleted file mode 100644
index ea834fc..0000000
--- a/server/src/com/cloud/server/api/response/UsageTypeResponse.java
+++ /dev/null
@@ -1,55 +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.server.api.response;
-
-import org.apache.cloudstack.api.ApiConstants;
-import org.apache.cloudstack.api.BaseResponse;
-import com.cloud.serializer.Param;
-import com.google.gson.annotations.SerializedName;
-
-public class UsageTypeResponse extends BaseResponse {
-
-    @SerializedName("usagetypeid") @Param(description="usage type")
-    private Integer usageType;
-
-    @SerializedName(ApiConstants.DESCRIPTION) @Param(description="description of usage type")
-    private String description;
-
-    
-    public String getDescription() {
-        return description;
-    }
-
-    public void setDescription(String description) {
-        this.description = description;
-    }
-
-    public Integer getUsageType() {
-        return usageType;
-    }
-
-    public void setUsageType(Integer usageType) {
-        this.usageType = usageType;
-    }
-
-    public UsageTypeResponse(Integer usageType, String description){
-    	this.usageType = usageType;
-    	this.description = description;
-    	setObjectName("usagetype");
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/63481ecb/server/src/com/cloud/usage/UsageTypes.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/usage/UsageTypes.java b/server/src/com/cloud/usage/UsageTypes.java
index af77c32..e5a48d5 100644
--- a/server/src/com/cloud/usage/UsageTypes.java
+++ b/server/src/com/cloud/usage/UsageTypes.java
@@ -19,7 +19,7 @@ package com.cloud.usage;
 import java.util.ArrayList;
 import java.util.List;
 
-import com.cloud.server.api.response.UsageTypeResponse;
+import org.apache.cloudstack.api.response.UsageTypeResponse;
 
 public class UsageTypes {
     public static final int RUNNING_VM = 1;