mirror of https://github.com/apache/cloudstack.git
CLOUDSTACK-6676: cleanup ip address details on ip disassoc
This commit is contained in:
parent
2ed9b474d8
commit
57e66ddaa6
|
|
@ -25,6 +25,7 @@ import javax.annotation.PostConstruct;
|
|||
import javax.ejb.Local;
|
||||
import javax.inject.Inject;
|
||||
|
||||
import org.apache.cloudstack.resourcedetail.dao.UserIpAddressDetailsDao;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
|
|
@ -63,6 +64,8 @@ public class IPAddressDaoImpl extends GenericDaoBase<IPAddressVO, Long> implemen
|
|||
protected GenericSearchBuilder<IPAddressVO, Long> CountFreePublicIps;
|
||||
@Inject
|
||||
ResourceTagDao _tagsDao;
|
||||
@Inject
|
||||
UserIpAddressDetailsDao _detailsDao;
|
||||
|
||||
// make it public for JUnit test
|
||||
public IPAddressDaoImpl() {
|
||||
|
|
@ -166,6 +169,8 @@ public class IPAddressDaoImpl extends GenericDaoBase<IPAddressVO, Long> implemen
|
|||
address.setSystem(false);
|
||||
address.setVmIp(null);
|
||||
address.setDisplay(true);
|
||||
//remove resource details for the ip
|
||||
_detailsDao.removeDetails(ipAddressId);
|
||||
update(ipAddressId, address);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue