mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
NaaS: Enforce the checking of VirtualRouterElement
If SourceNAT is not provided, VirtualRouter wouldn't provide firewall, portforwarding, loadbalance, static Nat and VPN service as well.
This commit is contained in:
parent
c5292de0ae
commit
f3df18aa9b
@ -635,6 +635,13 @@ public class VirtualRouterElement extends AdapterBase implements VirtualRouterEl
|
||||
|
||||
@Override
|
||||
public boolean verifyServicesCombination(List<String> services) {
|
||||
if (!services.contains("SourceNat")) {
|
||||
if (services.contains("StaticNat") || services.contains("Firewall") || services.contains("Lb") || services.contains("PortForwarding") ||
|
||||
services.contains("Vpn")) {
|
||||
s_logger.warn("Virtual router can't enable services " + services + " without source NAT service");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user