You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by bh...@apache.org on 2012/12/04 11:02:56 UTC

[32/55] [abbrv] api_refactor: refactor project apis

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/5e0501d1/api/src/com/cloud/api/commands/ListClustersCmd.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/api/commands/ListClustersCmd.java b/api/src/com/cloud/api/commands/ListClustersCmd.java
index 1953325..a6bd549 100755
--- a/api/src/com/cloud/api/commands/ListClustersCmd.java
+++ b/api/src/com/cloud/api/commands/ListClustersCmd.java
@@ -61,13 +61,13 @@ public class ListClustersCmd extends BaseListCmd {
 
     @Parameter(name=ApiConstants.CLUSTER_TYPE, type=CommandType.STRING, description="lists clusters by cluster type")
     private String clusterType;
-    
+
     @Parameter(name=ApiConstants.ALLOCATION_STATE, type=CommandType.STRING, description="lists clusters by allocation state")
     private String allocationState;
-    
+
     @Parameter(name=ApiConstants.MANAGED_STATE, type=CommandType.STRING, description="whether this cluster is managed by cloudstack")
     private String managedState;
-    
+
     @Parameter(name=ApiConstants.SHOW_CAPACITIES, type=CommandType.BOOLEAN, description="flag to display the capacity of the clusters")
     private Boolean showCapacities;
 
@@ -90,19 +90,19 @@ public class ListClustersCmd extends BaseListCmd {
     public Long getZoneId() {
         return zoneId;
     }
-    
+
     public String getHypervisorType() {
-    	return hypervisorType;
+        return hypervisorType;
     }
-    
+
     public String getClusterType() {
-    	return clusterType;
+        return clusterType;
     }
 
     public String getAllocationState() {
-    	return allocationState;
+        return allocationState;
     }
-    
+
 
     public String getManagedstate() {
         return managedState;
@@ -114,18 +114,18 @@ public class ListClustersCmd extends BaseListCmd {
 
 
     public Boolean getShowCapacities() {
-		return showCapacities;
-	}
+        return showCapacities;
+    }
 
     /////////////////////////////////////////////////////
     /////////////// API Implementation///////////////////
     /////////////////////////////////////////////////////
 
-	@Override
+    @Override
     public String getCommandName() {
         return s_name;
     }
-    
+
     @Override
     public void execute(){
         Pair<List<? extends Cluster>, Integer> result = _mgr.searchForClusters(this);

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/5e0501d1/api/src/com/cloud/api/commands/ListDomainChildrenCmd.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/api/commands/ListDomainChildrenCmd.java b/api/src/com/cloud/api/commands/ListDomainChildrenCmd.java
index f014d34..e432c0f 100644
--- a/api/src/com/cloud/api/commands/ListDomainChildrenCmd.java
+++ b/api/src/com/cloud/api/commands/ListDomainChildrenCmd.java
@@ -33,7 +33,7 @@ import com.cloud.utils.Pair;
 
 @Implementation(description="Lists all children domains belonging to a specified domain", responseObject=DomainResponse.class)
 public class ListDomainChildrenCmd extends BaseListCmd {
-	public static final Logger s_logger = Logger.getLogger(ListDomainChildrenCmd.class.getName());
+    public static final Logger s_logger = Logger.getLogger(ListDomainChildrenCmd.class.getName());
 
     private static final String s_name = "listdomainchildrenresponse";
 
@@ -47,10 +47,10 @@ public class ListDomainChildrenCmd extends BaseListCmd {
 
     @Parameter(name=ApiConstants.NAME, type=CommandType.STRING, description="list children domains by name")
     private String domainName;
-    
+
     @Parameter(name=ApiConstants.IS_RECURSIVE, type=CommandType.BOOLEAN, description="to return the entire tree, use the value \"true\". To return the first level children, use the value \"false\".")
     private Boolean recursive;
-    
+
     @Parameter(name=ApiConstants.LIST_ALL, type=CommandType.BOOLEAN, description="If set to false, list only resources belonging to the command's caller; if set to true - list resources that the caller is authorized to see. Default value is false")
     private Boolean listAll;
 
@@ -65,11 +65,11 @@ public class ListDomainChildrenCmd extends BaseListCmd {
     public String getDomainName() {
         return domainName;
     }
-    
+
     public boolean listAll() {
         return listAll == null ? false : listAll;
     }
-    
+
     public boolean isRecursive() {
         return recursive == null ? false : recursive;
     }
@@ -82,7 +82,7 @@ public class ListDomainChildrenCmd extends BaseListCmd {
     public String getCommandName() {
         return s_name;
     }
-    
+
     @Override
     public void execute(){
         Pair<List<? extends Domain>, Integer> result = _domainService.searchForDomainChildren(this);

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/5e0501d1/api/src/com/cloud/api/commands/ListDomainsCmd.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/api/commands/ListDomainsCmd.java b/api/src/com/cloud/api/commands/ListDomainsCmd.java
index 492fbdf..7e4b613 100644
--- a/api/src/com/cloud/api/commands/ListDomainsCmd.java
+++ b/api/src/com/cloud/api/commands/ListDomainsCmd.java
@@ -33,8 +33,8 @@ import com.cloud.utils.Pair;
 
 @Implementation(description="Lists domains and provides detailed information for listed domains", responseObject=DomainResponse.class)
 public class ListDomainsCmd extends BaseListCmd {
-	public static final Logger s_logger = Logger.getLogger(ListDomainsCmd.class.getName());
-	
+    public static final Logger s_logger = Logger.getLogger(ListDomainsCmd.class.getName());
+
     private static final String s_name = "listdomainsresponse";
 
     /////////////////////////////////////////////////////
@@ -50,7 +50,7 @@ public class ListDomainsCmd extends BaseListCmd {
 
     @Parameter(name=ApiConstants.NAME, type=CommandType.STRING, description="List domain by domain name.")
     private String domainName;
-    
+
     @Parameter(name=ApiConstants.LIST_ALL, type=CommandType.BOOLEAN, description="If set to false, list only resources belonging to the command's caller; if set to true - list resources that the caller is authorized to see. Default value is false")
     private Boolean listAll;
 
@@ -69,7 +69,7 @@ public class ListDomainsCmd extends BaseListCmd {
     public String getDomainName() {
         return domainName;
     }
-    
+
     public boolean listAll() {
         return listAll == null ? false : listAll;
     }

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/5e0501d1/api/src/com/cloud/api/commands/ListEventsCmd.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/api/commands/ListEventsCmd.java b/api/src/com/cloud/api/commands/ListEventsCmd.java
index eca145f..d0e09e1 100755
--- a/api/src/com/cloud/api/commands/ListEventsCmd.java
+++ b/api/src/com/cloud/api/commands/ListEventsCmd.java
@@ -44,7 +44,7 @@ public class ListEventsCmd extends BaseListProjectAndAccountResourcesCmd {
     @IdentityMapper(entityTableName="event")
     @Parameter(name=ApiConstants.ID, type=CommandType.LONG, description="the ID of the event")
     private Long id;
-    
+
     @Parameter(name=ApiConstants.DURATION, type=CommandType.INTEGER, description="the duration of the event")
     private Integer duration;
 
@@ -70,7 +70,7 @@ public class ListEventsCmd extends BaseListProjectAndAccountResourcesCmd {
     public Long getId() {
         return id;
     }
-    
+
     public Integer getDuration() {
         return duration;
     }

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/5e0501d1/api/src/com/cloud/api/commands/ListFirewallRulesCmd.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/api/commands/ListFirewallRulesCmd.java b/api/src/com/cloud/api/commands/ListFirewallRulesCmd.java
index 232f5a2..027a6b9 100644
--- a/api/src/com/cloud/api/commands/ListFirewallRulesCmd.java
+++ b/api/src/com/cloud/api/commands/ListFirewallRulesCmd.java
@@ -42,7 +42,7 @@ public class ListFirewallRulesCmd extends BaseListTaggedResourcesCmd {
     @IdentityMapper(entityTableName="firewall_rules")
     @Parameter(name=ApiConstants.ID, type=CommandType.LONG, description="Lists rule with the specified ID.")
     private Long id;
-    
+
     @IdentityMapper(entityTableName="user_ip_address")
     @Parameter(name=ApiConstants.IP_ADDRESS_ID, type=CommandType.LONG, description="the id of IP address of the firwall services")
     private Long ipAddressId;
@@ -50,11 +50,11 @@ public class ListFirewallRulesCmd extends BaseListTaggedResourcesCmd {
     /////////////////////////////////////////////////////
     /////////////////// Accessors ///////////////////////
     /////////////////////////////////////////////////////
-    
+
     public Long getIpAddressId() {
         return ipAddressId;
     }
-    
+
     public Long getId() {
         return id;
     }
@@ -67,13 +67,13 @@ public class ListFirewallRulesCmd extends BaseListTaggedResourcesCmd {
     public String getCommandName() {
         return s_name;
     }
-    
+
     @Override
     public void execute(){
         Pair<List<? extends FirewallRule>, Integer> result = _firewallService.listFirewallRules(this);
         ListResponse<FirewallResponse> response = new ListResponse<FirewallResponse>();
         List<FirewallResponse> fwResponses = new ArrayList<FirewallResponse>();
-        
+
         for (FirewallRule fwRule : result.first()) {
             FirewallResponse ruleData = _responseGenerator.createFirewallResponse(fwRule);
             ruleData.setObjectName("firewallrule");
@@ -81,6 +81,6 @@ public class ListFirewallRulesCmd extends BaseListTaggedResourcesCmd {
         }
         response.setResponses(fwResponses, result.second());
         response.setResponseName(getCommandName());
-        this.setResponseObject(response); 
+        this.setResponseObject(response);
     }
 }

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/5e0501d1/api/src/com/cloud/api/commands/ListGuestOsCategoriesCmd.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/api/commands/ListGuestOsCategoriesCmd.java b/api/src/com/cloud/api/commands/ListGuestOsCategoriesCmd.java
index e0af2f6..e233b98 100644
--- a/api/src/com/cloud/api/commands/ListGuestOsCategoriesCmd.java
+++ b/api/src/com/cloud/api/commands/ListGuestOsCategoriesCmd.java
@@ -44,7 +44,7 @@ public class ListGuestOsCategoriesCmd extends BaseListCmd {
     @IdentityMapper(entityTableName="guest_os_category")
     @Parameter(name=ApiConstants.ID, type=CommandType.LONG, description="list Os category by id")
     private Long id;
-    
+
     @Parameter(name=ApiConstants.NAME, type=CommandType.STRING, description="list os category by name", since="3.0.1")
     private String name;
 
@@ -70,7 +70,7 @@ public class ListGuestOsCategoriesCmd extends BaseListCmd {
     public String getCommandName() {
         return s_name;
     }
-    
+
     @Override
     public void execute(){
         Pair<List<? extends GuestOsCategory>, Integer> result = _mgr.listGuestOSCategoriesByCriteria(this);

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/5e0501d1/api/src/com/cloud/api/commands/ListGuestOsCmd.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/api/commands/ListGuestOsCmd.java b/api/src/com/cloud/api/commands/ListGuestOsCmd.java
index f64e89a..161046d 100644
--- a/api/src/com/cloud/api/commands/ListGuestOsCmd.java
+++ b/api/src/com/cloud/api/commands/ListGuestOsCmd.java
@@ -48,7 +48,7 @@ public class ListGuestOsCmd extends BaseListCmd {
     @IdentityMapper(entityTableName="guest_os_category")
     @Parameter(name=ApiConstants.OS_CATEGORY_ID, type=CommandType.LONG, description="list by Os Category id")
     private Long osCategoryId;
-    
+
     @Parameter(name=ApiConstants.DESCRIPTION, type=CommandType.STRING, description="list os by description", since="3.0.1")
     private String description;
 
@@ -68,7 +68,7 @@ public class ListGuestOsCmd extends BaseListCmd {
     public String getDescription() {
         return description;
     }
-    
+
     /////////////////////////////////////////////////////
     /////////////// API Implementation///////////////////
     /////////////////////////////////////////////////////
@@ -77,7 +77,7 @@ public class ListGuestOsCmd extends BaseListCmd {
     public String getCommandName() {
         return s_name;
     }
-    
+
     @Override
     public void execute(){
         Pair<List<? extends GuestOS>, Integer> result = _mgr.listGuestOSByCriteria(this);

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/5e0501d1/api/src/com/cloud/api/commands/ListHostsCmd.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/api/commands/ListHostsCmd.java b/api/src/com/cloud/api/commands/ListHostsCmd.java
index 09e7179..7e1e97c 100755
--- a/api/src/com/cloud/api/commands/ListHostsCmd.java
+++ b/api/src/com/cloud/api/commands/ListHostsCmd.java
@@ -73,16 +73,16 @@ public class ListHostsCmd extends BaseListCmd {
     @IdentityMapper(entityTableName="vm_instance")
     @Parameter(name=ApiConstants.VIRTUAL_MACHINE_ID, type=CommandType.LONG, required=false, description="lists hosts in the same cluster as this VM and flag hosts with enough CPU/RAm to host this VM")
     private Long virtualMachineId;
-    
+
     @Parameter(name=ApiConstants.RESOURCE_STATE, type=CommandType.STRING, description="list hosts by resource state. Resource state represents current state determined by admin of host, valule can be one of [Enabled, Disabled, Unmanaged, PrepareForMaintenance, ErrorInMaintenance, Maintenance, Error]")
-    private String resourceState;   
-    
+    private String resourceState;
+
     @Parameter(name=ApiConstants.DETAILS, type=CommandType.LIST, collectionType=CommandType.STRING, description="comma separated list of host details requested, value can be a list of [ min, all, capacity, events, stats]" )
     private List<String> viewDetails;
-    
+
     @Parameter(name=ApiConstants.HA_HOST, type=CommandType.BOOLEAN, description="if true, list only hosts dedicated to HA")
     private Boolean haHost;
-    
+
     /////////////////////////////////////////////////////
     /////////////////// Accessors ///////////////////////
     /////////////////////////////////////////////////////
@@ -110,7 +110,7 @@ public class ListHostsCmd extends BaseListCmd {
     public String getType() {
         return type;
     }
-    
+
     public Boolean getHaHost() {
         return haHost;
     }
@@ -122,7 +122,7 @@ public class ListHostsCmd extends BaseListCmd {
     public Long getVirtualMachineId() {
         return virtualMachineId;
     }
-    
+
     public EnumSet<HostDetails> getDetails() throws InvalidParameterValueException {
         EnumSet<HostDetails> dv;
         if (viewDetails==null || viewDetails.size() <=0){
@@ -142,9 +142,9 @@ public class ListHostsCmd extends BaseListCmd {
         }
         return dv;
     }
-    
+
     public String getResourceState() {
-    	return resourceState;
+        return resourceState;
     }
     /////////////////////////////////////////////////////
     /////////////// API Implementation///////////////////
@@ -154,23 +154,23 @@ public class ListHostsCmd extends BaseListCmd {
     public String getCommandName() {
         return s_name;
     }
-    
+
     public AsyncJob.Type getInstanceType() {
-    	return AsyncJob.Type.Host;
+        return AsyncJob.Type.Host;
     }
 
     @Override
     public void execute(){
-    	List<? extends Host> result = new ArrayList<Host>();
-    	List<? extends Host> hostsWithCapacity = new ArrayList<Host>();
-    	 
-    	if(getVirtualMachineId() != null){
+        List<? extends Host> result = new ArrayList<Host>();
+        List<? extends Host> hostsWithCapacity = new ArrayList<Host>();
+
+        if(getVirtualMachineId() != null){
             Pair<List<? extends Host>, List<? extends Host>> hostsForMigration = _mgr.listHostsForMigrationOfVM(getVirtualMachineId(), this.getStartIndex(), this.getPageSizeVal());
             result = hostsForMigration.first();
             hostsWithCapacity = hostsForMigration.second();
-    	}else{
-    		result = _mgr.searchForServers(this);
-    	}
+        }else{
+            result = _mgr.searchForServers(this);
+        }
 
         ListResponse<HostResponse> response = new ListResponse<HostResponse>();
         List<HostResponse> hostResponses = new ArrayList<HostResponse>();

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/5e0501d1/api/src/com/cloud/api/commands/ListIpForwardingRulesCmd.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/api/commands/ListIpForwardingRulesCmd.java b/api/src/com/cloud/api/commands/ListIpForwardingRulesCmd.java
index a3e1479..9551579 100644
--- a/api/src/com/cloud/api/commands/ListIpForwardingRulesCmd.java
+++ b/api/src/com/cloud/api/commands/ListIpForwardingRulesCmd.java
@@ -42,15 +42,15 @@ public class ListIpForwardingRulesCmd extends BaseListProjectAndAccountResources
     /////////////////////////////////////////////////////
     //////////////// API parameters /////////////////////
     /////////////////////////////////////////////////////
-    
+
     @IdentityMapper(entityTableName="user_ip_address")
     @Parameter(name=ApiConstants.IP_ADDRESS_ID, type=CommandType.LONG, description="list the rule belonging to this public ip address")
     private Long publicIpAddressId;
-    
+
     @IdentityMapper(entityTableName="firewall_rules")
     @Parameter(name=ApiConstants.ID, type=CommandType.LONG, description="Lists rule with the specified ID.")
     private Long id;
-    
+
     @IdentityMapper(entityTableName="vm_instance")
     @Parameter(name=ApiConstants.VIRTUAL_MACHINE_ID, type=CommandType.LONG, description="Lists all rules applied to the specified Vm.")
     private Long vmId;
@@ -64,15 +64,15 @@ public class ListIpForwardingRulesCmd extends BaseListProjectAndAccountResources
     /////////////// API Implementation///////////////////
     /////////////////////////////////////////////////////
     @Override
-	public String getCommandName() {
+    public String getCommandName() {
         return s_name;
     }
-    
+
     public Long getPublicIpAddressId() {
-		return publicIpAddressId;
-	}
+        return publicIpAddressId;
+    }
 
-	public Long getId() {
+    public Long getId() {
         return id;
     }
 
@@ -82,7 +82,7 @@ public class ListIpForwardingRulesCmd extends BaseListProjectAndAccountResources
 
     @Override
     public void execute(){
-        Pair<List<? extends FirewallRule>, Integer> result = _rulesService.searchStaticNatRules(publicIpAddressId, id, vmId, 
+        Pair<List<? extends FirewallRule>, Integer> result = _rulesService.searchStaticNatRules(publicIpAddressId, id, vmId,
                 this.getStartIndex(), this.getPageSizeVal(), this.getAccountName(), this.getDomainId(), this.getProjectId(), this.isRecursive(), this.listAll());
         ListResponse<IpForwardingRuleResponse> response = new ListResponse<IpForwardingRuleResponse>();
         List<IpForwardingRuleResponse> ipForwardingResponses = new ArrayList<IpForwardingRuleResponse>();
@@ -97,5 +97,5 @@ public class ListIpForwardingRulesCmd extends BaseListProjectAndAccountResources
         response.setResponseName(getCommandName());
         this.setResponseObject(response);
     }
-    
+
 }

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/5e0501d1/api/src/com/cloud/api/commands/ListIsoPermissionsCmd.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/api/commands/ListIsoPermissionsCmd.java b/api/src/com/cloud/api/commands/ListIsoPermissionsCmd.java
index 0af5855..81c18e9 100644
--- a/api/src/com/cloud/api/commands/ListIsoPermissionsCmd.java
+++ b/api/src/com/cloud/api/commands/ListIsoPermissionsCmd.java
@@ -25,17 +25,17 @@ public class ListIsoPermissionsCmd extends ListTemplateOrIsoPermissionsCmd {
 	protected String getResponseName() {
     	return "listisopermissionsresponse";
     }
-    
+
 	@Override
     public String getMediaType() {
     	return "iso";
     }
-	
+
 	@Override
     protected Logger getLogger() {
-		return Logger.getLogger(ListIsoPermissionsCmd.class.getName());    
+		return Logger.getLogger(ListIsoPermissionsCmd.class.getName());
 	}
-	
+
 	protected boolean templateIsCorrectType(VirtualMachineTemplate template) {
 		return template.getFormat().equals(ImageFormat.ISO);
 	}

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/5e0501d1/api/src/com/cloud/api/commands/ListIsosCmd.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/api/commands/ListIsosCmd.java b/api/src/com/cloud/api/commands/ListIsosCmd.java
index 970b6d4..3cf0797 100755
--- a/api/src/com/cloud/api/commands/ListIsosCmd.java
+++ b/api/src/com/cloud/api/commands/ListIsosCmd.java
@@ -62,10 +62,10 @@ public class ListIsosCmd extends BaseListTaggedResourcesCmd {
     private Boolean ready;
 
     @Parameter(name=ApiConstants.ISO_FILTER, type=CommandType.STRING, description="possible values are \"featured\", \"self\", \"self-executable\",\"executable\", and \"community\". " +
-    														"* featured-ISOs that are featured and are publicself-ISOs that have been registered/created by the owner. " +
-    														"* selfexecutable-ISOs that have been registered/created by the owner that can be used to deploy a new VM. " +
-    														"* executable-all ISOs that can be used to deploy a new VM " +
-    														"* community-ISOs that are public.")
+                                                            "* featured-ISOs that are featured and are publicself-ISOs that have been registered/created by the owner. " +
+                                                            "* selfexecutable-ISOs that have been registered/created by the owner that can be used to deploy a new VM. " +
+                                                            "* executable-all ISOs that can be used to deploy a new VM " +
+                                                            "* community-ISOs that are public.")
     private String isoFilter = TemplateFilter.selfexecutable.toString();
 
     @Parameter(name=ApiConstants.NAME, type=CommandType.STRING, description="list all isos by name")
@@ -74,7 +74,7 @@ public class ListIsosCmd extends BaseListTaggedResourcesCmd {
     @IdentityMapper(entityTableName="data_center")
     @Parameter(name=ApiConstants.ZONE_ID, type=CommandType.LONG, description="the ID of the zone")
     private Long zoneId;
-    
+
     /////////////////////////////////////////////////////
     /////////////////// Accessors ///////////////////////
     /////////////////////////////////////////////////////
@@ -111,7 +111,7 @@ public class ListIsosCmd extends BaseListTaggedResourcesCmd {
     public Long getZoneId() {
         return zoneId;
     }
-    
+
     public boolean listInReadyState() {
         Account account = UserContext.current().getCaller();
         // It is account specific if account is admin type and domainId and accountName are not null
@@ -120,29 +120,29 @@ public class ListIsosCmd extends BaseListTaggedResourcesCmd {
         TemplateFilter templateFilter = TemplateFilter.valueOf(getIsoFilter());
         boolean onlyReady = (templateFilter == TemplateFilter.featured) || (templateFilter == TemplateFilter.selfexecutable) || (templateFilter == TemplateFilter.sharedexecutable)
         || (templateFilter == TemplateFilter.executable && isAccountSpecific) || (templateFilter == TemplateFilter.community);
-        
+
         if (!onlyReady) {
-        	if (isReady() != null && isReady().booleanValue() != onlyReady) {
-        		onlyReady = isReady().booleanValue();
-        	}
+            if (isReady() != null && isReady().booleanValue() != onlyReady) {
+                onlyReady = isReady().booleanValue();
+            }
         }
-        
+
         return onlyReady;
     }
 
     /////////////////////////////////////////////////////
     /////////////// API Implementation///////////////////
     /////////////////////////////////////////////////////
-    
+
     @Override
     public String getCommandName() {
         return s_name;
     }
-    
+
     public AsyncJob.Type getInstanceType() {
-    	return AsyncJob.Type.Iso;
+        return AsyncJob.Type.Iso;
     }
-    
+
     @Override
     public void execute(){
         Set<Pair<Long, Long>> isoZonePairSet = _mgr.listIsos(this);

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/5e0501d1/api/src/com/cloud/api/commands/ListLBStickinessPoliciesCmd.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/api/commands/ListLBStickinessPoliciesCmd.java b/api/src/com/cloud/api/commands/ListLBStickinessPoliciesCmd.java
index 9f695e6..92a27bc 100644
--- a/api/src/com/cloud/api/commands/ListLBStickinessPoliciesCmd.java
+++ b/api/src/com/cloud/api/commands/ListLBStickinessPoliciesCmd.java
@@ -46,7 +46,7 @@ public class ListLBStickinessPoliciesCmd extends BaseListCmd {
     @IdentityMapper(entityTableName="firewall_rules")
     @Parameter(name = ApiConstants.LBID, type = CommandType.LONG, required = true, description = "the ID of the load balancer rule")
     private Long lbRuleId;
-    
+
 
 
     // ///////////////////////////////////////////////////
@@ -55,7 +55,7 @@ public class ListLBStickinessPoliciesCmd extends BaseListCmd {
     public Long getLbRuleId() {
         return lbRuleId;
     }
-    
+
 
 
     // ///////////////////////////////////////////////////
@@ -72,17 +72,17 @@ public class ListLBStickinessPoliciesCmd extends BaseListCmd {
         List<LBStickinessResponse> spResponses = new ArrayList<LBStickinessResponse>();
         LoadBalancer lb = _lbService.findById(getLbRuleId());
         ListResponse<LBStickinessResponse> response = new ListResponse<LBStickinessResponse>();
-        
+
         if (lb != null) {
-        	//check permissions
-        	Account caller = UserContext.current().getCaller();
-        	_accountService.checkAccess(caller, null, true, lb);
+            //check permissions
+            Account caller = UserContext.current().getCaller();
+            _accountService.checkAccess(caller, null, true, lb);
             List<? extends StickinessPolicy> stickinessPolicies = _lbService.searchForLBStickinessPolicies(this);
             LBStickinessResponse spResponse = _responseGenerator.createLBStickinessPolicyResponse(stickinessPolicies, lb);
             spResponses.add(spResponse);
             response.setResponses(spResponses);
         }
-        
+
         response.setResponseName(getCommandName());
         this.setResponseObject(response);
     }

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/5e0501d1/api/src/com/cloud/api/commands/ListLoadBalancerRuleInstancesCmd.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/api/commands/ListLoadBalancerRuleInstancesCmd.java b/api/src/com/cloud/api/commands/ListLoadBalancerRuleInstancesCmd.java
index 6e0de6c..49f066b 100644
--- a/api/src/com/cloud/api/commands/ListLoadBalancerRuleInstancesCmd.java
+++ b/api/src/com/cloud/api/commands/ListLoadBalancerRuleInstancesCmd.java
@@ -67,14 +67,14 @@ public class ListLoadBalancerRuleInstancesCmd extends BaseListCmd {
     public String getCommandName() {
         return s_name;
     }
-    
+
     @Override
     public void execute(){
         List<? extends UserVm> result = _lbService.listLoadBalancerInstances(this);
         ListResponse<UserVmResponse> response = new ListResponse<UserVmResponse>();
         List<UserVmResponse> vmResponses = new ArrayList<UserVmResponse>();
         if (result != null) {
-            vmResponses = _responseGenerator.createUserVmResponse("loadbalancerruleinstance", result.toArray(new UserVm[result.size()])); 
+            vmResponses = _responseGenerator.createUserVmResponse("loadbalancerruleinstance", result.toArray(new UserVm[result.size()]));
         }
         response.setResponses(vmResponses);
         response.setResponseName(getCommandName());

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/5e0501d1/api/src/com/cloud/api/commands/ListLoadBalancerRulesCmd.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/api/commands/ListLoadBalancerRulesCmd.java b/api/src/com/cloud/api/commands/ListLoadBalancerRulesCmd.java
index 63d24de..c7f5e18 100644
--- a/api/src/com/cloud/api/commands/ListLoadBalancerRulesCmd.java
+++ b/api/src/com/cloud/api/commands/ListLoadBalancerRulesCmd.java
@@ -49,7 +49,7 @@ public class ListLoadBalancerRulesCmd extends BaseListTaggedResourcesCmd {
     private String loadBalancerRuleName;
 
     @IdentityMapper(entityTableName="user_ip_address")
-    @Parameter(name = ApiConstants.PUBLIC_IP_ID, type = CommandType.LONG, description = "the public IP address id of the load balancer rule	")
+    @Parameter(name = ApiConstants.PUBLIC_IP_ID, type = CommandType.LONG, description = "the public IP address id of the load balancer rule ")
     private Long publicIpId;
 
     @IdentityMapper(entityTableName="vm_instance")

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/5e0501d1/api/src/com/cloud/api/commands/ListNetworkACLsCmd.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/api/commands/ListNetworkACLsCmd.java b/api/src/com/cloud/api/commands/ListNetworkACLsCmd.java
index 1b2ed14..c75e318 100644
--- a/api/src/com/cloud/api/commands/ListNetworkACLsCmd.java
+++ b/api/src/com/cloud/api/commands/ListNetworkACLsCmd.java
@@ -44,26 +44,26 @@ public class ListNetworkACLsCmd extends BaseListTaggedResourcesCmd {
     @IdentityMapper(entityTableName="firewall_rules")
     @Parameter(name=ApiConstants.ID, type=CommandType.LONG, description="Lists network ACL with the specified ID.")
     private Long id;
-    
+
     @IdentityMapper(entityTableName="networks")
     @Parameter(name=ApiConstants.NETWORK_ID, type=CommandType.LONG, description="list network ACLs by network Id")
     private Long networkId;
-    
+
     @Parameter(name=ApiConstants.TRAFFIC_TYPE, type=CommandType.STRING, description="list network ACLs by traffic type - Ingress or Egress")
     private String trafficType;
 
     /////////////////////////////////////////////////////
     /////////////////// Accessors ///////////////////////
     /////////////////////////////////////////////////////
-    
+
     public Long getNetworkId() {
         return networkId;
     }
-    
+
     public Long getId() {
         return id;
     }
-    
+
     public String getTrafficType() {
         return trafficType;
     }
@@ -76,19 +76,19 @@ public class ListNetworkACLsCmd extends BaseListTaggedResourcesCmd {
     public String getCommandName() {
         return s_name;
     }
-    
+
     @Override
     public void execute(){
         Pair<List<? extends FirewallRule>,Integer> result = _networkACLService.listNetworkACLs(this);
         ListResponse<NetworkACLResponse> response = new ListResponse<NetworkACLResponse>();
         List<NetworkACLResponse> aclResponses = new ArrayList<NetworkACLResponse>();
-        
+
         for (FirewallRule acl : result.first()) {
             NetworkACLResponse ruleData = _responseGenerator.createNetworkACLResponse(acl);
             aclResponses.add(ruleData);
         }
         response.setResponses(aclResponses, result.second());
         response.setResponseName(getCommandName());
-        this.setResponseObject(response); 
+        this.setResponseObject(response);
     }
 }

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/5e0501d1/api/src/com/cloud/api/commands/ListNetworkOfferingsCmd.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/api/commands/ListNetworkOfferingsCmd.java b/api/src/com/cloud/api/commands/ListNetworkOfferingsCmd.java
index ee80847..9f6f94d 100644
--- a/api/src/com/cloud/api/commands/ListNetworkOfferingsCmd.java
+++ b/api/src/com/cloud/api/commands/ListNetworkOfferingsCmd.java
@@ -42,70 +42,70 @@ public class ListNetworkOfferingsCmd extends BaseListCmd {
     @IdentityMapper(entityTableName="network_offerings")
     @Parameter(name=ApiConstants.ID, type=CommandType.LONG, description="list network offerings by id")
     private Long id;
-    
+
     @Parameter(name=ApiConstants.NAME, type=CommandType.STRING, description="list network offerings by name")
     private String networkOfferingName;
-    
+
     @Parameter(name=ApiConstants.DISPLAY_TEXT, type=CommandType.STRING, description="list network offerings by display text")
     private String displayText;
-    
+
     @Parameter(name=ApiConstants.TRAFFIC_TYPE, type=CommandType.STRING, description="list by traffic type")
     private String trafficType;
-    
+
     @Parameter(name=ApiConstants.IS_DEFAULT, type=CommandType.BOOLEAN, description="true if need to list only default network offerings. Default value is false")
-    private Boolean isDefault; 
-    
+    private Boolean isDefault;
+
     @Parameter(name=ApiConstants.SPECIFY_VLAN, type=CommandType.BOOLEAN, description="the tags for the network offering.")
     private Boolean specifyVlan;
-    
+
     @Parameter(name=ApiConstants.AVAILABILITY, type=CommandType.STRING, description="the availability of network offering. Default value is Required")
     private String availability;
-    
+
     @IdentityMapper(entityTableName="data_center")
     @Parameter(name=ApiConstants.ZONE_ID, type=CommandType.LONG, description="list netowrk offerings available for network creation in specific zone")
     private Long zoneId;
-    
+
     @Parameter(name=ApiConstants.STATE, type=CommandType.STRING, description="list network offerings by state")
     private String state;
-    
+
     @IdentityMapper(entityTableName="networks")
     @Parameter(name=ApiConstants.NETWORK_ID, type=CommandType.LONG, description="the ID of the network. Pass this in if you want to see the available network offering that a network can be changed to.")
     private Long networkId;
-    
+
     @Parameter(name=ApiConstants.GUEST_IP_TYPE, type=CommandType.STRING, description="list network offerings by guest type: Shared or Isolated")
     private String guestIpType;
 
     @Parameter(name=ApiConstants.SUPPORTED_SERVICES, type=CommandType.LIST, collectionType=CommandType.STRING, description="list network offerings supporting certain services")
     private List<String> supportedServices;
-    
+
     @Parameter(name=ApiConstants.SOURCE_NAT_SUPPORTED, type=CommandType.BOOLEAN, description="true if need to list only netwok offerings where source nat is supported, false otherwise")
     private Boolean sourceNatSupported;
-    
+
     @Parameter(name=ApiConstants.SPECIFY_IP_RANGES, type=CommandType.BOOLEAN, description="true if need to list only network offerings which support specifying ip ranges")
     private Boolean specifyIpRanges;
-    
+
     @Parameter(name=ApiConstants.TAGS, type=CommandType.STRING, description="list network offerings by tags", length=4096)
     private String tags;
-    
+
     @Parameter(name=ApiConstants.IS_TAGGED, type=CommandType.BOOLEAN, description="true if offering has tags specified")
     private Boolean isTagged;
-    
+
     @Parameter(name=ApiConstants.FOR_VPC, type=CommandType.BOOLEAN, description="the network offering can be used" +
-    		" only for network creation inside the VPC")
+            " only for network creation inside the VPC")
     private Boolean forVpc;
-    
+
     /////////////////////////////////////////////////////
     /////////////////// Accessors ///////////////////////
     /////////////////////////////////////////////////////
-    
+
     public String getNetworkOfferingName() {
         return networkOfferingName;
     }
-    
+
     public String getDisplayText() {
         return displayText;
     }
-    
+
     public String getTrafficType() {
         return trafficType;
     }
@@ -117,7 +117,7 @@ public class ListNetworkOfferingsCmd extends BaseListCmd {
     public Boolean getIsDefault() {
         return isDefault;
     }
-    
+
     public Boolean getSpecifyVlan() {
         return specifyVlan;
     }
@@ -147,14 +147,14 @@ public class ListNetworkOfferingsCmd extends BaseListCmd {
     }
 
     public Boolean getSourceNatSupported() {
-		return sourceNatSupported;
-	}
-    
+        return sourceNatSupported;
+    }
+
     public Boolean getSpecifyIpRanges() {
-    	return specifyIpRanges;
+        return specifyIpRanges;
     }
 
-	public String getTags() {
+    public String getTags() {
         return tags;
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/5e0501d1/api/src/com/cloud/api/commands/ListNetworkServiceProvidersCmd.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/api/commands/ListNetworkServiceProvidersCmd.java b/api/src/com/cloud/api/commands/ListNetworkServiceProvidersCmd.java
index f77e418..9818842 100644
--- a/api/src/com/cloud/api/commands/ListNetworkServiceProvidersCmd.java
+++ b/api/src/com/cloud/api/commands/ListNetworkServiceProvidersCmd.java
@@ -41,21 +41,21 @@ public class ListNetworkServiceProvidersCmd extends BaseListCmd {
     /////////////////////////////////////////////////////
     //////////////// API parameters /////////////////////
     /////////////////////////////////////////////////////
-    
+
     @IdentityMapper(entityTableName="physical_network")
     @Parameter(name=ApiConstants.PHYSICAL_NETWORK_ID, type=CommandType.LONG, description="the Physical Network ID")
     private Long physicalNetworkId;
-    
+
     @Parameter(name=ApiConstants.NAME, type=CommandType.STRING, description="list providers by name")
     private String name;
-    
+
     @Parameter(name=ApiConstants.STATE, type=CommandType.STRING, description="list providers by state")
     private String state;
-    
+
     /////////////////////////////////////////////////////
     /////////////////// Accessors ///////////////////////
     /////////////////////////////////////////////////////
-    
+
     public void setPhysicalNetworkId(Long physicalNetworkId) {
         this.physicalNetworkId = physicalNetworkId;
     }
@@ -65,14 +65,14 @@ public class ListNetworkServiceProvidersCmd extends BaseListCmd {
     }
 
     public String getName() {
-		return name;
-	}
+        return name;
+    }
 
-	public String getState() {
-		return state;
-	}
+    public String getState() {
+        return state;
+    }
 
-	/////////////////////////////////////////////////////
+    /////////////////////////////////////////////////////
     /////////////// API Implementation///////////////////
     /////////////////////////////////////////////////////
     @Override
@@ -84,7 +84,7 @@ public class ListNetworkServiceProvidersCmd extends BaseListCmd {
     public long getEntityOwnerId() {
         return Account.ACCOUNT_ID_SYSTEM;
     }
-    
+
     @Override
     public void execute(){
         Pair<List<? extends PhysicalNetworkServiceProvider>, Integer> serviceProviders = _networkService.listNetworkServiceProviders(getPhysicalNetworkId(),

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/5e0501d1/api/src/com/cloud/api/commands/ListNetworksCmd.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/api/commands/ListNetworksCmd.java b/api/src/com/cloud/api/commands/ListNetworksCmd.java
index 0a52618..4dcb22d 100644
--- a/api/src/com/cloud/api/commands/ListNetworksCmd.java
+++ b/api/src/com/cloud/api/commands/ListNetworksCmd.java
@@ -42,47 +42,47 @@ public class ListNetworksCmd extends BaseListTaggedResourcesCmd {
     @IdentityMapper(entityTableName="networks")
     @Parameter(name=ApiConstants.ID, type=CommandType.LONG, description="list networks by id")
     private Long id;
-    
+
     @IdentityMapper(entityTableName="data_center")
     @Parameter(name=ApiConstants.ZONE_ID, type=CommandType.LONG, description="the Zone ID of the network")
     private Long zoneId;
-    
+
     @Parameter(name=ApiConstants.TYPE, type=CommandType.STRING, description="the type of the network. Supported values are: Isolated and Shared")
     private String guestIpType;
-    
+
     @Parameter(name=ApiConstants.IS_SYSTEM, type=CommandType.BOOLEAN, description="true if network is system, false otherwise")
     private Boolean isSystem;
-    
+
     @Parameter(name=ApiConstants.ACL_TYPE, type=CommandType.STRING, description="list networks by ACL (access control list) type. Supported values are Account and Domain")
     private String aclType;
-    
+
     @Parameter(name=ApiConstants.TRAFFIC_TYPE, type=CommandType.STRING, description="type of the traffic")
     private String trafficType;
-    
+
     @IdentityMapper(entityTableName="physical_network")
     @Parameter(name=ApiConstants.PHYSICAL_NETWORK_ID, type=CommandType.LONG, description="list networks by physical network id")
     private Long physicalNetworkId;
-    
+
     @Parameter(name=ApiConstants.SUPPORTED_SERVICES, type=CommandType.LIST, collectionType=CommandType.STRING, description="list networks supporting certain services")
     private List<String> supportedServices;
-    
+
     @Parameter(name=ApiConstants.RESTART_REQUIRED, type=CommandType.BOOLEAN, description="list networks by restartRequired")
-    
+
     private Boolean restartRequired;
-    
+
     @Parameter(name=ApiConstants.SPECIFY_IP_RANGES, type=CommandType.BOOLEAN, description="true if need to list only networks which support specifying ip ranges")
     private Boolean specifyIpRanges;
-    
+
     @IdentityMapper(entityTableName="vpc")
     @Parameter(name=ApiConstants.VPC_ID, type=CommandType.LONG, description="List networks by VPC")
     private Long vpcId;
 
     @Parameter(name=ApiConstants.CAN_USE_FOR_DEPLOY, type=CommandType.BOOLEAN, description="list networks available for vm deployment")
     private Boolean canUseForDeploy;
-    
+
     @Parameter(name=ApiConstants.FOR_VPC, type=CommandType.BOOLEAN, description="the network belongs to vpc")
     private Boolean forVpc;
-   
+
     /////////////////////////////////////////////////////
     /////////////////// Accessors ///////////////////////
     /////////////////////////////////////////////////////
@@ -90,7 +90,7 @@ public class ListNetworksCmd extends BaseListTaggedResourcesCmd {
     public Long getId() {
         return id;
     }
-    
+
     public Long getZoneId() {
         return zoneId;
     }
@@ -102,10 +102,10 @@ public class ListNetworksCmd extends BaseListTaggedResourcesCmd {
     public Boolean getIsSystem() {
         return isSystem;
     }
-    
+
     public String getAclType() {
-		return aclType;
-	}
+        return aclType;
+    }
 
     public String getTrafficType() {
         return trafficType;
@@ -120,21 +120,21 @@ public class ListNetworksCmd extends BaseListTaggedResourcesCmd {
     }
 
     public Boolean getRestartRequired() {
-		return restartRequired;
-	}
-    
+        return restartRequired;
+    }
+
     public Boolean getSpecifyIpRanges() {
-    	return specifyIpRanges;
+        return specifyIpRanges;
     }
 
-	public Long getVpcId() {
+    public Long getVpcId() {
         return vpcId;
-	}
-	
-	public Boolean canUseForDeploy() {
+    }
+
+    public Boolean canUseForDeploy() {
         return canUseForDeploy;
     }
-	
+
     public Boolean getForVpc() {
         return forVpc;
     }

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/5e0501d1/api/src/com/cloud/api/commands/ListPhysicalNetworksCmd.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/api/commands/ListPhysicalNetworksCmd.java b/api/src/com/cloud/api/commands/ListPhysicalNetworksCmd.java
index 923b20d..69b00af 100644
--- a/api/src/com/cloud/api/commands/ListPhysicalNetworksCmd.java
+++ b/api/src/com/cloud/api/commands/ListPhysicalNetworksCmd.java
@@ -43,7 +43,7 @@ public class ListPhysicalNetworksCmd extends BaseListCmd {
     /////////////////////////////////////////////////////
     //////////////// API parameters /////////////////////
     /////////////////////////////////////////////////////
-    
+
     @IdentityMapper(entityTableName="physical_network")
     @Parameter(name=ApiConstants.ID, type=CommandType.LONG, description="list physical network by id")
     private Long id;
@@ -51,14 +51,14 @@ public class ListPhysicalNetworksCmd extends BaseListCmd {
     @IdentityMapper(entityTableName="data_center")
     @Parameter(name=ApiConstants.ZONE_ID, type=CommandType.LONG, description="the Zone ID for the physical network")
     private Long zoneId;
-    
+
     @Parameter(name=ApiConstants.NAME, type=CommandType.STRING, description="search by name")
     private String networkName;
 
     /////////////////////////////////////////////////////
     /////////////////// Accessors ///////////////////////
     /////////////////////////////////////////////////////
-    
+
     public Long getId() {
         return id;
     }
@@ -66,11 +66,11 @@ public class ListPhysicalNetworksCmd extends BaseListCmd {
     public Long getZoneId() {
         return zoneId;
     }
-    
+
     public String getNetworkName() {
-    	return networkName;
+        return networkName;
     }
-    
+
     /////////////////////////////////////////////////////
     /////////////// API Implementation///////////////////
     /////////////////////////////////////////////////////
@@ -79,12 +79,12 @@ public class ListPhysicalNetworksCmd extends BaseListCmd {
     public String getCommandName() {
         return s_name;
     }
-    
+
     @Override
     public long getEntityOwnerId() {
         return Account.ACCOUNT_ID_SYSTEM;
     }
-    
+
     @Override
     public void execute(){
         Pair<List<? extends PhysicalNetwork>, Integer> result = _networkService.searchPhysicalNetworks(getId(),getZoneId(),

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/5e0501d1/api/src/com/cloud/api/commands/ListPodsByCmd.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/api/commands/ListPodsByCmd.java b/api/src/com/cloud/api/commands/ListPodsByCmd.java
index e071dc7..d894606 100755
--- a/api/src/com/cloud/api/commands/ListPodsByCmd.java
+++ b/api/src/com/cloud/api/commands/ListPodsByCmd.java
@@ -51,13 +51,13 @@ public class ListPodsByCmd extends BaseListCmd {
     @IdentityMapper(entityTableName="data_center")
     @Parameter(name=ApiConstants.ZONE_ID, type=CommandType.LONG, description="list Pods by Zone ID")
     private Long zoneId;
-    
+
     @Parameter(name=ApiConstants.ALLOCATION_STATE, type=CommandType.STRING, description="list pods by allocation state")
-    private String allocationState;    
-    
+    private String allocationState;
+
     @Parameter(name=ApiConstants.SHOW_CAPACITIES, type=CommandType.BOOLEAN, description="flag to display the capacity of the pods")
     private Boolean showCapacities;
-    
+
     /////////////////////////////////////////////////////
     /////////////////// Accessors ///////////////////////
     /////////////////////////////////////////////////////
@@ -73,15 +73,15 @@ public class ListPodsByCmd extends BaseListCmd {
     public Long getZoneId() {
         return zoneId;
     }
-    
+
     public String getAllocationState() {
-    	return allocationState;
-    }    
+        return allocationState;
+    }
 
     public Boolean getShowCapacities() {
-		return showCapacities;
-	}
-    
+        return showCapacities;
+    }
+
     /////////////////////////////////////////////////////
     /////////////// API Implementation///////////////////
     /////////////////////////////////////////////////////

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/5e0501d1/api/src/com/cloud/api/commands/ListPortForwardingRulesCmd.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/api/commands/ListPortForwardingRulesCmd.java b/api/src/com/cloud/api/commands/ListPortForwardingRulesCmd.java
index 6a44bdd..37bbd14 100644
--- a/api/src/com/cloud/api/commands/ListPortForwardingRulesCmd.java
+++ b/api/src/com/cloud/api/commands/ListPortForwardingRulesCmd.java
@@ -40,11 +40,11 @@ public class ListPortForwardingRulesCmd extends BaseListTaggedResourcesCmd {
     /////////////////////////////////////////////////////
     //////////////// API parameters /////////////////////
     /////////////////////////////////////////////////////
-    
+
     @IdentityMapper(entityTableName="firewall_rules")
     @Parameter(name=ApiConstants.ID, type=CommandType.LONG, description="Lists rule with the specified ID.")
     private Long id;
-    
+
     @IdentityMapper(entityTableName="user_ip_address")
     @Parameter(name=ApiConstants.IP_ADDRESS_ID, type=CommandType.LONG, description="the id of IP address of the port forwarding services")
     private Long ipAddressId;
@@ -52,11 +52,11 @@ public class ListPortForwardingRulesCmd extends BaseListTaggedResourcesCmd {
     /////////////////////////////////////////////////////
     /////////////////// Accessors ///////////////////////
     /////////////////////////////////////////////////////
-    
+
     public Long getIpAddressId() {
         return ipAddressId;
     }
-    
+
     public Long getId() {
         return id;
     }
@@ -69,13 +69,13 @@ public class ListPortForwardingRulesCmd extends BaseListTaggedResourcesCmd {
     public String getCommandName() {
         return s_name;
     }
-    
+
     @Override
     public void execute(){
         Pair<List<? extends PortForwardingRule>, Integer> result = _rulesService.listPortForwardingRules(this);
         ListResponse<FirewallRuleResponse> response = new ListResponse<FirewallRuleResponse>();
         List<FirewallRuleResponse> fwResponses = new ArrayList<FirewallRuleResponse>();
-        
+
         for (PortForwardingRule fwRule : result.first()) {
             FirewallRuleResponse ruleData = _responseGenerator.createPortForwardingRuleResponse(fwRule);
             ruleData.setObjectName("portforwardingrule");
@@ -83,6 +83,6 @@ public class ListPortForwardingRulesCmd extends BaseListTaggedResourcesCmd {
         }
         response.setResponses(fwResponses, result.second());
         response.setResponseName(getCommandName());
-        this.setResponseObject(response); 
+        this.setResponseObject(response);
     }
 }

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/5e0501d1/api/src/com/cloud/api/commands/ListProjectAccountsCmd.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/api/commands/ListProjectAccountsCmd.java b/api/src/com/cloud/api/commands/ListProjectAccountsCmd.java
index 0ba1fae..4f8a6e3 100644
--- a/api/src/com/cloud/api/commands/ListProjectAccountsCmd.java
+++ b/api/src/com/cloud/api/commands/ListProjectAccountsCmd.java
@@ -42,14 +42,14 @@ public class ListProjectAccountsCmd extends BaseListCmd {
     /////////////////////////////////////////////////////
     //////////////// API parameters /////////////////////
     /////////////////////////////////////////////////////
-    
+
     @IdentityMapper(entityTableName="projects")
     @Parameter(name=ApiConstants.PROJECT_ID, type=CommandType.LONG, required=true, description="id of the project")
     private Long projectId;
 
     @Parameter(name=ApiConstants.ACCOUNT, type=CommandType.STRING, description="list accounts of the project by account name")
     private String accountName;
-   
+
     @Parameter(name=ApiConstants.ROLE, type=CommandType.STRING, description="list accounts of the project by role")
     private String role;
     /////////////////////////////////////////////////////
@@ -64,14 +64,14 @@ public class ListProjectAccountsCmd extends BaseListCmd {
     public String getCommandName() {
         return s_name;
     }
-    
+
     @Override
     public long getEntityOwnerId() {
        //TODO - return project entity ownerId
 
         return Account.ACCOUNT_ID_SYSTEM; // no account info given, parent this command to SYSTEM so ERROR events are tracked
     }
- 
+
 
     /////////////////////////////////////////////////////
     /////////////// API Implementation///////////////////
@@ -89,7 +89,7 @@ public class ListProjectAccountsCmd extends BaseListCmd {
         }
         response.setResponses(projectResponses, projectAccounts.second());
         response.setResponseName(getCommandName());
-        
+
         this.setResponseObject(response);
     }
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/5e0501d1/api/src/com/cloud/api/commands/ListProjectInvitationsCmd.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/api/commands/ListProjectInvitationsCmd.java b/api/src/com/cloud/api/commands/ListProjectInvitationsCmd.java
deleted file mode 100644
index c87ddfa..0000000
--- a/api/src/com/cloud/api/commands/ListProjectInvitationsCmd.java
+++ /dev/null
@@ -1,101 +0,0 @@
-// Licensed to the Apache Software Foundation (ASF) under one
-// or more contributor license agreements.  See the NOTICE file
-// distributed with this work for additional information
-// regarding copyright ownership.  The ASF licenses this file
-// to you under the Apache License, Version 2.0 (the
-// "License"); you may not use this file except in compliance
-// with the License.  You may obtain a copy of the License at
-//
-//   http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing,
-// software distributed under the License is distributed on an
-// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-// KIND, either express or implied.  See the License for the
-// specific language governing permissions and limitations
-// under the License.
-package com.cloud.api.commands;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.apache.log4j.Logger;
-
-import org.apache.cloudstack.api.ApiConstants;
-import org.apache.cloudstack.api.BaseListAccountResourcesCmd;
-import org.apache.cloudstack.api.IdentityMapper;
-import org.apache.cloudstack.api.Implementation;
-import org.apache.cloudstack.api.Parameter;
-import com.cloud.api.response.ListResponse;
-import com.cloud.api.response.ProjectInvitationResponse;
-import com.cloud.projects.ProjectInvitation;
-import com.cloud.utils.Pair;
-
-@Implementation(description = "Lists projects and provides detailed information for listed projects", responseObject = ProjectInvitationResponse.class, since = "3.0.0")
-public class ListProjectInvitationsCmd extends BaseListAccountResourcesCmd {
-    public static final Logger s_logger = Logger.getLogger(ListProjectInvitationsCmd.class.getName());
-    private static final String s_name = "listprojectinvitationsresponse";
-
-    // ///////////////////////////////////////////////////
-    // ////////////// API parameters /////////////////////
-    // ///////////////////////////////////////////////////
-    @IdentityMapper(entityTableName = "projects")
-    @Parameter(name = ApiConstants.PROJECT_ID, type = CommandType.LONG, description = "list by project id")
-    private Long projectId;
-
-    @Parameter(name = ApiConstants.ACTIVE_ONLY, type = CommandType.BOOLEAN, description = "if true, list only active invitations - having Pending state and ones that are not timed out yet")
-    private boolean activeOnly;
-
-    @Parameter(name = ApiConstants.STATE, type = CommandType.STRING, description = "list invitations by state")
-    private String state;
-
-    @IdentityMapper(entityTableName = "project_invitations")
-    @Parameter(name = ApiConstants.ID, type = CommandType.LONG, description = "list invitations by id")
-    private Long id;
-
-    // ///////////////////////////////////////////////////
-    // ///////////////// Accessors ///////////////////////
-    // ///////////////////////////////////////////////////
-    public Long getProjectId() {
-        return projectId;
-    }
-
-    public boolean isActiveOnly() {
-        return activeOnly;
-    }
-
-    public String getState() {
-        return state;
-    }
-
-    public Long getId() {
-        return id;
-    }
-
-    @Override
-    public String getCommandName() {
-        return s_name;
-    }
-
-    // ///////////////////////////////////////////////////
-    // ///////////// API Implementation///////////////////
-    // ///////////////////////////////////////////////////
-
-    @Override
-    public void execute() {
-        Pair<List<? extends ProjectInvitation>, Integer> invites = _projectService.listProjectInvitations(id, projectId,
-                this.getAccountName(), this.getDomainId(), state, activeOnly, this.getStartIndex(), this.getPageSizeVal(),
-                this.isRecursive(), this.listAll());
-        ListResponse<ProjectInvitationResponse> response = new ListResponse<ProjectInvitationResponse>();
-        List<ProjectInvitationResponse> projectInvitationResponses = new ArrayList<ProjectInvitationResponse>();
-        for (ProjectInvitation invite : invites.first()) {
-            ProjectInvitationResponse projectResponse = _responseGenerator.createProjectInvitationResponse(invite);
-            projectInvitationResponses.add(projectResponse);
-        }
-        response.setResponses(projectInvitationResponses, invites.second());
-        response.setResponseName(getCommandName());
-
-        this.setResponseObject(response);
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/5e0501d1/api/src/com/cloud/api/commands/ListProjectsCmd.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/api/commands/ListProjectsCmd.java b/api/src/com/cloud/api/commands/ListProjectsCmd.java
deleted file mode 100644
index 6758c1e..0000000
--- a/api/src/com/cloud/api/commands/ListProjectsCmd.java
+++ /dev/null
@@ -1,124 +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.Collection;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
-import org.apache.log4j.Logger;
-
-import org.apache.cloudstack.api.ApiConstants;
-import org.apache.cloudstack.api.BaseListAccountResourcesCmd;
-import org.apache.cloudstack.api.IdentityMapper;
-import org.apache.cloudstack.api.Implementation;
-import org.apache.cloudstack.api.Parameter;
-import com.cloud.api.response.ListResponse;
-import com.cloud.api.response.ProjectResponse;
-import com.cloud.exception.InvalidParameterValueException;
-import com.cloud.projects.Project;
-import com.cloud.utils.Pair;
-
-@Implementation(description="Lists projects and provides detailed information for listed projects", responseObject=ProjectResponse.class, since="3.0.0")
-public class ListProjectsCmd extends BaseListAccountResourcesCmd {
-    public static final Logger s_logger = Logger.getLogger(ListProjectsCmd.class.getName());
-    private static final String s_name = "listprojectsresponse";
-
-    /////////////////////////////////////////////////////
-    //////////////// API parameters /////////////////////
-    /////////////////////////////////////////////////////
-    
-    @IdentityMapper(entityTableName="projects")
-    @Parameter(name=ApiConstants.ID, type=CommandType.LONG, description="list projects by project ID")
-    private Long id;
-
-    @Parameter(name=ApiConstants.NAME, type=CommandType.STRING, description="list projects by name")
-    private String name;
-
-    @Parameter(name=ApiConstants.DISPLAY_TEXT, type=CommandType.STRING, description="list projects by display text")
-    private String displayText;
-    
-    @Parameter(name=ApiConstants.STATE, type=CommandType.STRING, description="list projects by state")
-    private String state;
-    
-    @Parameter(name = ApiConstants.TAGS, type = CommandType.MAP, description = "List projects by tags (key/value pairs)")
-    private Map tags;
-    
-    /////////////////////////////////////////////////////
-    /////////////////// Accessors ///////////////////////
-    /////////////////////////////////////////////////////
-
-    public Long getId() {
-        return id;
-    }
-
-    public String getName() {
-        return name;
-    }
-
-    public String getDisplayText() {
-        return displayText;
-    }
-    
-    @Override
-    public String getCommandName() {
-        return s_name;
-    }
-    
-    public Map<String, String> getTags() {
-        Map<String, String> tagsMap = null;
-        if (tags != null && !tags.isEmpty()) {
-            tagsMap = new HashMap<String, String>();
-            Collection<?> servicesCollection = tags.values();
-            Iterator<?> iter = servicesCollection.iterator();
-            while (iter.hasNext()) {
-                HashMap<String, String> services = (HashMap<String, String>) iter.next();
-                String key = services.get("key");
-                String value = services.get("value");
-                if (value == null) {
-                    throw new InvalidParameterValueException("No value is passed in for key " + key);
-                }
-                tagsMap.put(key, value);
-            }
-        }
-        return tagsMap;
-    }
-
-    /////////////////////////////////////////////////////
-    /////////////// API Implementation///////////////////
-    /////////////////////////////////////////////////////
-
-    @Override
-    public void execute(){
-        Pair<List<? extends Project>, Integer> projects = _projectService.listProjects(id, name, displayText, state, 
-                this.getAccountName(), this.getDomainId(), this.getKeyword(), this.getStartIndex(), this.getPageSizeVal(),
-                this.listAll(), this.isRecursive(), getTags());
-        ListResponse<ProjectResponse> response = new ListResponse<ProjectResponse>();
-        List<ProjectResponse> projectResponses = new ArrayList<ProjectResponse>();
-        for (Project project : projects.first()) {
-            ProjectResponse projectResponse = _responseGenerator.createProjectResponse(project);
-            projectResponses.add(projectResponse);
-        }
-        response.setResponses(projectResponses, projects.second());
-        response.setResponseName(getCommandName());
-        
-        this.setResponseObject(response);
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/5e0501d1/api/src/com/cloud/api/commands/ListPublicIpAddressesCmd.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/api/commands/ListPublicIpAddressesCmd.java b/api/src/com/cloud/api/commands/ListPublicIpAddressesCmd.java
index be4805d..a310129 100644
--- a/api/src/com/cloud/api/commands/ListPublicIpAddressesCmd.java
+++ b/api/src/com/cloud/api/commands/ListPublicIpAddressesCmd.java
@@ -48,7 +48,7 @@ public class ListPublicIpAddressesCmd extends BaseListTaggedResourcesCmd {
 
     @Parameter(name=ApiConstants.FOR_VIRTUAL_NETWORK, type=CommandType.BOOLEAN, description="the virtual network for the IP address")
     private Boolean forVirtualNetwork;
-    
+
     @IdentityMapper(entityTableName="user_ip_address")
     @Parameter(name=ApiConstants.ID, type=CommandType.LONG, description="lists ip address by id")
     private Long id;
@@ -63,24 +63,24 @@ public class ListPublicIpAddressesCmd extends BaseListTaggedResourcesCmd {
     @IdentityMapper(entityTableName="data_center")
     @Parameter(name=ApiConstants.ZONE_ID, type=CommandType.LONG, description="lists all public IP addresses by Zone ID")
     private Long zoneId;
-    
+
     @Parameter(name=ApiConstants.FOR_LOAD_BALANCING, type=CommandType.BOOLEAN, description="list only ips used for load balancing")
     private Boolean forLoadBalancing;
-    
+
     @IdentityMapper(entityTableName="physical_network")
     @Parameter(name=ApiConstants.PHYSICAL_NETWORK_ID, type=CommandType.LONG, description="lists all public IP addresses by physical network id")
     private Long physicalNetworkId;
-    
+
     @IdentityMapper(entityTableName="networks")
     @Parameter(name=ApiConstants.ASSOCIATED_NETWORK_ID, type=CommandType.LONG, description="lists all public IP addresses associated to the network specified")
     private Long associatedNetworkId;
-    
+
     @Parameter(name=ApiConstants.IS_SOURCE_NAT, type=CommandType.BOOLEAN, description="list only source nat ip addresses")
     private Boolean isSourceNat;
-    
+
     @Parameter(name=ApiConstants.IS_STATIC_NAT, type=CommandType.BOOLEAN, description="list only static nat ip addresses")
     private Boolean isStaticNat;
-    
+
     @IdentityMapper(entityTableName="vpc")
     @Parameter(name=ApiConstants.VPC_ID, type=CommandType.LONG, description="List ips belonging to the VPC")
     private Long vpcId;
@@ -111,35 +111,35 @@ public class ListPublicIpAddressesCmd extends BaseListTaggedResourcesCmd {
     public Long getZoneId() {
         return zoneId;
     }
-    
+
     public Long getPhysicalNetworkId() {
         return physicalNetworkId;
     }
-    
+
     public Long getAssociatedNetworkId() {
-		return associatedNetworkId;
-	}
+        return associatedNetworkId;
+    }
 
     public Boolean getIsSourceNat() {
-		return isSourceNat;
-	}
+        return isSourceNat;
+    }
 
-	public Boolean getIsStaticNat() {
-		return isStaticNat;
-	}
+    public Boolean getIsStaticNat() {
+        return isStaticNat;
+    }
 
-	public Long getVpcId() {
+    public Long getVpcId() {
         return vpcId;
-	}
+    }
 
-	/////////////////////////////////////////////////////
+    /////////////////////////////////////////////////////
     /////////////// API Implementation///////////////////
     /////////////////////////////////////////////////////
-	@Override
+    @Override
     public String getCommandName() {
         return s_name;
     }
-    
+
     @Override
     public void execute(){
         Pair<List<? extends IpAddress>, Integer> result = _mgr.searchForIPAddresses(this);
@@ -155,7 +155,7 @@ public class ListPublicIpAddressesCmd extends BaseListTaggedResourcesCmd {
         response.setResponseName(getCommandName());
         this.setResponseObject(response);
     }
-    
+
     public AsyncJob.Type getInstanceType() {
         return AsyncJob.Type.IpAddress;
     }

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/5e0501d1/api/src/com/cloud/api/commands/ListRecurringSnapshotScheduleCmd.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/api/commands/ListRecurringSnapshotScheduleCmd.java b/api/src/com/cloud/api/commands/ListRecurringSnapshotScheduleCmd.java
index e9f0052..85aa7e8 100644
--- a/api/src/com/cloud/api/commands/ListRecurringSnapshotScheduleCmd.java
+++ b/api/src/com/cloud/api/commands/ListRecurringSnapshotScheduleCmd.java
@@ -61,7 +61,7 @@ public class ListRecurringSnapshotScheduleCmd extends BaseListCmd {
     public String getCommandName() {
         return s_name;
     }
-    
+
     @Override
     public void execute(){
         List<? extends SnapshotSchedule> snapshotSchedules = _snapshotService.findRecurringSnapshotSchedule(this);

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/5e0501d1/api/src/com/cloud/api/commands/ListResourceLimitsCmd.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/api/commands/ListResourceLimitsCmd.java b/api/src/com/cloud/api/commands/ListResourceLimitsCmd.java
index 1782fda..7f832ae 100644
--- a/api/src/com/cloud/api/commands/ListResourceLimitsCmd.java
+++ b/api/src/com/cloud/api/commands/ListResourceLimitsCmd.java
@@ -43,12 +43,12 @@ public class ListResourceLimitsCmd extends BaseListProjectAndAccountResourcesCmd
     private Long id;
 
     @Parameter(name=ApiConstants.RESOURCE_TYPE, type=CommandType.INTEGER, description="Type of resource to update. Values are 0, 1, 2, 3, and 4. 0 - Instance. Number of instances a user can create. " +
-																						"1 - IP. Number of public IP addresses a user can own. " +
-																						"2 - Volume. Number of disk volumes a user can create." +
-																						"3 - Snapshot. Number of snapshots a user can create." +
-																						"4 - Template. Number of templates that a user can register/create.")
-	private Integer resourceType;
-			
+                                                                                        "1 - IP. Number of public IP addresses a user can own. " +
+                                                                                        "2 - Volume. Number of disk volumes a user can create." +
+                                                                                        "3 - Snapshot. Number of snapshots a user can create." +
+                                                                                        "4 - Template. Number of templates that a user can register/create.")
+    private Integer resourceType;
+
     /////////////////////////////////////////////////////
     /////////////////// Accessors ///////////////////////
     /////////////////////////////////////////////////////
@@ -64,12 +64,12 @@ public class ListResourceLimitsCmd extends BaseListProjectAndAccountResourcesCmd
     /////////////////////////////////////////////////////
     /////////////// API Implementation///////////////////
     /////////////////////////////////////////////////////
-    
+
     @Override
     public String getCommandName() {
         return s_name;
     }
-    
+
     @Override
     public void execute(){
         List<? extends ResourceLimit> result = _resourceLimitService.searchForLimits(id, finalyzeAccountId(this.getAccountName(), this.getDomainId(), this.getProjectId(), false), this.getDomainId(), resourceType, this.getStartIndex(), this.getPageSizeVal());

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/5e0501d1/api/src/com/cloud/api/commands/ListRoutersCmd.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/api/commands/ListRoutersCmd.java b/api/src/com/cloud/api/commands/ListRoutersCmd.java
index 681c13a..d4c41fc 100644
--- a/api/src/com/cloud/api/commands/ListRoutersCmd.java
+++ b/api/src/com/cloud/api/commands/ListRoutersCmd.java
@@ -49,7 +49,7 @@ public class ListRoutersCmd extends BaseListProjectAndAccountResourcesCmd {
     @IdentityMapper(entityTableName="vm_instance")
     @Parameter(name=ApiConstants.ID, type=CommandType.LONG, description="the ID of the disk router")
     private Long id;
-    
+
     @Parameter(name=ApiConstants.NAME, type=CommandType.STRING, description="the name of the router")
     private String routerName;
 
@@ -63,15 +63,15 @@ public class ListRoutersCmd extends BaseListProjectAndAccountResourcesCmd {
     @IdentityMapper(entityTableName="data_center")
     @Parameter(name=ApiConstants.ZONE_ID, type=CommandType.LONG, description="the Zone ID of the router")
     private Long zoneId;
-    
+
     @IdentityMapper(entityTableName="networks")
     @Parameter(name=ApiConstants.NETWORK_ID, type=CommandType.LONG, description="list by network id")
     private Long networkId;
-    
+
     @IdentityMapper(entityTableName="vpc")
     @Parameter(name=ApiConstants.VPC_ID, type=CommandType.LONG, description="List networks by VPC")
     private Long vpcId;
-    
+
     @Parameter(name=ApiConstants.FOR_VPC, type=CommandType.BOOLEAN, description="if true is passed for this parameter, list only VPC routers")
     private Boolean forVpc;
 
@@ -86,7 +86,7 @@ public class ListRoutersCmd extends BaseListProjectAndAccountResourcesCmd {
     public Long getId() {
         return id;
     }
-    
+
     public String getRouterName() {
         return routerName;
     }
@@ -102,15 +102,15 @@ public class ListRoutersCmd extends BaseListProjectAndAccountResourcesCmd {
     public Long getZoneId() {
         return zoneId;
     }
-    
+
     public Long getNetworkId() {
         return networkId;
     }
-    
+
     public Long getVpcId() {
         return vpcId;
     }
-    
+
     public Boolean getForVpc() {
         return forVpc;
     }
@@ -123,9 +123,9 @@ public class ListRoutersCmd extends BaseListProjectAndAccountResourcesCmd {
     public String getCommandName() {
         return s_name;
     }
-    
+
     public AsyncJob.Type getInstanceType() {
-    	return AsyncJob.Type.DomainRouter;
+        return AsyncJob.Type.DomainRouter;
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/5e0501d1/api/src/com/cloud/api/commands/ListSSHKeyPairsCmd.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/api/commands/ListSSHKeyPairsCmd.java b/api/src/com/cloud/api/commands/ListSSHKeyPairsCmd.java
index 398a818..7103777 100644
--- a/api/src/com/cloud/api/commands/ListSSHKeyPairsCmd.java
+++ b/api/src/com/cloud/api/commands/ListSSHKeyPairsCmd.java
@@ -30,59 +30,59 @@ import com.cloud.api.response.SSHKeyPairResponse;
 import com.cloud.user.SSHKeyPair;
 import com.cloud.utils.Pair;
 
-@Implementation(description="List registered keypairs", responseObject=SSHKeyPairResponse.class) 
+@Implementation(description="List registered keypairs", responseObject=SSHKeyPairResponse.class)
 public class ListSSHKeyPairsCmd extends BaseListProjectAndAccountResourcesCmd {
     public static final Logger s_logger = Logger.getLogger(ListSSHKeyPairsCmd.class.getName());
     private static final String s_name = "listsshkeypairsresponse";
-    
-    
+
+
     /////////////////////////////////////////////////////
     //////////////// API parameters /////////////////////
     /////////////////////////////////////////////////////
-	
-	@Parameter(name=ApiConstants.NAME, type=CommandType.STRING, description="A key pair name to look for") 
-	private String name;
-	
-    @Parameter(name="fingerprint", type=CommandType.STRING, description="A public key fingerprint to look for") 
+
+    @Parameter(name=ApiConstants.NAME, type=CommandType.STRING, description="A key pair name to look for")
+    private String name;
+
+    @Parameter(name="fingerprint", type=CommandType.STRING, description="A public key fingerprint to look for")
     private String fingerprint;
 
-    
+
     /////////////////////////////////////////////////////
     /////////////////// Accessors ///////////////////////
-    ///////////////////////////////////////////////////// 
-    
-	public String getName() {
-		return name;
-	}
-	
-	public String getFingerprint() {
-		return fingerprint;
-	}
-    
-    
+    /////////////////////////////////////////////////////
+
+    public String getName() {
+        return name;
+    }
+
+    public String getFingerprint() {
+        return fingerprint;
+    }
+
+
     /////////////////////////////////////////////////////
     /////////////// API Implementation///////////////////
     /////////////////////////////////////////////////////
-    
-	@Override
-	public void execute() {
-	    Pair<List<? extends SSHKeyPair>, Integer> resultList = _mgr.listSSHKeyPairs(this);
-		List<SSHKeyPairResponse> responses = new ArrayList<SSHKeyPairResponse>();
-		for (SSHKeyPair result : resultList.first()) {
-			SSHKeyPairResponse r = new SSHKeyPairResponse(result.getName(), result.getFingerprint());
-			r.setObjectName("sshkeypair");
-			responses.add(r);
-		}
-		
+
+    @Override
+    public void execute() {
+        Pair<List<? extends SSHKeyPair>, Integer> resultList = _mgr.listSSHKeyPairs(this);
+        List<SSHKeyPairResponse> responses = new ArrayList<SSHKeyPairResponse>();
+        for (SSHKeyPair result : resultList.first()) {
+            SSHKeyPairResponse r = new SSHKeyPairResponse(result.getName(), result.getFingerprint());
+            r.setObjectName("sshkeypair");
+            responses.add(r);
+        }
+
         ListResponse<SSHKeyPairResponse> response = new ListResponse<SSHKeyPairResponse>();
         response.setResponses(responses, resultList.second());
         response.setResponseName(getCommandName());
         this.setResponseObject(response);
-	}
+    }
 
-	@Override
-	public String getCommandName() {
-		return s_name;
-	}
+    @Override
+    public String getCommandName() {
+        return s_name;
+    }
 
 }

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/5e0501d1/api/src/com/cloud/api/commands/ListSecurityGroupsCmd.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/api/commands/ListSecurityGroupsCmd.java b/api/src/com/cloud/api/commands/ListSecurityGroupsCmd.java
index 53889a7..9211741 100644
--- a/api/src/com/cloud/api/commands/ListSecurityGroupsCmd.java
+++ b/api/src/com/cloud/api/commands/ListSecurityGroupsCmd.java
@@ -33,7 +33,7 @@ import com.cloud.network.security.SecurityGroupRules;
 
 @Implementation(description="Lists security groups", responseObject=SecurityGroupResponse.class)
 public class ListSecurityGroupsCmd extends BaseListTaggedResourcesCmd {
-	public static final Logger s_logger = Logger.getLogger(ListSecurityGroupsCmd.class.getName());
+    public static final Logger s_logger = Logger.getLogger(ListSecurityGroupsCmd.class.getName());
 
     private static final String s_name = "listsecuritygroupsresponse";
 
@@ -51,7 +51,7 @@ public class ListSecurityGroupsCmd extends BaseListTaggedResourcesCmd {
     @IdentityMapper(entityTableName="security_group")
     @Parameter(name=ApiConstants.ID, type=CommandType.LONG, description="list the security group by the id provided")
     private Long id;
-    
+
     /////////////////////////////////////////////////////
     /////////////////// Accessors ///////////////////////
     /////////////////////////////////////////////////////
@@ -62,9 +62,9 @@ public class ListSecurityGroupsCmd extends BaseListTaggedResourcesCmd {
     public Long getVirtualMachineId() {
         return virtualMachineId;
     }
-    
+
     public Long getId(){
-    	return id;
+        return id;
     }
 
     /////////////////////////////////////////////////////
@@ -84,7 +84,7 @@ public class ListSecurityGroupsCmd extends BaseListTaggedResourcesCmd {
         response.setResponseName(getCommandName());
         this.setResponseObject(response);
     }
-    
+
     @Override
     public AsyncJob.Type getInstanceType() {
         return AsyncJob.Type.SecurityGroup;

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/5e0501d1/api/src/com/cloud/api/commands/ListServiceOfferingsCmd.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/api/commands/ListServiceOfferingsCmd.java b/api/src/com/cloud/api/commands/ListServiceOfferingsCmd.java
index b1ad2e9..69763b9 100644
--- a/api/src/com/cloud/api/commands/ListServiceOfferingsCmd.java
+++ b/api/src/com/cloud/api/commands/ListServiceOfferingsCmd.java
@@ -50,7 +50,7 @@ public class ListServiceOfferingsCmd extends BaseListCmd {
     @IdentityMapper(entityTableName="vm_instance")
     @Parameter(name=ApiConstants.VIRTUAL_MACHINE_ID, type=CommandType.LONG, description="the ID of the virtual machine. Pass this in if you want to see the available service offering that a virtual machine can be changed to.")
     private Long virtualMachineId;
-    
+
     @IdentityMapper(entityTableName="domain")
     @Parameter(name=ApiConstants.DOMAIN_ID, type=CommandType.LONG, description="the ID of the domain associated with the service offering")
     private Long domainId;
@@ -61,7 +61,7 @@ public class ListServiceOfferingsCmd extends BaseListCmd {
     @Parameter(name=ApiConstants.SYSTEM_VM_TYPE, type=CommandType.STRING, description="the system VM type. Possible types are \"consoleproxy\", \"secondarystoragevm\" or \"domainrouter\".")
     private String systemVmType;
 
-    
+
     /////////////////////////////////////////////////////
     /////////////////// Accessors ///////////////////////
     /////////////////////////////////////////////////////
@@ -79,13 +79,13 @@ public class ListServiceOfferingsCmd extends BaseListCmd {
     }
 
     public Long getDomainId(){
-    	return domainId;
+        return domainId;
     }
-    
+
     public Boolean getIsSystem() {
         return isSystem == null ? false : isSystem;
     }
-    
+
     public String getSystemVmType(){
         return systemVmType;
     }
@@ -98,7 +98,7 @@ public class ListServiceOfferingsCmd extends BaseListCmd {
     public String getCommandName() {
         return s_name;
     }
-    
+
     @Override
     public void execute(){
         List<? extends ServiceOffering> offerings = _mgr.searchForServiceOfferings(this);

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/5e0501d1/api/src/com/cloud/api/commands/ListSnapshotPoliciesCmd.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/api/commands/ListSnapshotPoliciesCmd.java b/api/src/com/cloud/api/commands/ListSnapshotPoliciesCmd.java
index b1bc0f4..79105bb 100644
--- a/api/src/com/cloud/api/commands/ListSnapshotPoliciesCmd.java
+++ b/api/src/com/cloud/api/commands/ListSnapshotPoliciesCmd.java
@@ -72,7 +72,7 @@ public class ListSnapshotPoliciesCmd extends BaseListCmd {
             policyResponses.add(policyResponse);
         }
         response.setResponses(policyResponses);
-        response.setResponseName(getCommandName());   
+        response.setResponseName(getCommandName());
         this.setResponseObject(response);
     }
 }

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/5e0501d1/api/src/com/cloud/api/commands/ListSnapshotsCmd.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/api/commands/ListSnapshotsCmd.java b/api/src/com/cloud/api/commands/ListSnapshotsCmd.java
index 7e49c32..44b192b 100644
--- a/api/src/com/cloud/api/commands/ListSnapshotsCmd.java
+++ b/api/src/com/cloud/api/commands/ListSnapshotsCmd.java
@@ -35,7 +35,7 @@ import com.cloud.utils.Pair;
 
 @Implementation(description="Lists all available snapshots for the account.", responseObject=SnapshotResponse.class)
 public class ListSnapshotsCmd extends BaseListTaggedResourcesCmd {
-	public static final Logger s_logger = Logger.getLogger(ListSnapshotsCmd.class.getName());
+    public static final Logger s_logger = Logger.getLogger(ListSnapshotsCmd.class.getName());
 
     private static final String s_name = "listsnapshotsresponse";
 
@@ -83,7 +83,7 @@ public class ListSnapshotsCmd extends BaseListTaggedResourcesCmd {
     public Long getVolumeId() {
         return volumeId;
     }
-    
+
     /////////////////////////////////////////////////////
     /////////////// API Implementation///////////////////
     /////////////////////////////////////////////////////
@@ -92,9 +92,9 @@ public class ListSnapshotsCmd extends BaseListTaggedResourcesCmd {
     public String getCommandName() {
         return s_name;
     }
-    
+
     public AsyncJob.Type getInstanceType() {
-    	return AsyncJob.Type.Snapshot;
+        return AsyncJob.Type.Snapshot;
     }
 
     @Override
@@ -109,7 +109,7 @@ public class ListSnapshotsCmd extends BaseListTaggedResourcesCmd {
         }
         response.setResponses(snapshotResponses, result.second());
         response.setResponseName(getCommandName());
-        
+
         this.setResponseObject(response);
     }
 }

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/5e0501d1/api/src/com/cloud/api/commands/ListStoragePoolsCmd.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/api/commands/ListStoragePoolsCmd.java b/api/src/com/cloud/api/commands/ListStoragePoolsCmd.java
index 154013a..3787f92 100644
--- a/api/src/com/cloud/api/commands/ListStoragePoolsCmd.java
+++ b/api/src/com/cloud/api/commands/ListStoragePoolsCmd.java
@@ -62,7 +62,7 @@ public class ListStoragePoolsCmd extends BaseListCmd {
     @IdentityMapper(entityTableName="data_center")
     @Parameter(name=ApiConstants.ZONE_ID, type=CommandType.LONG, description="the Zone ID for the storage pool")
     private Long zoneId;
-    
+
     @IdentityMapper(entityTableName="storage_pool")
     @Parameter(name=ApiConstants.ID, type=CommandType.LONG, description="the ID of the storage pool")
     private Long id;
@@ -94,9 +94,9 @@ public class ListStoragePoolsCmd extends BaseListCmd {
     public Long getZoneId() {
         return zoneId;
     }
-    
+
     public Long getId() {
-    	return id;
+        return id;
     }
 
     /////////////////////////////////////////////////////
@@ -107,7 +107,7 @@ public class ListStoragePoolsCmd extends BaseListCmd {
     public String getCommandName() {
         return s_name;
     }
-    
+
     public AsyncJob.Type getInstanceType() {
         return AsyncJob.Type.StoragePool;
     }

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/5e0501d1/api/src/com/cloud/api/commands/ListSupportedNetworkServicesCmd.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/api/commands/ListSupportedNetworkServicesCmd.java b/api/src/com/cloud/api/commands/ListSupportedNetworkServicesCmd.java
index 517ed54..83462bb 100644
--- a/api/src/com/cloud/api/commands/ListSupportedNetworkServicesCmd.java
+++ b/api/src/com/cloud/api/commands/ListSupportedNetworkServicesCmd.java
@@ -37,21 +37,21 @@ import com.cloud.user.Account;
 public class ListSupportedNetworkServicesCmd extends BaseListCmd {
     public static final Logger s_logger = Logger.getLogger(ListSupportedNetworkServicesCmd.class.getName());
     private static final String _name = "listsupportednetworkservicesresponse";
-    
+
     @Parameter(name=ApiConstants.PROVIDER, type=CommandType.STRING, description="network service provider name")
     private String providerName;
-    
+
     @Parameter(name=ApiConstants.SERVICE, type=CommandType.STRING, description="network service name to list providers and capabilities of")
     private String serviceName;
 
     /////////////////////////////////////////////////////
     //////////////// API parameters /////////////////////
     /////////////////////////////////////////////////////
-    
+
     /////////////////////////////////////////////////////
     /////////////////// Accessors ///////////////////////
     /////////////////////////////////////////////////////
-    
+
 
     public void setProviderName(String providerName) {
         this.providerName = providerName;
@@ -78,10 +78,10 @@ public class ListSupportedNetworkServicesCmd extends BaseListCmd {
     public long getEntityOwnerId() {
         return Account.ACCOUNT_ID_SYSTEM;
     }
-    
+
     @Override
     public void execute(){
-        List<? extends Network.Service> services; 
+        List<? extends Network.Service> services;
         if(getServiceName() != null){
             Network.Service service = null;
             if(serviceName != null){
@@ -96,14 +96,14 @@ public class ListSupportedNetworkServicesCmd extends BaseListCmd {
         }else{
             services = _networkService.listNetworkServices(getProviderName());
         }
-        
+
         ListResponse<ServiceResponse> response = new ListResponse<ServiceResponse>();
         List<ServiceResponse> servicesResponses = new ArrayList<ServiceResponse>();
         for (Network.Service service : services) {
-        	//skip gateway service
-        	if (service == Service.Gateway) {
-        		continue;
-        	}
+            //skip gateway service
+            if (service == Service.Gateway) {
+                continue;
+            }
             ServiceResponse serviceResponse = _responseGenerator.createNetworkServiceResponse(service);
             servicesResponses.add(serviceResponse);
         }