Fixing issues with idmanager
[vpnservice.git] / idmanager / idmanager-impl / src / main / java / org / opendaylight / idmanager / IdUtils.java
index 507dad2b4b6ed6d11b21a9303fc7dfbae13be391..ebf4cd7361ac232c1cec2a8dec943982e7e23f3d 100644 (file)
@@ -52,15 +52,8 @@ class IdUtils {
 
     private static int BLADE_ID;
     static {
-        String hostName;
         try {
-            hostName = InetAddress.getLocalHost().getHostName();
             BLADE_ID = InetAddresses.coerceToInteger(InetAddress.getLocalHost());
-            if (hostName.indexOf("-") > 0) {
-                BLADE_ID = new Integer(hostName.split("-")[1].toString()).intValue();
-            } else {
-                LOGGER.error("Host name {} is not matching with the condition!! PL-X is expected", hostName);
-            }
         } catch (Exception e) {
             LOGGER.error("IdManager - Exception - {}", e.getMessage());
         }