mirror of
https://github.com/apache/cloudstack.git
synced 2025-11-02 20:02:29 +01:00
Bug 13326: Added is_elastic flag to IP address usage. Added new column in usage_ip_address, defaults to false. size column will contain is_elastic info in cloud_usage table
Status 13326: resolved fixed Reviewed-By: Nitin
This commit is contained in:
parent
b70f74088c
commit
a388ed792f
@ -93,14 +93,16 @@ public class UsageEventVO implements UsageEvent {
|
|||||||
this.resourceName = resourceName;
|
this.resourceName = resourceName;
|
||||||
}
|
}
|
||||||
|
|
||||||
public UsageEventVO(String usageType, long accountId, long zoneId, long resourceId, String resourceName, long size, String resourceType) {
|
//IPAddress usage event
|
||||||
|
public UsageEventVO(String usageType, long accountId, long zoneId, long ipAddressId, String ipAddress, boolean isSourceNat, String guestType, boolean isElastic) {
|
||||||
this.type = usageType;
|
this.type = usageType;
|
||||||
this.accountId = accountId;
|
this.accountId = accountId;
|
||||||
this.zoneId = zoneId;
|
this.zoneId = zoneId;
|
||||||
this.resourceId = resourceId;
|
this.resourceId = ipAddressId;
|
||||||
this.resourceName = resourceName;
|
this.resourceName = ipAddress;
|
||||||
this.size = size;
|
this.size = (isSourceNat ? 1L : 0L);
|
||||||
this.resourceType = resourceType;
|
this.resourceType = guestType;
|
||||||
|
this.templateId = (isElastic ? 1L : 0L);
|
||||||
}
|
}
|
||||||
|
|
||||||
public UsageEventVO(String usageType, long accountId, long zoneId, long resourceId, String resourceName, Long offeringId, Long templateId, String resourceType) {
|
public UsageEventVO(String usageType, long accountId, long zoneId, long resourceId, String resourceName, Long offeringId, Long templateId, String resourceType) {
|
||||||
|
|||||||
@ -439,7 +439,6 @@ public class NetworkManagerImpl implements NetworkManager, NetworkService, Manag
|
|||||||
Transaction txn = Transaction.currentTxn();
|
Transaction txn = Transaction.currentTxn();
|
||||||
|
|
||||||
Account owner = _accountMgr.getAccount(addr.getAllocatedToAccountId());
|
Account owner = _accountMgr.getAccount(addr.getAllocatedToAccountId());
|
||||||
long isSourceNat = (addr.isSourceNat()) ? 1 : 0;
|
|
||||||
|
|
||||||
txn.start();
|
txn.start();
|
||||||
addr.setState(IpAddress.State.Allocated);
|
addr.setState(IpAddress.State.Allocated);
|
||||||
@ -451,7 +450,7 @@ public class NetworkManagerImpl implements NetworkManager, NetworkService, Manag
|
|||||||
|
|
||||||
String guestType = vlan.getVlanType().toString();
|
String guestType = vlan.getVlanType().toString();
|
||||||
|
|
||||||
UsageEventVO usageEvent = new UsageEventVO(EventTypes.EVENT_NET_IP_ASSIGN, owner.getId(), addr.getDataCenterId(), addr.getId(), addr.getAddress().toString(), isSourceNat, guestType);
|
UsageEventVO usageEvent = new UsageEventVO(EventTypes.EVENT_NET_IP_ASSIGN, owner.getId(), addr.getDataCenterId(), addr.getId(), addr.getAddress().toString(), addr.isSourceNat(), guestType, addr.getElastic());
|
||||||
_usageEventDao.persist(usageEvent);
|
_usageEventDao.persist(usageEvent);
|
||||||
// don't increment resource count for direct ip addresses
|
// don't increment resource count for direct ip addresses
|
||||||
if (addr.getAssociatedWithNetworkId() != null) {
|
if (addr.getAssociatedWithNetworkId() != null) {
|
||||||
@ -3722,15 +3721,13 @@ public class NetworkManagerImpl implements NetworkManager, NetworkService, Manag
|
|||||||
_resourceLimitMgr.decrementResourceCount(_ipAddressDao.findById(addrId).getAllocatedToAccountId(), ResourceType.public_ip);
|
_resourceLimitMgr.decrementResourceCount(_ipAddressDao.findById(addrId).getAllocatedToAccountId(), ResourceType.public_ip);
|
||||||
}
|
}
|
||||||
|
|
||||||
long isSourceNat = (ip.isSourceNat()) ? 1 : 0;
|
|
||||||
|
|
||||||
// Save usage event
|
// Save usage event
|
||||||
if (ip.getAllocatedToAccountId() != Account.ACCOUNT_ID_SYSTEM) {
|
if (ip.getAllocatedToAccountId() != Account.ACCOUNT_ID_SYSTEM) {
|
||||||
VlanVO vlan = _vlanDao.findById(ip.getVlanId());
|
VlanVO vlan = _vlanDao.findById(ip.getVlanId());
|
||||||
|
|
||||||
String guestType = vlan.getVlanType().toString();
|
String guestType = vlan.getVlanType().toString();
|
||||||
|
|
||||||
UsageEventVO usageEvent = new UsageEventVO(EventTypes.EVENT_NET_IP_RELEASE, ip.getAllocatedToAccountId(), ip.getDataCenterId(), addrId, ip.getAddress().addr(), isSourceNat, guestType);
|
UsageEventVO usageEvent = new UsageEventVO(EventTypes.EVENT_NET_IP_RELEASE, ip.getAllocatedToAccountId(), ip.getDataCenterId(), addrId, ip.getAddress().addr(), ip.isSourceNat(), guestType, ip.getElastic());
|
||||||
_usageEventDao.persist(usageEvent);
|
_usageEventDao.persist(usageEvent);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1882,13 +1882,12 @@ public class Upgrade218to22 implements DbUpgrade {
|
|||||||
pstmt.close();
|
pstmt.close();
|
||||||
|
|
||||||
boolean isSourceNat = Boolean.parseBoolean(ipEventParams.getProperty("sourceNat"));
|
boolean isSourceNat = Boolean.parseBoolean(ipEventParams.getProperty("sourceNat"));
|
||||||
long isSourceNatLong = isSourceNat ? 1 : 0;
|
|
||||||
|
|
||||||
if (EventTypes.EVENT_NET_IP_ASSIGN.equals(event.getType())) {
|
if (EventTypes.EVENT_NET_IP_ASSIGN.equals(event.getType())) {
|
||||||
zoneId = Long.parseLong(ipEventParams.getProperty("dcId"));
|
zoneId = Long.parseLong(ipEventParams.getProperty("dcId"));
|
||||||
usageEvent = new UsageEventVO(EventTypes.EVENT_NET_IP_ASSIGN, event.getAccountId(), zoneId, ipId, ipAddress, isSourceNatLong,"");
|
usageEvent = new UsageEventVO(EventTypes.EVENT_NET_IP_ASSIGN, event.getAccountId(), zoneId, ipId, ipAddress, isSourceNat,"", false);
|
||||||
} else if (EventTypes.EVENT_NET_IP_RELEASE.equals(event.getType())) {
|
} else if (EventTypes.EVENT_NET_IP_RELEASE.equals(event.getType())) {
|
||||||
usageEvent = new UsageEventVO(EventTypes.EVENT_NET_IP_RELEASE, event.getAccountId(), zoneId, ipId, ipAddress, isSourceNatLong,"");
|
usageEvent = new UsageEventVO(EventTypes.EVENT_NET_IP_RELEASE, event.getAccountId(), zoneId, ipId, ipAddress, isSourceNat,"", false);
|
||||||
}
|
}
|
||||||
return usageEvent;
|
return usageEvent;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -48,6 +48,9 @@ public class UsageIPAddressVO {
|
|||||||
@Column(name="is_source_nat")
|
@Column(name="is_source_nat")
|
||||||
private boolean isSourceNat = false;
|
private boolean isSourceNat = false;
|
||||||
|
|
||||||
|
@Column(name="is_elastic")
|
||||||
|
private boolean isElastic = false;
|
||||||
|
|
||||||
@Column(name="assigned")
|
@Column(name="assigned")
|
||||||
@Temporal(value=TemporalType.TIMESTAMP)
|
@Temporal(value=TemporalType.TIMESTAMP)
|
||||||
private Date assigned = null;
|
private Date assigned = null;
|
||||||
@ -59,13 +62,14 @@ public class UsageIPAddressVO {
|
|||||||
protected UsageIPAddressVO() {
|
protected UsageIPAddressVO() {
|
||||||
}
|
}
|
||||||
|
|
||||||
public UsageIPAddressVO(long id, long accountId, long domainId, long zoneId, String address, boolean isSourceNat, Date assigned, Date released) {
|
public UsageIPAddressVO(long id, long accountId, long domainId, long zoneId, String address, boolean isSourceNat, boolean isElastic, Date assigned, Date released) {
|
||||||
this.id = id;
|
this.id = id;
|
||||||
this.accountId = accountId;
|
this.accountId = accountId;
|
||||||
this.domainId = domainId;
|
this.domainId = domainId;
|
||||||
this.zoneId = zoneId;
|
this.zoneId = zoneId;
|
||||||
this.address = address;
|
this.address = address;
|
||||||
this.isSourceNat = isSourceNat;
|
this.isSourceNat = isSourceNat;
|
||||||
|
this.isElastic = isElastic;
|
||||||
this.assigned = assigned;
|
this.assigned = assigned;
|
||||||
this.released = released;
|
this.released = released;
|
||||||
}
|
}
|
||||||
@ -101,6 +105,10 @@ public class UsageIPAddressVO {
|
|||||||
return isSourceNat;
|
return isSourceNat;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean isElastic() {
|
||||||
|
return isElastic;
|
||||||
|
}
|
||||||
|
|
||||||
public Date getAssigned() {
|
public Date getAssigned() {
|
||||||
return assigned;
|
return assigned;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -151,6 +151,23 @@ public class UsageVO {
|
|||||||
this.endDate = endDate;
|
this.endDate = endDate;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//IPAddress Usage
|
||||||
|
public UsageVO(Long zoneId, Long accountId, Long domainId, String description, String usageDisplay,
|
||||||
|
int usageType, Double rawUsage, Long usageId, long size, String type, Date startDate, Date endDate) {
|
||||||
|
this.zoneId = zoneId;
|
||||||
|
this.accountId = accountId;
|
||||||
|
this.domainId = domainId;
|
||||||
|
this.description = description;
|
||||||
|
this.usageDisplay = usageDisplay;
|
||||||
|
this.usageType = usageType;
|
||||||
|
this.rawUsage = rawUsage;
|
||||||
|
this.usageId = usageId;
|
||||||
|
this.size = size;
|
||||||
|
this.type = type;
|
||||||
|
this.startDate = startDate;
|
||||||
|
this.endDate = endDate;
|
||||||
|
}
|
||||||
|
|
||||||
public Long getId() {
|
public Long getId() {
|
||||||
return id;
|
return id;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -41,15 +41,15 @@ public class UsageIPAddressDaoImpl extends GenericDaoBase<UsageIPAddressVO, Long
|
|||||||
public static final Logger s_logger = Logger.getLogger(UsageIPAddressDaoImpl.class.getName());
|
public static final Logger s_logger = Logger.getLogger(UsageIPAddressDaoImpl.class.getName());
|
||||||
|
|
||||||
protected static final String UPDATE_RELEASED = "UPDATE usage_ip_address SET released = ? WHERE account_id = ? AND public_ip_address = ? and released IS NULL";
|
protected static final String UPDATE_RELEASED = "UPDATE usage_ip_address SET released = ? WHERE account_id = ? AND public_ip_address = ? and released IS NULL";
|
||||||
protected static final String GET_USAGE_RECORDS_BY_ACCOUNT = "SELECT id, account_id, domain_id, zone_id, public_ip_address, is_source_nat, assigned, released " +
|
protected static final String GET_USAGE_RECORDS_BY_ACCOUNT = "SELECT id, account_id, domain_id, zone_id, public_ip_address, is_source_nat, is_elastic, assigned, released " +
|
||||||
"FROM usage_ip_address " +
|
"FROM usage_ip_address " +
|
||||||
"WHERE account_id = ? AND ((released IS NULL AND assigned <= ?) OR (assigned BETWEEN ? AND ?) OR " +
|
"WHERE account_id = ? AND ((released IS NULL AND assigned <= ?) OR (assigned BETWEEN ? AND ?) OR " +
|
||||||
" (released BETWEEN ? AND ?) OR ((assigned <= ?) AND (released >= ?)))";
|
" (released BETWEEN ? AND ?) OR ((assigned <= ?) AND (released >= ?)))";
|
||||||
protected static final String GET_USAGE_RECORDS_BY_DOMAIN = "SELECT id, account_id, domain_id, zone_id, public_ip_address, is_source_nat, assigned, released " +
|
protected static final String GET_USAGE_RECORDS_BY_DOMAIN = "SELECT id, account_id, domain_id, zone_id, public_ip_address, is_source_nat, is_elastic, assigned, released " +
|
||||||
"FROM usage_ip_address " +
|
"FROM usage_ip_address " +
|
||||||
"WHERE domain_id = ? AND ((released IS NULL AND assigned <= ?) OR (assigned BETWEEN ? AND ?) OR " +
|
"WHERE domain_id = ? AND ((released IS NULL AND assigned <= ?) OR (assigned BETWEEN ? AND ?) OR " +
|
||||||
" (released BETWEEN ? AND ?) OR ((assigned <= ?) AND (released >= ?)))";
|
" (released BETWEEN ? AND ?) OR ((assigned <= ?) AND (released >= ?)))";
|
||||||
protected static final String GET_ALL_USAGE_RECORDS = "SELECT id, account_id, domain_id, zone_id, public_ip_address, is_source_nat, assigned, released " +
|
protected static final String GET_ALL_USAGE_RECORDS = "SELECT id, account_id, domain_id, zone_id, public_ip_address, is_source_nat, is_elastic, assigned, released " +
|
||||||
"FROM usage_ip_address " +
|
"FROM usage_ip_address " +
|
||||||
"WHERE (released IS NULL AND assigned <= ?) OR (assigned BETWEEN ? AND ?) OR " +
|
"WHERE (released IS NULL AND assigned <= ?) OR (assigned BETWEEN ? AND ?) OR " +
|
||||||
" (released BETWEEN ? AND ?) OR ((assigned <= ?) AND (released >= ?))";
|
" (released BETWEEN ? AND ?) OR ((assigned <= ?) AND (released >= ?))";
|
||||||
@ -119,10 +119,11 @@ public class UsageIPAddressDaoImpl extends GenericDaoBase<UsageIPAddressVO, Long
|
|||||||
Long zId = Long.valueOf(rs.getLong(4));
|
Long zId = Long.valueOf(rs.getLong(4));
|
||||||
String addr = rs.getString(5);
|
String addr = rs.getString(5);
|
||||||
Boolean isSourceNat = Boolean.valueOf(rs.getBoolean(6));
|
Boolean isSourceNat = Boolean.valueOf(rs.getBoolean(6));
|
||||||
|
Boolean isElastic = Boolean.valueOf(rs.getBoolean(7));
|
||||||
Date assignedDate = null;
|
Date assignedDate = null;
|
||||||
Date releasedDate = null;
|
Date releasedDate = null;
|
||||||
String assignedTS = rs.getString(7);
|
String assignedTS = rs.getString(8);
|
||||||
String releasedTS = rs.getString(8);
|
String releasedTS = rs.getString(9);
|
||||||
|
|
||||||
if (assignedTS != null) {
|
if (assignedTS != null) {
|
||||||
assignedDate = DateUtil.parseDateString(s_gmtTimeZone, assignedTS);
|
assignedDate = DateUtil.parseDateString(s_gmtTimeZone, assignedTS);
|
||||||
@ -131,7 +132,7 @@ public class UsageIPAddressDaoImpl extends GenericDaoBase<UsageIPAddressVO, Long
|
|||||||
releasedDate = DateUtil.parseDateString(s_gmtTimeZone, releasedTS);
|
releasedDate = DateUtil.parseDateString(s_gmtTimeZone, releasedTS);
|
||||||
}
|
}
|
||||||
|
|
||||||
usageRecords.add(new UsageIPAddressVO(id, acctId, dId, zId, addr, isSourceNat, assignedDate, releasedDate));
|
usageRecords.add(new UsageIPAddressVO(id, acctId, dId, zId, addr, isSourceNat, isElastic, assignedDate, releasedDate));
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
txn.rollback();
|
txn.rollback();
|
||||||
|
|||||||
@ -95,6 +95,7 @@ CREATE TABLE `cloud_usage`.`usage_ip_address` (
|
|||||||
`zone_id` bigint unsigned NOT NULL,
|
`zone_id` bigint unsigned NOT NULL,
|
||||||
`public_ip_address` varchar(15) NOT NULL,
|
`public_ip_address` varchar(15) NOT NULL,
|
||||||
`is_source_nat` smallint(1) NOT NULL,
|
`is_source_nat` smallint(1) NOT NULL,
|
||||||
|
`is_elastic` smallint(1) NOT NULL,
|
||||||
`assigned` DATETIME NOT NULL,
|
`assigned` DATETIME NOT NULL,
|
||||||
`released` DATETIME NULL,
|
`released` DATETIME NULL,
|
||||||
UNIQUE KEY (`id`, `assigned`)
|
UNIQUE KEY (`id`, `assigned`)
|
||||||
|
|||||||
@ -305,7 +305,7 @@ UPDATE `cloud_usage`.`usage_network` set agg_bytes_received = net_bytes_received
|
|||||||
ALTER TABLE `cloud_usage`.`usage_vpn_user` ADD INDEX `i_usage_vpn_user__account_id`(`account_id`);
|
ALTER TABLE `cloud_usage`.`usage_vpn_user` ADD INDEX `i_usage_vpn_user__account_id`(`account_id`);
|
||||||
ALTER TABLE `cloud_usage`.`usage_vpn_user` ADD INDEX `i_usage_vpn_user__created`(`created`);
|
ALTER TABLE `cloud_usage`.`usage_vpn_user` ADD INDEX `i_usage_vpn_user__created`(`created`);
|
||||||
ALTER TABLE `cloud_usage`.`usage_vpn_user` ADD INDEX `i_usage_vpn_user__deleted`(`deleted`);
|
ALTER TABLE `cloud_usage`.`usage_vpn_user` ADD INDEX `i_usage_vpn_user__deleted`(`deleted`);
|
||||||
|
ALTER TABLE `cloud_usage`.`usage_ip_address` ADD COLUMN `is_elastic` smallint(1) NOT NULL default '0';
|
||||||
|
|
||||||
DELETE FROM `cloud`.`configuration` WHERE name='host.capacity.checker.wait';
|
DELETE FROM `cloud`.`configuration` WHERE name='host.capacity.checker.wait';
|
||||||
DELETE FROM `cloud`.`configuration` WHERE name='host.capacity.checker.interval';
|
DELETE FROM `cloud`.`configuration` WHERE name='host.capacity.checker.interval';
|
||||||
|
|||||||
@ -1010,7 +1010,8 @@ public class UsageManagerImpl implements UsageManager, Runnable {
|
|||||||
long id = event.getResourceId();
|
long id = event.getResourceId();
|
||||||
long sourceNat = event.getSize();
|
long sourceNat = event.getSize();
|
||||||
boolean isSourceNat = (sourceNat == 1) ? true : false ;
|
boolean isSourceNat = (sourceNat == 1) ? true : false ;
|
||||||
UsageIPAddressVO ipAddressVO = new UsageIPAddressVO(id, event.getAccountId(), acct.getDomainId(), zoneId, ipAddress, isSourceNat, event.getCreateDate(), null);
|
boolean isElastic = (event.getTemplateId() == 1) ? true : false ;
|
||||||
|
UsageIPAddressVO ipAddressVO = new UsageIPAddressVO(id, event.getAccountId(), acct.getDomainId(), zoneId, ipAddress, isSourceNat, isElastic, event.getCreateDate(), null);
|
||||||
m_usageIPAddressDao.persist(ipAddressVO);
|
m_usageIPAddressDao.persist(ipAddressVO);
|
||||||
} else if (EventTypes.EVENT_NET_IP_RELEASE.equals(event.getType())) {
|
} else if (EventTypes.EVENT_NET_IP_RELEASE.equals(event.getType())) {
|
||||||
SearchCriteria<UsageIPAddressVO> sc = m_usageIPAddressDao.createSearchCriteria();
|
SearchCriteria<UsageIPAddressVO> sc = m_usageIPAddressDao.createSearchCriteria();
|
||||||
|
|||||||
@ -78,7 +78,7 @@ public class IPAddressUsageParser {
|
|||||||
String key = ""+IpId;
|
String key = ""+IpId;
|
||||||
|
|
||||||
// store the info in the IP map
|
// store the info in the IP map
|
||||||
IPMap.put(key, new IpInfo(usageIp.getZoneId(), IpId, usageIp.getAddress(), usageIp.isSourceNat()));
|
IPMap.put(key, new IpInfo(usageIp.getZoneId(), IpId, usageIp.getAddress(), usageIp.isSourceNat(), usageIp.isElastic()));
|
||||||
|
|
||||||
Date IpAssignDate = usageIp.getAssigned();
|
Date IpAssignDate = usageIp.getAssigned();
|
||||||
Date IpReleaseDeleteDate = usageIp.getReleased();
|
Date IpReleaseDeleteDate = usageIp.getReleased();
|
||||||
@ -104,7 +104,7 @@ public class IPAddressUsageParser {
|
|||||||
// Only create a usage record if we have a runningTime of bigger than zero.
|
// Only create a usage record if we have a runningTime of bigger than zero.
|
||||||
if (useTime > 0L) {
|
if (useTime > 0L) {
|
||||||
IpInfo info = IPMap.get(ipIdKey);
|
IpInfo info = IPMap.get(ipIdKey);
|
||||||
createUsageRecord(info.getZoneId(), useTime, startDate, endDate, account, info.getIpId(), info.getIPAddress(), info.isSourceNat());
|
createUsageRecord(info.getZoneId(), useTime, startDate, endDate, account, info.getIpId(), info.getIPAddress(), info.isSourceNat(), info.isElastic);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -123,7 +123,7 @@ public class IPAddressUsageParser {
|
|||||||
usageDataMap.put(key, ipUsageInfo);
|
usageDataMap.put(key, ipUsageInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void createUsageRecord(long zoneId, long runningTime, Date startDate, Date endDate, AccountVO account, long IpId, String IPAddress, boolean isSourceNat) {
|
private static void createUsageRecord(long zoneId, long runningTime, Date startDate, Date endDate, AccountVO account, long IpId, String IPAddress, boolean isSourceNat, boolean isElastic) {
|
||||||
if (s_logger.isDebugEnabled()) {
|
if (s_logger.isDebugEnabled()) {
|
||||||
s_logger.debug("Total usage time " + runningTime + "ms");
|
s_logger.debug("Total usage time " + runningTime + "ms");
|
||||||
}
|
}
|
||||||
@ -141,8 +141,8 @@ public class IPAddressUsageParser {
|
|||||||
|
|
||||||
// Create the usage record
|
// Create the usage record
|
||||||
|
|
||||||
UsageVO usageRecord = new UsageVO(zoneId, account.getAccountId(), account.getDomainId(), usageDesc, usageDisplay + " Hrs",
|
UsageVO usageRecord = new UsageVO(zoneId, account.getAccountId(), account.getDomainId(), usageDesc, usageDisplay + " Hrs", UsageTypes.IP_ADDRESS, new Double(usage), IpId,
|
||||||
UsageTypes.IP_ADDRESS, new Double(usage), null, null, null, null, IpId, startDate, endDate, (isSourceNat?"SourceNat":""));
|
(isElastic?1:0), (isSourceNat?"SourceNat":""), startDate, endDate);
|
||||||
m_usageDao.persist(usageRecord);
|
m_usageDao.persist(usageRecord);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -151,12 +151,14 @@ public class IPAddressUsageParser {
|
|||||||
private long IpId;
|
private long IpId;
|
||||||
private String IPAddress;
|
private String IPAddress;
|
||||||
private boolean isSourceNat;
|
private boolean isSourceNat;
|
||||||
|
private boolean isElastic;
|
||||||
|
|
||||||
public IpInfo(long zoneId,long IpId, String IPAddress, boolean isSourceNat) {
|
public IpInfo(long zoneId,long IpId, String IPAddress, boolean isSourceNat, boolean isElastic) {
|
||||||
this.zoneId = zoneId;
|
this.zoneId = zoneId;
|
||||||
this.IpId = IpId;
|
this.IpId = IpId;
|
||||||
this.IPAddress = IPAddress;
|
this.IPAddress = IPAddress;
|
||||||
this.isSourceNat = isSourceNat;
|
this.isSourceNat = isSourceNat;
|
||||||
|
this.isElastic = isElastic;
|
||||||
}
|
}
|
||||||
|
|
||||||
public long getZoneId() {
|
public long getZoneId() {
|
||||||
@ -174,6 +176,10 @@ public class IPAddressUsageParser {
|
|||||||
public boolean isSourceNat() {
|
public boolean isSourceNat() {
|
||||||
return isSourceNat;
|
return isSourceNat;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean isElastic() {
|
||||||
|
return isElastic;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user