use of org.onosproject.dhcprelay.config.HostAutoRelearnConfig in project onos by opennetworkinglab.
the class DhcpRelayManager method updateConfig.
/**
* Updates DHCP relay app configuration with given configuration.
*
* @param config the configuration ot update
*/
protected void updateConfig(Config config) {
if (config instanceof IndirectDhcpRelayConfig) {
IndirectDhcpRelayConfig indirectConfig = (IndirectDhcpRelayConfig) config;
v4Handler.setIndirectDhcpServerConfigs(indirectConfig.dhcpServerConfigs());
v6Handler.setIndirectDhcpServerConfigs(indirectConfig.dhcpServerConfigs());
} else if (config instanceof DefaultDhcpRelayConfig) {
DefaultDhcpRelayConfig defaultConfig = (DefaultDhcpRelayConfig) config;
v4Handler.setDefaultDhcpServerConfigs(defaultConfig.dhcpServerConfigs());
v6Handler.setDefaultDhcpServerConfigs(defaultConfig.dhcpServerConfigs());
}
if (config instanceof IgnoreDhcpConfig) {
v4Handler.updateIgnoreVlanConfig((IgnoreDhcpConfig) config);
v6Handler.updateIgnoreVlanConfig((IgnoreDhcpConfig) config);
}
if (config instanceof HostAutoRelearnConfig) {
setHostAutoRelearnConfig((HostAutoRelearnConfig) config);
}
}
use of org.onosproject.dhcprelay.config.HostAutoRelearnConfig in project onos by opennetworkinglab.
the class DhcpRelayManager method updateConfig.
/**
* Updates DHCP relay app configuration.
*/
private void updateConfig() {
DefaultDhcpRelayConfig defaultConfig = cfgService.getConfig(appId, DefaultDhcpRelayConfig.class);
IndirectDhcpRelayConfig indirectConfig = cfgService.getConfig(appId, IndirectDhcpRelayConfig.class);
IgnoreDhcpConfig ignoreDhcpConfig = cfgService.getConfig(appId, IgnoreDhcpConfig.class);
HostAutoRelearnConfig hostAutoRelearnConfig = cfgService.getConfig(appId, HostAutoRelearnConfig.class);
if (defaultConfig != null) {
updateConfig(defaultConfig);
}
if (indirectConfig != null) {
updateConfig(indirectConfig);
}
if (ignoreDhcpConfig != null) {
updateConfig(ignoreDhcpConfig);
}
if (hostAutoRelearnConfig != null) {
updateConfig(hostAutoRelearnConfig);
}
}
Aggregations