1) CS-15692 - ipAddress is always null for NetworkACL rule
2) CS-15699 - redundant router = true when provider is VirtualRouter
3) CS-15701 - fixed error message
This commit is contained in:
Alena Prokharchyk 2012-07-26 09:41:18 -07:00
parent 5de0e5717a
commit 20b6b36302
5 changed files with 11 additions and 7 deletions

BIN
awsapi.log.2012-07-25.gz Normal file

Binary file not shown.

View File

@ -288,11 +288,13 @@ public class VpcVirtualRouterElement extends VirtualRouterElement implements Vpc
Map<Service, Map<Capability, String>> capabilities = new HashMap<Service, Map<Capability, String>>();
capabilities.putAll(VirtualRouterElement.capabilities);
Map<Capability, String> sourceNatCapabilities = capabilities.get(Service.SourceNat);
Map<Capability, String> sourceNatCapabilities = new HashMap<Capability, String>();
sourceNatCapabilities.putAll(capabilities.get(Service.SourceNat));
sourceNatCapabilities.put(Capability.RedundantRouter, "false");
capabilities.put(Service.SourceNat, sourceNatCapabilities);
Map<Capability, String> vpnCapabilities = capabilities.get(Service.Vpn);
Map<Capability, String> vpnCapabilities = new HashMap<Capability, String>();
vpnCapabilities.putAll(capabilities.get(Service.Vpn));
vpnCapabilities.put(Capability.VpnTypes, "s2svpn");
capabilities.put(Service.Vpn, vpnCapabilities);

View File

@ -462,9 +462,11 @@ public class FirewallManagerImpl implements FirewallService, FirewallManager, Ma
//remove the rule
_firewallDao.remove(rule.getId());
//if the rule is the last one for the ip address assigned to VPC, unassign it from the network
IpAddress ip = _ipAddressDao.findById(rule.getSourceIpAddressId());
_networkMgr.unassignIPFromVpcNetwork(ip.getId(), rule.getNetworkId());
if (rule.getSourceIpAddressId() != null) {
//if the rule is the last one for the ip address assigned to VPC, unassign it from the network
IpAddress ip = _ipAddressDao.findById(rule.getSourceIpAddressId());
_networkMgr.unassignIPFromVpcNetwork(ip.getId(), rule.getNetworkId());
}
}
@Override

View File

@ -891,7 +891,7 @@ public class VpcVirtualNetworkApplianceManagerImpl extends VirtualNetworkApplian
super.finalizeNetworkRulesForNetwork(cmds, router, provider, guestNetworkId);
if (router.getVpcId() == null) {
if (router.getVpcId() != null) {
if (_networkMgr.isProviderSupportServiceInNetwork(guestNetworkId, Service.NetworkACL, Provider.VPCVirtualRouter)) {
List<? extends FirewallRule> networkACLs = _networkACLMgr.listNetworkACLs(guestNetworkId);
s_logger.debug("Found " + networkACLs.size() + " network ACLs to apply as a part of VPC VR " + router

View File

@ -917,7 +917,7 @@ public class VpcManagerImpl implements VpcManager, Manager{
&& _ntwkMgr.areServicesSupportedByNetworkOffering(guestNtwkOff.getId(), Service.SourceNat))) {
throw new InvalidParameterValueException("Only networks of type " + GuestType.Isolated + " with service "
+ Service.SourceNat +
+ Service.SourceNat.getName() +
" can be added as a part of VPC", null);
}