cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject [21/36] git commit: updated refs/heads/master to cd7218e
Date Sat, 29 Aug 2015 20:06:18 GMT
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3818257a/plugins/network-elements/nicira-nvp/src/main/java/com/cloud/network/element/NiciraNvpElement.java
----------------------------------------------------------------------
diff --git a/plugins/network-elements/nicira-nvp/src/main/java/com/cloud/network/element/NiciraNvpElement.java b/plugins/network-elements/nicira-nvp/src/main/java/com/cloud/network/element/NiciraNvpElement.java
index 0243e2d..d59d4e1 100644
--- a/plugins/network-elements/nicira-nvp/src/main/java/com/cloud/network/element/NiciraNvpElement.java
+++ b/plugins/network-elements/nicira-nvp/src/main/java/com/cloud/network/element/NiciraNvpElement.java
@@ -32,7 +32,6 @@ import javax.ejb.Local;
 import javax.inject.Inject;
 import javax.naming.ConfigurationException;
 
-import org.apache.log4j.Logger;
 import org.springframework.stereotype.Component;
 
 import org.apache.cloudstack.engine.orchestration.service.NetworkOrchestrationService;
@@ -137,7 +136,6 @@ NiciraNvpElementService, ResourceStateAdapter, IpDeployer {
     private static final int MAX_PORT = 65535;
     private static final int MIN_PORT = 0;
 
-    private static final Logger s_logger = Logger.getLogger(NiciraNvpElement.class);
 
     private static final Map<Service, Map<Capability, String>> capabilities = setCapabilities();
 
@@ -187,18 +185,18 @@ NiciraNvpElementService, ResourceStateAdapter, IpDeployer {
     }
 
     protected boolean canHandle(Network network, Service service) {
-        s_logger.debug("Checking if NiciraNvpElement can handle service " + service.getName() + " on network " + network.getDisplayText());
+        logger.debug("Checking if NiciraNvpElement can handle service " + service.getName() + " on network " + network.getDisplayText());
         if (network.getBroadcastDomainType() != BroadcastDomainType.Lswitch) {
             return false;
         }
 
         if (!networkModel.isProviderForNetwork(getProvider(), network.getId())) {
-            s_logger.debug("NiciraNvpElement is not a provider for network " + network.getDisplayText());
+            logger.debug("NiciraNvpElement is not a provider for network " + network.getDisplayText());
             return false;
         }
 
         if (!ntwkSrvcDao.canProviderSupportServiceInNetwork(network.getId(), service, Network.Provider.NiciraNvp)) {
-            s_logger.debug("NiciraNvpElement can't provide the " + service.getName() + " service on network " + network.getDisplayText());
+            logger.debug("NiciraNvpElement can't provide the " + service.getName() + " service on network " + network.getDisplayText());
             return false;
         }
 
@@ -215,20 +213,20 @@ NiciraNvpElementService, ResourceStateAdapter, IpDeployer {
     @Override
     public boolean implement(Network network, NetworkOffering offering, DeployDestination dest, ReservationContext context) throws ConcurrentOperationException,
     ResourceUnavailableException, InsufficientCapacityException {
-        s_logger.debug("entering NiciraNvpElement implement function for network " + network.getDisplayText() + " (state " + network.getState() + ")");
+        logger.debug("entering NiciraNvpElement implement function for network " + network.getDisplayText() + " (state " + network.getState() + ")");
 
         if (!canHandle(network, Service.Connectivity)) {
             return false;
         }
 
         if (network.getBroadcastUri() == null) {
-            s_logger.error("Nic has no broadcast Uri with the LSwitch Uuid");
+            logger.error("Nic has no broadcast Uri with the LSwitch Uuid");
             return false;
         }
 
         List<NiciraNvpDeviceVO> devices = niciraNvpDao.listByPhysicalNetwork(network.getPhysicalNetworkId());
         if (devices.isEmpty()) {
-            s_logger.error("No NiciraNvp Controller on physical network " + network.getPhysicalNetworkId());
+            logger.error("No NiciraNvp Controller on physical network " + network.getPhysicalNetworkId());
             return false;
         }
         NiciraNvpDeviceVO niciraNvpDevice = devices.get(0);
@@ -244,7 +242,7 @@ NiciraNvpElementService, ResourceStateAdapter, IpDeployer {
 
         // Implement SourceNat immediately as we have al the info already
         if (networkModel.isProviderSupportServiceInNetwork(network.getId(), Service.SourceNat, Provider.NiciraNvp)) {
-            s_logger.debug("Apparently we are supposed to provide SourceNat on this network");
+            logger.debug("Apparently we are supposed to provide SourceNat on this network");
 
             PublicIp sourceNatIp = ipAddrMgr.assignSourceNatIpAddressToGuestNetwork(owner, network);
             String publicCidr = sourceNatIp.getAddress().addr() + "/" + NetUtils.getCidrSize(sourceNatIp.getVlanNetmask());
@@ -270,7 +268,7 @@ NiciraNvpElementService, ResourceStateAdapter, IpDeployer {
                                     context.getAccount().getAccountName());
             CreateLogicalRouterAnswer answer = (CreateLogicalRouterAnswer)agentMgr.easySend(niciraNvpHost.getId(), cmd);
             if (answer.getResult() == false) {
-                s_logger.error("Failed to create Logical Router for network " + network.getDisplayText());
+                logger.error("Failed to create Logical Router for network " + network.getDisplayText());
                 return false;
             }
 
@@ -291,7 +289,7 @@ NiciraNvpElementService, ResourceStateAdapter, IpDeployer {
         }
 
         if (network.getBroadcastUri() == null) {
-            s_logger.error("Nic has no broadcast Uri with the LSwitch Uuid");
+            logger.error("Nic has no broadcast Uri with the LSwitch Uuid");
             return false;
         }
 
@@ -299,7 +297,7 @@ NiciraNvpElementService, ResourceStateAdapter, IpDeployer {
 
         List<NiciraNvpDeviceVO> devices = niciraNvpDao.listByPhysicalNetwork(network.getPhysicalNetworkId());
         if (devices.isEmpty()) {
-            s_logger.error("No NiciraNvp Controller on physical network " + network.getPhysicalNetworkId());
+            logger.error("No NiciraNvp Controller on physical network " + network.getPhysicalNetworkId());
             return false;
         }
         NiciraNvpDeviceVO niciraNvpDevice = devices.get(0);
@@ -311,14 +309,14 @@ NiciraNvpElementService, ResourceStateAdapter, IpDeployer {
             FindLogicalSwitchPortAnswer answer = (FindLogicalSwitchPortAnswer)agentMgr.easySend(niciraNvpHost.getId(), findCmd);
 
             if (answer.getResult()) {
-                s_logger.warn("Existing Logical Switchport found for nic " + nic.getName() + " with uuid " + existingNicMap.getLogicalSwitchPortUuid());
+                logger.warn("Existing Logical Switchport found for nic " + nic.getName() + " with uuid " + existingNicMap.getLogicalSwitchPortUuid());
                 UpdateLogicalSwitchPortCommand cmd =
                         new UpdateLogicalSwitchPortCommand(existingNicMap.getLogicalSwitchPortUuid(), BroadcastDomainType.getValue(network.getBroadcastUri()),
                                 nicVO.getUuid(), context.getDomain().getName() + "-" + context.getAccount().getAccountName(), nic.getName());
                 agentMgr.easySend(niciraNvpHost.getId(), cmd);
                 return true;
             } else {
-                s_logger.error("Stale entry found for nic " + nic.getName() + " with logical switchport uuid " + existingNicMap.getLogicalSwitchPortUuid());
+                logger.error("Stale entry found for nic " + nic.getName() + " with logical switchport uuid " + existingNicMap.getLogicalSwitchPortUuid());
                 niciraNvpNicMappingDao.remove(existingNicMap.getId());
             }
         }
@@ -329,7 +327,7 @@ NiciraNvpElementService, ResourceStateAdapter, IpDeployer {
         CreateLogicalSwitchPortAnswer answer = (CreateLogicalSwitchPortAnswer)agentMgr.easySend(niciraNvpHost.getId(), cmd);
 
         if (answer == null || !answer.getResult()) {
-            s_logger.error("CreateLogicalSwitchPortCommand failed");
+            logger.error("CreateLogicalSwitchPortCommand failed");
             return false;
         }
 
@@ -349,7 +347,7 @@ NiciraNvpElementService, ResourceStateAdapter, IpDeployer {
         }
 
         if (network.getBroadcastUri() == null) {
-            s_logger.error("Nic has no broadcast Uri with the LSwitch Uuid");
+            logger.error("Nic has no broadcast Uri with the LSwitch Uuid");
             return false;
         }
 
@@ -357,7 +355,7 @@ NiciraNvpElementService, ResourceStateAdapter, IpDeployer {
 
         List<NiciraNvpDeviceVO> devices = niciraNvpDao.listByPhysicalNetwork(network.getPhysicalNetworkId());
         if (devices.isEmpty()) {
-            s_logger.error("No NiciraNvp Controller on physical network " + network.getPhysicalNetworkId());
+            logger.error("No NiciraNvp Controller on physical network " + network.getPhysicalNetworkId());
             return false;
         }
         NiciraNvpDeviceVO niciraNvpDevice = devices.get(0);
@@ -365,7 +363,7 @@ NiciraNvpElementService, ResourceStateAdapter, IpDeployer {
 
         NiciraNvpNicMappingVO nicMap = niciraNvpNicMappingDao.findByNicUuid(nicVO.getUuid());
         if (nicMap == null) {
-            s_logger.error("No mapping for nic " + nic.getName());
+            logger.error("No mapping for nic " + nic.getName());
             return false;
         }
 
@@ -373,7 +371,7 @@ NiciraNvpElementService, ResourceStateAdapter, IpDeployer {
         DeleteLogicalSwitchPortAnswer answer = (DeleteLogicalSwitchPortAnswer)agentMgr.easySend(niciraNvpHost.getId(), cmd);
 
         if (answer == null || !answer.getResult()) {
-            s_logger.error("DeleteLogicalSwitchPortCommand failed");
+            logger.error("DeleteLogicalSwitchPortCommand failed");
             return false;
         }
 
@@ -390,20 +388,20 @@ NiciraNvpElementService, ResourceStateAdapter, IpDeployer {
 
         List<NiciraNvpDeviceVO> devices = niciraNvpDao.listByPhysicalNetwork(network.getPhysicalNetworkId());
         if (devices.isEmpty()) {
-            s_logger.error("No NiciraNvp Controller on physical network " + network.getPhysicalNetworkId());
+            logger.error("No NiciraNvp Controller on physical network " + network.getPhysicalNetworkId());
             return false;
         }
         NiciraNvpDeviceVO niciraNvpDevice = devices.get(0);
         HostVO niciraNvpHost = hostDao.findById(niciraNvpDevice.getHostId());
 
         if (networkModel.isProviderSupportServiceInNetwork(network.getId(), Service.SourceNat, Provider.NiciraNvp)) {
-            s_logger.debug("Apparently we were providing SourceNat on this network");
+            logger.debug("Apparently we were providing SourceNat on this network");
 
             // Deleting the LogicalRouter will also take care of all provisioned
             // nat rules.
             NiciraNvpRouterMappingVO routermapping = niciraNvpRouterMappingDao.findByNetworkId(network.getId());
             if (routermapping == null) {
-                s_logger.warn("No logical router uuid found for network " + network.getDisplayText());
+                logger.warn("No logical router uuid found for network " + network.getDisplayText());
                 // This might be cause by a failed deployment, so don't make shutdown fail as well.
                 return true;
             }
@@ -411,7 +409,7 @@ NiciraNvpElementService, ResourceStateAdapter, IpDeployer {
             DeleteLogicalRouterCommand cmd = new DeleteLogicalRouterCommand(routermapping.getLogicalRouterUuid());
             DeleteLogicalRouterAnswer answer = (DeleteLogicalRouterAnswer)agentMgr.easySend(niciraNvpHost.getId(), cmd);
             if (answer.getResult() == false) {
-                s_logger.error("Failed to delete LogicalRouter for network " + network.getDisplayText());
+                logger.error("Failed to delete LogicalRouter for network " + network.getDisplayText());
                 return false;
             }
 
@@ -452,11 +450,11 @@ NiciraNvpElementService, ResourceStateAdapter, IpDeployer {
         // This element can only function in a Nicra Nvp based
         // SDN network, so Connectivity needs to be present here
         if (!services.contains(Service.Connectivity)) {
-            s_logger.warn("Unable to provide services without Connectivity service enabled for this element");
+            logger.warn("Unable to provide services without Connectivity service enabled for this element");
             return false;
         }
         if ((services.contains(Service.PortForwarding) || services.contains(Service.StaticNat)) && !services.contains(Service.SourceNat)) {
-            s_logger.warn("Unable to provide StaticNat and/or PortForwarding without the SourceNat service");
+            logger.warn("Unable to provide StaticNat and/or PortForwarding without the SourceNat service");
             return false;
         }
         return true;
@@ -734,7 +732,7 @@ NiciraNvpElementService, ResourceStateAdapter, IpDeployer {
             // SourceNat is required for StaticNat and PortForwarding
             List<NiciraNvpDeviceVO> devices = niciraNvpDao.listByPhysicalNetwork(network.getPhysicalNetworkId());
             if (devices.isEmpty()) {
-                s_logger.error("No NiciraNvp Controller on physical network " + network.getPhysicalNetworkId());
+                logger.error("No NiciraNvp Controller on physical network " + network.getPhysicalNetworkId());
                 return false;
             }
             NiciraNvpDeviceVO niciraNvpDevice = devices.get(0);
@@ -743,7 +741,7 @@ NiciraNvpElementService, ResourceStateAdapter, IpDeployer {
 
             NiciraNvpRouterMappingVO routermapping = niciraNvpRouterMappingDao.findByNetworkId(network.getId());
             if (routermapping == null) {
-                s_logger.error("No logical router uuid found for network " + network.getDisplayText());
+                logger.error("No logical router uuid found for network " + network.getDisplayText());
                 return false;
             }
 
@@ -762,7 +760,7 @@ NiciraNvpElementService, ResourceStateAdapter, IpDeployer {
             //FIXME answer can be null if the host is down
             return answer.getResult();
         } else {
-            s_logger.debug("No need to provision ip addresses as we are not providing L3 services.");
+            logger.debug("No need to provision ip addresses as we are not providing L3 services.");
         }
 
         return true;
@@ -779,7 +777,7 @@ NiciraNvpElementService, ResourceStateAdapter, IpDeployer {
 
         List<NiciraNvpDeviceVO> devices = niciraNvpDao.listByPhysicalNetwork(network.getPhysicalNetworkId());
         if (devices.isEmpty()) {
-            s_logger.error("No NiciraNvp Controller on physical network " + network.getPhysicalNetworkId());
+            logger.error("No NiciraNvp Controller on physical network " + network.getPhysicalNetworkId());
             return false;
         }
         NiciraNvpDeviceVO niciraNvpDevice = devices.get(0);
@@ -787,7 +785,7 @@ NiciraNvpElementService, ResourceStateAdapter, IpDeployer {
 
         NiciraNvpRouterMappingVO routermapping = niciraNvpRouterMappingDao.findByNetworkId(network.getId());
         if (routermapping == null) {
-            s_logger.error("No logical router uuid found for network " + network.getDisplayText());
+            logger.error("No logical router uuid found for network " + network.getDisplayText());
             return false;
         }
 
@@ -819,7 +817,7 @@ NiciraNvpElementService, ResourceStateAdapter, IpDeployer {
 
         List<NiciraNvpDeviceVO> devices = niciraNvpDao.listByPhysicalNetwork(network.getPhysicalNetworkId());
         if (devices.isEmpty()) {
-            s_logger.error("No NiciraNvp Controller on physical network " + network.getPhysicalNetworkId());
+            logger.error("No NiciraNvp Controller on physical network " + network.getPhysicalNetworkId());
             return false;
         }
         NiciraNvpDeviceVO niciraNvpDevice = devices.get(0);
@@ -827,7 +825,7 @@ NiciraNvpElementService, ResourceStateAdapter, IpDeployer {
 
         NiciraNvpRouterMappingVO routermapping = niciraNvpRouterMappingDao.findByNetworkId(network.getId());
         if (routermapping == null) {
-            s_logger.error("No logical router uuid found for network " + network.getDisplayText());
+            logger.error("No logical router uuid found for network " + network.getDisplayText());
             return false;
         }
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3818257a/plugins/network-elements/nicira-nvp/src/main/java/com/cloud/network/guru/NiciraNvpGuestNetworkGuru.java
----------------------------------------------------------------------
diff --git a/plugins/network-elements/nicira-nvp/src/main/java/com/cloud/network/guru/NiciraNvpGuestNetworkGuru.java b/plugins/network-elements/nicira-nvp/src/main/java/com/cloud/network/guru/NiciraNvpGuestNetworkGuru.java
index 975ebd1..bfce332 100644
--- a/plugins/network-elements/nicira-nvp/src/main/java/com/cloud/network/guru/NiciraNvpGuestNetworkGuru.java
+++ b/plugins/network-elements/nicira-nvp/src/main/java/com/cloud/network/guru/NiciraNvpGuestNetworkGuru.java
@@ -26,7 +26,6 @@ import java.util.List;
 import javax.ejb.Local;
 import javax.inject.Inject;
 
-import org.apache.log4j.Logger;
 
 import com.cloud.agent.AgentManager;
 import com.cloud.agent.api.CreateLogicalSwitchAnswer;
@@ -71,7 +70,6 @@ import com.cloud.vm.VirtualMachineProfile;
 public class NiciraNvpGuestNetworkGuru extends GuestNetworkGuru {
     private static final int MAX_NAME_LENGTH = 40;
 
-    private static final Logger s_logger = Logger.getLogger(NiciraNvpGuestNetworkGuru.class);
 
     @Inject
     protected NetworkModel networkModel;
@@ -108,7 +106,7 @@ public class NiciraNvpGuestNetworkGuru extends GuestNetworkGuru {
                 && isMyIsolationMethod(physicalNetwork) && ntwkOfferingSrvcDao.areServicesSupportedByNetworkOffering(offering.getId(), Service.Connectivity)) {
             return true;
         } else {
-            s_logger.trace("We only take care of Guest networks of type   " + GuestType.Isolated + " in zone of type " + NetworkType.Advanced);
+            logger.trace("We only take care of Guest networks of type   " + GuestType.Isolated + " in zone of type " + NetworkType.Advanced);
             return false;
         }
     }
@@ -119,18 +117,18 @@ public class NiciraNvpGuestNetworkGuru extends GuestNetworkGuru {
         final PhysicalNetworkVO physnet = physicalNetworkDao.findById(plan.getPhysicalNetworkId());
         final DataCenter dc = _dcDao.findById(plan.getDataCenterId());
         if (!canHandle(offering, dc.getNetworkType(), physnet)) {
-            s_logger.debug("Refusing to design this network");
+            logger.debug("Refusing to design this network");
             return null;
         }
 
         final List<NiciraNvpDeviceVO> devices = niciraNvpDao.listByPhysicalNetwork(physnet.getId());
         if (devices.isEmpty()) {
-            s_logger.error("No NiciraNvp Controller on physical network " + physnet.getName());
+            logger.error("No NiciraNvp Controller on physical network " + physnet.getName());
             return null;
         }
-        s_logger.debug("Nicira Nvp " + devices.get(0).getUuid() + " found on physical network " + physnet.getId());
+        logger.debug("Nicira Nvp " + devices.get(0).getUuid() + " found on physical network " + physnet.getId());
 
-        s_logger.debug("Physical isolation type is supported, asking GuestNetworkGuru to design this network");
+        logger.debug("Physical isolation type is supported, asking GuestNetworkGuru to design this network");
         final NetworkVO networkObject = (NetworkVO) super.design(offering, plan, userSpecified, owner);
         if (networkObject == null) {
             return null;
@@ -176,7 +174,7 @@ public class NiciraNvpGuestNetworkGuru extends GuestNetworkGuru {
 
         final List<NiciraNvpDeviceVO> devices = niciraNvpDao.listByPhysicalNetwork(physicalNetworkId);
         if (devices.isEmpty()) {
-            s_logger.error("No NiciraNvp Controller on physical network " + physicalNetworkId);
+            logger.error("No NiciraNvp Controller on physical network " + physicalNetworkId);
             return null;
         }
         final NiciraNvpDeviceVO niciraNvpDevice = devices.get(0);
@@ -190,16 +188,16 @@ public class NiciraNvpGuestNetworkGuru extends GuestNetworkGuru {
         final CreateLogicalSwitchAnswer answer = (CreateLogicalSwitchAnswer) agentMgr.easySend(niciraNvpHost.getId(), cmd);
 
         if (answer == null || !answer.getResult()) {
-            s_logger.error("CreateLogicalSwitchCommand failed");
+            logger.error("CreateLogicalSwitchCommand failed");
             return null;
         }
 
         try {
             implemented.setBroadcastUri(new URI("lswitch", answer.getLogicalSwitchUuid(), null));
             implemented.setBroadcastDomainType(BroadcastDomainType.Lswitch);
-            s_logger.info("Implemented OK, network linked to  = " + implemented.getBroadcastUri().toString());
+            logger.info("Implemented OK, network linked to  = " + implemented.getBroadcastUri().toString());
         } catch (final URISyntaxException e) {
-            s_logger.error("Unable to store logical switch id in broadcast uri, uuid = " + implemented.getUuid(), e);
+            logger.error("Unable to store logical switch id in broadcast uri, uuid = " + implemented.getUuid(), e);
             return null;
         }
 
@@ -221,13 +219,13 @@ public class NiciraNvpGuestNetworkGuru extends GuestNetworkGuru {
     public void shutdown(final NetworkProfile profile, final NetworkOffering offering) {
         final NetworkVO networkObject = networkDao.findById(profile.getId());
         if (networkObject.getBroadcastDomainType() != BroadcastDomainType.Lswitch || networkObject.getBroadcastUri() == null) {
-            s_logger.warn("BroadcastUri is empty or incorrect for guestnetwork " + networkObject.getDisplayText());
+            logger.warn("BroadcastUri is empty or incorrect for guestnetwork " + networkObject.getDisplayText());
             return;
         }
 
         final List<NiciraNvpDeviceVO> devices = niciraNvpDao.listByPhysicalNetwork(networkObject.getPhysicalNetworkId());
         if (devices.isEmpty()) {
-            s_logger.error("No NiciraNvp Controller on physical network " + networkObject.getPhysicalNetworkId());
+            logger.error("No NiciraNvp Controller on physical network " + networkObject.getPhysicalNetworkId());
             return;
         }
         final NiciraNvpDeviceVO niciraNvpDevice = devices.get(0);
@@ -237,7 +235,7 @@ public class NiciraNvpGuestNetworkGuru extends GuestNetworkGuru {
         final DeleteLogicalSwitchAnswer answer = (DeleteLogicalSwitchAnswer) agentMgr.easySend(niciraNvpHost.getId(), cmd);
 
         if (answer == null || !answer.getResult()) {
-            s_logger.error("DeleteLogicalSwitchCommand failed");
+            logger.error("DeleteLogicalSwitchCommand failed");
         }
 
         super.shutdown(profile, offering);

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3818257a/plugins/network-elements/nuage-vsp/src/com/cloud/network/element/NuageVspElement.java
----------------------------------------------------------------------
diff --git a/plugins/network-elements/nuage-vsp/src/com/cloud/network/element/NuageVspElement.java b/plugins/network-elements/nuage-vsp/src/com/cloud/network/element/NuageVspElement.java
index e777268..c092706 100644
--- a/plugins/network-elements/nuage-vsp/src/com/cloud/network/element/NuageVspElement.java
+++ b/plugins/network-elements/nuage-vsp/src/com/cloud/network/element/NuageVspElement.java
@@ -31,7 +31,6 @@ import javax.naming.ConfigurationException;
 
 import org.apache.cloudstack.api.InternalIdentity;
 import org.apache.cloudstack.network.ExternalNetworkDeviceManager;
-import org.apache.log4j.Logger;
 
 import com.cloud.agent.AgentManager;
 import com.cloud.agent.api.StartupCommand;
@@ -93,7 +92,6 @@ import com.cloud.vm.dao.NicDao;
 public class NuageVspElement extends AdapterBase implements ConnectivityProvider, IpDeployer, SourceNatServiceProvider, StaticNatServiceProvider, FirewallServiceProvider,
         DhcpServiceProvider, NetworkACLServiceProvider, ResourceStateAdapter {
 
-    private static final Logger s_logger = Logger.getLogger(NuageVspElement.class);
 
     private static final Map<Service, Map<Capability, String>> capabilities = setCapabilities();
 
@@ -194,14 +192,14 @@ public class NuageVspElement extends AdapterBase implements ConnectivityProvider
     @Override
     public boolean implement(Network network, NetworkOffering offering, DeployDestination dest, ReservationContext context) throws ConcurrentOperationException,
             ResourceUnavailableException, InsufficientCapacityException {
-        s_logger.debug("Entering NuageElement implement function for network " + network.getDisplayText() + " (state " + network.getState() + ")");
+        logger.debug("Entering NuageElement implement function for network " + network.getDisplayText() + " (state " + network.getState() + ")");
 
         if (!canHandle(network, Service.Connectivity)) {
             return false;
         }
 
         if (network.getBroadcastUri() == null) {
-            s_logger.error("Nic has no broadcast Uri with the virtual router IP");
+            logger.error("Nic has no broadcast Uri with the virtual router IP");
             return false;
         }
 
@@ -216,7 +214,7 @@ public class NuageVspElement extends AdapterBase implements ConnectivityProvider
         }
 
         if (network.getBroadcastUri() == null) {
-            s_logger.error("Nic has no broadcast Uri with the virtual router IP");
+            logger.error("Nic has no broadcast Uri with the virtual router IP");
             return false;
         }
 
@@ -230,7 +228,7 @@ public class NuageVspElement extends AdapterBase implements ConnectivityProvider
         }
 
         if (network.getBroadcastUri() == null) {
-            s_logger.error("Nic has no broadcast Uri with the virtual router IP");
+            logger.error("Nic has no broadcast Uri with the virtual router IP");
             return false;
         }
 
@@ -275,12 +273,12 @@ public class NuageVspElement extends AdapterBase implements ConnectivityProvider
         // This element can only function in a NuageVsp based
         // SDN network, so Connectivity needs to be present here
         if (!services.contains(Service.Connectivity)) {
-            s_logger.warn("Unable to support services combination without Connectivity service provided by Nuage VSP.");
+            logger.warn("Unable to support services combination without Connectivity service provided by Nuage VSP.");
             return false;
         }
 
         if ((services.contains(Service.StaticNat)) && (!services.contains(Service.SourceNat))) {
-            s_logger.warn("Unable to provide StaticNat without the SourceNat service.");
+            logger.warn("Unable to provide StaticNat without the SourceNat service.");
             return false;
         }
 
@@ -289,7 +287,7 @@ public class NuageVspElement extends AdapterBase implements ConnectivityProvider
             // NuageVsp doesn't implement any of these services, and we don't
             // want anyone else to do it for us. So if these services
             // exist, we can't handle it.
-            s_logger.warn("Unable to support services combination. The services list contains service(s) not supported by Nuage VSP.");
+            logger.warn("Unable to support services combination. The services list contains service(s) not supported by Nuage VSP.");
             return false;
         }
 
@@ -303,13 +301,13 @@ public class NuageVspElement extends AdapterBase implements ConnectivityProvider
         }
 
         if (!_networkModel.isProviderForNetwork(getProvider(), network.getId())) {
-            s_logger.debug("NuageElement is not a provider for network " + network.getDisplayText());
+            logger.debug("NuageElement is not a provider for network " + network.getDisplayText());
             return false;
         }
 
         if (service != null) {
             if (!_ntwkSrvcDao.canProviderSupportServiceInNetwork(network.getId(), service, getProvider())) {
-                s_logger.debug("NuageElement can't provide the " + service.getName() + " service on network " + network.getDisplayText());
+                logger.debug("NuageElement can't provide the " + service.getName() + " service on network " + network.getDisplayText());
                 return false;
             }
         }
@@ -373,13 +371,13 @@ public class NuageVspElement extends AdapterBase implements ConnectivityProvider
                 ApplyStaticNatVspCommand cmd = new ApplyStaticNatVspCommand(networkDomain.getUuid(), vpcOrSubnetUuid, isL3Network, sourceNatDetails);
                 ApplyStaticNatVspAnswer answer = (ApplyStaticNatVspAnswer)_agentMgr.easySend(nuageVspHost.getId(), cmd);
                 if (answer == null || !answer.getResult()) {
-                    s_logger.error("ApplyStaticNatNuageVspCommand for network " + config.getUuid() + " failed");
+                    logger.error("ApplyStaticNatNuageVspCommand for network " + config.getUuid() + " failed");
                     if ((null != answer) && (null != answer.getDetails())) {
                         throw new ResourceUnavailableException(answer.getDetails(), Network.class, config.getId());
                     }
                 }
             } catch (Exception e) {
-                s_logger.warn("Failed to apply static Nat in Vsp " + e.getMessage());
+                logger.warn("Failed to apply static Nat in Vsp " + e.getMessage());
             }
         } catch (Exception e) {
             throw new ResourceUnavailableException("Failed to apply Static NAT in VSP", Network.class, config.getId(), e);
@@ -395,9 +393,9 @@ public class NuageVspElement extends AdapterBase implements ConnectivityProvider
 
     @Override
     public boolean applyFWRules(Network network, List<? extends FirewallRule> rules) throws ResourceUnavailableException {
-        s_logger.debug("Handling applyFWRules for network " + network.getName() + " with " + rules.size() + " FWRules");
+        logger.debug("Handling applyFWRules for network " + network.getName() + " with " + rules.size() + " FWRules");
         if (rules != null && rules.size() == 1 && rules.iterator().next().getType().equals(FirewallRuleType.System)) {
-            s_logger.debug("Default ACL added by CS as system is ignored for network " + network.getName() + " with rule " + rules);
+            logger.debug("Default ACL added by CS as system is ignored for network " + network.getName() + " with rule " + rules);
             return true;
         }
         return applyACLRules(network, rules, false);
@@ -406,12 +404,12 @@ public class NuageVspElement extends AdapterBase implements ConnectivityProvider
     @Override
     public boolean applyNetworkACLs(Network network, List<? extends NetworkACLItem> rules) throws ResourceUnavailableException {
         if (rules == null || rules.isEmpty()) {
-            s_logger.debug("No rules to apply. So, delete all the existing ACL in VSP from Subnet with uuid " + network.getUuid());
+            logger.debug("No rules to apply. So, delete all the existing ACL in VSP from Subnet with uuid " + network.getUuid());
         } else {
-            s_logger.debug("New rules has to applied. So, delete all the existing ACL in VSP from Subnet with uuid " + network.getUuid());
+            logger.debug("New rules has to applied. So, delete all the existing ACL in VSP from Subnet with uuid " + network.getUuid());
         }
         if (rules != null) {
-            s_logger.debug("Handling applyNetworkACLs for network " + network.getName() + " with " + rules.size() + " Network ACLs");
+            logger.debug("Handling applyNetworkACLs for network " + network.getName() + " with " + rules.size() + " Network ACLs");
             applyACLRules(network, rules, true);
         }
         return true;
@@ -440,7 +438,7 @@ public class NuageVspElement extends AdapterBase implements ConnectivityProvider
                     isVpc, network.getId());
             ApplyAclRuleVspAnswer answer = (ApplyAclRuleVspAnswer)_agentMgr.easySend(nuageVspHost.getId(), cmd);
             if (answer == null || !answer.getResult()) {
-                s_logger.error("ApplyAclRuleNuageVspCommand for network " + network.getUuid() + " failed");
+                logger.error("ApplyAclRuleNuageVspCommand for network " + network.getUuid() + " failed");
                 if ((null != answer) && (null != answer.getDetails())) {
                     throw new ResourceUnavailableException(answer.getDetails(), Network.class, network.getId());
                 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3818257a/plugins/network-elements/nuage-vsp/src/com/cloud/network/guru/NuageVspGuestNetworkGuru.java
----------------------------------------------------------------------
diff --git a/plugins/network-elements/nuage-vsp/src/com/cloud/network/guru/NuageVspGuestNetworkGuru.java b/plugins/network-elements/nuage-vsp/src/com/cloud/network/guru/NuageVspGuestNetworkGuru.java
index 9bbaf40..e611d02 100644
--- a/plugins/network-elements/nuage-vsp/src/com/cloud/network/guru/NuageVspGuestNetworkGuru.java
+++ b/plugins/network-elements/nuage-vsp/src/com/cloud/network/guru/NuageVspGuestNetworkGuru.java
@@ -31,7 +31,6 @@ import javax.ejb.Local;
 import javax.inject.Inject;
 
 import org.apache.commons.lang.StringUtils;
-import org.apache.log4j.Logger;
 
 import com.cloud.agent.AgentManager;
 import com.cloud.agent.api.guru.DeallocateVmVspAnswer;
@@ -85,7 +84,6 @@ import com.cloud.vm.VirtualMachineProfile;
 
 @Local(value = NetworkGuru.class)
 public class NuageVspGuestNetworkGuru extends GuestNetworkGuru {
-    public static final Logger s_logger = Logger.getLogger(NuageVspGuestNetworkGuru.class);
 
     @Inject
     NetworkOfferingServiceMapDao _ntwkOfferingSrvcDao;
@@ -114,7 +112,7 @@ public class NuageVspGuestNetworkGuru extends GuestNetworkGuru {
         PhysicalNetworkVO physnet = _physicalNetworkDao.findById(plan.getPhysicalNetworkId());
         DataCenter dc = _dcDao.findById(plan.getDataCenterId());
         if (!canHandle(offering, dc.getNetworkType(), physnet)) {
-            s_logger.debug("Refusing to design this network");
+            logger.debug("Refusing to design this network");
             return null;
         }
 
@@ -163,7 +161,7 @@ public class NuageVspGuestNetworkGuru extends GuestNetworkGuru {
         AccountVO networksAccount = _accountDao.findById(network.getAccountId());
         if (networksAccount.getType() == Account.ACCOUNT_TYPE_PROJECT) {
             String errorMessage = "CS project support is not yet implemented in NuageVsp";
-            s_logger.debug(errorMessage);
+            logger.debug(errorMessage);
             throw new InsufficientVirtualNetworkCapacityException(errorMessage, Account.class, network.getAccountId());
         }
         boolean isL3Network = isL3Network(offering.getId());
@@ -182,13 +180,13 @@ public class NuageVspGuestNetworkGuru extends GuestNetworkGuru {
         ImplementNetworkVspAnswer answer = (ImplementNetworkVspAnswer)_agentMgr.easySend(nuageVspHost.getId(), cmd);
 
         if (answer == null || !answer.getResult()) {
-            s_logger.error("ImplementNetworkNuageVspCommand failed");
+            logger.error("ImplementNetworkNuageVspCommand failed");
             if ((null != answer) && (null != answer.getDetails())) {
-                s_logger.error(answer.getDetails());
+                logger.error(answer.getDetails());
             }
             return null;
         }
-        s_logger.info("Implemented OK, network " + networkUuid + " in tenant " + tenantId + " linked to " + implemented.getBroadcastUri().toString());
+        logger.info("Implemented OK, network " + networkUuid + " in tenant " + tenantId + " linked to " + implemented.getBroadcastUri().toString());
         return implemented;
     }
 
@@ -204,7 +202,7 @@ public class NuageVspGuestNetworkGuru extends GuestNetworkGuru {
         nic.setBroadcastUri(network.getBroadcastUri());
         nic.setIsolationUri(network.getBroadcastUri());
 
-        s_logger.debug("Handling reserve() call back to with Create a new VM or add an interface to existing VM in network " + network.getName());
+        logger.debug("Handling reserve() call back to with Create a new VM or add an interface to existing VM in network " + network.getName());
         DataCenter dc = _dcDao.findById(network.getDataCenterId());
         Account networksAccount = _accountDao.findById(network.getAccountId());
         DomainVO networksDomain = _domainDao.findById(network.getDomainId());
@@ -233,9 +231,9 @@ public class NuageVspGuestNetworkGuru extends GuestNetworkGuru {
         ReserveVmInterfaceVspAnswer answer = (ReserveVmInterfaceVspAnswer)_agentMgr.easySend(nuageVspHost.getId(), cmd);
 
         if (answer == null || !answer.getResult()) {
-            s_logger.error("ReserveVmInterfaceNuageVspCommand failed");
+            logger.error("ReserveVmInterfaceNuageVspCommand failed");
             if ((null != answer) && (null != answer.getDetails())) {
-                s_logger.error(answer.getDetails());
+                logger.error(answer.getDetails());
             }
             throw new InsufficientVirtualNetworkCapacityException("Failed to reserve VM in Nuage VSP.", Network.class, network.getId());
         }
@@ -249,7 +247,7 @@ public class NuageVspGuestNetworkGuru extends GuestNetworkGuru {
                 && isMyIsolationMethod(physicalNetwork)) {
             return true;
         } else {
-            s_logger.trace("We only take care of Guest networks of type   " + GuestType.Isolated + " in zone of type " + NetworkType.Advanced);
+            logger.trace("We only take care of Guest networks of type   " + GuestType.Isolated + " in zone of type " + NetworkType.Advanced);
             return false;
         }
     }
@@ -258,7 +256,7 @@ public class NuageVspGuestNetworkGuru extends GuestNetworkGuru {
     public boolean release(NicProfile nic, VirtualMachineProfile vm, String reservationId) {
         long networkId = nic.getNetworkId();
         Network network = _networkDao.findById(networkId);
-        s_logger.debug("Handling release() call back, which is called when a VM is stopped or destroyed, to delete the VM with state " + vm.getVirtualMachine().getState()
+        logger.debug("Handling release() call back, which is called when a VM is stopped or destroyed, to delete the VM with state " + vm.getVirtualMachine().getState()
                 + " from netork " + network.getName());
         if (vm.getVirtualMachine().getState().equals(VirtualMachine.State.Stopping)) {
             try {
@@ -266,16 +264,16 @@ public class NuageVspGuestNetworkGuru extends GuestNetworkGuru {
                 ReleaseVmVspCommand cmd = new ReleaseVmVspCommand(network.getUuid(), vm.getUuid(), vm.getInstanceName());
                 ReleaseVmVspAnswer answer = (ReleaseVmVspAnswer)_agentMgr.easySend(nuageVspHost.getId(), cmd);
                 if (answer == null || !answer.getResult()) {
-                    s_logger.error("ReleaseVmNuageVspCommand for VM " + vm.getUuid() + " failed");
+                    logger.error("ReleaseVmNuageVspCommand for VM " + vm.getUuid() + " failed");
                     if ((null != answer) && (null != answer.getDetails())) {
-                        s_logger.error(answer.getDetails());
+                        logger.error(answer.getDetails());
                     }
                 }
             } catch (InsufficientVirtualNetworkCapacityException e) {
-                s_logger.debug("Handling release() call back. Failed to delete CS VM " + vm.getInstanceName() + " in VSP. " + e.getMessage());
+                logger.debug("Handling release() call back. Failed to delete CS VM " + vm.getInstanceName() + " in VSP. " + e.getMessage());
             }
         } else {
-            s_logger.debug("Handling release() call back. VM " + vm.getInstanceName() + " is in " + vm.getVirtualMachine().getState() + " state. So, the CS VM is not deleted."
+            logger.debug("Handling release() call back. VM " + vm.getInstanceName() + " is in " + vm.getVirtualMachine().getState() + " state. So, the CS VM is not deleted."
                     + " This could be a case where VM interface is deleted. deallocate() call back should be called later");
         }
 
@@ -287,7 +285,7 @@ public class NuageVspGuestNetworkGuru extends GuestNetworkGuru {
     public void deallocate(Network network, NicProfile nic, VirtualMachineProfile vm) {
 
         try {
-            s_logger.debug("Handling deallocate() call back, which is called when a VM is destroyed or interface is removed, " + "to delete VM Interface with IP "
+            logger.debug("Handling deallocate() call back, which is called when a VM is destroyed or interface is removed, " + "to delete VM Interface with IP "
                     + nic.getIPv4Address() + " from a VM " + vm.getInstanceName() + " with state " + vm.getVirtualMachine().getState());
             DomainVO networksDomain = _domainDao.findById(network.getDomainId());
             NicVO nicFrmDd = _nicDao.findById(nic.getId());
@@ -303,13 +301,13 @@ public class NuageVspGuestNetworkGuru extends GuestNetworkGuru {
                     isL3Network(networkOfferingId), vpcUuid, networksDomain.getUuid(), vm.getInstanceName(), vm.getUuid());
             DeallocateVmVspAnswer answer = (DeallocateVmVspAnswer)_agentMgr.easySend(nuageVspHost.getId(), cmd);
             if (answer == null || !answer.getResult()) {
-                s_logger.error("DeallocateVmNuageVspCommand for VM " + vm.getUuid() + " failed");
+                logger.error("DeallocateVmNuageVspCommand for VM " + vm.getUuid() + " failed");
                 if ((null != answer) && (null != answer.getDetails())) {
-                    s_logger.error(answer.getDetails());
+                    logger.error(answer.getDetails());
                 }
             }
         } catch (InsufficientVirtualNetworkCapacityException e) {
-            s_logger.error("Handling deallocate(). VM " + vm.getInstanceName() + " with NIC IP " + nic.getIPv4Address()
+            logger.error("Handling deallocate(). VM " + vm.getInstanceName() + " with NIC IP " + nic.getIPv4Address()
                     + " is getting destroyed. REST API failed to update the VM state in NuageVsp", e);
         }
         super.deallocate(network, nic, vm);
@@ -323,7 +321,7 @@ public class NuageVspGuestNetworkGuru extends GuestNetworkGuru {
     @Override
     public boolean trash(Network network, NetworkOffering offering) {
 
-        s_logger.debug("Handling trash() call back to delete the network " + network.getName() + " with uuid " + network.getUuid() + " from VSP");
+        logger.debug("Handling trash() call back to delete the network " + network.getName() + " with uuid " + network.getUuid() + " from VSP");
         long domainId = network.getDomainId();
         Domain domain = _domainDao.findById(domainId);
         Long vpcId = network.getVpcId();
@@ -337,13 +335,13 @@ public class NuageVspGuestNetworkGuru extends GuestNetworkGuru {
             TrashNetworkVspCommand cmd = new TrashNetworkVspCommand(domain.getUuid(), network.getUuid(), isL3Network(offering.getId()), vpcUuid);
             TrashNetworkVspAnswer answer = (TrashNetworkVspAnswer)_agentMgr.easySend(nuageVspHost.getId(), cmd);
             if (answer == null || !answer.getResult()) {
-                s_logger.error("TrashNetworkNuageVspCommand for network " + network.getUuid() + " failed");
+                logger.error("TrashNetworkNuageVspCommand for network " + network.getUuid() + " failed");
                 if ((null != answer) && (null != answer.getDetails())) {
-                    s_logger.error(answer.getDetails());
+                    logger.error(answer.getDetails());
                 }
             }
         } catch (Exception e) {
-            s_logger.warn("Failed to clean up network information in Vsp " + e.getMessage());
+            logger.warn("Failed to clean up network information in Vsp " + e.getMessage());
         }
 
         return super.trash(network, offering);
@@ -361,13 +359,13 @@ public class NuageVspGuestNetworkGuru extends GuestNetworkGuru {
             Iterator<Long> ipIterator = allIPsInCidr.iterator();
             long vip = ipIterator.next();
             if (NetUtils.ip2Long(network.getGateway()) == vip) {
-                s_logger.debug("Gateway of the Network(" + network.getUuid() + ") has the first IP " + NetUtils.long2Ip(vip));
+                logger.debug("Gateway of the Network(" + network.getUuid() + ") has the first IP " + NetUtils.long2Ip(vip));
                 vip = ipIterator.next();
                 virtualRouterIp = NetUtils.long2Ip(vip);
-                s_logger.debug("So, reserving the 2nd IP " + virtualRouterIp + " for the Virtual Router IP in Network(" + network.getUuid() + ")");
+                logger.debug("So, reserving the 2nd IP " + virtualRouterIp + " for the Virtual Router IP in Network(" + network.getUuid() + ")");
             } else {
                 virtualRouterIp = NetUtils.long2Ip(vip);
-                s_logger.debug("1nd IP is not used as the gateway IP. So, reserving" + virtualRouterIp + " for the Virtual Router IP for " + "Network(" + network.getUuid() + ")");
+                logger.debug("1nd IP is not used as the gateway IP. So, reserving" + virtualRouterIp + " for the Virtual Router IP for " + "Network(" + network.getUuid() + ")");
             }
             addressRange.add(NetUtils.long2Ip(ipIterator.next()));
             addressRange.add(NetUtils.long2Ip((Long)allIPsInCidr.toArray()[allIPsInCidr.size() - 1]));
@@ -390,7 +388,7 @@ public class NuageVspGuestNetworkGuru extends GuestNetworkGuru {
                 }
             }
         } catch (Exception e) {
-            s_logger.error("Failed to parse the VM interface Json response from VSP REST API. VM interface json string is  " + vmInterfacesDetails, e);
+            logger.error("Failed to parse the VM interface Json response from VSP REST API. VM interface json string is  " + vmInterfacesDetails, e);
             throw new InsufficientVirtualNetworkCapacityException("Failed to parse the VM interface Json response from VSP REST API. VM interface Json " + "string is  "
                     + vmInterfacesDetails + ". So. failed to get IP for the VM from VSP address for network " + network, Network.class, network.getId());
         }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3818257a/plugins/network-elements/nuage-vsp/src/com/cloud/network/manager/NuageVspManagerImpl.java
----------------------------------------------------------------------
diff --git a/plugins/network-elements/nuage-vsp/src/com/cloud/network/manager/NuageVspManagerImpl.java b/plugins/network-elements/nuage-vsp/src/com/cloud/network/manager/NuageVspManagerImpl.java
index fed970e..0932057 100644
--- a/plugins/network-elements/nuage-vsp/src/com/cloud/network/manager/NuageVspManagerImpl.java
+++ b/plugins/network-elements/nuage-vsp/src/com/cloud/network/manager/NuageVspManagerImpl.java
@@ -39,7 +39,6 @@ import org.apache.cloudstack.framework.config.Configurable;
 import org.apache.cloudstack.framework.config.dao.ConfigurationDao;
 import org.apache.cloudstack.network.ExternalNetworkDeviceManager;
 import org.apache.commons.codec.binary.Base64;
-import org.apache.log4j.Logger;
 
 import com.cloud.api.ApiDBUtils;
 import com.cloud.api.commands.AddNuageVspDeviceCmd;
@@ -82,7 +81,6 @@ import com.cloud.utils.exception.CloudRuntimeException;
 @Local(value = {NuageVspManager.class})
 public class NuageVspManagerImpl extends ManagerBase implements NuageVspManager, Configurable {
 
-    private static final Logger s_logger = Logger.getLogger(NuageVspManagerImpl.class);
 
     private static final int ONE_MINUTE_MULTIPLIER = 60 * 1000;
 
@@ -290,7 +288,7 @@ public class NuageVspManagerImpl extends ManagerBase implements NuageVspManager,
         try {
             initNuageScheduledTasks();
         } catch (Exception ce) {
-            s_logger.warn("Failed to load NuageVsp configuration properties. Check if the NuageVsp properties are configured correctly");
+            logger.warn("Failed to load NuageVsp configuration properties. Check if the NuageVsp properties are configured correctly");
         }
         return true;
     }
@@ -318,7 +316,7 @@ public class NuageVspManagerImpl extends ManagerBase implements NuageVspManager,
             scheduler
                     .scheduleWithFixedDelay(new NuageVspSyncTask("ENTERPRISE"), ONE_MINUTE_MULTIPLIER * 15, ONE_MINUTE_MULTIPLIER * syncUpIntervalInMinutes, TimeUnit.MILLISECONDS);
         } else {
-            s_logger.warn("NuageVsp configuration for syncWorkers=" + numOfSyncThreads + " syncInterval=" + syncUpIntervalInMinutes
+            logger.warn("NuageVsp configuration for syncWorkers=" + numOfSyncThreads + " syncInterval=" + syncUpIntervalInMinutes
                     + " could not be read properly. So, check if the properties are configured properly in global properties");
         }
     }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3818257a/plugins/network-elements/nuage-vsp/src/com/cloud/network/resource/NuageVspResource.java
----------------------------------------------------------------------
diff --git a/plugins/network-elements/nuage-vsp/src/com/cloud/network/resource/NuageVspResource.java b/plugins/network-elements/nuage-vsp/src/com/cloud/network/resource/NuageVspResource.java
index 65c8ae9..c4a3ff1 100644
--- a/plugins/network-elements/nuage-vsp/src/com/cloud/network/resource/NuageVspResource.java
+++ b/plugins/network-elements/nuage-vsp/src/com/cloud/network/resource/NuageVspResource.java
@@ -32,7 +32,6 @@ import net.nuage.vsp.acs.client.NuageVspGuruClient;
 import net.nuage.vsp.acs.client.NuageVspSyncClient;
 
 import org.apache.commons.codec.binary.Base64;
-import org.apache.log4j.Logger;
 
 import com.cloud.agent.IAgentControl;
 import com.cloud.agent.api.Answer;
@@ -70,7 +69,6 @@ import com.cloud.utils.component.ManagerBase;
 import com.cloud.utils.exception.CloudRuntimeException;
 
 public class NuageVspResource extends ManagerBase implements ServerResource {
-    private static final Logger s_logger = Logger.getLogger(NuageVspResource.class);
 
     private String _name;
     private String _guid;
@@ -184,7 +182,7 @@ public class NuageVspResource extends ManagerBase implements ServerResource {
         try {
             login();
         } catch (Exception e) {
-            s_logger.error("Failed to login to Nuage VSD on " + name + " as user " + cmsUser + " Exception " + e.getMessage());
+            logger.error("Failed to login to Nuage VSD on " + name + " as user " + cmsUser + " Exception " + e.getMessage());
             throw new CloudRuntimeException("Failed to login to Nuage VSD on " + name + " as user " + cmsUser, e);
         }
 
@@ -219,7 +217,7 @@ public class NuageVspResource extends ManagerBase implements ServerResource {
         } catch (Exception e) {
             _isNuageVspClientLoaded = false;
             String errorMessage = "Nuage Vsp Plugin client is not yet installed. Please install NuageVsp plugin client to use NuageVsp plugin in Cloudstack. ";
-            s_logger.warn(errorMessage + e.getMessage());
+            logger.warn(errorMessage + e.getMessage());
             throw new Exception(errorMessage);
         }
 
@@ -261,13 +259,13 @@ public class NuageVspResource extends ManagerBase implements ServerResource {
     @Override
     public PingCommand getCurrentStatus(long id) {
         if ((_relativePath == null) || (_relativePath.isEmpty()) || (_cmsUserInfo == null) || (_cmsUserInfo.length == 0)) {
-            s_logger.error("Failed to ping to Nuage VSD");
+            logger.error("Failed to ping to Nuage VSD");
             return null;
         }
         try {
             login();
         } catch (Exception e) {
-            s_logger.error("Failed to ping to Nuage VSD on " + _name + " as user " + _cmsUserInfo[1] + " Exception " + e.getMessage());
+            logger.error("Failed to ping to Nuage VSD on " + _name + " as user " + _cmsUserInfo[1] + " Exception " + e.getMessage());
             return null;
         }
         return new PingCommand(Host.Type.L2Networking, id);
@@ -306,7 +304,7 @@ public class NuageVspResource extends ManagerBase implements ServerResource {
         else if (cmd instanceof SyncVspCommand) {
             return executeRequest((SyncVspCommand)cmd);
         }
-        s_logger.debug("Received unsupported command " + cmd.toString());
+        logger.debug("Received unsupported command " + cmd.toString());
         return Answer.createUnsupportedCommandAnswer(cmd);
     }
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3818257a/plugins/network-elements/opendaylight/src/main/java/org/apache/cloudstack/network/opendaylight/OpendaylightElement.java
----------------------------------------------------------------------
diff --git a/plugins/network-elements/opendaylight/src/main/java/org/apache/cloudstack/network/opendaylight/OpendaylightElement.java b/plugins/network-elements/opendaylight/src/main/java/org/apache/cloudstack/network/opendaylight/OpendaylightElement.java
index 05bc831..ccb0b9d 100644
--- a/plugins/network-elements/opendaylight/src/main/java/org/apache/cloudstack/network/opendaylight/OpendaylightElement.java
+++ b/plugins/network-elements/opendaylight/src/main/java/org/apache/cloudstack/network/opendaylight/OpendaylightElement.java
@@ -28,7 +28,6 @@ import javax.ejb.Local;
 import javax.inject.Inject;
 import javax.naming.ConfigurationException;
 
-import org.apache.log4j.Logger;
 import org.springframework.stereotype.Component;
 
 import org.apache.cloudstack.network.opendaylight.agent.commands.StartupOpenDaylightControllerCommand;
@@ -62,7 +61,6 @@ import com.cloud.vm.VirtualMachineProfile;
 @Local(value = {NetworkElement.class, ConnectivityProvider.class})
 public class OpendaylightElement extends AdapterBase implements ConnectivityProvider, ResourceStateAdapter {
 
-    private static final Logger s_logger = Logger.getLogger(OpendaylightElement.class);
     private static final Map<Service, Map<Capability, String>> s_capabilities = setCapabilities();
 
     @Inject

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3818257a/plugins/network-elements/opendaylight/src/main/java/org/apache/cloudstack/network/opendaylight/OpendaylightGuestNetworkGuru.java
----------------------------------------------------------------------
diff --git a/plugins/network-elements/opendaylight/src/main/java/org/apache/cloudstack/network/opendaylight/OpendaylightGuestNetworkGuru.java b/plugins/network-elements/opendaylight/src/main/java/org/apache/cloudstack/network/opendaylight/OpendaylightGuestNetworkGuru.java
index cbaa4d0..3553249 100644
--- a/plugins/network-elements/opendaylight/src/main/java/org/apache/cloudstack/network/opendaylight/OpendaylightGuestNetworkGuru.java
+++ b/plugins/network-elements/opendaylight/src/main/java/org/apache/cloudstack/network/opendaylight/OpendaylightGuestNetworkGuru.java
@@ -24,7 +24,6 @@ import java.util.UUID;
 
 import javax.inject.Inject;
 
-import org.apache.log4j.Logger;
 
 import org.apache.cloudstack.network.opendaylight.agent.commands.AddHypervisorCommand;
 import org.apache.cloudstack.network.opendaylight.agent.commands.ConfigureNetworkCommand;
@@ -70,7 +69,6 @@ import com.cloud.vm.ReservationContext;
 import com.cloud.vm.VirtualMachineProfile;
 
 public class OpendaylightGuestNetworkGuru extends GuestNetworkGuru {
-    private static final Logger s_logger = Logger.getLogger(OpendaylightGuestNetworkGuru.class);
 
     @Inject
     protected NetworkOfferingServiceMapDao ntwkOfferingSrvcDao;
@@ -96,7 +94,7 @@ public class OpendaylightGuestNetworkGuru extends GuestNetworkGuru {
                 && ntwkOfferingSrvcDao.isProviderForNetworkOffering(offering.getId(), Provider.Opendaylight)) {
             return true;
         } else {
-            s_logger.trace("We only take care of Guest networks of type   " + GuestType.Isolated + " in zone of type " + NetworkType.Advanced);
+            logger.trace("We only take care of Guest networks of type   " + GuestType.Isolated + " in zone of type " + NetworkType.Advanced);
             return false;
         }
     }
@@ -106,17 +104,17 @@ public class OpendaylightGuestNetworkGuru extends GuestNetworkGuru {
         PhysicalNetworkVO physnet = physicalNetworkDao.findById(plan.getPhysicalNetworkId());
         DataCenter dc = _dcDao.findById(plan.getDataCenterId());
         if (!canHandle(offering, dc.getNetworkType(), physnet)) {
-            s_logger.debug("Refusing to design this network");
+            logger.debug("Refusing to design this network");
             return null;
         }
 
         List<OpenDaylightControllerVO> devices = openDaylightControllerMappingDao.listByPhysicalNetwork(physnet.getId());
         if (devices.isEmpty()) {
-            s_logger.error("No Controller on physical network " + physnet.getName());
+            logger.error("No Controller on physical network " + physnet.getName());
             return null;
         }
-        s_logger.debug("Controller " + devices.get(0).getUuid() + " found on physical network " + physnet.getId());
-        s_logger.debug("Physical isolation type is ODL, asking GuestNetworkGuru to design this network");
+        logger.debug("Controller " + devices.get(0).getUuid() + " found on physical network " + physnet.getId());
+        logger.debug("Physical isolation type is ODL, asking GuestNetworkGuru to design this network");
 
         NetworkVO networkObject = (NetworkVO)super.design(offering, plan, userSpecified, owner);
         if (networkObject == null) {
@@ -161,7 +159,7 @@ public class OpendaylightGuestNetworkGuru extends GuestNetworkGuru {
 
         List<OpenDaylightControllerVO> devices = openDaylightControllerMappingDao.listByPhysicalNetwork(physicalNetworkId);
         if (devices.isEmpty()) {
-            s_logger.error("No Controller on physical network " + physicalNetworkId);
+            logger.error("No Controller on physical network " + physicalNetworkId);
             return null;
         }
         OpenDaylightControllerVO controller = devices.get(0);
@@ -170,13 +168,13 @@ public class OpendaylightGuestNetworkGuru extends GuestNetworkGuru {
         ConfigureNetworkAnswer answer = (ConfigureNetworkAnswer)agentManager.easySend(controller.getHostId(), cmd);
 
         if (answer == null || !answer.getResult()) {
-            s_logger.error("ConfigureNetworkCommand failed");
+            logger.error("ConfigureNetworkCommand failed");
             return null;
         }
 
         implemented.setBroadcastUri(BroadcastDomainType.OpenDaylight.toUri(answer.getNetworkUuid()));
         implemented.setBroadcastDomainType(BroadcastDomainType.OpenDaylight);
-        s_logger.info("Implemented OK, network linked to  = " + implemented.getBroadcastUri().toString());
+        logger.info("Implemented OK, network linked to  = " + implemented.getBroadcastUri().toString());
 
         return implemented;
     }
@@ -191,7 +189,7 @@ public class OpendaylightGuestNetworkGuru extends GuestNetworkGuru {
 
         List<OpenDaylightControllerVO> devices = openDaylightControllerMappingDao.listByPhysicalNetwork(physicalNetworkId);
         if (devices.isEmpty()) {
-            s_logger.error("No Controller on physical network " + physicalNetworkId);
+            logger.error("No Controller on physical network " + physicalNetworkId);
             throw new InsufficientVirtualNetworkCapacityException("No OpenDaylight Controller configured for this network", dest.getPod().getId());
         }
         OpenDaylightControllerVO controller = devices.get(0);
@@ -199,7 +197,7 @@ public class OpendaylightGuestNetworkGuru extends GuestNetworkGuru {
         AddHypervisorCommand addCmd = new AddHypervisorCommand(dest.getHost().getUuid(), dest.getHost().getPrivateIpAddress());
         AddHypervisorAnswer addAnswer = (AddHypervisorAnswer)agentManager.easySend(controller.getHostId(), addCmd);
         if (addAnswer == null || !addAnswer.getResult()) {
-            s_logger.error("Failed to add " + dest.getHost().getName() + " as a node to the controller");
+            logger.error("Failed to add " + dest.getHost().getName() + " as a node to the controller");
             throw new InsufficientVirtualNetworkCapacityException("Failed to add destination hypervisor to the OpenDaylight Controller", dest.getPod().getId());
         }
 
@@ -208,7 +206,7 @@ public class OpendaylightGuestNetworkGuru extends GuestNetworkGuru {
         ConfigurePortAnswer answer = (ConfigurePortAnswer)agentManager.easySend(controller.getHostId(), cmd);
 
         if (answer == null || !answer.getResult()) {
-            s_logger.error("ConfigureNetworkCommand failed");
+            logger.error("ConfigureNetworkCommand failed");
             throw new InsufficientVirtualNetworkCapacityException("Failed to configure the port on the OpenDaylight Controller", dest.getPod().getId());
         }
 
@@ -225,7 +223,7 @@ public class OpendaylightGuestNetworkGuru extends GuestNetworkGuru {
 
             List<OpenDaylightControllerVO> devices = openDaylightControllerMappingDao.listByPhysicalNetwork(physicalNetworkId);
             if (devices.isEmpty()) {
-                s_logger.error("No Controller on physical network " + physicalNetworkId);
+                logger.error("No Controller on physical network " + physicalNetworkId);
                 throw new CloudRuntimeException("No OpenDaylight controller on this physical network");
             }
             OpenDaylightControllerVO controller = devices.get(0);
@@ -234,7 +232,7 @@ public class OpendaylightGuestNetworkGuru extends GuestNetworkGuru {
             DestroyPortAnswer answer = (DestroyPortAnswer)agentManager.easySend(controller.getHostId(), cmd);
 
             if (answer == null || !answer.getResult()) {
-                s_logger.error("DestroyPortCommand failed");
+                logger.error("DestroyPortCommand failed");
                 success = false;
             }
         }
@@ -246,13 +244,13 @@ public class OpendaylightGuestNetworkGuru extends GuestNetworkGuru {
     public void shutdown(NetworkProfile profile, NetworkOffering offering) {
         NetworkVO networkObject = networkDao.findById(profile.getId());
         if (networkObject.getBroadcastDomainType() != BroadcastDomainType.OpenDaylight || networkObject.getBroadcastUri() == null) {
-            s_logger.warn("BroadcastUri is empty or incorrect for guestnetwork " + networkObject.getDisplayText());
+            logger.warn("BroadcastUri is empty or incorrect for guestnetwork " + networkObject.getDisplayText());
             return;
         }
 
         List<OpenDaylightControllerVO> devices = openDaylightControllerMappingDao.listByPhysicalNetwork(networkObject.getPhysicalNetworkId());
         if (devices.isEmpty()) {
-            s_logger.error("No Controller on physical network " + networkObject.getPhysicalNetworkId());
+            logger.error("No Controller on physical network " + networkObject.getPhysicalNetworkId());
             return;
         }
         OpenDaylightControllerVO controller = devices.get(0);
@@ -261,7 +259,7 @@ public class OpendaylightGuestNetworkGuru extends GuestNetworkGuru {
         DestroyNetworkAnswer answer = (DestroyNetworkAnswer)agentManager.easySend(controller.getHostId(), cmd);
 
         if (answer == null || !answer.getResult()) {
-            s_logger.error("DestroyNetworkCommand failed");
+            logger.error("DestroyNetworkCommand failed");
         }
 
         super.shutdown(profile, offering);

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3818257a/plugins/network-elements/ovs/src/com/cloud/network/element/OvsElement.java
----------------------------------------------------------------------
diff --git a/plugins/network-elements/ovs/src/com/cloud/network/element/OvsElement.java b/plugins/network-elements/ovs/src/com/cloud/network/element/OvsElement.java
index 5ce4d93..66050ea 100644
--- a/plugins/network-elements/ovs/src/com/cloud/network/element/OvsElement.java
+++ b/plugins/network-elements/ovs/src/com/cloud/network/element/OvsElement.java
@@ -28,7 +28,6 @@ import javax.naming.ConfigurationException;
 
 import org.apache.cloudstack.network.topology.NetworkTopology;
 import org.apache.cloudstack.network.topology.NetworkTopologyContext;
-import org.apache.log4j.Logger;
 
 import com.cloud.agent.api.StartupCommand;
 import com.cloud.agent.api.StartupOvsCommand;
@@ -107,7 +106,6 @@ StaticNatServiceProvider, IpDeployer {
     @Inject
     NetworkTopologyContext _networkTopologyContext;
 
-    private static final Logger s_logger = Logger.getLogger(OvsElement.class);
     private static final Map<Service, Map<Capability, String>> capabilities = setCapabilities();
 
     @Override
@@ -121,21 +119,21 @@ StaticNatServiceProvider, IpDeployer {
     }
 
     protected boolean canHandle(final Network network, final Service service) {
-        s_logger.debug("Checking if OvsElement can handle service "
+        logger.debug("Checking if OvsElement can handle service "
                 + service.getName() + " on network " + network.getDisplayText());
         if (network.getBroadcastDomainType() != BroadcastDomainType.Vswitch) {
             return false;
         }
 
         if (!_networkModel.isProviderForNetwork(getProvider(), network.getId())) {
-            s_logger.debug("OvsElement is not a provider for network "
+            logger.debug("OvsElement is not a provider for network "
                     + network.getDisplayText());
             return false;
         }
 
         if (!_ntwkSrvcDao.canProviderSupportServiceInNetwork(network.getId(),
                 service, Network.Provider.Ovs)) {
-            s_logger.debug("OvsElement can't provide the " + service.getName()
+            logger.debug("OvsElement can't provide the " + service.getName()
                     + " service on network " + network.getDisplayText());
             return false;
         }
@@ -156,7 +154,7 @@ StaticNatServiceProvider, IpDeployer {
             final DeployDestination dest, final ReservationContext context)
                     throws ConcurrentOperationException, ResourceUnavailableException,
                     InsufficientCapacityException {
-        s_logger.debug("entering OvsElement implement function for network "
+        logger.debug("entering OvsElement implement function for network "
                 + network.getDisplayText() + " (state " + network.getState()
                 + ")");
 
@@ -254,7 +252,7 @@ StaticNatServiceProvider, IpDeployer {
     @Override
     public boolean verifyServicesCombination(final Set<Service> services) {
         if (!services.contains(Service.Connectivity)) {
-            s_logger.warn("Unable to provide services without Connectivity service enabled for this element");
+            logger.warn("Unable to provide services without Connectivity service enabled for this element");
             return false;
         }
 
@@ -443,7 +441,7 @@ StaticNatServiceProvider, IpDeployer {
             List<DomainRouterVO> routers = _routerDao.listByNetworkAndRole(
                     network.getId(), Role.VIRTUAL_ROUTER);
             if (routers == null || routers.isEmpty()) {
-                s_logger.debug("Virtual router element doesn't need to associate ip addresses on the backend; virtual "
+                logger.debug("Virtual router element doesn't need to associate ip addresses on the backend; virtual "
                         + "router doesn't exist in the network "
                         + network.getId());
                 return true;
@@ -467,7 +465,7 @@ StaticNatServiceProvider, IpDeployer {
         List<DomainRouterVO> routers = _routerDao.listByNetworkAndRole(
                 network.getId(), Role.VIRTUAL_ROUTER);
         if (routers == null || routers.isEmpty()) {
-            s_logger.debug("Ovs element doesn't need to apply static nat on the backend; virtual "
+            logger.debug("Ovs element doesn't need to apply static nat on the backend; virtual "
                     + "router doesn't exist in the network " + network.getId());
             return true;
         }
@@ -487,7 +485,7 @@ StaticNatServiceProvider, IpDeployer {
         List<DomainRouterVO> routers = _routerDao.listByNetworkAndRole(
                 network.getId(), Role.VIRTUAL_ROUTER);
         if (routers == null || routers.isEmpty()) {
-            s_logger.debug("Ovs element doesn't need to apply firewall rules on the backend; virtual "
+            logger.debug("Ovs element doesn't need to apply firewall rules on the backend; virtual "
                     + "router doesn't exist in the network " + network.getId());
             return true;
         }
@@ -509,7 +507,7 @@ StaticNatServiceProvider, IpDeployer {
             List<DomainRouterVO> routers = _routerDao.listByNetworkAndRole(
                     network.getId(), Role.VIRTUAL_ROUTER);
             if (routers == null || routers.isEmpty()) {
-                s_logger.debug("Virtual router elemnt doesn't need to apply firewall rules on the backend; virtual "
+                logger.debug("Virtual router elemnt doesn't need to apply firewall rules on the backend; virtual "
                         + "router doesn't exist in the network "
                         + network.getId());
                 return true;
@@ -559,7 +557,7 @@ StaticNatServiceProvider, IpDeployer {
             if (schemeCaps != null) {
                 for (LoadBalancingRule rule : rules) {
                     if (!schemeCaps.contains(rule.getScheme().toString())) {
-                        s_logger.debug("Scheme " + rules.get(0).getScheme()
+                        logger.debug("Scheme " + rules.get(0).getScheme()
                                 + " is not supported by the provider "
                                 + getName());
                         return false;

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3818257a/plugins/network-elements/ovs/src/com/cloud/network/guru/OvsGuestNetworkGuru.java
----------------------------------------------------------------------
diff --git a/plugins/network-elements/ovs/src/com/cloud/network/guru/OvsGuestNetworkGuru.java b/plugins/network-elements/ovs/src/com/cloud/network/guru/OvsGuestNetworkGuru.java
index be49757..ca5b068 100644
--- a/plugins/network-elements/ovs/src/com/cloud/network/guru/OvsGuestNetworkGuru.java
+++ b/plugins/network-elements/ovs/src/com/cloud/network/guru/OvsGuestNetworkGuru.java
@@ -21,7 +21,6 @@ import com.cloud.network.vpc.dao.VpcDao;
 import javax.ejb.Local;
 import javax.inject.Inject;
 
-import org.apache.log4j.Logger;
 import org.springframework.stereotype.Component;
 
 import org.apache.cloudstack.context.CallContext;
@@ -56,8 +55,6 @@ import com.cloud.vm.VirtualMachineProfile;
 @Component
 @Local(value = NetworkGuru.class)
 public class OvsGuestNetworkGuru extends GuestNetworkGuru {
-    private static final Logger s_logger = Logger
-        .getLogger(OvsGuestNetworkGuru.class);
 
     @Inject
     OvsTunnelManager _ovsTunnelMgr;
@@ -85,7 +82,7 @@ public class OvsGuestNetworkGuru extends GuestNetworkGuru {
                 offering.getId(), Service.Connectivity)) {
             return true;
         } else {
-            s_logger.trace("We only take care of Guest networks of type   "
+            logger.trace("We only take care of Guest networks of type   "
                 + GuestType.Isolated + " in zone of type "
                 + NetworkType.Advanced);
             return false;
@@ -100,7 +97,7 @@ public class OvsGuestNetworkGuru extends GuestNetworkGuru {
             .getPhysicalNetworkId());
         DataCenter dc = _dcDao.findById(plan.getDataCenterId());
         if (!canHandle(offering, dc.getNetworkType(), physnet)) {
-            s_logger.debug("Refusing to design this network");
+            logger.debug("Refusing to design this network");
             return null;
         }
         NetworkVO config = (NetworkVO)super.design(offering, plan,
@@ -135,7 +132,7 @@ public class OvsGuestNetworkGuru extends GuestNetworkGuru {
             .findById(physicalNetworkId);
 
         if (!canHandle(offering, nwType, physnet)) {
-            s_logger.debug("Refusing to design this network");
+            logger.debug("Refusing to design this network");
             return null;
         }
         NetworkVO implemented = (NetworkVO)super.implement(network, offering,
@@ -184,13 +181,13 @@ public class OvsGuestNetworkGuru extends GuestNetworkGuru {
         NetworkVO networkObject = _networkDao.findById(profile.getId());
         if (networkObject.getBroadcastDomainType() != BroadcastDomainType.Vswitch
             || networkObject.getBroadcastUri() == null) {
-            s_logger.warn("BroadcastUri is empty or incorrect for guestnetwork "
+            logger.warn("BroadcastUri is empty or incorrect for guestnetwork "
                 + networkObject.getDisplayText());
             return;
         }
 
         if (profile.getBroadcastDomainType() == BroadcastDomainType.Vswitch ) {
-            s_logger.debug("Releasing vnet for the network id=" + profile.getId());
+            logger.debug("Releasing vnet for the network id=" + profile.getId());
             _dcDao.releaseVnet(BroadcastDomainType.getValue(profile.getBroadcastUri()), profile.getDataCenterId(), profile.getPhysicalNetworkId(),
                     profile.getAccountId(), profile.getReservationId());
         }


Mime
View raw message