You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by ts...@apache.org on 2013/04/03 21:28:52 UTC

[4/9] Removing ^M's from code.

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/469c4dd1/plugins/hypervisors/ucs/src/com/cloud/ucs/structure/ComputeBlade.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/ucs/src/com/cloud/ucs/structure/ComputeBlade.java b/plugins/hypervisors/ucs/src/com/cloud/ucs/structure/ComputeBlade.java
index e3b1cfd..4ac60c0 100644
--- a/plugins/hypervisors/ucs/src/com/cloud/ucs/structure/ComputeBlade.java
+++ b/plugins/hypervisors/ucs/src/com/cloud/ucs/structure/ComputeBlade.java
@@ -14,169 +14,169 @@
 // KIND, either express or implied.  See the License for the
 // specific language governing permissions and limitations
 // under the License.
-// 
-package com.cloud.ucs.structure;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import com.cloud.utils.xmlobject.XmlObject;
-import com.cloud.utils.xmlobject.XmlObjectParser;
-
-public class ComputeBlade {
-    String adminPower;
-    String adminState;
-    String assignedToDn;
-    String association;
-    String availability;
-    String availableMemory;
-    String chassisId;
-    String dn;
-    String name;
-    String numOfAdaptors;
-    String numOfCores;
-    String numOfCoresEnabled;
-    String numOfCpus;
-    String numOfEthHostIfs;
-    String numOfFcHostIfs;
-    String numOfThreads;
-    String operPower;
-    String totalMemory;
-    String uuid;
-    
-    public static List<ComputeBlade> fromXmString(String xmlstr) {
-        XmlObject root = XmlObjectParser.parseFromString(xmlstr);
-        List<XmlObject> lst = root.getAsList("outConfigs.computeBlade");
-        List<ComputeBlade> blades = new ArrayList<ComputeBlade>();
-        if (lst == null) {
-            return blades;
-        }
-        for (XmlObject xo : lst) {
-            blades.add(fromXmlObject(xo));
-        }
-        return blades;
-    }
-    
-    public static ComputeBlade fromXmlObject(XmlObject obj) {
-        ComputeBlade ret = new ComputeBlade();
-        return obj.evaluateObject(ret);
-    }
-    
-    public String getAdminPower() {
-        return adminPower;
-    }
-    public void setAdminPower(String adminPower) {
-        this.adminPower = adminPower;
-    }
-    public String getAdminState() {
-        return adminState;
-    }
-    public void setAdminState(String adminState) {
-        this.adminState = adminState;
-    }
-    public String getAssignedToDn() {
-        return assignedToDn;
-    }
-    public void setAssignedToDn(String assignedToDn) {
-        this.assignedToDn = assignedToDn;
-    }
-    public String getAssociation() {
-        return association;
-    }
-    public void setAssociation(String association) {
-        this.association = association;
-    }
-    public String getAvailability() {
-        return availability;
-    }
-    public void setAvailability(String availability) {
-        this.availability = availability;
-    }
-    public String getAvailableMemory() {
-        return availableMemory;
-    }
-    public void setAvailableMemory(String availableMemory) {
-        this.availableMemory = availableMemory;
-    }
-    public String getChassisId() {
-        return chassisId;
-    }
-    public void setChassisId(String chassisId) {
-        this.chassisId = chassisId;
-    }
-    public String getDn() {
-        return dn;
-    }
-    public void setDn(String dn) {
-        this.dn = dn;
-    }
-    public String getName() {
-        return name;
-    }
-    public void setName(String name) {
-        this.name = name;
-    }
-    public String getNumOfAdaptors() {
-        return numOfAdaptors;
-    }
-    public void setNumOfAdaptors(String numOfAdaptors) {
-        this.numOfAdaptors = numOfAdaptors;
-    }
-    public String getNumOfCores() {
-        return numOfCores;
-    }
-    public void setNumOfCores(String numOfCores) {
-        this.numOfCores = numOfCores;
-    }
-    public String getNumOfCoresEnabled() {
-        return numOfCoresEnabled;
-    }
-    public void setNumOfCoresEnabled(String numOfCoresEnabled) {
-        this.numOfCoresEnabled = numOfCoresEnabled;
-    }
-    public String getNumOfCpus() {
-        return numOfCpus;
-    }
-    public void setNumOfCpus(String numOfCpus) {
-        this.numOfCpus = numOfCpus;
-    }
-    public String getNumOfEthHostIfs() {
-        return numOfEthHostIfs;
-    }
-    public void setNumOfEthHostIfs(String numOfEthHostIfs) {
-        this.numOfEthHostIfs = numOfEthHostIfs;
-    }
-    public String getNumOfFcHostIfs() {
-        return numOfFcHostIfs;
-    }
-    public void setNumOfFcHostIfs(String numOfFcHostIfs) {
-        this.numOfFcHostIfs = numOfFcHostIfs;
-    }
-    public String getNumOfThreads() {
-        return numOfThreads;
-    }
-    public void setNumOfThreads(String numOfThreads) {
-        this.numOfThreads = numOfThreads;
-    }
-    public String getOperPower() {
-        return operPower;
-    }
-    public void setOperPower(String operPower) {
-        this.operPower = operPower;
-    }
-    public String getTotalMemory() {
-        return totalMemory;
-    }
-    public void setTotalMemory(String totalMemory) {
-        this.totalMemory = totalMemory;
-    }
-    public String getUuid() {
-        return uuid;
-    }
-    public void setUuid(String uuid) {
-        this.uuid = uuid;
-    }
-    public boolean isAssociated() {
-        return this.assignedToDn.equals("");
-    }
-}
+//
+package com.cloud.ucs.structure;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import com.cloud.utils.xmlobject.XmlObject;
+import com.cloud.utils.xmlobject.XmlObjectParser;
+
+public class ComputeBlade {
+    String adminPower;
+    String adminState;
+    String assignedToDn;
+    String association;
+    String availability;
+    String availableMemory;
+    String chassisId;
+    String dn;
+    String name;
+    String numOfAdaptors;
+    String numOfCores;
+    String numOfCoresEnabled;
+    String numOfCpus;
+    String numOfEthHostIfs;
+    String numOfFcHostIfs;
+    String numOfThreads;
+    String operPower;
+    String totalMemory;
+    String uuid;
+
+    public static List<ComputeBlade> fromXmString(String xmlstr) {
+        XmlObject root = XmlObjectParser.parseFromString(xmlstr);
+        List<XmlObject> lst = root.getAsList("outConfigs.computeBlade");
+        List<ComputeBlade> blades = new ArrayList<ComputeBlade>();
+        if (lst == null) {
+            return blades;
+        }
+        for (XmlObject xo : lst) {
+            blades.add(fromXmlObject(xo));
+        }
+        return blades;
+    }
+
+    public static ComputeBlade fromXmlObject(XmlObject obj) {
+        ComputeBlade ret = new ComputeBlade();
+        return obj.evaluateObject(ret);
+    }
+
+    public String getAdminPower() {
+        return adminPower;
+    }
+    public void setAdminPower(String adminPower) {
+        this.adminPower = adminPower;
+    }
+    public String getAdminState() {
+        return adminState;
+    }
+    public void setAdminState(String adminState) {
+        this.adminState = adminState;
+    }
+    public String getAssignedToDn() {
+        return assignedToDn;
+    }
+    public void setAssignedToDn(String assignedToDn) {
+        this.assignedToDn = assignedToDn;
+    }
+    public String getAssociation() {
+        return association;
+    }
+    public void setAssociation(String association) {
+        this.association = association;
+    }
+    public String getAvailability() {
+        return availability;
+    }
+    public void setAvailability(String availability) {
+        this.availability = availability;
+    }
+    public String getAvailableMemory() {
+        return availableMemory;
+    }
+    public void setAvailableMemory(String availableMemory) {
+        this.availableMemory = availableMemory;
+    }
+    public String getChassisId() {
+        return chassisId;
+    }
+    public void setChassisId(String chassisId) {
+        this.chassisId = chassisId;
+    }
+    public String getDn() {
+        return dn;
+    }
+    public void setDn(String dn) {
+        this.dn = dn;
+    }
+    public String getName() {
+        return name;
+    }
+    public void setName(String name) {
+        this.name = name;
+    }
+    public String getNumOfAdaptors() {
+        return numOfAdaptors;
+    }
+    public void setNumOfAdaptors(String numOfAdaptors) {
+        this.numOfAdaptors = numOfAdaptors;
+    }
+    public String getNumOfCores() {
+        return numOfCores;
+    }
+    public void setNumOfCores(String numOfCores) {
+        this.numOfCores = numOfCores;
+    }
+    public String getNumOfCoresEnabled() {
+        return numOfCoresEnabled;
+    }
+    public void setNumOfCoresEnabled(String numOfCoresEnabled) {
+        this.numOfCoresEnabled = numOfCoresEnabled;
+    }
+    public String getNumOfCpus() {
+        return numOfCpus;
+    }
+    public void setNumOfCpus(String numOfCpus) {
+        this.numOfCpus = numOfCpus;
+    }
+    public String getNumOfEthHostIfs() {
+        return numOfEthHostIfs;
+    }
+    public void setNumOfEthHostIfs(String numOfEthHostIfs) {
+        this.numOfEthHostIfs = numOfEthHostIfs;
+    }
+    public String getNumOfFcHostIfs() {
+        return numOfFcHostIfs;
+    }
+    public void setNumOfFcHostIfs(String numOfFcHostIfs) {
+        this.numOfFcHostIfs = numOfFcHostIfs;
+    }
+    public String getNumOfThreads() {
+        return numOfThreads;
+    }
+    public void setNumOfThreads(String numOfThreads) {
+        this.numOfThreads = numOfThreads;
+    }
+    public String getOperPower() {
+        return operPower;
+    }
+    public void setOperPower(String operPower) {
+        this.operPower = operPower;
+    }
+    public String getTotalMemory() {
+        return totalMemory;
+    }
+    public void setTotalMemory(String totalMemory) {
+        this.totalMemory = totalMemory;
+    }
+    public String getUuid() {
+        return uuid;
+    }
+    public void setUuid(String uuid) {
+        this.uuid = uuid;
+    }
+    public boolean isAssociated() {
+        return this.assignedToDn.equals("");
+    }
+}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/469c4dd1/plugins/hypervisors/ucs/src/com/cloud/ucs/structure/UcsProfile.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/ucs/src/com/cloud/ucs/structure/UcsProfile.java b/plugins/hypervisors/ucs/src/com/cloud/ucs/structure/UcsProfile.java
index 16cf35d..5322bc8 100644
--- a/plugins/hypervisors/ucs/src/com/cloud/ucs/structure/UcsProfile.java
+++ b/plugins/hypervisors/ucs/src/com/cloud/ucs/structure/UcsProfile.java
@@ -14,43 +14,43 @@
 // KIND, either express or implied.  See the License for the
 // specific language governing permissions and limitations
 // under the License.
-// 
-package com.cloud.ucs.structure;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import com.cloud.utils.xmlobject.XmlObject;
-import com.cloud.utils.xmlobject.XmlObjectParser;
-
-public class UcsProfile {
-    private String dn;
-    
-    public static UcsProfile fromXmlObject(XmlObject xo) {
-        UcsProfile p = new UcsProfile();
-        return xo.evaluateObject(p);
-    }
-    
-    public static List<UcsProfile> fromXmlString(String xmlstr) {
-        List<UcsProfile> ps = new ArrayList<UcsProfile>();
-        XmlObject xo = XmlObjectParser.parseFromString(xmlstr);
-        List<XmlObject> xos = xo.getAsList("outDns.dn");
-        if (xos != null) {
-            for (XmlObject x : xos) {
+//
+package com.cloud.ucs.structure;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import com.cloud.utils.xmlobject.XmlObject;
+import com.cloud.utils.xmlobject.XmlObjectParser;
+
+public class UcsProfile {
+    private String dn;
+
+    public static UcsProfile fromXmlObject(XmlObject xo) {
+        UcsProfile p = new UcsProfile();
+        return xo.evaluateObject(p);
+    }
+
+    public static List<UcsProfile> fromXmlString(String xmlstr) {
+        List<UcsProfile> ps = new ArrayList<UcsProfile>();
+        XmlObject xo = XmlObjectParser.parseFromString(xmlstr);
+        List<XmlObject> xos = xo.getAsList("outDns.dn");
+        if (xos != null) {
+            for (XmlObject x : xos) {
                 //UcsProfile p = UcsProfile.fromXmlObject(x);
                 UcsProfile p = new UcsProfile();
-                p.setDn(x.get("value").toString());
-                ps.add(p);
-            }
-        }
-        return ps;
-    }
-
-    public String getDn() {
-        return dn;
-    }
-
-    public void setDn(String dn) {
-        this.dn = dn;
-    }
-}
+                p.setDn(x.get("value").toString());
+                ps.add(p);
+            }
+        }
+        return ps;
+    }
+
+    public String getDn() {
+        return dn;
+    }
+
+    public void setDn(String dn) {
+        this.dn = dn;
+    }
+}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/469c4dd1/plugins/network-elements/dns-notifier/src/org/apache/cloudstack/network/element/DnsNotifier.java
----------------------------------------------------------------------
diff --git a/plugins/network-elements/dns-notifier/src/org/apache/cloudstack/network/element/DnsNotifier.java b/plugins/network-elements/dns-notifier/src/org/apache/cloudstack/network/element/DnsNotifier.java
index 907e8e7..c421344 100644
--- a/plugins/network-elements/dns-notifier/src/org/apache/cloudstack/network/element/DnsNotifier.java
+++ b/plugins/network-elements/dns-notifier/src/org/apache/cloudstack/network/element/DnsNotifier.java
@@ -1,122 +1,122 @@
-// 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
-// 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.network.element;
-
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Set;
-
-import javax.ejb.Local;
-import javax.naming.ConfigurationException;
-
-import com.cloud.deploy.DeployDestination;
-import com.cloud.exception.ConcurrentOperationException;
-import com.cloud.exception.InsufficientCapacityException;
-import com.cloud.exception.ResourceUnavailableException;
-import com.cloud.network.Network;
-import com.cloud.network.Network.Capability;
-import com.cloud.network.Network.Provider;
-import com.cloud.network.Network.Service;
-import com.cloud.network.PhysicalNetworkServiceProvider;
-import com.cloud.network.element.NetworkElement;
-import com.cloud.offering.NetworkOffering;
-import com.cloud.utils.component.AdapterBase;
-import com.cloud.vm.NicProfile;
-import com.cloud.vm.ReservationContext;
-import com.cloud.vm.VirtualMachine;
-import com.cloud.vm.VirtualMachineProfile;
-
-/**
- * @author ahuang
- *
- */
-@Local(NetworkElement.class)
-public class DnsNotifier extends AdapterBase implements NetworkElement {
-
-    public DnsNotifier() {
-
-    }
-
-    @Override
-    public Map<Service, Map<Capability, String>> getCapabilities() {
-        Map<Service, Map<Capability, String>> caps = new HashMap<Service, Map<Capability, String>>(); 
-        caps.put(Service.Dns, new HashMap<Capability, String>());
-        return caps;
-    }
-
-    @Override
-    public Provider getProvider() {
-        return null;
-    }
-
-    @Override
-    public boolean implement(Network network, NetworkOffering offering, DeployDestination dest, ReservationContext context) throws ConcurrentOperationException, ResourceUnavailableException,
-    InsufficientCapacityException {
-        return true;
-    }
-
-    @Override
-    public boolean prepare(Network network, NicProfile nic, VirtualMachineProfile<? extends VirtualMachine> vm, DeployDestination dest, ReservationContext context) throws ConcurrentOperationException,
-    ResourceUnavailableException, InsufficientCapacityException {
-        // signal to the dns server that this vm is up and running and set the ip address to hostname mapping.
-        vm.getHostName();
-        nic.getIp4Address();
-        nic.getIp6Address();
-        return true;
-    }
-
-    @Override
-    public boolean release(Network network, NicProfile nic, VirtualMachineProfile<? extends VirtualMachine> vm, ReservationContext context) throws ConcurrentOperationException, ResourceUnavailableException {
-        vm.getHostName();
-        nic.getIp4Address();
-        nic.getIp6Address();
-        // signal to the dns server that the vm is being shutdown and remove the mapping.
-        return true;
-    }
-
-    @Override
-    public boolean shutdown(Network network, ReservationContext context, boolean cleanup) throws ConcurrentOperationException, ResourceUnavailableException {
-        return true;
-    }
-
-    @Override
-    public boolean destroy(Network network, ReservationContext context) throws ConcurrentOperationException, ResourceUnavailableException {
-        return true;
-    }
-
-    @Override
-    public boolean isReady(PhysicalNetworkServiceProvider provider) {
-        return true;
-    }
-
-    @Override
-    public boolean shutdownProviderInstances(PhysicalNetworkServiceProvider provider, ReservationContext context) throws ConcurrentOperationException, ResourceUnavailableException {
-        return true;
-    }
-
-    @Override
-    public boolean canEnableIndividualServices() {
-        return true;
-    }
-
-    @Override
-    public boolean verifyServicesCombination(Set<Service> services) {
-        return true;
-    }
-
-}
+// 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
+// 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.network.element;
+
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Set;
+
+import javax.ejb.Local;
+import javax.naming.ConfigurationException;
+
+import com.cloud.deploy.DeployDestination;
+import com.cloud.exception.ConcurrentOperationException;
+import com.cloud.exception.InsufficientCapacityException;
+import com.cloud.exception.ResourceUnavailableException;
+import com.cloud.network.Network;
+import com.cloud.network.Network.Capability;
+import com.cloud.network.Network.Provider;
+import com.cloud.network.Network.Service;
+import com.cloud.network.PhysicalNetworkServiceProvider;
+import com.cloud.network.element.NetworkElement;
+import com.cloud.offering.NetworkOffering;
+import com.cloud.utils.component.AdapterBase;
+import com.cloud.vm.NicProfile;
+import com.cloud.vm.ReservationContext;
+import com.cloud.vm.VirtualMachine;
+import com.cloud.vm.VirtualMachineProfile;
+
+/**
+ * @author ahuang
+ *
+ */
+@Local(NetworkElement.class)
+public class DnsNotifier extends AdapterBase implements NetworkElement {
+
+    public DnsNotifier() {
+
+    }
+
+    @Override
+    public Map<Service, Map<Capability, String>> getCapabilities() {
+        Map<Service, Map<Capability, String>> caps = new HashMap<Service, Map<Capability, String>>();
+        caps.put(Service.Dns, new HashMap<Capability, String>());
+        return caps;
+    }
+
+    @Override
+    public Provider getProvider() {
+        return null;
+    }
+
+    @Override
+    public boolean implement(Network network, NetworkOffering offering, DeployDestination dest, ReservationContext context) throws ConcurrentOperationException, ResourceUnavailableException,
+    InsufficientCapacityException {
+        return true;
+    }
+
+    @Override
+    public boolean prepare(Network network, NicProfile nic, VirtualMachineProfile<? extends VirtualMachine> vm, DeployDestination dest, ReservationContext context) throws ConcurrentOperationException,
+    ResourceUnavailableException, InsufficientCapacityException {
+        // signal to the dns server that this vm is up and running and set the ip address to hostname mapping.
+        vm.getHostName();
+        nic.getIp4Address();
+        nic.getIp6Address();
+        return true;
+    }
+
+    @Override
+    public boolean release(Network network, NicProfile nic, VirtualMachineProfile<? extends VirtualMachine> vm, ReservationContext context) throws ConcurrentOperationException, ResourceUnavailableException {
+        vm.getHostName();
+        nic.getIp4Address();
+        nic.getIp6Address();
+        // signal to the dns server that the vm is being shutdown and remove the mapping.
+        return true;
+    }
+
+    @Override
+    public boolean shutdown(Network network, ReservationContext context, boolean cleanup) throws ConcurrentOperationException, ResourceUnavailableException {
+        return true;
+    }
+
+    @Override
+    public boolean destroy(Network network, ReservationContext context) throws ConcurrentOperationException, ResourceUnavailableException {
+        return true;
+    }
+
+    @Override
+    public boolean isReady(PhysicalNetworkServiceProvider provider) {
+        return true;
+    }
+
+    @Override
+    public boolean shutdownProviderInstances(PhysicalNetworkServiceProvider provider, ReservationContext context) throws ConcurrentOperationException, ResourceUnavailableException {
+        return true;
+    }
+
+    @Override
+    public boolean canEnableIndividualServices() {
+        return true;
+    }
+
+    @Override
+    public boolean verifyServicesCombination(Set<Service> services) {
+        return true;
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/469c4dd1/server/src/com/cloud/async/AsyncJobManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/async/AsyncJobManagerImpl.java b/server/src/com/cloud/async/AsyncJobManagerImpl.java
index 438877b..47d793f 100644
--- a/server/src/com/cloud/async/AsyncJobManagerImpl.java
+++ b/server/src/com/cloud/async/AsyncJobManagerImpl.java
@@ -15,8 +15,8 @@
 // specific language governing permissions and limitations
 // under the License.
 
-package com.cloud.async;
-
+package com.cloud.async;
+
 import java.io.File;
 import java.io.FileInputStream;
 import java.lang.reflect.Type;
@@ -75,182 +75,182 @@ import com.cloud.utils.mgmt.JmxUtil;
 import com.cloud.utils.net.MacAddress;
 import com.google.gson.Gson;
 import com.google.gson.reflect.TypeToken;
-
+
 @Component
-@Local(value={AsyncJobManager.class})
-public class AsyncJobManagerImpl extends ManagerBase implements AsyncJobManager, ClusterManagerListener {
-    public static final Logger s_logger = Logger.getLogger(AsyncJobManagerImpl.class.getName());
+@Local(value={AsyncJobManager.class})
+public class AsyncJobManagerImpl extends ManagerBase implements AsyncJobManager, ClusterManagerListener {
+    public static final Logger s_logger = Logger.getLogger(AsyncJobManagerImpl.class.getName());
     private static final int ACQUIRE_GLOBAL_LOCK_TIMEOUT_FOR_COOPERATION = 3; 	// 3 seconds
-
-    private static final int MAX_ONETIME_SCHEDULE_SIZE = 50;
+
+    private static final int MAX_ONETIME_SCHEDULE_SIZE = 50;
     private static final int HEARTBEAT_INTERVAL = 2000;
     private static final int GC_INTERVAL = 10000;				// 10 seconds
-
-    @Inject private AsyncJobExecutorContext _context;
-    @Inject private SyncQueueManager _queueMgr;
+
+    @Inject private AsyncJobExecutorContext _context;
+    @Inject private SyncQueueManager _queueMgr;
     @Inject private ClusterManager _clusterMgr;
-    @Inject private AccountManager _accountMgr;
+    @Inject private AccountManager _accountMgr;
     @Inject private AccountDao _accountDao;
     @Inject private AsyncJobDao _jobDao;
     @Inject private ConfigurationDao _configDao;
     private long _jobExpireSeconds = 86400;						// 1 day
     private long _jobCancelThresholdSeconds = 3600;         // 1 hour (for cancelling the jobs blocking other jobs)
 
-    @Inject private ApiDispatcher _dispatcher;
-
-    private final ScheduledExecutorService _heartbeatScheduler =
-            Executors.newScheduledThreadPool(1, new NamedThreadFactory("AsyncJobMgr-Heartbeat"));
-    private ExecutorService _executor;
-
-    @Override
-    public AsyncJobExecutorContext getExecutorContext() {
-        return _context;
-    }
-
-    @Override
-    public AsyncJobVO getAsyncJob(long jobId) {
-        return _jobDao.findById(jobId);
-    }
-
-    @Override
-    public AsyncJobVO findInstancePendingAsyncJob(String instanceType, long instanceId) {
-        return _jobDao.findInstancePendingAsyncJob(instanceType, instanceId);
+    @Inject private ApiDispatcher _dispatcher;
+
+    private final ScheduledExecutorService _heartbeatScheduler =
+            Executors.newScheduledThreadPool(1, new NamedThreadFactory("AsyncJobMgr-Heartbeat"));
+    private ExecutorService _executor;
+
+    @Override
+    public AsyncJobExecutorContext getExecutorContext() {
+        return _context;
+    }
+
+    @Override
+    public AsyncJobVO getAsyncJob(long jobId) {
+        return _jobDao.findById(jobId);
+    }
+
+    @Override
+    public AsyncJobVO findInstancePendingAsyncJob(String instanceType, long instanceId) {
+        return _jobDao.findInstancePendingAsyncJob(instanceType, instanceId);
     }
 
     @Override
     public List<AsyncJobVO> findInstancePendingAsyncJobs(AsyncJob.Type instanceType, Long accountId) {
         return _jobDao.findInstancePendingAsyncJobs(instanceType, accountId);
-    }
-
-    @Override
-    public long submitAsyncJob(AsyncJobVO job) {
-        return submitAsyncJob(job, false);
-    }
-
-    @Override @DB
+    }
+
+    @Override
+    public long submitAsyncJob(AsyncJobVO job) {
+        return submitAsyncJob(job, false);
+    }
+
+    @Override @DB
     public long submitAsyncJob(AsyncJobVO job, boolean scheduleJobExecutionInContext) {
-        Transaction txt = Transaction.currentTxn();
-        try {
-            txt.start();
+        Transaction txt = Transaction.currentTxn();
+        try {
+            txt.start();
             job.setInitMsid(getMsid());
-            _jobDao.persist(job);
-            txt.commit();
+            _jobDao.persist(job);
+            txt.commit();
 
             // no sync source originally
-            job.setSyncSource(null);
+            job.setSyncSource(null);
             scheduleExecution(job, scheduleJobExecutionInContext);
             if(s_logger.isDebugEnabled()) {
                 s_logger.debug("submit async job-" + job.getId() + ", details: " + job.toString());
             }
-            return job.getId();
+            return job.getId();
         } catch(Exception e) {
             txt.rollback();
             String errMsg = "Unable to schedule async job for command " + job.getCmd() + ", unexpected exception.";
             s_logger.warn(errMsg, e);
             throw new CloudRuntimeException(errMsg);
-        }
-    }
-
-    @Override @DB
-    public void completeAsyncJob(long jobId, int jobStatus, int resultCode, Object resultObject) {
+        }
+    }
+
+    @Override @DB
+    public void completeAsyncJob(long jobId, int jobStatus, int resultCode, Object resultObject) {
         if(s_logger.isDebugEnabled()) {
-            s_logger.debug("Complete async job-" + jobId + ", jobStatus: " + jobStatus +
+            s_logger.debug("Complete async job-" + jobId + ", jobStatus: " + jobStatus +
                     ", resultCode: " + resultCode + ", result: " + resultObject);
-        }
-
-        Transaction txt = Transaction.currentTxn();
-        try {
-            txt.start();
-            AsyncJobVO job = _jobDao.findById(jobId);
-            if(job == null) {
+        }
+
+        Transaction txt = Transaction.currentTxn();
+        try {
+            txt.start();
+            AsyncJobVO job = _jobDao.findById(jobId);
+            if(job == null) {
                 if(s_logger.isDebugEnabled()) {
-                    s_logger.debug("job-" + jobId + " no longer exists, we just log completion info here. " + jobStatus +
+                    s_logger.debug("job-" + jobId + " no longer exists, we just log completion info here. " + jobStatus +
                             ", resultCode: " + resultCode + ", result: " + resultObject);
-                }
-
-                txt.rollback();
-                return;
-            }
+                }
 
-            job.setCompleteMsid(getMsid());
-            job.setStatus(jobStatus);
-            job.setResultCode(resultCode);
+                txt.rollback();
+                return;
+            }
 
-            // reset attached object
-            job.setInstanceType(null);
-            job.setInstanceId(null);
+            job.setCompleteMsid(getMsid());
+            job.setStatus(jobStatus);
+            job.setResultCode(resultCode);
+
+            // reset attached object
+            job.setInstanceType(null);
+            job.setInstanceId(null);
 
             if (resultObject != null) {
                 job.setResult(ApiSerializerHelper.toSerializedStringOld(resultObject));
-            }
-
-            job.setLastUpdated(DateUtil.currentGMTTime());
-            _jobDao.update(jobId, job);
-            txt.commit();
-        } catch(Exception e) {
-            s_logger.error("Unexpected exception while completing async job-" + jobId, e);
-            txt.rollback();
-        }
-    }
-
-    @Override @DB
-    public void updateAsyncJobStatus(long jobId, int processStatus, Object resultObject) {
+            }
+
+            job.setLastUpdated(DateUtil.currentGMTTime());
+            _jobDao.update(jobId, job);
+            txt.commit();
+        } catch(Exception e) {
+            s_logger.error("Unexpected exception while completing async job-" + jobId, e);
+            txt.rollback();
+        }
+    }
+
+    @Override @DB
+    public void updateAsyncJobStatus(long jobId, int processStatus, Object resultObject) {
         if(s_logger.isDebugEnabled()) {
-            s_logger.debug("Update async-job progress, job-" + jobId + ", processStatus: " + processStatus +
+            s_logger.debug("Update async-job progress, job-" + jobId + ", processStatus: " + processStatus +
                     ", result: " + resultObject);
-        }
-
-        Transaction txt = Transaction.currentTxn();
-        try {
-            txt.start();
-            AsyncJobVO job = _jobDao.findById(jobId);
-            if(job == null) {
+        }
+
+        Transaction txt = Transaction.currentTxn();
+        try {
+            txt.start();
+            AsyncJobVO job = _jobDao.findById(jobId);
+            if(job == null) {
                 if(s_logger.isDebugEnabled()) {
                     s_logger.debug("job-" + jobId + " no longer exists, we just log progress info here. progress status: " + processStatus);
-                }
-
-                txt.rollback();
-                return;
-            }
-
-            job.setProcessStatus(processStatus);
+                }
+
+                txt.rollback();
+                return;
+            }
+
+            job.setProcessStatus(processStatus);
             if(resultObject != null) {
                 job.setResult(ApiSerializerHelper.toSerializedStringOld(resultObject));
-            }
-            job.setLastUpdated(DateUtil.currentGMTTime());
-            _jobDao.update(jobId, job);
-            txt.commit();
-        } catch(Exception e) {
-            s_logger.error("Unexpected exception while updating async job-" + jobId + " status: ", e);
-            txt.rollback();
-        }
-    }
-
-    @Override @DB
-    public void updateAsyncJobAttachment(long jobId, String instanceType, Long instanceId) {
+            }
+            job.setLastUpdated(DateUtil.currentGMTTime());
+            _jobDao.update(jobId, job);
+            txt.commit();
+        } catch(Exception e) {
+            s_logger.error("Unexpected exception while updating async job-" + jobId + " status: ", e);
+            txt.rollback();
+        }
+    }
+
+    @Override @DB
+    public void updateAsyncJobAttachment(long jobId, String instanceType, Long instanceId) {
         if(s_logger.isDebugEnabled()) {
-            s_logger.debug("Update async-job attachment, job-" + jobId + ", instanceType: " + instanceType +
+            s_logger.debug("Update async-job attachment, job-" + jobId + ", instanceType: " + instanceType +
                     ", instanceId: " + instanceId);
-        }
-
-        Transaction txt = Transaction.currentTxn();
-        try {
-            txt.start();
-
-            AsyncJobVO job = _jobDao.createForUpdate();
-            //job.setInstanceType(instanceType);
-            job.setInstanceId(instanceId);
-            job.setLastUpdated(DateUtil.currentGMTTime());
-            _jobDao.update(jobId, job);
-
-            txt.commit();
-        } catch(Exception e) {
-            s_logger.error("Unexpected exception while updating async job-" + jobId + " attachment: ", e);
-            txt.rollback();
-        }
-    }
-
-    @Override
+        }
+
+        Transaction txt = Transaction.currentTxn();
+        try {
+            txt.start();
+
+            AsyncJobVO job = _jobDao.createForUpdate();
+            //job.setInstanceType(instanceType);
+            job.setInstanceId(instanceId);
+            job.setLastUpdated(DateUtil.currentGMTTime());
+            _jobDao.update(jobId, job);
+
+            txt.commit();
+        } catch(Exception e) {
+            s_logger.error("Unexpected exception while updating async job-" + jobId + " attachment: ", e);
+            txt.rollback();
+        }
+    }
+
+    @Override
     public void syncAsyncJobExecution(AsyncJob job, String syncObjType, long syncObjId, long queueSizeLimit) {
         // This method is re-entrant.  If an API developer wants to synchronized on an object, e.g. the router,
         // when executing business logic, they will call this method (actually a method in BaseAsyncCmd that calls this).
@@ -317,60 +317,60 @@ public class AsyncJobManagerImpl extends ManagerBase implements AsyncJobManager,
         return _jobDao.findById(cmd.getId());
     }
 
-    @Override @DB
-    public AsyncJobResult queryAsyncJobResult(long jobId) {
+    @Override @DB
+    public AsyncJobResult queryAsyncJobResult(long jobId) {
         if(s_logger.isTraceEnabled()) {
             s_logger.trace("Query async-job status, job-" + jobId);
-        }
-
-        Transaction txt = Transaction.currentTxn();
-        AsyncJobResult jobResult = new AsyncJobResult(jobId);
-
-        try {
-            txt.start();
-            AsyncJobVO job = _jobDao.findById(jobId);
-            if(job != null) {
-                jobResult.setCmdOriginator(job.getCmdOriginator());
-                jobResult.setJobStatus(job.getStatus());
-                jobResult.setProcessStatus(job.getProcessStatus());
-                jobResult.setResult(job.getResult());
+        }
+
+        Transaction txt = Transaction.currentTxn();
+        AsyncJobResult jobResult = new AsyncJobResult(jobId);
+
+        try {
+            txt.start();
+            AsyncJobVO job = _jobDao.findById(jobId);
+            if(job != null) {
+                jobResult.setCmdOriginator(job.getCmdOriginator());
+                jobResult.setJobStatus(job.getStatus());
+                jobResult.setProcessStatus(job.getProcessStatus());
+                jobResult.setResult(job.getResult());
                 jobResult.setResultCode(job.getResultCode());
-                jobResult.setUuid(job.getUuid());
-
-                if(job.getStatus() == AsyncJobResult.STATUS_SUCCEEDED ||
-                        job.getStatus() == AsyncJobResult.STATUS_FAILED) {
-
+                jobResult.setUuid(job.getUuid());
+
+                if(job.getStatus() == AsyncJobResult.STATUS_SUCCEEDED ||
+                        job.getStatus() == AsyncJobResult.STATUS_FAILED) {
+
                     if(s_logger.isDebugEnabled()) {
                         s_logger.debug("Async job-" + jobId + " completed");
-                    }
-                } else {
-                    job.setLastPolled(DateUtil.currentGMTTime());
-                    _jobDao.update(jobId, job);
-                }
-            } else {
+                    }
+                } else {
+                    job.setLastPolled(DateUtil.currentGMTTime());
+                    _jobDao.update(jobId, job);
+                }
+            } else {
                 if(s_logger.isDebugEnabled()) {
                     s_logger.debug("Async job-" + jobId + " does not exist, invalid job id?");
-                }
-
-                jobResult.setJobStatus(AsyncJobResult.STATUS_FAILED);
-                jobResult.setResult("job-" + jobId + " does not exist");
-            }
-            txt.commit();
-        } catch(Exception e) {
-            s_logger.error("Unexpected exception while querying async job-" + jobId + " status: ", e);
-
-            jobResult.setJobStatus(AsyncJobResult.STATUS_FAILED);
-            jobResult.setResult("Exception: " + e.toString());
-            txt.rollback();
-        }
-
+                }
+
+                jobResult.setJobStatus(AsyncJobResult.STATUS_FAILED);
+                jobResult.setResult("job-" + jobId + " does not exist");
+            }
+            txt.commit();
+        } catch(Exception e) {
+            s_logger.error("Unexpected exception while querying async job-" + jobId + " status: ", e);
+
+            jobResult.setJobStatus(AsyncJobResult.STATUS_FAILED);
+            jobResult.setResult("Exception: " + e.toString());
+            txt.rollback();
+        }
+
         if(s_logger.isTraceEnabled()) {
             s_logger.trace("Job status: " + jobResult.toString());
-        }
-
-        return jobResult;
+        }
+
+        return jobResult;
     }
-
+
     private void scheduleExecution(final AsyncJobVO job) {
         scheduleExecution(job, false);
     }
@@ -509,7 +509,7 @@ public class AsyncJobManagerImpl extends ManagerBase implements AsyncJobManager,
             }
         };
     }
-
+
     private void executeQueueItem(SyncQueueItemVO item, boolean fromPreviousSession) {
         AsyncJobVO job = _jobDao.findById(item.getContentId());
         if (job != null) {
@@ -539,59 +539,59 @@ public class AsyncJobManagerImpl extends ManagerBase implements AsyncJobManager,
         }
     }
 
-    @Override
-    public void releaseSyncSource(AsyncJobExecutor executor) {
-        if(executor.getSyncSource() != null) {
+    @Override
+    public void releaseSyncSource(AsyncJobExecutor executor) {
+        if(executor.getSyncSource() != null) {
             if(s_logger.isDebugEnabled()) {
-                s_logger.debug("Release sync source for job-" + executor.getJob().getId() + " sync source: "
-                        + executor.getSyncSource().getContentType() + "-"
+                s_logger.debug("Release sync source for job-" + executor.getJob().getId() + " sync source: "
+                        + executor.getSyncSource().getContentType() + "-"
                         + executor.getSyncSource().getContentId());
-            }
-
-            _queueMgr.purgeItem(executor.getSyncSource().getId());
-            checkQueue(executor.getSyncSource().getQueueId());
-        }
-    }
-
-    private void checkQueue(long queueId) {
-        while(true) {
-            try {
-                SyncQueueItemVO item = _queueMgr.dequeueFromOne(queueId, getMsid());
-                if(item != null) {
+            }
+
+            _queueMgr.purgeItem(executor.getSyncSource().getId());
+            checkQueue(executor.getSyncSource().getQueueId());
+        }
+    }
+
+    private void checkQueue(long queueId) {
+        while(true) {
+            try {
+                SyncQueueItemVO item = _queueMgr.dequeueFromOne(queueId, getMsid());
+                if(item != null) {
                     if(s_logger.isDebugEnabled()) {
                         s_logger.debug("Executing sync queue item: " + item.toString());
-                    }
-
-                    executeQueueItem(item, false);
-                } else {
-                    break;
-                }
-            } catch(Throwable e) {
-                s_logger.error("Unexpected exception when kicking sync queue-" + queueId, e);
-                break;
-            }
-        }
-    }
-
-    private Runnable getHeartbeatTask() {
-        return new Runnable() {
+                    }
+
+                    executeQueueItem(item, false);
+                } else {
+                    break;
+                }
+            } catch(Throwable e) {
+                s_logger.error("Unexpected exception when kicking sync queue-" + queueId, e);
+                break;
+            }
+        }
+    }
+
+    private Runnable getHeartbeatTask() {
+        return new Runnable() {
             @Override
-            public void run() {
+            public void run() {
                 try {
-                    List<SyncQueueItemVO> l = _queueMgr.dequeueFromAny(getMsid(), MAX_ONETIME_SCHEDULE_SIZE);
-                    if(l != null && l.size() > 0) {
-                        for(SyncQueueItemVO item: l) {
+                    List<SyncQueueItemVO> l = _queueMgr.dequeueFromAny(getMsid(), MAX_ONETIME_SCHEDULE_SIZE);
+                    if(l != null && l.size() > 0) {
+                        for(SyncQueueItemVO item: l) {
                             if(s_logger.isDebugEnabled()) {
                                 s_logger.debug("Execute sync-queue item: " + item.toString());
                             }
                             executeQueueItem(item, false);
-                        }
-                    }
-                } catch(Throwable e) {
-                    s_logger.error("Unexpected exception when trying to execute queue item, ", e);
-                }
-            }
-        };
+                        }
+                    }
+                } catch(Throwable e) {
+                    s_logger.error("Unexpected exception when trying to execute queue item, ", e);
+                }
+            }
+        };
     }
 
     @DB
@@ -651,7 +651,7 @@ public class AsyncJobManagerImpl extends ManagerBase implements AsyncJobManager,
 
         };
     }
-
+
     @DB
     protected void expungeAsyncJob(AsyncJobVO job) {
         Transaction txn = Transaction.currentTxn();
@@ -662,13 +662,13 @@ public class AsyncJobManagerImpl extends ManagerBase implements AsyncJobManager,
         txn.commit();
     }
 
-    private long getMsid() {
+    private long getMsid() {
         if(_clusterMgr != null) {
             return _clusterMgr.getManagementNodeId();
-        }
-
-        return MacAddress.getMacAddress().toLong();
-    }
+        }
+
+        return MacAddress.getMacAddress().toLong();
+    }
 
     private void cleanupPendingJobs(List<SyncQueueItemVO> l) {
         if(l != null && l.size() > 0) {
@@ -688,10 +688,10 @@ public class AsyncJobManagerImpl extends ManagerBase implements AsyncJobManager,
                 _queueMgr.purgeItem(item.getId());
             }
         }
-    }
-
-    @Override
-    public boolean configure(String name, Map<String, Object> params) throws ConfigurationException {
+    }
+
+    @Override
+    public boolean configure(String name, Map<String, Object> params) throws ConfigurationException {
         int expireMinutes = NumbersUtil.parseInt(
                 _configDao.getValue(Config.JobExpireMinutes.key()), 24*60);
         _jobExpireSeconds = (long)expireMinutes*60;
@@ -715,7 +715,7 @@ public class AsyncJobManagerImpl extends ManagerBase implements AsyncJobManager,
             throw new ConfigurationException("Unable to load db.properties to configure AsyncJobManagerImpl");
         }
 
-        return true;
+        return true;
     }
 
     @Override
@@ -744,23 +744,23 @@ public class AsyncJobManagerImpl extends ManagerBase implements AsyncJobManager,
     @Override
     public void onManagementNodeIsolated() {
     }
-
-    @Override
+
+    @Override
     public boolean start() {
-        try {
+        try {
             List<SyncQueueItemVO> l = _queueMgr.getActiveQueueItems(getMsid(), false);
             cleanupPendingJobs(l);
             _jobDao.resetJobProcess(getMsid(), ApiErrorCode.INTERNAL_ERROR.getHttpCode(), getSerializedErrorMessage("job cancelled because of management server restart"));
         } catch(Throwable e) {
             s_logger.error("Unexpected exception " + e.getMessage(), e);
         }
-
-        _heartbeatScheduler.scheduleAtFixedRate(getHeartbeatTask(), HEARTBEAT_INTERVAL,
+
+        _heartbeatScheduler.scheduleAtFixedRate(getHeartbeatTask(), HEARTBEAT_INTERVAL,
                 HEARTBEAT_INTERVAL, TimeUnit.MILLISECONDS);
         _heartbeatScheduler.scheduleAtFixedRate(getGCTask(), GC_INTERVAL,
                 GC_INTERVAL, TimeUnit.MILLISECONDS);
-
-        return true;
+
+        return true;
     }
 
     private static ExceptionResponse getResetResultResponse(String errorMessage) {
@@ -772,12 +772,12 @@ public class AsyncJobManagerImpl extends ManagerBase implements AsyncJobManager,
 
     private static String getSerializedErrorMessage(String errorMessage) {
         return ApiSerializerHelper.toSerializedStringOld(getResetResultResponse(errorMessage));
-    }
-
-    @Override
-    public boolean stop() {
-        _heartbeatScheduler.shutdown();
-        _executor.shutdown();
-        return true;
-    }
-}
+    }
+
+    @Override
+    public boolean stop() {
+        _heartbeatScheduler.shutdown();
+        _executor.shutdown();
+        return true;
+    }
+}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/469c4dd1/server/src/com/cloud/async/SyncQueueManager.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/async/SyncQueueManager.java b/server/src/com/cloud/async/SyncQueueManager.java
index a7032da..2641a10 100644
--- a/server/src/com/cloud/async/SyncQueueManager.java
+++ b/server/src/com/cloud/async/SyncQueueManager.java
@@ -20,16 +20,16 @@ import java.util.List;
 
 import com.cloud.utils.component.Manager;
 
-
-public interface SyncQueueManager extends Manager {
-    public SyncQueueVO queue(String syncObjType, long syncObjId, String itemType, long itemId, long queueSizeLimit);
-    public SyncQueueItemVO dequeueFromOne(long queueId, Long msid);
-    public List<SyncQueueItemVO> dequeueFromAny(Long msid, int maxItems);
-    public void purgeItem(long queueItemId);
+
+public interface SyncQueueManager extends Manager {
+    public SyncQueueVO queue(String syncObjType, long syncObjId, String itemType, long itemId, long queueSizeLimit);
+    public SyncQueueItemVO dequeueFromOne(long queueId, Long msid);
+    public List<SyncQueueItemVO> dequeueFromAny(Long msid, int maxItems);
+    public void purgeItem(long queueItemId);
     public void returnItem(long queueItemId);
-    
+
 	public List<SyncQueueItemVO> getActiveQueueItems(Long msid, boolean exclusive);
     public List<SyncQueueItemVO> getBlockedQueueItems(long thresholdMs, boolean exclusive);
 
     void purgeAsyncJobQueueItemId(long asyncJobId);
-}
+}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/469c4dd1/server/src/com/cloud/async/SyncQueueManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/async/SyncQueueManagerImpl.java b/server/src/com/cloud/async/SyncQueueManagerImpl.java
index aaa4c9b..14e24b1 100644
--- a/server/src/com/cloud/async/SyncQueueManagerImpl.java
+++ b/server/src/com/cloud/async/SyncQueueManagerImpl.java
@@ -36,7 +36,7 @@ import com.cloud.utils.db.DB;
 import com.cloud.utils.db.Transaction;
 import com.cloud.utils.exception.CloudRuntimeException;
 
-@Component
+@Component
 @Local(value={SyncQueueManager.class})
 public class SyncQueueManagerImpl extends ManagerBase implements SyncQueueManager {
     public static final Logger s_logger = Logger.getLogger(SyncQueueManagerImpl.class.getName());
@@ -46,7 +46,7 @@ public class SyncQueueManagerImpl extends ManagerBase implements SyncQueueManage
 
     @Override
     @DB
-    public SyncQueueVO queue(String syncObjType, long syncObjId, String itemType, long itemId, long queueSizeLimit) {
+    public SyncQueueVO queue(String syncObjType, long syncObjId, String itemType, long itemId, long queueSizeLimit) {
         Transaction txn = Transaction.currentTxn();
         try {
             txn.start();
@@ -57,7 +57,7 @@ public class SyncQueueManagerImpl extends ManagerBase implements SyncQueueManage
                 throw new CloudRuntimeException("Unable to queue item into DB, DB is full?");
 
             queueVO.setQueueSizeLimit(queueSizeLimit);
-            _syncQueueDao.update(queueVO.getId(), queueVO);
+            _syncQueueDao.update(queueVO.getId(), queueVO);
 
             Date dt = DateUtil.currentGMTTime();
             SyncQueueItemVO item = new SyncQueueItemVO();
@@ -91,7 +91,7 @@ public class SyncQueueManagerImpl extends ManagerBase implements SyncQueueManage
                 return null;
             }
 
-            if(queueReadyToProcess(queueVO)) {
+            if(queueReadyToProcess(queueVO)) {
                 SyncQueueItemVO itemVO = _syncQueueItemDao.getNextQueueItem(queueVO.getId());
                 if(itemVO != null) {
                     Long processNumber = queueVO.getLastProcessNumber();
@@ -102,12 +102,12 @@ public class SyncQueueManagerImpl extends ManagerBase implements SyncQueueManage
                     Date dt = DateUtil.currentGMTTime();
                     queueVO.setLastProcessNumber(processNumber);
                     queueVO.setLastUpdated(dt);
-                    queueVO.setQueueSize(queueVO.getQueueSize() + 1);
+                    queueVO.setQueueSize(queueVO.getQueueSize() + 1);
                     _syncQueueDao.update(queueVO.getId(), queueVO);
 
                     itemVO.setLastProcessMsid(msid);
                     itemVO.setLastProcessNumber(processNumber);
-                    itemVO.setLastProcessTime(dt);
+                    itemVO.setLastProcessTime(dt);
                     _syncQueueItemDao.update(itemVO.getId(), itemVO);
 
                     txt.commit();
@@ -143,7 +143,7 @@ public class SyncQueueManagerImpl extends ManagerBase implements SyncQueueManage
                 for(SyncQueueItemVO item : l) {
                     SyncQueueVO queueVO = _syncQueueDao.lockRow(item.getQueueId(), true);
                     SyncQueueItemVO itemVO = _syncQueueItemDao.lockRow(item.getId(), true);
-                    if(queueReadyToProcess(queueVO) && itemVO.getLastProcessNumber() == null) {
+                    if(queueReadyToProcess(queueVO) && itemVO.getLastProcessNumber() == null) {
                         Long processNumber = queueVO.getLastProcessNumber();
                         if(processNumber == null)
                             processNumber = new Long(1);
@@ -153,12 +153,12 @@ public class SyncQueueManagerImpl extends ManagerBase implements SyncQueueManage
                         Date dt = DateUtil.currentGMTTime();
                         queueVO.setLastProcessNumber(processNumber);
                         queueVO.setLastUpdated(dt);
-                        queueVO.setQueueSize(queueVO.getQueueSize() + 1);
+                        queueVO.setQueueSize(queueVO.getQueueSize() + 1);
                         _syncQueueDao.update(queueVO.getId(), queueVO);
 
                         itemVO.setLastProcessMsid(msid);
                         itemVO.setLastProcessNumber(processNumber);
-                        itemVO.setLastProcessTime(dt);
+                        itemVO.setLastProcessTime(dt);
                         _syncQueueItemDao.update(item.getId(), itemVO);
 
                         resultList.add(item);
@@ -195,7 +195,7 @@ public class SyncQueueManagerImpl extends ManagerBase implements SyncQueueManage
                     queueVO.setQueueSize(queueVO.getQueueSize() - 1);
                     _syncQueueDao.update(queueVO.getId(), queueVO);
                 }
-            }
+            }
             txt.commit();
         } catch(Exception e) {
             s_logger.error("Unexpected exception: ", e);
@@ -249,5 +249,5 @@ public class SyncQueueManagerImpl extends ManagerBase implements SyncQueueManage
         if (itemId != null) {
             purgeItem(itemId);
         }
-    }
+    }
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/469c4dd1/server/src/com/cloud/async/dao/SyncQueueDao.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/async/dao/SyncQueueDao.java b/server/src/com/cloud/async/dao/SyncQueueDao.java
index 816f9dd..edd695c 100644
--- a/server/src/com/cloud/async/dao/SyncQueueDao.java
+++ b/server/src/com/cloud/async/dao/SyncQueueDao.java
@@ -22,4 +22,4 @@ import com.cloud.utils.db.GenericDao;
 public interface SyncQueueDao extends GenericDao<SyncQueueVO, Long>{
 	public void ensureQueue(String syncObjType, long syncObjId);
 	public SyncQueueVO find(String syncObjType, long syncObjId);
-}
+}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/469c4dd1/server/src/com/cloud/async/dao/SyncQueueItemDao.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/async/dao/SyncQueueItemDao.java b/server/src/com/cloud/async/dao/SyncQueueItemDao.java
index 6b9da8b..b5a4eab 100644
--- a/server/src/com/cloud/async/dao/SyncQueueItemDao.java
+++ b/server/src/com/cloud/async/dao/SyncQueueItemDao.java
@@ -26,5 +26,5 @@ public interface SyncQueueItemDao extends GenericDao<SyncQueueItemVO, Long> {
 	public List<SyncQueueItemVO> getNextQueueItems(int maxItems);
 	public List<SyncQueueItemVO> getActiveQueueItems(Long msid, boolean exclusive);
 	public List<SyncQueueItemVO> getBlockedQueueItems(long thresholdMs, boolean exclusive);
-	public Long getQueueItemIdByContentIdAndType(long contentId, String contentType);
-}
+	public Long getQueueItemIdByContentIdAndType(long contentId, String contentType);
+}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/469c4dd1/server/src/com/cloud/consoleproxy/AgentBasedConsoleProxyManager.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/consoleproxy/AgentBasedConsoleProxyManager.java b/server/src/com/cloud/consoleproxy/AgentBasedConsoleProxyManager.java
index d5f04ac..6f8575d 100755
--- a/server/src/com/cloud/consoleproxy/AgentBasedConsoleProxyManager.java
+++ b/server/src/com/cloud/consoleproxy/AgentBasedConsoleProxyManager.java
@@ -353,7 +353,7 @@ public class AgentBasedConsoleProxyManager extends ManagerBase implements Consol
         throw new UnsupportedOperationException("Unplug nic is not supported for vm of type " + vm.getType());
     }
 
-    @Override 
+    @Override
     public void prepareStop(VirtualMachineProfile<ConsoleProxyVO> profile) {
     }
-}
+}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/469c4dd1/server/src/com/cloud/deploy/AbstractDeployPlannerSelector.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/deploy/AbstractDeployPlannerSelector.java b/server/src/com/cloud/deploy/AbstractDeployPlannerSelector.java
index 03e8774..7665687 100755
--- a/server/src/com/cloud/deploy/AbstractDeployPlannerSelector.java
+++ b/server/src/com/cloud/deploy/AbstractDeployPlannerSelector.java
@@ -1,84 +1,84 @@
-// 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.deploy;
-
-import java.util.Map;
-
-import javax.inject.Inject;
-import javax.naming.ConfigurationException;
-
-import com.cloud.configuration.Config;
-import com.cloud.configuration.dao.ConfigurationDao;
-import com.cloud.utils.component.AdapterBase;
-import com.cloud.vm.UserVmVO;
-
-public abstract class AbstractDeployPlannerSelector extends AdapterBase implements DeployPlannerSelector {
-    protected Map<String, Object>  params;
-    protected String name;
-    protected int runLevel;
-
-    @Inject
-    protected ConfigurationDao _configDao;
-    protected String _allocationAlgorithm = "random";
-
-    @Override
-    public String getName() {
-        return name;
-    }
-
-    @Override
-    public void setName(String name) {
-        this.name = name;
-    }
-
-    @Override
-    public void setConfigParams(Map<String, Object> params) {
-        this.params = params;
-    }
-
-    @Override
-    public Map<String, Object> getConfigParams() {
-        return params;
-    }
-
-    @Override
-    public int getRunLevel() {
-        return runLevel;
-    }
-
-    @Override
-    public void setRunLevel(int level) {
-        this.runLevel = level;
-    }
-
-    @Override
-    public boolean configure(String name, Map<String, Object> params) throws ConfigurationException {
-        super.configure(name, params);
-        _allocationAlgorithm = _configDao.getValue(Config.VmAllocationAlgorithm.key());
-        return true;
-    }
-
-    @Override
-    public boolean start() {
-        return true;
-    }
-
-    @Override
-    public boolean stop() {
-        return true;
-    }
-}
+// 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.deploy;
+
+import java.util.Map;
+
+import javax.inject.Inject;
+import javax.naming.ConfigurationException;
+
+import com.cloud.configuration.Config;
+import com.cloud.configuration.dao.ConfigurationDao;
+import com.cloud.utils.component.AdapterBase;
+import com.cloud.vm.UserVmVO;
+
+public abstract class AbstractDeployPlannerSelector extends AdapterBase implements DeployPlannerSelector {
+    protected Map<String, Object>  params;
+    protected String name;
+    protected int runLevel;
+
+    @Inject
+    protected ConfigurationDao _configDao;
+    protected String _allocationAlgorithm = "random";
+
+    @Override
+    public String getName() {
+        return name;
+    }
+
+    @Override
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    @Override
+    public void setConfigParams(Map<String, Object> params) {
+        this.params = params;
+    }
+
+    @Override
+    public Map<String, Object> getConfigParams() {
+        return params;
+    }
+
+    @Override
+    public int getRunLevel() {
+        return runLevel;
+    }
+
+    @Override
+    public void setRunLevel(int level) {
+        this.runLevel = level;
+    }
+
+    @Override
+    public boolean configure(String name, Map<String, Object> params) throws ConfigurationException {
+        super.configure(name, params);
+        _allocationAlgorithm = _configDao.getValue(Config.VmAllocationAlgorithm.key());
+        return true;
+    }
+
+    @Override
+    public boolean start() {
+        return true;
+    }
+
+    @Override
+    public boolean stop() {
+        return true;
+    }
+}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/469c4dd1/server/src/com/cloud/deploy/DeployPlannerSelector.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/deploy/DeployPlannerSelector.java b/server/src/com/cloud/deploy/DeployPlannerSelector.java
index 40eabb1..062b492 100755
--- a/server/src/com/cloud/deploy/DeployPlannerSelector.java
+++ b/server/src/com/cloud/deploy/DeployPlannerSelector.java
@@ -1,24 +1,24 @@
-// 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.deploy;
-
-import com.cloud.utils.component.Adapter;
-import com.cloud.vm.UserVmVO;
-
-public interface DeployPlannerSelector extends Adapter {
-    String selectPlanner(UserVmVO vm);
-}
+// 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.deploy;
+
+import com.cloud.utils.component.Adapter;
+import com.cloud.vm.UserVmVO;
+
+public interface DeployPlannerSelector extends Adapter {
+    String selectPlanner(UserVmVO vm);
+}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/469c4dd1/server/src/com/cloud/deploy/HypervisorVmPlannerSelector.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/deploy/HypervisorVmPlannerSelector.java b/server/src/com/cloud/deploy/HypervisorVmPlannerSelector.java
index 0f454cd..ce49405 100755
--- a/server/src/com/cloud/deploy/HypervisorVmPlannerSelector.java
+++ b/server/src/com/cloud/deploy/HypervisorVmPlannerSelector.java
@@ -1,54 +1,54 @@
-// 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.deploy;
-
-import javax.ejb.Local;
-
-import org.apache.log4j.Logger;
-
-import com.cloud.deploy.DeploymentPlanner.AllocationAlgorithm;
-import com.cloud.hypervisor.Hypervisor.HypervisorType;
-import com.cloud.vm.UserVmVO;
-
-@Local(value = {DeployPlannerSelector.class})
-public class HypervisorVmPlannerSelector extends AbstractDeployPlannerSelector {
-    private static final Logger s_logger = Logger.getLogger(HypervisorVmPlannerSelector.class);
-
-    @Override
-    public String selectPlanner(UserVmVO vm) {
-        if (vm.getHypervisorType() != HypervisorType.BareMetal) {
-            //check the allocation strategy
-            if (_allocationAlgorithm != null) {
-                if (_allocationAlgorithm.equals(AllocationAlgorithm.random.toString())
-                        || _allocationAlgorithm.equals(AllocationAlgorithm.firstfit.toString())) {
-                    return "FirstFitPlanner";
-                } else if (_allocationAlgorithm.equals(AllocationAlgorithm.userdispersing.toString())) {
-                    return "UserDispersingPlanner";
-                } else if (_allocationAlgorithm.equals(AllocationAlgorithm.userconcentratedpod_random.toString())
-                        || _allocationAlgorithm.equals(AllocationAlgorithm.userconcentratedpod_firstfit.toString())) {
-                    return "UserConcentratedPodPlanner";
-                }
-            } else {
-                if (s_logger.isDebugEnabled()) {
-                    s_logger.debug("The allocation algorithm is null, cannot select the planner");
-                }
-            }
-        }
-
-        return null;
-    }
-}
+// 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.deploy;
+
+import javax.ejb.Local;
+
+import org.apache.log4j.Logger;
+
+import com.cloud.deploy.DeploymentPlanner.AllocationAlgorithm;
+import com.cloud.hypervisor.Hypervisor.HypervisorType;
+import com.cloud.vm.UserVmVO;
+
+@Local(value = {DeployPlannerSelector.class})
+public class HypervisorVmPlannerSelector extends AbstractDeployPlannerSelector {
+    private static final Logger s_logger = Logger.getLogger(HypervisorVmPlannerSelector.class);
+
+    @Override
+    public String selectPlanner(UserVmVO vm) {
+        if (vm.getHypervisorType() != HypervisorType.BareMetal) {
+            //check the allocation strategy
+            if (_allocationAlgorithm != null) {
+                if (_allocationAlgorithm.equals(AllocationAlgorithm.random.toString())
+                        || _allocationAlgorithm.equals(AllocationAlgorithm.firstfit.toString())) {
+                    return "FirstFitPlanner";
+                } else if (_allocationAlgorithm.equals(AllocationAlgorithm.userdispersing.toString())) {
+                    return "UserDispersingPlanner";
+                } else if (_allocationAlgorithm.equals(AllocationAlgorithm.userconcentratedpod_random.toString())
+                        || _allocationAlgorithm.equals(AllocationAlgorithm.userconcentratedpod_firstfit.toString())) {
+                    return "UserConcentratedPodPlanner";
+                }
+            } else {
+                if (s_logger.isDebugEnabled()) {
+                    s_logger.debug("The allocation algorithm is null, cannot select the planner");
+                }
+            }
+        }
+
+        return null;
+    }
+}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/469c4dd1/server/src/com/cloud/ha/UserVmDomRInvestigator.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/ha/UserVmDomRInvestigator.java b/server/src/com/cloud/ha/UserVmDomRInvestigator.java
index f86932a..f785d18 100644
--- a/server/src/com/cloud/ha/UserVmDomRInvestigator.java
+++ b/server/src/com/cloud/ha/UserVmDomRInvestigator.java
@@ -50,9 +50,9 @@ public class UserVmDomRInvestigator extends AbstractInvestigatorImpl {
     @Inject private final UserVmDao _userVmDao = null;
     @Inject private final AgentManager _agentMgr = null;
     @Inject private final NetworkModel _networkMgr = null;
-    @Inject private final VpcVirtualNetworkApplianceManager _vnaMgr = null;
-
-    @Override
+    @Inject private final VpcVirtualNetworkApplianceManager _vnaMgr = null;
+
+    @Override
     public Boolean isVmAlive(VMInstanceVO vm, HostVO host) {
         if (vm.getType() != VirtualMachine.Type.User) {
             if (s_logger.isDebugEnabled()) {

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/469c4dd1/server/src/com/cloud/host/dao/HostDao.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/host/dao/HostDao.java b/server/src/com/cloud/host/dao/HostDao.java
index 4760035..98bdcb4 100755
--- a/server/src/com/cloud/host/dao/HostDao.java
+++ b/server/src/com/cloud/host/dao/HostDao.java
@@ -79,5 +79,5 @@ public interface HostDao extends GenericDao<HostVO, Long>, StateDao<Status, Stat
      * @param haTag TODO
      * @return
      */
-    List<HostVO> listAllUpAndEnabledNonHAHosts(Type type, Long clusterId, Long podId, long dcId, String haTag);
-}
+    List<HostVO> listAllUpAndEnabledNonHAHosts(Type type, Long clusterId, Long podId, long dcId, String haTag);
+}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/469c4dd1/server/src/com/cloud/network/as/AutoScaleManager.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/as/AutoScaleManager.java b/server/src/com/cloud/network/as/AutoScaleManager.java
index ac822dc..5b84b30 100644
--- a/server/src/com/cloud/network/as/AutoScaleManager.java
+++ b/server/src/com/cloud/network/as/AutoScaleManager.java
@@ -1,19 +1,19 @@
-// 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.
+// 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.network.as;
 
 public interface AutoScaleManager extends AutoScaleService {

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/469c4dd1/server/src/com/cloud/network/as/dao/AutoScalePolicyConditionMapDao.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/as/dao/AutoScalePolicyConditionMapDao.java b/server/src/com/cloud/network/as/dao/AutoScalePolicyConditionMapDao.java
index 88755bb..3025198 100644
--- a/server/src/com/cloud/network/as/dao/AutoScalePolicyConditionMapDao.java
+++ b/server/src/com/cloud/network/as/dao/AutoScalePolicyConditionMapDao.java
@@ -1,19 +1,19 @@
-// 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.
+// 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.network.as.dao;
 
 import java.util.List;

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/469c4dd1/server/src/com/cloud/network/as/dao/AutoScalePolicyConditionMapDaoImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/as/dao/AutoScalePolicyConditionMapDaoImpl.java b/server/src/com/cloud/network/as/dao/AutoScalePolicyConditionMapDaoImpl.java
index cacebf0..00fee3d 100644
--- a/server/src/com/cloud/network/as/dao/AutoScalePolicyConditionMapDaoImpl.java
+++ b/server/src/com/cloud/network/as/dao/AutoScalePolicyConditionMapDaoImpl.java
@@ -1,31 +1,31 @@
-// 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.
+// 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.network.as.dao;
 
 import java.util.List;
 
 import javax.ejb.Local;
-
-import org.springframework.stereotype.Component;
+
+import org.springframework.stereotype.Component;
 
 import com.cloud.network.as.AutoScalePolicyConditionMapVO;
 import com.cloud.utils.db.GenericDaoBase;
 import com.cloud.utils.db.SearchCriteria;
-
+
 @Component
 @Local(value={AutoScalePolicyConditionMapDao.class})
 public class AutoScalePolicyConditionMapDaoImpl extends GenericDaoBase<AutoScalePolicyConditionMapVO, Long> implements AutoScalePolicyConditionMapDao {

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/469c4dd1/server/src/com/cloud/network/as/dao/AutoScalePolicyDao.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/as/dao/AutoScalePolicyDao.java b/server/src/com/cloud/network/as/dao/AutoScalePolicyDao.java
index 51b2a94..0cc2d27 100644
--- a/server/src/com/cloud/network/as/dao/AutoScalePolicyDao.java
+++ b/server/src/com/cloud/network/as/dao/AutoScalePolicyDao.java
@@ -1,19 +1,19 @@
-// 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.
+// 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.network.as.dao;
 
 import com.cloud.network.as.AutoScalePolicyVO;

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/469c4dd1/server/src/com/cloud/network/as/dao/AutoScalePolicyDaoImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/as/dao/AutoScalePolicyDaoImpl.java b/server/src/com/cloud/network/as/dao/AutoScalePolicyDaoImpl.java
index 05dbf31..796a9c3 100644
--- a/server/src/com/cloud/network/as/dao/AutoScalePolicyDaoImpl.java
+++ b/server/src/com/cloud/network/as/dao/AutoScalePolicyDaoImpl.java
@@ -1,29 +1,29 @@
-// 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.
+// 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.network.as.dao;
 
 import javax.ejb.Local;
-
-import org.springframework.stereotype.Component;
+
+import org.springframework.stereotype.Component;
 
 import com.cloud.network.as.AutoScalePolicyVO;
 import com.cloud.utils.db.GenericDaoBase;
 import com.cloud.utils.db.SearchCriteria;
-
+
 @Component
 @Local(value = { AutoScalePolicyDao.class })
 public class AutoScalePolicyDaoImpl extends GenericDaoBase<AutoScalePolicyVO, Long>  implements AutoScalePolicyDao {

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/469c4dd1/server/src/com/cloud/network/as/dao/AutoScaleVmGroupDao.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/as/dao/AutoScaleVmGroupDao.java b/server/src/com/cloud/network/as/dao/AutoScaleVmGroupDao.java
index a11bedd..3fc8a5b 100644
--- a/server/src/com/cloud/network/as/dao/AutoScaleVmGroupDao.java
+++ b/server/src/com/cloud/network/as/dao/AutoScaleVmGroupDao.java
@@ -1,19 +1,19 @@
-// 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.
+// 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.network.as.dao;
 
 import java.util.List;

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/469c4dd1/server/src/com/cloud/network/as/dao/AutoScaleVmGroupDaoImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/as/dao/AutoScaleVmGroupDaoImpl.java b/server/src/com/cloud/network/as/dao/AutoScaleVmGroupDaoImpl.java
index ae4ab2c..4ddd572 100644
--- a/server/src/com/cloud/network/as/dao/AutoScaleVmGroupDaoImpl.java
+++ b/server/src/com/cloud/network/as/dao/AutoScaleVmGroupDaoImpl.java
@@ -1,33 +1,33 @@
-// 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.
+// 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.network.as.dao;
 
 import java.util.List;
 
 import javax.ejb.Local;
-
-import org.springframework.stereotype.Component;
+
+import org.springframework.stereotype.Component;
 
 import com.cloud.network.as.AutoScaleVmGroupVO;
 import com.cloud.utils.db.GenericDaoBase;
 import com.cloud.utils.db.GenericSearchBuilder;
 import com.cloud.utils.db.SearchCriteria;
 import com.cloud.utils.db.SearchCriteria.Func;
-
+
 @Component
 @Local(value = { AutoScaleVmGroupDao.class })
 public class AutoScaleVmGroupDaoImpl extends GenericDaoBase<AutoScaleVmGroupVO, Long>  implements AutoScaleVmGroupDao {