mirror of
https://github.com/apache/cloudstack.git
synced 2025-11-03 04:12:31 +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
|
@Override
|
||||||
public boolean verifyServicesCombination(List<String> services) {
|
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;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user