mirror of https://github.com/apache/cloudstack.git
bug 12332: use short type for "accountType" field in EventVO object
status 12332: resolved fixed
This commit is contained in:
parent
8c0be2e34a
commit
d747801144
|
|
@ -45,5 +45,5 @@ public interface Event extends ControlledEntity{
|
|||
String getLevel();
|
||||
long getStartId();
|
||||
String getParameters();
|
||||
String getAccountType();
|
||||
Short getAccountType();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -72,7 +72,7 @@ public class EventVO implements Event, Identity {
|
|||
private String accountName;
|
||||
|
||||
@Column(name="type", table="account", insertable=false, updatable=false)
|
||||
private String accountType;
|
||||
private short accountType;
|
||||
|
||||
@Column(name="removed", table="account", insertable=false, updatable=false)
|
||||
private Date removed;
|
||||
|
|
@ -198,7 +198,7 @@ public class EventVO implements Event, Identity {
|
|||
}
|
||||
|
||||
@Override
|
||||
public String getAccountType() {
|
||||
public Short getAccountType() {
|
||||
return accountType;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -4476,7 +4476,7 @@ public class NetworkManagerImpl implements NetworkManager, NetworkService, Manag
|
|||
success = false;
|
||||
}
|
||||
|
||||
// Mark all static rules as revoked and apply them on the backend (not in the DB)
|
||||
// Mark all static rules as revoked and apply them on the backend (not in the DB)
|
||||
List<FirewallRuleVO> firewallStaticNatRules = _firewallDao.listByNetworkAndPurpose(networkId, Purpose.StaticNat);
|
||||
List<StaticNatRule> staticNatRules = new ArrayList<StaticNatRule>();
|
||||
if (s_logger.isDebugEnabled()) {
|
||||
|
|
@ -4556,15 +4556,13 @@ public class NetworkManagerImpl implements NetworkManager, NetworkService, Manag
|
|||
success = false;
|
||||
}
|
||||
|
||||
// Get all ip addresses, mark as releasing and release them on the backend (except for source nat) - DONE
|
||||
// Get all ip addresses, mark as releasing and release them on the backend
|
||||
Network network = getNetwork(networkId);
|
||||
List<IPAddressVO> userIps = _ipAddressDao.listByAssociatedNetwork(networkId, null);
|
||||
List<PublicIp> publicIpsToRelease = new ArrayList<PublicIp>();
|
||||
if (userIps != null && !userIps.isEmpty()) {
|
||||
for (IPAddressVO userIp : userIps) {
|
||||
if (!userIp.isSourceNat()) {
|
||||
userIp.setState(State.Releasing);
|
||||
}
|
||||
userIp.setState(State.Releasing);
|
||||
PublicIp publicIp = new PublicIp(userIp, _vlanDao.findById(userIp.getVlanId()), NetUtils.createSequenceBasedMacAddress(userIp.getMacAddress()));
|
||||
publicIpsToRelease.add(publicIp);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2360,6 +2360,10 @@ public class VirtualNetworkApplianceManagerImpl implements VirtualNetworkApplian
|
|||
if (ipList == null) {
|
||||
ipList = new ArrayList<PublicIpAddress>();
|
||||
}
|
||||
//domR doesn't support release for sourceNat IP address
|
||||
if (ipAddress.isSourceNat() && ipAddress.getState() == IpAddress.State.Releasing) {
|
||||
continue;
|
||||
}
|
||||
ipList.add(ipAddress);
|
||||
vlanIpMap.put(vlanTag, ipList);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue