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

Conflicts:

	server/src/com/cloud/network/vpc/VpcManagerImpl.java
This commit is contained in:
Alena Prokharchyk 2012-07-26 09:41:18 -07:00
parent 110903a91a
commit 190329286c
5 changed files with 11 additions and 8 deletions

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

Binary file not shown.

View File

@ -287,11 +287,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

@ -455,9 +455,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

@ -881,7 +881,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

@ -893,8 +893,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 +
" can be added as a part of VPC");
+ Service.SourceNat + " can be added as a part of VPC");
}
//3) No redundant router support