mirror of
https://github.com/apache/cloudstack.git
synced 2025-11-03 04:12:31 +01:00
Added config to enable/disable router version check
This commit is contained in:
parent
79dc74dcb8
commit
700184f3ba
@ -665,6 +665,10 @@ public class VirtualNetworkApplianceManagerImpl extends ManagerBase implements V
|
||||
static final ConfigKey<Boolean> UseExternalDnsServers = new ConfigKey<Boolean>(Boolean.class, "use.external.dns", "Advanced", "false",
|
||||
"Bypass internal dns, use external dns1 and dns2", true, ConfigKey.Scope.Zone, null);
|
||||
|
||||
static final ConfigKey<Boolean> routerVersionCheckEnabled = new ConfigKey<Boolean>("Advanced", Boolean.class, "router.version.check", "true",
|
||||
"If true, router minimum required version is checked before sending command", false);
|
||||
|
||||
|
||||
@Override
|
||||
public boolean configure(final String name, final Map<String, Object> params) throws ConfigurationException {
|
||||
|
||||
@ -4156,6 +4160,10 @@ public class VirtualNetworkApplianceManagerImpl extends ManagerBase implements V
|
||||
//Checks if the router is at the required version
|
||||
// Compares MS version and router version
|
||||
private boolean checkRouterVersion(VirtualRouter router){
|
||||
if(!routerVersionCheckEnabled.value()){
|
||||
//Router version check is disabled.
|
||||
return true;
|
||||
}
|
||||
if(router.getTemplateVersion() == null){
|
||||
return false;
|
||||
}
|
||||
@ -4198,6 +4206,6 @@ public class VirtualNetworkApplianceManagerImpl extends ManagerBase implements V
|
||||
|
||||
@Override
|
||||
public ConfigKey<?>[] getConfigKeys() {
|
||||
return new ConfigKey<?>[] {UseExternalDnsServers};
|
||||
return new ConfigKey<?>[] {UseExternalDnsServers, routerVersionCheckEnabled};
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user