cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject [13/36] git commit: updated refs/heads/master to cd7218e
Date Sat, 29 Aug 2015 20:06:10 GMT
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3818257a/server/src/com/cloud/network/IpAddressManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/IpAddressManagerImpl.java b/server/src/com/cloud/network/IpAddressManagerImpl.java
index 28df971..5113b7f 100644
--- a/server/src/com/cloud/network/IpAddressManagerImpl.java
+++ b/server/src/com/cloud/network/IpAddressManagerImpl.java
@@ -40,7 +40,6 @@ import org.apache.cloudstack.region.PortableIp;
 import org.apache.cloudstack.region.PortableIpDao;
 import org.apache.cloudstack.region.PortableIpVO;
 import org.apache.cloudstack.region.Region;
-import org.apache.log4j.Logger;
 
 import com.cloud.agent.AgentManager;
 import com.cloud.alert.AlertManager;
@@ -168,7 +167,6 @@ import com.cloud.vm.dao.UserVmDao;
 import com.cloud.vm.dao.VMInstanceDao;
 
 public class IpAddressManagerImpl extends ManagerBase implements IpAddressManager, Configurable {
-    private static final Logger s_logger = Logger.getLogger(IpAddressManagerImpl.class);
 
     @Inject
     NetworkOrchestrationService _networkMgr = null;
@@ -399,7 +397,7 @@ public class IpAddressManagerImpl extends ManagerBase implements IpAddressManage
 
         Network.State.getStateMachine().registerListener(new NetworkStateListener(_usageEventDao, _networksDao, _configDao));
 
-        s_logger.info("Network Manager is configured.");
+        logger.info("Network Manager is configured.");
 
         return true;
     }
@@ -451,14 +449,14 @@ public class IpAddressManagerImpl extends ManagerBase implements IpAddressManage
                 if (postApplyRules) {
 
                     if (revokeCount != null && revokeCount.longValue() == totalCount.longValue()) {
-                        s_logger.trace("All rules are in Revoke state, have to dis-assiciate IP from the backend");
+                        logger.trace("All rules are in Revoke state, have to dis-assiciate IP from the backend");
                         return true;
                     }
                 } else {
                     if (activeCount != null && activeCount > 0) {
                         continue;
                     } else if (addCount != null && addCount.longValue() == totalCount.longValue()) {
-                        s_logger.trace("All rules are in Add state, have to assiciate IP with the backend");
+                        logger.trace("All rules are in Add state, have to assiciate IP with the backend");
                         return true;
                     } else {
                         continue;
@@ -475,7 +473,7 @@ public class IpAddressManagerImpl extends ManagerBase implements IpAddressManage
     public boolean applyRules(List<? extends FirewallRule> rules, FirewallRule.Purpose purpose, NetworkRuleApplier applier, boolean continueOnError)
         throws ResourceUnavailableException {
         if (rules == null || rules.size() == 0) {
-            s_logger.debug("There are no rules to forward to the network elements");
+            logger.debug("There are no rules to forward to the network elements");
             return true;
         }
 
@@ -506,7 +504,7 @@ public class IpAddressManagerImpl extends ManagerBase implements IpAddressManage
             if (!continueOnError) {
                 throw e;
             }
-            s_logger.warn("Problems with applying " + purpose + " rules but pushing on", e);
+            logger.warn("Problems with applying " + purpose + " rules but pushing on", e);
             success = false;
         }
 
@@ -524,31 +522,31 @@ public class IpAddressManagerImpl extends ManagerBase implements IpAddressManage
 
         // Revoke all firewall rules for the ip
         try {
-            s_logger.debug("Revoking all " + Purpose.Firewall + "rules as a part of public IP id=" + ipId + " release...");
+            logger.debug("Revoking all " + Purpose.Firewall + "rules as a part of public IP id=" + ipId + " release...");
             if (!_firewallMgr.revokeFirewallRulesForIp(ipId, userId, caller)) {
-                s_logger.warn("Unable to revoke all the firewall rules for ip id=" + ipId + " as a part of ip release");
+                logger.warn("Unable to revoke all the firewall rules for ip id=" + ipId + " as a part of ip release");
                 success = false;
             }
         } catch (ResourceUnavailableException e) {
-            s_logger.warn("Unable to revoke all firewall rules for ip id=" + ipId + " as a part of ip release", e);
+            logger.warn("Unable to revoke all firewall rules for ip id=" + ipId + " as a part of ip release", e);
             success = false;
         }
 
         // Revoke all PF/Static nat rules for the ip
         try {
-            s_logger.debug("Revoking all " + Purpose.PortForwarding + "/" + Purpose.StaticNat + " rules as a part of public IP id=" + ipId + " release...");
+            logger.debug("Revoking all " + Purpose.PortForwarding + "/" + Purpose.StaticNat + " rules as a part of public IP id=" + ipId + " release...");
             if (!_rulesMgr.revokeAllPFAndStaticNatRulesForIp(ipId, userId, caller)) {
-                s_logger.warn("Unable to revoke all the port forwarding rules for ip id=" + ipId + " as a part of ip release");
+                logger.warn("Unable to revoke all the port forwarding rules for ip id=" + ipId + " as a part of ip release");
                 success = false;
             }
         } catch (ResourceUnavailableException e) {
-            s_logger.warn("Unable to revoke all the port forwarding rules for ip id=" + ipId + " as a part of ip release", e);
+            logger.warn("Unable to revoke all the port forwarding rules for ip id=" + ipId + " as a part of ip release", e);
             success = false;
         }
 
-        s_logger.debug("Revoking all " + Purpose.LoadBalancing + " rules as a part of public IP id=" + ipId + " release...");
+        logger.debug("Revoking all " + Purpose.LoadBalancing + " rules as a part of public IP id=" + ipId + " release...");
         if (!_lbMgr.removeAllLoadBalanacersForIp(ipId, caller, userId)) {
-            s_logger.warn("Unable to revoke all the load balancer rules for ip id=" + ipId + " as a part of ip release");
+            logger.warn("Unable to revoke all the load balancer rules for ip id=" + ipId + " as a part of ip release");
             success = false;
         }
 
@@ -556,11 +554,11 @@ public class IpAddressManagerImpl extends ManagerBase implements IpAddressManage
         // conditions
         // only when ip address failed to be cleaned up as a part of account destroy and was marked as Releasing, this part of
         // the code would be triggered
-        s_logger.debug("Cleaning up remote access vpns as a part of public IP id=" + ipId + " release...");
+        logger.debug("Cleaning up remote access vpns as a part of public IP id=" + ipId + " release...");
         try {
             _vpnMgr.destroyRemoteAccessVpnForIp(ipId, caller);
         } catch (ResourceUnavailableException e) {
-            s_logger.warn("Unable to destroy remote access vpn for ip id=" + ipId + " as a part of ip release", e);
+            logger.warn("Unable to destroy remote access vpn for ip id=" + ipId + " as a part of ip release", e);
             success = false;
         }
 
@@ -575,7 +573,7 @@ public class IpAddressManagerImpl extends ManagerBase implements IpAddressManage
         // Cleanup all ip address resources - PF/LB/Static nat rules
         if (!cleanupIpResources(addrId, userId, caller)) {
             success = false;
-            s_logger.warn("Failed to release resources for ip address id=" + addrId);
+            logger.warn("Failed to release resources for ip address id=" + addrId);
         }
 
         IPAddressVO ip = markIpAsUnavailable(addrId);
@@ -583,15 +581,15 @@ public class IpAddressManagerImpl extends ManagerBase implements IpAddressManage
             return true;
         }
 
-        if (s_logger.isDebugEnabled()) {
-            s_logger.debug("Releasing ip id=" + addrId + "; sourceNat = " + ip.isSourceNat());
+        if (logger.isDebugEnabled()) {
+            logger.debug("Releasing ip id=" + addrId + "; sourceNat = " + ip.isSourceNat());
         }
 
         if (ip.getAssociatedWithNetworkId() != null) {
             Network network = _networksDao.findById(ip.getAssociatedWithNetworkId());
             try {
                 if (!applyIpAssociations(network, true)) {
-                    s_logger.warn("Unable to apply ip address associations for " + network);
+                    logger.warn("Unable to apply ip address associations for " + network);
                     success = false;
                 }
             } catch (ResourceUnavailableException e) {
@@ -607,7 +605,7 @@ public class IpAddressManagerImpl extends ManagerBase implements IpAddressManage
             if (ip.isPortable()) {
                 releasePortableIpAddress(addrId);
             }
-            s_logger.debug("Released a public ip id=" + addrId);
+            logger.debug("Released a public ip id=" + addrId);
         }
 
         return success;
@@ -703,7 +701,7 @@ public class IpAddressManagerImpl extends ManagerBase implements IpAddressManage
                 ex.addProxyObject(ApiDBUtils.findPodById(podId).getUuid());
                 throw ex;
             }
-            s_logger.warn(errorMessage.toString());
+            logger.warn(errorMessage.toString());
             InsufficientAddressCapacityException ex = new InsufficientAddressCapacityException("Insufficient address capacity", DataCenter.class, dcId);
             ex.addProxyObject(ApiDBUtils.findZoneById(dcId).getUuid());
             throw ex;
@@ -748,7 +746,7 @@ public class IpAddressManagerImpl extends ManagerBase implements IpAddressManage
                 ex.addProxyObject(ApiDBUtils.findPodById(podId).getUuid());
                 throw ex;
             }
-            s_logger.warn(errorMessage.toString());
+            logger.warn(errorMessage.toString());
             InsufficientAddressCapacityException ex = new InsufficientAddressCapacityException("Insufficient address capacity", DataCenter.class, dcId);
             ex.addProxyObject(ApiDBUtils.findZoneById(dcId).getUuid());
             throw ex;
@@ -761,7 +759,7 @@ public class IpAddressManagerImpl extends ManagerBase implements IpAddressManage
             try {
                 _resourceLimitMgr.checkResourceLimit(owner, ResourceType.public_ip);
             } catch (ResourceAllocationException ex) {
-                s_logger.warn("Failed to allocate resource of type " + ex.getResourceType() + " for account " + owner);
+                logger.warn("Failed to allocate resource of type " + ex.getResourceType() + " for account " + owner);
                 throw new AccountLimitException("Maximum number of public IP addresses for account: " + owner.getAccountName() + " has been exceeded.");
             }
         }
@@ -879,8 +877,8 @@ public class IpAddressManagerImpl extends ManagerBase implements IpAddressManage
                 ConcurrentOperationException ex = new ConcurrentOperationException("Unable to lock account");
                 throw ex;
             }
-            if (s_logger.isDebugEnabled()) {
-                s_logger.debug("lock account " + ownerId + " is acquired");
+            if (logger.isDebugEnabled()) {
+                logger.debug("lock account " + ownerId + " is acquired");
             }
                     boolean displayIp = true;
                     if (guestNtwkId != null) {
@@ -904,14 +902,14 @@ public class IpAddressManagerImpl extends ManagerBase implements IpAddressManage
             return ip;
         } finally {
             if (owner != null) {
-                if (s_logger.isDebugEnabled()) {
-                    s_logger.debug("Releasing lock account " + ownerId);
+                if (logger.isDebugEnabled()) {
+                    logger.debug("Releasing lock account " + ownerId);
                 }
 
                 _accountDao.releaseFromLockTable(ownerId);
             }
             if (ip == null) {
-                s_logger.error("Unable to get source nat ip address for account " + ownerId);
+                logger.error("Unable to get source nat ip address for account " + ownerId);
             }
         }
     }
@@ -934,7 +932,7 @@ public class IpAddressManagerImpl extends ManagerBase implements IpAddressManage
                     _ipAddressDao.unassignIpAddress(addr.getId());
                 } else {
                     success = false;
-                    s_logger.warn("Failed to release resources for ip address id=" + addr.getId());
+                    logger.warn("Failed to release resources for ip address id=" + addr.getId());
                 }
             }
         }
@@ -981,7 +979,7 @@ public class IpAddressManagerImpl extends ManagerBase implements IpAddressManage
                 if (!continueOnError) {
                     throw e;
                 } else {
-                    s_logger.debug("Resource is not available: " + provider.getName(), e);
+                    logger.debug("Resource is not available: " + provider.getName(), e);
                 }
             }
         }
@@ -1009,17 +1007,17 @@ public class IpAddressManagerImpl extends ManagerBase implements IpAddressManage
 
         Account accountToLock = null;
         try {
-            if (s_logger.isDebugEnabled()) {
-                s_logger.debug("Associate IP address called by the user " + callerUserId + " account " + ipOwner.getId());
+            if (logger.isDebugEnabled()) {
+                logger.debug("Associate IP address called by the user " + callerUserId + " account " + ipOwner.getId());
             }
             accountToLock = _accountDao.acquireInLockTable(ipOwner.getId());
             if (accountToLock == null) {
-                s_logger.warn("Unable to lock account: " + ipOwner.getId());
+                logger.warn("Unable to lock account: " + ipOwner.getId());
                 throw new ConcurrentOperationException("Unable to acquire account lock");
             }
 
-            if (s_logger.isDebugEnabled()) {
-                s_logger.debug("Associate IP address lock acquired");
+            if (logger.isDebugEnabled()) {
+                logger.debug("Associate IP address lock acquired");
             }
 
             ip = Transaction.execute(new TransactionCallbackWithException<PublicIp, InsufficientAddressCapacityException>() {
@@ -1036,7 +1034,7 @@ public class IpAddressManagerImpl extends ManagerBase implements IpAddressManage
             CallContext.current().setEventDetails("Ip Id: " + ip.getId());
             Ip ipAddress = ip.getAddress();
 
-            s_logger.debug("Got " + ipAddress + " to assign for account " + ipOwner.getId() + " in zone " + zone.getId());
+            logger.debug("Got " + ipAddress + " to assign for account " + ipOwner.getId() + " in zone " + zone.getId());
 
                     return ip;
                 }
@@ -1044,11 +1042,11 @@ public class IpAddressManagerImpl extends ManagerBase implements IpAddressManage
 
         } finally {
             if (accountToLock != null) {
-                if (s_logger.isDebugEnabled()) {
-                    s_logger.debug("Releasing lock account " + ipOwner);
+                if (logger.isDebugEnabled()) {
+                    logger.debug("Releasing lock account " + ipOwner);
                 }
                 _accountDao.releaseFromLockTable(ipOwner.getId());
-                s_logger.debug("Associate IP address lock released");
+                logger.debug("Associate IP address lock released");
             }
         }
         return ip;
@@ -1177,12 +1175,12 @@ public class IpAddressManagerImpl extends ManagerBase implements IpAddressManage
             }
             owner = _accountMgr.getAccount(ipToAssoc.getAllocatedToAccountId());
         } else {
-            s_logger.debug("Unable to find ip address by id: " + ipId);
+            logger.debug("Unable to find ip address by id: " + ipId);
             return null;
         }
 
         if (ipToAssoc.getAssociatedWithNetworkId() != null) {
-            s_logger.debug("IP " + ipToAssoc + " is already assocaited with network id" + networkId);
+            logger.debug("IP " + ipToAssoc + " is already assocaited with network id" + networkId);
             return ipToAssoc;
         }
 
@@ -1190,7 +1188,7 @@ public class IpAddressManagerImpl extends ManagerBase implements IpAddressManage
         if (network != null) {
             _accountMgr.checkAccess(owner, AccessType.UseEntry, false, network);
         } else {
-            s_logger.debug("Unable to find ip address by id: " + ipId);
+            logger.debug("Unable to find ip address by id: " + ipId);
             return null;
         }
 
@@ -1237,7 +1235,7 @@ public class IpAddressManagerImpl extends ManagerBase implements IpAddressManage
             }
         }
 
-        s_logger.debug("Associating ip " + ipToAssoc + " to network " + network);
+        logger.debug("Associating ip " + ipToAssoc + " to network " + network);
 
         IPAddressVO ip = _ipAddressDao.findById(ipId);
         //update ip address with networkId
@@ -1249,16 +1247,16 @@ public class IpAddressManagerImpl extends ManagerBase implements IpAddressManage
         try {
             success = applyIpAssociations(network, false);
             if (success) {
-                s_logger.debug("Successfully associated ip address " + ip.getAddress().addr() + " to network " + network);
+                logger.debug("Successfully associated ip address " + ip.getAddress().addr() + " to network " + network);
             } else {
-                s_logger.warn("Failed to associate ip address " + ip.getAddress().addr() + " to network " + network);
+                logger.warn("Failed to associate ip address " + ip.getAddress().addr() + " to network " + network);
             }
             return ip;
         } finally {
             if (!success && releaseOnFailure) {
                 if (ip != null) {
                     try {
-                        s_logger.warn("Failed to associate ip address, so releasing ip from the database " + ip);
+                        logger.warn("Failed to associate ip address, so releasing ip from the database " + ip);
                         _ipAddressDao.markAsUnavailable(ip.getId());
                         if (!applyIpAssociations(network, true)) {
                             // if fail to apply ip assciations again, unassign ip address without updating resource
@@ -1266,7 +1264,7 @@ public class IpAddressManagerImpl extends ManagerBase implements IpAddressManage
                             _ipAddressDao.unassignIpAddress(ip.getId());
                         }
                     } catch (Exception e) {
-                        s_logger.warn("Unable to disassociate ip address for recovery", e);
+                        logger.warn("Unable to disassociate ip address for recovery", e);
                     }
                 }
             }
@@ -1328,7 +1326,7 @@ public class IpAddressManagerImpl extends ManagerBase implements IpAddressManage
             }
             owner = _accountMgr.getAccount(ipToAssoc.getAllocatedToAccountId());
         } else {
-            s_logger.debug("Unable to find ip address by id: " + ipId);
+            logger.debug("Unable to find ip address by id: " + ipId);
             return null;
         }
 
@@ -1363,9 +1361,9 @@ public class IpAddressManagerImpl extends ManagerBase implements IpAddressManage
         try {
             boolean success = applyIpAssociations(network, false);
             if (success) {
-                s_logger.debug("Successfully associated ip address " + ip.getAddress().addr() + " to network " + network);
+                logger.debug("Successfully associated ip address " + ip.getAddress().addr() + " to network " + network);
             } else {
-                s_logger.warn("Failed to associate ip address " + ip.getAddress().addr() + " to network " + network);
+                logger.warn("Failed to associate ip address " + ip.getAddress().addr() + " to network " + network);
             }
             return ip;
         } finally {
@@ -1526,12 +1524,12 @@ public class IpAddressManagerImpl extends ManagerBase implements IpAddressManage
                                         + requiredOfferings.get(0).getTags());
                             }
 
-                            s_logger.debug("Creating network for account " + owner + " from the network offering id=" + requiredOfferings.get(0).getId()
+                            logger.debug("Creating network for account " + owner + " from the network offering id=" + requiredOfferings.get(0).getId()
                                     + " as a part of createVlanIpRange process");
                             guestNetwork = _networkMgr.createGuestNetwork(requiredOfferings.get(0).getId(), owner.getAccountName() + "-network", owner.getAccountName()
                                     + "-network", null, null, null, null, owner, null, physicalNetwork, zoneId, ACLType.Account, null, null, null, null, true, null);
                 if (guestNetwork == null) {
-                    s_logger.warn("Failed to create default Virtual network for the account " + accountId + "in zone " + zoneId);
+                    logger.warn("Failed to create default Virtual network for the account " + accountId + "in zone " + zoneId);
                                 throw new CloudRuntimeException("Failed to create a Guest Isolated Networks with SourceNAT "
                                         + "service enabled as a part of createVlanIpRange, for the account " + accountId + "in zone " + zoneId);
                 }
@@ -1588,19 +1586,19 @@ public class IpAddressManagerImpl extends ManagerBase implements IpAddressManage
             DeployDestination dest = new DeployDestination(zone, null, null, null);
             Account callerAccount = CallContext.current().getCallingAccount();
             UserVO callerUser = _userDao.findById(CallContext.current().getCallingUserId());
-            Journal journal = new Journal.LogJournal("Implementing " + guestNetwork, s_logger);
+            Journal journal = new Journal.LogJournal("Implementing " + guestNetwork, logger);
             ReservationContext context = new ReservationContextImpl(UUID.randomUUID().toString(), journal, callerUser, callerAccount);
-            s_logger.debug("Implementing network " + guestNetwork + " as a part of network provision for persistent network");
+            logger.debug("Implementing network " + guestNetwork + " as a part of network provision for persistent network");
             try {
                 Pair<? extends NetworkGuru, ? extends Network> implementedNetwork = _networkMgr.implementNetwork(guestNetwork.getId(), dest, context);
                 if (implementedNetwork == null || implementedNetwork.first() == null) {
-                    s_logger.warn("Failed to implement the network " + guestNetwork);
+                    logger.warn("Failed to implement the network " + guestNetwork);
                 }
                 if (implementedNetwork != null) {
                     guestNetwork = implementedNetwork.second();
                 }
             } catch (Exception ex) {
-                s_logger.warn("Failed to implement network " + guestNetwork + " elements and resources as a part of" + " network provision due to ", ex);
+                logger.warn("Failed to implement network " + guestNetwork + " elements and resources as a part of" + " network provision due to ", ex);
                 CloudRuntimeException e = new CloudRuntimeException("Failed to implement network (with specified id)"
                                                                     + " elements and resources as a part of network provision for persistent network");
                 e.addProxyObject(guestNetwork.getUuid(), "networkId");
@@ -1616,7 +1614,7 @@ public class IpAddressManagerImpl extends ManagerBase implements IpAddressManage
         final IPAddressVO ip = _ipAddressDao.findById(addrId);
 
         if (ip.getAllocatedToAccountId() == null && ip.getAllocatedTime() == null) {
-            s_logger.trace("Ip address id=" + addrId + " is already released");
+            logger.trace("Ip address id=" + addrId + " is already released");
             return ip;
         }
 
@@ -1657,14 +1655,14 @@ public class IpAddressManagerImpl extends ManagerBase implements IpAddressManage
     @DB
     public String acquireGuestIpAddress(Network network, String requestedIp) {
         if (requestedIp != null && requestedIp.equals(network.getGateway())) {
-            s_logger.warn("Requested ip address " + requestedIp + " is used as a gateway address in network " + network);
+            logger.warn("Requested ip address " + requestedIp + " is used as a gateway address in network " + network);
             return null;
         }
 
         Set<Long> availableIps = _networkModel.getAvailableIps(network, requestedIp);
 
         if (availableIps == null || availableIps.isEmpty()) {
-            s_logger.debug("There are no free ips in the  network " + network);
+            logger.debug("There are no free ips in the  network " + network);
             return null;
         }
 
@@ -1675,10 +1673,10 @@ public class IpAddressManagerImpl extends ManagerBase implements IpAddressManage
             String[] cidr = network.getCidr().split("/");
             boolean isSameCidr = NetUtils.sameSubnetCIDR(requestedIp, NetUtils.long2Ip(array[0]), Integer.parseInt(cidr[1]));
             if (!isSameCidr) {
-                s_logger.warn("Requested ip address " + requestedIp + " doesn't belong to the network " + network + " cidr");
+                logger.warn("Requested ip address " + requestedIp + " doesn't belong to the network " + network + " cidr");
                 return null;
             } else if (NetUtils.IsIpEqualToNetworkOrBroadCastIp(requestedIp, cidr[0], Integer.parseInt(cidr[1]))) {
-                s_logger.warn("Requested ip address " + requestedIp + " is equal to the to the network/broadcast ip of the network" + network);
+                logger.warn("Requested ip address " + requestedIp + " is equal to the to the network/broadcast ip of the network" + network);
                 return null;
             }
             return requestedIp;
@@ -1696,7 +1694,7 @@ public class IpAddressManagerImpl extends ManagerBase implements IpAddressManage
     @Override
     public boolean applyStaticNats(List<? extends StaticNat> staticNats, boolean continueOnError, boolean forRevoke) throws ResourceUnavailableException {
         if (staticNats == null || staticNats.size() == 0) {
-            s_logger.debug("There are no static nat rules for the network elements");
+            logger.debug("There are no static nat rules for the network elements");
             return true;
         }
 
@@ -1705,7 +1703,7 @@ public class IpAddressManagerImpl extends ManagerBase implements IpAddressManage
 
         // Check if the StaticNat service is supported
         if (!_networkModel.areServicesSupportedInNetwork(network.getId(), Service.StaticNat)) {
-            s_logger.debug("StaticNat service is not supported in specified network id");
+            logger.debug("StaticNat service is not supported in specified network id");
             return true;
         }
 
@@ -1733,7 +1731,7 @@ public class IpAddressManagerImpl extends ManagerBase implements IpAddressManage
             if (!continueOnError) {
                 throw e;
             }
-            s_logger.warn("Problems with " + element.getName() + " but pushing on", e);
+            logger.warn("Problems with " + element.getName() + " but pushing on", e);
             success = false;
         }
 
@@ -1794,7 +1792,7 @@ public class IpAddressManagerImpl extends ManagerBase implements IpAddressManage
         if ((off.getElasticLb() && forElasticLb) || (off.getElasticIp() && forElasticIp)) {
 
             try {
-                s_logger.debug("Allocating system IP address for load balancer rule...");
+                logger.debug("Allocating system IP address for load balancer rule...");
                 // allocate ip
                 ip = allocateIP(owner, true, guestNetwork.getDataCenterId());
                 // apply ip associations
@@ -1824,10 +1822,10 @@ public class IpAddressManagerImpl extends ManagerBase implements IpAddressManage
             if (ip.getSystem()) {
                 CallContext ctx = CallContext.current();
                 if (!disassociatePublicIpAddress(ip.getId(), ctx.getCallingUserId(), ctx.getCallingAccount())) {
-                    s_logger.warn("Unable to release system ip address id=" + ip.getId());
+                    logger.warn("Unable to release system ip address id=" + ip.getId());
                     success = false;
                 } else {
-                    s_logger.warn("Successfully released system ip address id=" + ip.getId());
+                    logger.warn("Successfully released system ip address id=" + ip.getId());
                 }
             }
         }
@@ -1855,7 +1853,7 @@ public class IpAddressManagerImpl extends ManagerBase implements IpAddressManage
                     if (placeholderNic != null) {
                         IPAddressVO userIp = _ipAddressDao.findByIpAndSourceNetworkId(network.getId(), placeholderNic.getIPv4Address());
                         ip = PublicIp.createFromAddrAndVlan(userIp, _vlanDao.findById(userIp.getVlanId()));
-                        s_logger.debug("Nic got an ip address " + placeholderNic.getIPv4Address() + " stored in placeholder nic for the network " + network);
+                        logger.debug("Nic got an ip address " + placeholderNic.getIPv4Address() + " stored in placeholder nic for the network " + network);
                     }
                 }
 
@@ -1928,7 +1926,7 @@ public class IpAddressManagerImpl extends ManagerBase implements IpAddressManage
 
                         //Get ip address from the placeholder and don't allocate a new one
                         if (requestedIpv4 != null && vm.getType() == VirtualMachine.Type.DomainRouter) {
-                            s_logger.debug("There won't be nic assignment for VR id " + vm.getId() +"  in this network " + network);
+                            logger.debug("There won't be nic assignment for VR id " + vm.getId() +"  in this network " + network);
 
                         }
 
@@ -1995,7 +1993,7 @@ public class IpAddressManagerImpl extends ManagerBase implements IpAddressManage
     public String allocatePublicIpForGuestNic(Network network, Long podId, Account owner, String requestedIp) throws InsufficientAddressCapacityException {
         PublicIp ip = assignPublicIpAddress(network.getDataCenterId(), podId, owner, VlanType.DirectAttached, network.getId(), requestedIp, false);
         if (ip == null) {
-            s_logger.debug("There is no free public ip address");
+            logger.debug("There is no free public ip address");
             return null;
         }
         Ip ipAddr = ip.getAddress();

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3818257a/server/src/com/cloud/network/Ipv6AddressManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/Ipv6AddressManagerImpl.java b/server/src/com/cloud/network/Ipv6AddressManagerImpl.java
index d8a9d68..0655da7 100644
--- a/server/src/com/cloud/network/Ipv6AddressManagerImpl.java
+++ b/server/src/com/cloud/network/Ipv6AddressManagerImpl.java
@@ -24,7 +24,6 @@ import javax.ejb.Local;
 import javax.inject.Inject;
 import javax.naming.ConfigurationException;
 
-import org.apache.log4j.Logger;
 
 import org.apache.cloudstack.framework.config.dao.ConfigurationDao;
 
@@ -46,7 +45,6 @@ import com.cloud.utils.net.NetUtils;
 
 @Local(value = {Ipv6AddressManager.class})
 public class Ipv6AddressManagerImpl extends ManagerBase implements Ipv6AddressManager {
-    public static final Logger s_logger = Logger.getLogger(Ipv6AddressManagerImpl.class.getName());
 
     String _name = null;
     int _ipv6RetryMax = 0;
@@ -80,7 +78,7 @@ public class Ipv6AddressManagerImpl extends ManagerBase implements Ipv6AddressMa
         }
         List<VlanVO> vlans = _vlanDao.listVlansByNetworkId(networkId);
         if (vlans == null) {
-            s_logger.debug("Cannot find related vlan attached to network " + networkId);
+            logger.debug("Cannot find related vlan attached to network " + networkId);
             return null;
         }
         String ip = null;

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3818257a/server/src/com/cloud/network/NetworkModelImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/NetworkModelImpl.java b/server/src/com/cloud/network/NetworkModelImpl.java
index 154e666..39c7f0c 100644
--- a/server/src/com/cloud/network/NetworkModelImpl.java
+++ b/server/src/com/cloud/network/NetworkModelImpl.java
@@ -38,7 +38,6 @@ import org.apache.cloudstack.acl.ControlledEntity.ACLType;
 import org.apache.cloudstack.framework.config.dao.ConfigurationDao;
 import org.apache.cloudstack.lb.dao.ApplicationLoadBalancerRuleDao;
 import org.apache.commons.codec.binary.Base64;
-import org.apache.log4j.Logger;
 
 import com.cloud.api.ApiDBUtils;
 import com.cloud.configuration.Config;
@@ -127,7 +126,6 @@ import com.cloud.vm.dao.VMInstanceDao;
 
 @Local(value = {NetworkModel.class})
 public class NetworkModelImpl extends ManagerBase implements NetworkModel {
-    static final Logger s_logger = Logger.getLogger(NetworkModelImpl.class);
     @Inject
     EntityManager _entityMgr;
     @Inject
@@ -339,7 +337,7 @@ public class NetworkModelImpl extends ManagerBase implements NetworkModel {
                             // no active rules/revoked rules are associated with this public IP, so remove the
                             // association with the provider
                             if (ip.isSourceNat()) {
-                                s_logger.debug("Not releasing ip " + ip.getAddress().addr() + " as it is in use for SourceNat");
+                                logger.debug("Not releasing ip " + ip.getAddress().addr() + " as it is in use for SourceNat");
                             } else {
                                 ip.setState(State.Releasing);
                             }
@@ -594,7 +592,7 @@ public class NetworkModelImpl extends ManagerBase implements NetworkModel {
             }
         } else {
             if (network.getCidr() == null) {
-                s_logger.debug("Network - " + network.getId() +  " has NULL CIDR.");
+                logger.debug("Network - " + network.getId() +  " has NULL CIDR.");
                 return false;
             }
             hasFreeIps = (getAvailableIps(network, null)).size() > 0;
@@ -766,7 +764,7 @@ public class NetworkModelImpl extends ManagerBase implements NetworkModel {
             }
         }
         if (ret_network == null) {
-            s_logger.debug("Can not find network with security group enabled with free IPs");
+            logger.debug("Can not find network with security group enabled with free IPs");
         }
         return ret_network;
     }
@@ -779,7 +777,7 @@ public class NetworkModelImpl extends ManagerBase implements NetworkModel {
         }
 
         if (networks.size() > 1) {
-            s_logger.debug("There are multiple network with security group enabled? select one of them...");
+            logger.debug("There are multiple network with security group enabled? select one of them...");
         }
         return networks.get(0);
     }
@@ -873,12 +871,12 @@ public class NetworkModelImpl extends ManagerBase implements NetworkModel {
                 }
             }
         } else {
-            s_logger.debug("Unable to find default network for the vm; vm doesn't have any nics");
+            logger.debug("Unable to find default network for the vm; vm doesn't have any nics");
             return null;
         }
 
         if (defaultNic == null) {
-            s_logger.debug("Unable to find default network for the vm; vm doesn't have default nic");
+            logger.debug("Unable to find default network for the vm; vm doesn't have default nic");
         }
 
         return defaultNic;
@@ -890,7 +888,7 @@ public class NetworkModelImpl extends ManagerBase implements NetworkModel {
         String userDataProvider = _ntwkSrvcDao.getProviderForServiceInNetwork(network.getId(), Service.UserData);
 
         if (userDataProvider == null) {
-            s_logger.debug("Network " + network + " doesn't support service " + Service.UserData.getName());
+            logger.debug("Network " + network + " doesn't support service " + Service.UserData.getName());
             return null;
         }
 
@@ -932,7 +930,7 @@ public class NetworkModelImpl extends ManagerBase implements NetworkModel {
         List<NetworkVO> virtualNetworks = _networksDao.listByZoneAndGuestType(accountId, dataCenterId, Network.GuestType.Isolated, false);
 
         if (virtualNetworks.isEmpty()) {
-            s_logger.trace("Unable to find default Virtual network account id=" + accountId);
+            logger.trace("Unable to find default Virtual network account id=" + accountId);
             return null;
         }
 
@@ -943,7 +941,7 @@ public class NetworkModelImpl extends ManagerBase implements NetworkModel {
         if (networkElementNic != null) {
             return networkElementNic.getIPv4Address();
         } else {
-            s_logger.warn("Unable to set find network element for the network id=" + virtualNetwork.getId());
+            logger.warn("Unable to set find network element for the network id=" + virtualNetwork.getId());
             return null;
         }
     }
@@ -1150,7 +1148,7 @@ public class NetworkModelImpl extends ManagerBase implements NetworkModel {
             Long pNtwkId = null;
             for (PhysicalNetwork pNtwk : pNtwks) {
                 if (pNtwk.getTags().contains(tag)) {
-                    s_logger.debug("Found physical network id=" + pNtwk.getId() + " based on requested tags " + tag);
+                    logger.debug("Found physical network id=" + pNtwk.getId() + " based on requested tags " + tag);
                     pNtwkId = pNtwk.getId();
                     break;
                 }
@@ -1187,7 +1185,7 @@ public class NetworkModelImpl extends ManagerBase implements NetworkModel {
     @Override
     public boolean isSecurityGroupSupportedInNetwork(Network network) {
         if (network.getTrafficType() != TrafficType.Guest) {
-            s_logger.trace("Security group can be enabled for Guest networks only; and network " + network + " has a diff traffic type");
+            logger.trace("Security group can be enabled for Guest networks only; and network " + network + " has a diff traffic type");
             return false;
         }
 
@@ -1255,8 +1253,8 @@ public class NetworkModelImpl extends ManagerBase implements NetworkModel {
                 return label;
             }
         } catch (Exception ex) {
-            if (s_logger.isDebugEnabled()) {
-                s_logger.debug("Failed to retrive the default label for management traffic:" + "zone: " + zoneId + " hypervisor: " + hypervisorType + " due to:" +
+            if (logger.isDebugEnabled()) {
+                logger.debug("Failed to retrive the default label for management traffic:" + "zone: " + zoneId + " hypervisor: " + hypervisorType + " due to:" +
                     ex.getMessage());
             }
         }
@@ -1290,8 +1288,8 @@ public class NetworkModelImpl extends ManagerBase implements NetworkModel {
                 return label;
             }
         } catch (Exception ex) {
-            if (s_logger.isDebugEnabled()) {
-                s_logger.debug("Failed to retrive the default label for storage traffic:" + "zone: " + zoneId + " hypervisor: " + hypervisorType + " due to:" +
+            if (logger.isDebugEnabled()) {
+                logger.debug("Failed to retrive the default label for storage traffic:" + "zone: " + zoneId + " hypervisor: " + hypervisorType + " due to:" +
                     ex.getMessage());
             }
         }
@@ -1328,7 +1326,7 @@ public class NetworkModelImpl extends ManagerBase implements NetworkModel {
     public boolean isProviderEnabledInPhysicalNetwork(long physicalNetowrkId, String providerName) {
         PhysicalNetworkServiceProviderVO ntwkSvcProvider = _pNSPDao.findByServiceProvider(physicalNetowrkId, providerName);
         if (ntwkSvcProvider == null) {
-            s_logger.warn("Unable to find provider " + providerName + " in physical network id=" + physicalNetowrkId);
+            logger.warn("Unable to find provider " + providerName + " in physical network id=" + physicalNetowrkId);
             return false;
         }
         return isProviderEnabled(ntwkSvcProvider);
@@ -1370,7 +1368,7 @@ public class NetworkModelImpl extends ManagerBase implements NetworkModel {
 
         if (physicalNetworkId == null) {
             assert (false) : "Can't get the physical network";
-            s_logger.warn("Can't get the physical network");
+            logger.warn("Can't get the physical network");
             return null;
         }
 
@@ -1657,8 +1655,8 @@ public class NetworkModelImpl extends ManagerBase implements NetworkModel {
                 return label;
             }
         } catch (Exception ex) {
-            if (s_logger.isDebugEnabled()) {
-                s_logger.debug("Failed to retrieve the default label for public traffic." + "zone: " + dcId + " hypervisor: " + hypervisorType + " due to: " +
+            if (logger.isDebugEnabled()) {
+                logger.debug("Failed to retrieve the default label for public traffic." + "zone: " + dcId + " hypervisor: " + hypervisorType + " due to: " +
                     ex.getMessage());
             }
         }
@@ -1692,8 +1690,8 @@ public class NetworkModelImpl extends ManagerBase implements NetworkModel {
                 return label;
             }
         } catch (Exception ex) {
-            if (s_logger.isDebugEnabled()) {
-                s_logger.debug("Failed to retrive the default label for management traffic:" + "zone: " + dcId + " hypervisor: " + hypervisorType + " due to:" +
+            if (logger.isDebugEnabled()) {
+                logger.debug("Failed to retrive the default label for management traffic:" + "zone: " + dcId + " hypervisor: " + hypervisorType + " due to:" +
                     ex.getMessage());
             }
         }
@@ -1766,13 +1764,13 @@ public class NetworkModelImpl extends ManagerBase implements NetworkModel {
         Long networkDomainId = null;
         Network network = getNetwork(networkId);
         if (network.getGuestType() != Network.GuestType.Shared) {
-            s_logger.trace("Network id=" + networkId + " is not shared");
+            logger.trace("Network id=" + networkId + " is not shared");
             return false;
         }
 
         NetworkDomainVO networkDomainMap = _networkDomainDao.getDomainNetworkMapByNetworkId(networkId);
         if (networkDomainMap == null) {
-            s_logger.trace("Network id=" + networkId + " is shared, but not domain specific");
+            logger.trace("Network id=" + networkId + " is shared, but not domain specific");
             return true;
         } else {
             networkDomainId = networkDomainMap.getDomainId();
@@ -1801,7 +1799,7 @@ public class NetworkModelImpl extends ManagerBase implements NetworkModel {
 
         for (String ip : ips) {
             if (requestedIp != null && requestedIp.equals(ip)) {
-                s_logger.warn("Requested ip address " + requestedIp + " is already in use in network" + network);
+                logger.warn("Requested ip address " + requestedIp + " is already in use in network" + network);
                 return null;
             }
 
@@ -1859,14 +1857,14 @@ public class NetworkModelImpl extends ManagerBase implements NetworkModel {
     boolean isServiceEnabledInNetwork(long physicalNetworkId, long networkId, Service service) {
         // check if the service is supported in the network
         if (!areServicesSupportedInNetwork(networkId, service)) {
-            s_logger.debug("Service " + service.getName() + " is not supported in the network id=" + networkId);
+            logger.debug("Service " + service.getName() + " is not supported in the network id=" + networkId);
             return false;
         }
 
         // get provider for the service and check if all of them are supported
         String provider = _ntwkSrvcDao.getProviderForServiceInNetwork(networkId, service);
         if (!isProviderEnabledInPhysicalNetwork(physicalNetworkId, provider)) {
-            s_logger.debug("Provider " + provider + " is not enabled in physical network id=" + physicalNetworkId);
+            logger.debug("Provider " + provider + " is not enabled in physical network id=" + physicalNetworkId);
             return false;
         }
 
@@ -1890,7 +1888,7 @@ public class NetworkModelImpl extends ManagerBase implements NetworkModel {
         }
 
         if (networkList.size() > 1) {
-            s_logger.info("More than one physical networks exist in zone id=" + zoneId + " with traffic type=" + trafficType + ". ");
+            logger.info("More than one physical networks exist in zone id=" + zoneId + " with traffic type=" + trafficType + ". ");
         }
 
         return networkList.get(0);
@@ -2037,7 +2035,7 @@ public class NetworkModelImpl extends ManagerBase implements NetworkModel {
         networkSearch.and("traffictype", networkSearch.entity().getTrafficType(), Op.EQ);
         NicForTrafficTypeSearch.done();
 
-        s_logger.info("Network Model is configured.");
+        logger.info("Network Model is configured.");
 
         return true;
     }
@@ -2051,11 +2049,11 @@ public class NetworkModelImpl extends ManagerBase implements NetworkModel {
             Provider implementedProvider = element.getProvider();
             if (implementedProvider != null) {
                 if (s_providerToNetworkElementMap.containsKey(implementedProvider.getName())) {
-                    s_logger.error("Cannot start NetworkModel: Provider <-> NetworkElement must be a one-to-one map, " + "multiple NetworkElements found for Provider: " +
+                    logger.error("Cannot start NetworkModel: Provider <-> NetworkElement must be a one-to-one map, " + "multiple NetworkElements found for Provider: " +
                         implementedProvider.getName());
                     continue;
                 }
-                s_logger.info("Add provider <-> element map entry. " + implementedProvider.getName() + "-" + element.getName() + "-" + element.getClass().getSimpleName());
+                logger.info("Add provider <-> element map entry. " + implementedProvider.getName() + "-" + element.getName() + "-" + element.getClass().getSimpleName());
                 s_providerToNetworkElementMap.put(implementedProvider.getName(), element.getName());
             }
             if (capabilities != null && implementedProvider != null) {
@@ -2071,7 +2069,7 @@ public class NetworkModelImpl extends ManagerBase implements NetworkModel {
                 }
             }
         }
-        s_logger.info("Started Network Model");
+        logger.info("Started Network Model");
         return true;
     }
 
@@ -2265,7 +2263,7 @@ public class NetworkModelImpl extends ManagerBase implements NetworkModel {
         //if the network has vms in Starting state (nics for those might not be allocated yet as Starting state also used when vm is being Created)
         //don't GC
         if (_nicDao.countNicsForStartingVms(networkId) > 0) {
-            s_logger.debug("Network id=" + networkId + " is not ready for GC as it has vms that are Starting at the moment");
+            logger.debug("Network id=" + networkId + " is not ready for GC as it has vms that are Starting at the moment");
             return false;
         }
 
@@ -2318,7 +2316,7 @@ public class NetworkModelImpl extends ManagerBase implements NetworkModel {
                 try {
                     md5 = MessageDigest.getInstance("MD5");
                 } catch (NoSuchAlgorithmException e) {
-                    s_logger.error("Unexpected exception " + e.getMessage(), e);
+                    logger.error("Unexpected exception " + e.getMessage(), e);
                     throw new CloudRuntimeException("Unable to get MD5 MessageDigest", e);
                 }
                 md5.reset();

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3818257a/server/src/com/cloud/network/NetworkServiceImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/NetworkServiceImpl.java b/server/src/com/cloud/network/NetworkServiceImpl.java
index abee178..d5ee63f 100644
--- a/server/src/com/cloud/network/NetworkServiceImpl.java
+++ b/server/src/com/cloud/network/NetworkServiceImpl.java
@@ -57,7 +57,6 @@ import org.apache.cloudstack.framework.config.dao.ConfigurationDao;
 import org.apache.cloudstack.framework.messagebus.MessageBus;
 import org.apache.cloudstack.framework.messagebus.PublishScope;
 import org.apache.cloudstack.network.element.InternalLoadBalancerElementService;
-import org.apache.log4j.Logger;
 
 import com.cloud.api.ApiDBUtils;
 import com.cloud.configuration.Config;
@@ -199,7 +198,6 @@ import com.cloud.vm.dao.VMInstanceDao;
  */
 @Local(value = {NetworkService.class})
 public class NetworkServiceImpl extends ManagerBase implements  NetworkService {
-    private static final Logger s_logger = Logger.getLogger(NetworkServiceImpl.class);
 
     private static final long MIN_VLAN_ID = 0L;
     private static final long MAX_VLAN_ID = 4095L; // 2^12 - 1
@@ -554,8 +552,8 @@ public class NetworkServiceImpl extends ManagerBase implements  NetworkService {
                 if (zone.getNetworkType() == NetworkType.Advanced) {
                     if (isSharedNetworkOfferingWithServices(network.getNetworkOfferingId())) {
                         _accountMgr.checkAccess(caller, AccessType.UseEntry, false, network);
-                        if (s_logger.isDebugEnabled()) {
-                            s_logger.debug("Associate IP address called by the user " + callerUserId + " account " + ipOwner.getId());
+                        if (logger.isDebugEnabled()) {
+                            logger.debug("Associate IP address called by the user " + callerUserId + " account " + ipOwner.getId());
                         }
                         return _ipAddrMgr.allocateIp(ipOwner, false, caller, callerUserId, zone, displayIp);
                     } else {
@@ -597,8 +595,8 @@ public class NetworkServiceImpl extends ManagerBase implements  NetworkService {
                 if (zone.getNetworkType() == NetworkType.Advanced) {
                     if (isSharedNetworkOfferingWithServices(network.getNetworkOfferingId())) {
                         _accountMgr.checkAccess(caller, AccessType.UseEntry, false, network);
-                        if (s_logger.isDebugEnabled()) {
-                            s_logger.debug("Associate IP address called by the user " + callerUserId + " account " + ipOwner.getId());
+                        if (logger.isDebugEnabled()) {
+                            logger.debug("Associate IP address called by the user " + callerUserId + " account " + ipOwner.getId());
                         }
                         return _ipAddrMgr.allocatePortableIp(ipOwner, caller, zoneId, networkId, null);
                     } else {
@@ -640,7 +638,7 @@ public class NetworkServiceImpl extends ManagerBase implements  NetworkService {
 
         _allowSubdomainNetworkAccess = Boolean.valueOf(_configs.get(Config.SubDomainNetworkAccess.key()));
 
-        s_logger.info("Network Service is configured.");
+        logger.info("Network Service is configured.");
 
         return true;
     }
@@ -666,7 +664,7 @@ public class NetworkServiceImpl extends ManagerBase implements  NetworkService {
 
         if (isZoneSgEnabled) {
             success = _securityGroupService.securityGroupRulesForVmSecIp(secIp.getNicId(), secIp.getIp4Address(), true);
-            s_logger.info("Associated ip address to NIC : " + secIp.getIp4Address());
+            logger.info("Associated ip address to NIC : " + secIp.getIp4Address());
         } else {
             success = true;
         }
@@ -708,12 +706,12 @@ public class NetworkServiceImpl extends ManagerBase implements  NetworkService {
         int maxAllowedIpsPerNic = NumbersUtil.parseInt(_configDao.getValue(Config.MaxNumberOfSecondaryIPsPerNIC.key()), 10);
         Long nicWiseIpCount = _nicSecondaryIpDao.countByNicId(nicId);
         if(nicWiseIpCount.intValue() >= maxAllowedIpsPerNic) {
-            s_logger.error("Maximum Number of Ips \"vm.network.nic.max.secondary.ipaddresses = \"" + maxAllowedIpsPerNic + " per Nic has been crossed for the nic " +  nicId + ".");
+            logger.error("Maximum Number of Ips \"vm.network.nic.max.secondary.ipaddresses = \"" + maxAllowedIpsPerNic + " per Nic has been crossed for the nic " +  nicId + ".");
             throw new InsufficientAddressCapacityException("Maximum Number of Ips per Nic has been crossed.", Nic.class, nicId);
         }
 
 
-        s_logger.debug("Calling the ip allocation ...");
+        logger.debug("Calling the ip allocation ...");
         String ipaddr = null;
         //Isolated network can exist in Basic zone only, so no need to verify the zone type
         if (network.getGuestType() == Network.GuestType.Isolated) {
@@ -741,11 +739,11 @@ public class NetworkServiceImpl extends ManagerBase implements  NetworkService {
                     throw new InvalidParameterValueException("Allocating ip to guest nic " + nicId + " failed");
                 }
             } catch (InsufficientAddressCapacityException e) {
-                s_logger.error("Allocating ip to guest nic " + nicId + " failed");
+                logger.error("Allocating ip to guest nic " + nicId + " failed");
                 return null;
             }
         } else {
-            s_logger.error("AddIpToVMNic is not supported in this network...");
+            logger.error("AddIpToVMNic is not supported in this network...");
             return null;
         }
 
@@ -759,11 +757,11 @@ public class NetworkServiceImpl extends ManagerBase implements  NetworkService {
             if (!nicSecondaryIpSet) {
                 nicVO.setSecondaryIp(true);
                 // commit when previously set ??
-                s_logger.debug("Setting nics table ...");
+                logger.debug("Setting nics table ...");
                 _nicDao.update(nicId, nicVO);
             }
 
-            s_logger.debug("Setting nic_secondary_ip table ...");
+            logger.debug("Setting nic_secondary_ip table ...");
                     Long vmId = nicVO.getInstanceId();
                     NicSecondaryIpVO secondaryIpVO = new NicSecondaryIpVO(nicId, addrFinal, vmId, ipOwner.getId(), ipOwner.getDomainId(), networkId);
             _nicSecondaryIpDao.persist(secondaryIpVO);
@@ -808,7 +806,7 @@ public class NetworkServiceImpl extends ManagerBase implements  NetworkService {
         NetworkOfferingVO ntwkOff = _networkOfferingDao.findById(network.getNetworkOfferingId());
 
         Long nicId = secIpVO.getNicId();
-        s_logger.debug("ip id = " + ipAddressId + " nic id = " + nicId);
+        logger.debug("ip id = " + ipAddressId + " nic id = " + nicId);
         //check is this the last secondary ip for NIC
         List<NicSecondaryIpVO> ipList = _nicSecondaryIpDao.listByNicId(nicId);
         boolean lastIp = false;
@@ -822,7 +820,7 @@ public class NetworkServiceImpl extends ManagerBase implements  NetworkService {
             throw new InvalidParameterValueException("Invalid zone Id is given");
         }
 
-        s_logger.debug("Calling secondary ip " + secIpVO.getIp4Address() + " release ");
+        logger.debug("Calling secondary ip " + secIpVO.getIp4Address() + " release ");
         if (dc.getNetworkType() == NetworkType.Advanced && network.getGuestType() == Network.GuestType.Isolated) {
             //check PF or static NAT is configured on this ip address
             String secondaryIp = secIpVO.getIp4Address();
@@ -831,7 +829,7 @@ public class NetworkServiceImpl extends ManagerBase implements  NetworkService {
             if (fwRulesList.size() != 0) {
                 for (FirewallRuleVO rule : fwRulesList) {
                     if (_portForwardingDao.findByIdAndIp(rule.getId(), secondaryIp) != null) {
-                        s_logger.debug("VM nic IP " + secondaryIp + " is associated with the port forwarding rule");
+                        logger.debug("VM nic IP " + secondaryIp + " is associated with the port forwarding rule");
                         throw new InvalidParameterValueException("Can't remove the secondary ip " + secondaryIp + " is associate with the port forwarding rule");
                     }
                 }
@@ -839,12 +837,12 @@ public class NetworkServiceImpl extends ManagerBase implements  NetworkService {
             //check if the secondary ip associated with any static nat rule
             IPAddressVO publicIpVO = _ipAddressDao.findByVmIp(secondaryIp);
             if (publicIpVO != null) {
-                s_logger.debug("VM nic IP " + secondaryIp + " is associated with the static NAT rule public IP address id " + publicIpVO.getId());
+                logger.debug("VM nic IP " + secondaryIp + " is associated with the static NAT rule public IP address id " + publicIpVO.getId());
                 throw new InvalidParameterValueException("Can' remove the ip " + secondaryIp + "is associate with static NAT rule public IP address id " + publicIpVO.getId());
             }
 
             if (_lbService.isLbRuleMappedToVmGuestIp(secondaryIp)) {
-                s_logger.debug("VM nic IP " + secondaryIp + " is mapped to load balancing rule");
+                logger.debug("VM nic IP " + secondaryIp + " is mapped to load balancing rule");
                 throw new InvalidParameterValueException("Can't remove the secondary ip " + secondaryIp + " is mapped to load balancing rule");
             }
 
@@ -876,11 +874,11 @@ public class NetworkServiceImpl extends ManagerBase implements  NetworkService {
             public void doInTransactionWithoutResult(TransactionStatus status) {
         if (lastIp) {
             nic.setSecondaryIp(false);
-            s_logger.debug("Setting nics secondary ip to false ...");
+            logger.debug("Setting nics secondary ip to false ...");
             _nicDao.update(nicId, nic);
         }
 
-        s_logger.debug("Revoving nic secondary ip entry ...");
+        logger.debug("Revoving nic secondary ip entry ...");
         _nicSecondaryIpDao.remove(ipVO.getId());
             }
         });
@@ -914,7 +912,7 @@ public class NetworkServiceImpl extends ManagerBase implements  NetworkService {
         }
 
         if (ipVO.getAllocatedTime() == null) {
-            s_logger.debug("Ip Address id= " + ipAddressId + " is not allocated, so do nothing.");
+            logger.debug("Ip Address id= " + ipAddressId + " is not allocated, so do nothing.");
             return true;
         }
 
@@ -953,7 +951,7 @@ public class NetworkServiceImpl extends ManagerBase implements  NetworkService {
                 }
             }
         } else {
-            s_logger.warn("Failed to release public ip address id=" + ipAddressId);
+            logger.warn("Failed to release public ip address id=" + ipAddressId);
         }
         return success;
     }
@@ -1173,7 +1171,7 @@ public class NetworkServiceImpl extends ManagerBase implements  NetworkService {
                     ipv4 = true;
                 }
             } catch (UnknownHostException e) {
-                s_logger.error("Unable to convert gateway IP to a InetAddress", e);
+                logger.error("Unable to convert gateway IP to a InetAddress", e);
                 throw new InvalidParameterValueException("Gateway parameter is invalid");
             }
         }
@@ -1307,21 +1305,21 @@ public class NetworkServiceImpl extends ManagerBase implements  NetworkService {
         if (ntwkOff.getIsPersistent()) {
             try {
                 if (network.getState() == Network.State.Setup) {
-                    s_logger.debug("Network id=" + network.getId() + " is already provisioned");
+                    logger.debug("Network id=" + network.getId() + " is already provisioned");
                     return network;
                 }
                 DeployDestination dest = new DeployDestination(zone, null, null, null);
                 UserVO callerUser = _userDao.findById(CallContext.current().getCallingUserId());
-                Journal journal = new Journal.LogJournal("Implementing " + network, s_logger);
+                Journal journal = new Journal.LogJournal("Implementing " + network, logger);
                 ReservationContext context = new ReservationContextImpl(UUID.randomUUID().toString(), journal, callerUser, caller);
-                s_logger.debug("Implementing network " + network + " as a part of network provision for persistent network");
+                logger.debug("Implementing network " + network + " as a part of network provision for persistent network");
                 Pair<? extends NetworkGuru, ? extends Network> implementedNetwork = _networkMgr.implementNetwork(network.getId(), dest, context);
                 if (implementedNetwork == null || implementedNetwork.first() == null) {
-                    s_logger.warn("Failed to provision the network " + network);
+                    logger.warn("Failed to provision the network " + network);
                 }
                 network = implementedNetwork.second();
             } catch (ResourceUnavailableException ex) {
-                s_logger.warn("Failed to implement persistent guest network " + network + "due to ", ex);
+                logger.warn("Failed to implement persistent guest network " + network + "due to ", ex);
                 CloudRuntimeException e = new CloudRuntimeException("Failed to implement persistent guest network");
                 e.addProxyObject(network.getUuid(), "networkId");
                 throw e;
@@ -1891,9 +1889,9 @@ public class NetworkServiceImpl extends ManagerBase implements  NetworkService {
         boolean success = _networkMgr.restartNetwork(networkId, callerAccount, callerUser, cleanup);
 
         if (success) {
-            s_logger.debug("Network id=" + networkId + " is restarted successfully.");
+            logger.debug("Network id=" + networkId + " is restarted successfully.");
         } else {
-            s_logger.warn("Network id=" + networkId + " failed to restart.");
+            logger.warn("Network id=" + networkId + " failed to restart.");
         }
 
         return success;
@@ -2178,11 +2176,11 @@ public class NetworkServiceImpl extends ManagerBase implements  NetworkService {
                 List<NicVO> nicsPresent = _nicDao.listByNetworkId(networkId);
 
                 String cidrIpRange[] = NetUtils.getIpRangeFromCidr(guestVmCidrPair[0], size);
-            s_logger.info("The start IP of the specified guest vm cidr is: " + cidrIpRange[0] + " and end IP is: " + cidrIpRange[1]);
+            logger.info("The start IP of the specified guest vm cidr is: " + cidrIpRange[0] + " and end IP is: " + cidrIpRange[1]);
                 long startIp = NetUtils.ip2Long(cidrIpRange[0]);
                 long endIp = NetUtils.ip2Long(cidrIpRange[1]);
                 long range =  endIp - startIp + 1;
-                s_logger.info("The specified guest vm cidr has " +  range + " IPs");
+                logger.info("The specified guest vm cidr has " +  range + " IPs");
 
                 for (NicVO nic : nicsPresent) {
                     long nicIp = NetUtils.ip2Long(nic.getIPv4Address());
@@ -2218,14 +2216,14 @@ public class NetworkServiceImpl extends ManagerBase implements  NetworkService {
 
                 // Condition for IP Reservation reset : guestVmCidr and network CIDR are same
                 if (network.getNetworkCidr().equals(guestVmCidr)) {
-                    s_logger.warn("Guest VM CIDR and Network CIDR both are same, reservation will reset.");
+                    logger.warn("Guest VM CIDR and Network CIDR both are same, reservation will reset.");
                     network.setNetworkCidr(null);
                 }
                 // Finally update "cidr" with the guestVmCidr
                 // which becomes the effective address space for CloudStack guest VMs
                 network.setCidr(guestVmCidr);
                 _networksDao.update(networkId, network);
-                s_logger.info("IP Reservation has been applied. The new CIDR for Guests Vms is " + guestVmCidr);
+                logger.info("IP Reservation has been applied. The new CIDR for Guests Vms is " + guestVmCidr);
             }
 
         ReservationContext context = new ReservationContextImpl(null, null, callerUser, callerAccount);
@@ -2235,21 +2233,21 @@ public class NetworkServiceImpl extends ManagerBase implements  NetworkService {
         if (restartNetwork) {
             if (validStateToShutdown) {
                 if (!changeCidr) {
-                    s_logger.debug("Shutting down elements and resources for network id=" + networkId + " as a part of network update");
+                    logger.debug("Shutting down elements and resources for network id=" + networkId + " as a part of network update");
 
                     if (!_networkMgr.shutdownNetworkElementsAndResources(context, true, network)) {
-                        s_logger.warn("Failed to shutdown the network elements and resources as a part of network restart: " + network);
+                        logger.warn("Failed to shutdown the network elements and resources as a part of network restart: " + network);
                         CloudRuntimeException ex = new CloudRuntimeException("Failed to shutdown the network elements and resources as a part of update to network of specified id");
                         ex.addProxyObject(network.getUuid(), "networkId");
                         throw ex;
                     }
                 } else {
                     // We need to shutdown the network, since we want to re-implement the network.
-                    s_logger.debug("Shutting down network id=" + networkId + " as a part of network update");
+                    logger.debug("Shutting down network id=" + networkId + " as a part of network update");
 
                     //check if network has reservation
                     if (NetUtils.isNetworkAWithinNetworkB(network.getCidr(), network.getNetworkCidr())) {
-                        s_logger.warn("Existing IP reservation will become ineffective for the network with id =  " + networkId
+                        logger.warn("Existing IP reservation will become ineffective for the network with id =  " + networkId
                                 + " You need to reapply reservation after network reimplementation.");
                         //set cidr to the newtork cidr
                         network.setCidr(network.getNetworkCidr());
@@ -2258,7 +2256,7 @@ public class NetworkServiceImpl extends ManagerBase implements  NetworkService {
                     }
 
                     if (!_networkMgr.shutdownNetwork(network.getId(), context, true)) {
-                        s_logger.warn("Failed to shutdown the network as a part of update to network with specified id");
+                        logger.warn("Failed to shutdown the network as a part of update to network with specified id");
                         CloudRuntimeException ex = new CloudRuntimeException("Failed to shutdown the network as a part of update of specified network id");
                         ex.addProxyObject(network.getUuid(), "networkId");
                         throw ex;
@@ -2298,7 +2296,7 @@ public class NetworkServiceImpl extends ManagerBase implements  NetworkService {
                     long vmId = nic.getInstanceId();
                     VMInstanceVO vm = _vmDao.findById(vmId);
                     if (vm == null) {
-                        s_logger.error("Vm for nic " + nic.getId() + " not found with Vm Id:" + vmId);
+                        logger.error("Vm for nic " + nic.getId() + " not found with Vm Id:" + vmId);
                         continue;
                     }
                     long isDefault = (nic.isDefaultNic()) ? 1 : 0;
@@ -2323,7 +2321,7 @@ public class NetworkServiceImpl extends ManagerBase implements  NetworkService {
         if (restartNetwork) {
             if (network.getState() != Network.State.Allocated) {
                 DeployDestination dest = new DeployDestination(_dcDao.findById(network.getDataCenterId()), null, null, null);
-                s_logger.debug("Implementing the network " + network + " elements and resources as a part of network update");
+                logger.debug("Implementing the network " + network + " elements and resources as a part of network update");
                 try {
                     if (!changeCidr) {
                         _networkMgr.implementNetworkElementsAndResources(dest, context, network, _networkOfferingDao.findById(network.getNetworkOfferingId()));
@@ -2331,7 +2329,7 @@ public class NetworkServiceImpl extends ManagerBase implements  NetworkService {
                         _networkMgr.implementNetwork(network.getId(), dest, context);
                     }
                 } catch (Exception ex) {
-                    s_logger.warn("Failed to implement network " + network + " elements and resources as a part of network update due to ", ex);
+                    logger.warn("Failed to implement network " + network + " elements and resources as a part of network update due to ", ex);
                     CloudRuntimeException e = new CloudRuntimeException("Failed to implement network (with specified id) elements and resources as a part of network update");
                     e.addProxyObject(network.getUuid(), "networkId");
                     throw e;
@@ -2347,7 +2345,7 @@ public class NetworkServiceImpl extends ManagerBase implements  NetworkService {
                     DeployDestination dest = new DeployDestination(_dcDao.findById(network.getDataCenterId()), null, null, null);
                     _networkMgr.implementNetwork(network.getId(), dest, context);
                 } catch (Exception ex) {
-                    s_logger.warn("Failed to implement network " + network + " elements and resources as a part o" + "f network update due to ", ex);
+                    logger.warn("Failed to implement network " + network + " elements and resources as a part o" + "f network update due to ", ex);
                     CloudRuntimeException e = new CloudRuntimeException("Failed to implement network (with specified" + " id) elements and resources as a part of network update");
                     e.addProxyObject(network.getUuid(), "networkId");
                     throw e;
@@ -2365,7 +2363,7 @@ public class NetworkServiceImpl extends ManagerBase implements  NetworkService {
 
         for (String ip : ips) {
             if (requestedIp != null && requestedIp.equals(ip)) {
-                s_logger.warn("Requested ip address " + requestedIp + " is already in use in network" + network);
+                logger.warn("Requested ip address " + requestedIp + " is already in use in network" + network);
                 return null;
             }
 
@@ -2391,44 +2389,44 @@ public class NetworkServiceImpl extends ManagerBase implements  NetworkService {
 
         // security group service should be the same
         if (areServicesSupportedByNetworkOffering(oldNetworkOfferingId, Service.SecurityGroup) != areServicesSupportedByNetworkOffering(newNetworkOfferingId, Service.SecurityGroup)) {
-            s_logger.debug("Offerings " + newNetworkOfferingId + " and " + oldNetworkOfferingId + " have different securityGroupProperty, can't upgrade");
+            logger.debug("Offerings " + newNetworkOfferingId + " and " + oldNetworkOfferingId + " have different securityGroupProperty, can't upgrade");
             return false;
         }
 
         // Type of the network should be the same
         if (oldNetworkOffering.getGuestType() != newNetworkOffering.getGuestType()) {
-            s_logger.debug("Network offerings " + newNetworkOfferingId + " and " + oldNetworkOfferingId + " are of different types, can't upgrade");
+            logger.debug("Network offerings " + newNetworkOfferingId + " and " + oldNetworkOfferingId + " are of different types, can't upgrade");
             return false;
         }
 
         // tags should be the same
         if (newNetworkOffering.getTags() != null) {
             if (oldNetworkOffering.getTags() == null) {
-                s_logger.debug("New network offering id=" + newNetworkOfferingId + " has tags and old network offering id=" + oldNetworkOfferingId + " doesn't, can't upgrade");
+                logger.debug("New network offering id=" + newNetworkOfferingId + " has tags and old network offering id=" + oldNetworkOfferingId + " doesn't, can't upgrade");
                 return false;
             }
 
             if (!StringUtils.areTagsEqual(oldNetworkOffering.getTags(), newNetworkOffering.getTags())) {
-                s_logger.debug("Network offerings " + newNetworkOffering.getUuid() + " and " + oldNetworkOffering.getUuid() + " have different tags, can't upgrade");
+                logger.debug("Network offerings " + newNetworkOffering.getUuid() + " and " + oldNetworkOffering.getUuid() + " have different tags, can't upgrade");
                 return false;
             }
         }
 
         // Traffic types should be the same
         if (oldNetworkOffering.getTrafficType() != newNetworkOffering.getTrafficType()) {
-            s_logger.debug("Network offerings " + newNetworkOfferingId + " and " + oldNetworkOfferingId + " have different traffic types, can't upgrade");
+            logger.debug("Network offerings " + newNetworkOfferingId + " and " + oldNetworkOfferingId + " have different traffic types, can't upgrade");
             return false;
         }
 
         // specify vlan should be the same
         if (oldNetworkOffering.getSpecifyVlan() != newNetworkOffering.getSpecifyVlan()) {
-            s_logger.debug("Network offerings " + newNetworkOfferingId + " and " + oldNetworkOfferingId + " have different values for specifyVlan, can't upgrade");
+            logger.debug("Network offerings " + newNetworkOfferingId + " and " + oldNetworkOfferingId + " have different values for specifyVlan, can't upgrade");
             return false;
         }
 
         // specify ipRanges should be the same
         if (oldNetworkOffering.getSpecifyIpRanges() != newNetworkOffering.getSpecifyIpRanges()) {
-            s_logger.debug("Network offerings " + newNetworkOfferingId + " and " + oldNetworkOfferingId + " have different values for specifyIpRangess, can't upgrade");
+            logger.debug("Network offerings " + newNetworkOfferingId + " and " + oldNetworkOfferingId + " have different values for specifyIpRangess, can't upgrade");
             return false;
         }
 
@@ -2566,7 +2564,7 @@ public class NetworkServiceImpl extends ManagerBase implements  NetworkService {
                 }
             });
         } catch (Exception ex) {
-            s_logger.warn("Exception: ", ex);
+            logger.warn("Exception: ", ex);
             throw new CloudRuntimeException("Fail to create a physical network");
         }
     }
@@ -2703,13 +2701,13 @@ public class NetworkServiceImpl extends ManagerBase implements  NetworkService {
                 @Override
                 public void doInTransactionWithoutResult(TransactionStatus status) {
                     if (addVnetsFinal != null) {
-                        s_logger.debug("Adding vnet range " + addVnetsFinal.toString() + " for the physicalNetwork id= " + network.getId() + " and zone id="
+                        logger.debug("Adding vnet range " + addVnetsFinal.toString() + " for the physicalNetwork id= " + network.getId() + " and zone id="
                                 + network.getDataCenterId() + " as a part of updatePhysicalNetwork call");
                 //add vnet takes a list of strings to be added. each string is a vnet.
                         _dcDao.addVnet(network.getDataCenterId(), network.getId(), addVnetsFinal);
             }
                     if (removeVnetsFinal != null) {
-                        s_logger.debug("removing vnet range " + removeVnetsFinal.toString() + " for the physicalNetwork id= " + network.getId() + " and zone id="
+                        logger.debug("removing vnet range " + removeVnetsFinal.toString() + " for the physicalNetwork id= " + network.getId() + " and zone id="
                                 + network.getDataCenterId() + " as a part of updatePhysicalNetwork call");
                 //deleteVnets  takes a list of strings to be removed. each string is a vnet.
                         _datacneterVnet.deleteVnets(TransactionLegacy.currentTxn(), network.getDataCenterId(), network.getId(), removeVnetsFinal);
@@ -2736,7 +2734,7 @@ public class NetworkServiceImpl extends ManagerBase implements  NetworkService {
             // for GRE phynets allow up to 32bits
             // TODO: Not happy about this test.
             // What about guru-like objects for physical networs?
-            s_logger.debug("ISOLATION METHODS:" + network.getIsolationMethods());
+            logger.debug("ISOLATION METHODS:" + network.getIsolationMethods());
             // Java does not have unsigned types...
             if (network.getIsolationMethods().contains("GRE")) {
                 minVnet = MIN_GRE_KEY;
@@ -2747,12 +2745,12 @@ public class NetworkServiceImpl extends ManagerBase implements  NetworkService {
                 // fail if zone already contains VNI, need to be unique per zone.
                 // since adding a range adds each VNI to the database, need only check min/max
                 for (String vnet : VnetRange) {
-                    s_logger.debug("Looking to see if VNI " + vnet + " already exists on another network in zone " + network.getDataCenterId());
+                    logger.debug("Looking to see if VNI " + vnet + " already exists on another network in zone " + network.getDataCenterId());
                     List<DataCenterVnetVO> vnis = _datacneterVnet.findVnet(network.getDataCenterId(), vnet);
                     if (vnis != null && !vnis.isEmpty()) {
                         for (DataCenterVnetVO vni : vnis) {
                             if (vni.getPhysicalNetworkId() != network.getId()) {
-                                s_logger.debug("VNI " + vnet + " already exists on another network in zone, please specify a unique range");
+                                logger.debug("VNI " + vnet + " already exists on another network in zone, please specify a unique range");
                                 throw new InvalidParameterValueException("VNI " + vnet + " already exists on another network in zone, please specify a unique range");
                             }
                         }
@@ -2776,7 +2774,7 @@ public class NetworkServiceImpl extends ManagerBase implements  NetworkService {
                 StartVnet = Integer.parseInt(VnetRange[0]);
                 EndVnet = Integer.parseInt(VnetRange[1]);
             } catch (NumberFormatException e) {
-                s_logger.warn("Unable to parse vnet range:", e);
+                logger.warn("Unable to parse vnet range:", e);
                 throw new InvalidParameterValueException("Please provide valid vnet range. The vnet range should be a coma seperated list example 2001-2012,3000-3005."
                         + rangeMessage);
             }
@@ -2914,10 +2912,10 @@ public class NetworkServiceImpl extends ManagerBase implements  NetworkService {
             try {
                 deleteNetworkServiceProvider(provider.getId());
                     } catch (ResourceUnavailableException e) {
-                        s_logger.warn("Unable to complete destroy of the physical network provider: " + provider.getProviderName() + ", id: " + provider.getId(), e);
+                        logger.warn("Unable to complete destroy of the physical network provider: " + provider.getProviderName() + ", id: " + provider.getId(), e);
                 return false;
             } catch (ConcurrentOperationException e) {
-                        s_logger.warn("Unable to complete destroy of the physical network provider: " + provider.getProviderName() + ", id: " + provider.getId(), e);
+                        logger.warn("Unable to complete destroy of the physical network provider: " + provider.getProviderName() + ", id: " + provider.getId(), e);
                 return false;
             }
         }
@@ -3055,7 +3053,7 @@ public class NetworkServiceImpl extends ManagerBase implements  NetworkService {
             startVlan = Integer.parseInt(vlanRange[0]);
             endVlan = Integer.parseInt(vlanRange[1]);
         } catch (NumberFormatException e) {
-            s_logger.warn("Unable to parse guest vlan range:", e);
+            logger.warn("Unable to parse guest vlan range:", e);
             throw new InvalidParameterValueException("Please provide valid guest vlan range");
         }
 
@@ -3169,7 +3167,7 @@ public class NetworkServiceImpl extends ManagerBase implements  NetworkService {
             tokens.add(startVlan);
             tokens.add(endVlan);
         } catch (NumberFormatException e) {
-            s_logger.warn("Unable to parse guest vlan range:", e);
+            logger.warn("Unable to parse guest vlan range:", e);
             throw new InvalidParameterValueException("Please provide valid guest vlan range");
         }
         return tokens;
@@ -3383,7 +3381,7 @@ public class NetworkServiceImpl extends ManagerBase implements  NetworkService {
 
             return nsp;
         } catch (Exception ex) {
-            s_logger.warn("Exception: ", ex);
+            logger.warn("Exception: ", ex);
             throw new CloudRuntimeException("Fail to add a provider to physical network");
         }
 
@@ -3439,8 +3437,8 @@ public class NetworkServiceImpl extends ManagerBase implements  NetworkService {
         boolean update = false;
 
         if (state != null) {
-            if (s_logger.isDebugEnabled()) {
-                s_logger.debug("trying to update the state of the service provider id=" + id + " on physical network: " + provider.getPhysicalNetworkId() + " to state: "
+            if (logger.isDebugEnabled()) {
+                logger.debug("trying to update the state of the service provider id=" + id + " on physical network: " + provider.getPhysicalNetworkId() + " to state: "
                         + stateStr);
             }
             switch (state) {
@@ -3508,8 +3506,8 @@ public class NetworkServiceImpl extends ManagerBase implements  NetworkService {
         Account callerAccount = _accountMgr.getActiveAccountById(callerUser.getAccountId());
         // shutdown the provider instances
         ReservationContext context = new ReservationContextImpl(null, null, callerUser, callerAccount);
-        if (s_logger.isDebugEnabled()) {
-            s_logger.debug("Shutting down the service provider id=" + id + " on physical network: " + provider.getPhysicalNetworkId());
+        if (logger.isDebugEnabled()) {
+            logger.debug("Shutting down the service provider id=" + id + " on physical network: " + provider.getPhysicalNetworkId());
         }
         NetworkElement element = _networkModel.getElementImplementingProvider(provider.getProviderName());
         if (element == null) {
@@ -3566,7 +3564,7 @@ public class NetworkServiceImpl extends ManagerBase implements  NetworkService {
             Long pNtwkId = null;
             for (PhysicalNetwork pNtwk : pNtwks) {
                 if (pNtwk.getTags().contains(tag)) {
-                    s_logger.debug("Found physical network id=" + pNtwk.getId() + " based on requested tags " + tag);
+                    logger.debug("Found physical network id=" + pNtwk.getId() + " based on requested tags " + tag);
                     pNtwkId = pNtwk.getId();
                     break;
                 }
@@ -3648,7 +3646,7 @@ public class NetworkServiceImpl extends ManagerBase implements  NetworkService {
                 // find row in networks table that is defined as 'Public', created when zone was deployed
                 NetworkVO publicNetwork = _networksDao.listByZoneAndTrafficType(network.getDataCenterId(),TrafficType.Public).get(0);
                 if (publicNetwork != null) {
-                    s_logger.debug("setting public network " + publicNetwork + " to broadcast type vxlan");
+                    logger.debug("setting public network " + publicNetwork + " to broadcast type vxlan");
                     publicNetwork.setBroadcastDomainType(BroadcastDomainType.Vxlan);
                     _networksDao.persist(publicNetwork);
                 }
@@ -3657,7 +3655,7 @@ public class NetworkServiceImpl extends ManagerBase implements  NetworkService {
 
             return pNetworktrafficType;
         } catch (Exception ex) {
-            s_logger.warn("Exception: ", ex);
+            logger.warn("Exception: ", ex);
             throw new CloudRuntimeException("Fail to add a traffic type to physical network");
         }
 
@@ -3811,7 +3809,7 @@ public class NetworkServiceImpl extends ManagerBase implements  NetworkService {
         }
         OvsProviderVO element = _ovsProviderDao.findByNspId(nsp.getId());
         if (element != null) {
-            s_logger.debug("There is already a Ovs element with service provider id " + nsp.getId());
+            logger.debug("There is already a Ovs element with service provider id " + nsp.getId());
             return nsp;
         }
         element = new OvsProviderVO(nsp.getId());
@@ -4013,12 +4011,12 @@ public class NetworkServiceImpl extends ManagerBase implements  NetworkService {
                         privateNetwork = _networkMgr.createGuestNetwork(ntwkOffFinal.getId(), networkName, displayText, gateway, cidr, uriString, null, owner, null, pNtwk,
                                 pNtwk.getDataCenterId(), ACLType.Account, null, vpcId, null, null, true, null);
                         if (privateNetwork != null) {
-                            s_logger.debug("Successfully created guest network " + privateNetwork);
+                            logger.debug("Successfully created guest network " + privateNetwork);
                         } else {
                             throw new CloudRuntimeException("Creating guest network failed");
                         }
                     } else {
-                        s_logger.debug("Private network already exists: " + privateNetwork);
+                        logger.debug("Private network already exists: " + privateNetwork);
                         //Do not allow multiple private gateways with same Vlan within a VPC
                         if (vpcId != null && vpcId.equals(privateNetwork.getVpcId())) {
                             throw new InvalidParameterValueException("Private network for the vlan: " + uriString + " and cidr  " + cidr + "  already exists " + "for Vpc " + vpcId
@@ -4040,7 +4038,7 @@ public class NetworkServiceImpl extends ManagerBase implements  NetworkService {
                         _dcDao.update(dc.getId(), dc);
                     }
 
-                    s_logger.debug("Private network " + privateNetwork + " is created");
+                    logger.debug("Private network " + privateNetwork + " is created");
 
                     return privateNetwork;
                 }


Mime
View raw message