mirror of https://github.com/apache/cloudstack.git
Added a method to look up public IPs that are used for static NAT rules.
This commit is contained in:
parent
b4605fbf2f
commit
17abb3e5d4
|
|
@ -37,6 +37,8 @@ public interface IPAddressDao extends GenericDao<IPAddressVO, Long> {
|
|||
List<IPAddressVO> listByDcIdIpAddress(long dcId, String ipAddress);
|
||||
|
||||
List<IPAddressVO> listByAssociatedNetwork(long networkId, Boolean isSourceNat);
|
||||
|
||||
List<IPAddressVO> listStaticNatPublicIps(long networkId);
|
||||
|
||||
int countIPs(long dcId, long vlanDbId, boolean onlyCountAllocated);
|
||||
|
||||
|
|
|
|||
|
|
@ -206,6 +206,14 @@ public class IPAddressDaoImpl extends GenericDaoBase<IPAddressVO, Long> implemen
|
|||
return listBy(sc);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<IPAddressVO> listStaticNatPublicIps(long networkId) {
|
||||
SearchCriteria<IPAddressVO> sc = AllFieldsSearch.create();
|
||||
sc.setParameters("network", networkId);
|
||||
sc.setParameters("oneToOneNat", true);
|
||||
return listBy(sc);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IPAddressVO findByAssociatedVmId(long vmId) {
|
||||
SearchCriteria<IPAddressVO> sc = AllFieldsSearch.create();
|
||||
|
|
|
|||
Loading…
Reference in New Issue