try pac ip update
This commit is contained in:
parent
c308720e84
commit
bc4b6a4965
@ -130,6 +130,16 @@ public class PacModuleImpl extends AbstractModuleImpl {
|
|||||||
Pac newState = (Pac) entity;
|
Pac newState = (Pac) entity;
|
||||||
EntityManager em = getTransaction().getEntityManager();
|
EntityManager em = getTransaction().getEntityManager();
|
||||||
Pac oldState = em.find(Pac.class, newState.getId());
|
Pac oldState = em.find(Pac.class, newState.getId());
|
||||||
|
|
||||||
|
String oldCurINetAddr = oldState.getCurINetAddr().getInet4Addr();
|
||||||
|
String newCurINetAddr = newState.getCurINetAddr().getInet4Addr();
|
||||||
|
|
||||||
|
System.out.println("new IP: " + newCurINetAddr);
|
||||||
|
System.out.println("old IP: " + oldCurINetAddr);
|
||||||
|
if (newCurINetAddr != null && !newCurINetAddr.isEmpty() && !newCurINetAddr.equals(oldCurINetAddr)) {
|
||||||
|
System.out.println("needs IP update");
|
||||||
|
}
|
||||||
|
|
||||||
String oldBasepacName = oldState.getBasepac().getName();
|
String oldBasepacName = oldState.getBasepac().getName();
|
||||||
BasePac newBasepac = newState.getBasepac();
|
BasePac newBasepac = newState.getBasepac();
|
||||||
String newBasepacName = newBasepac.getName();
|
String newBasepacName = newBasepac.getName();
|
||||||
|
Loading…
Reference in New Issue
Block a user