mirror of
https://github.com/Telecominfraproject/wlan-cloud-opensync-controller.git
synced 2026-03-21 19:39:16 +00:00
Wifi-1004: Provision gre_ifname, gre_local_inet_addr, gre_remote_inet_addr, gre_remote_mac_addr on AP
Add checks to make sure required parameters are not null before attempting to configure on AP. Required because the gre attributes are in the ApProfile now, so cannot just have check based on whether there is an attached GreProfile.
This commit is contained in:
@@ -3269,12 +3269,26 @@ public class OvsdbDao {
|
||||
Map<String, Value> tableColumns = new HashMap<>();
|
||||
|
||||
ApNetworkConfiguration details = (ApNetworkConfiguration) apNetworkConfiguration.getDetails();
|
||||
if (details.getGreParentIfName() == null) {
|
||||
LOG.info("Cannot configure GRE profile without gre_ifname");
|
||||
return;
|
||||
}
|
||||
tableColumns.put("gre_ifname", new Atom<>(details.getGreParentIfName()));
|
||||
tableColumns.put("gre_local_inet_addr", new Atom<>(details.getGreLocalInetAddr().getHostAddress()));
|
||||
if (details.getGreLocalInetAddr() != null) {
|
||||
tableColumns.put("gre_local_inet_addr", new Atom<>(details.getGreLocalInetAddr().getHostAddress()));
|
||||
}
|
||||
if (details.getGreRemoteInetAddr() == null) {
|
||||
LOG.info("Cannot configure GRE profile without gre_remote_inet_addr");
|
||||
return;
|
||||
}
|
||||
tableColumns.put("gre_remote_inet_addr", new Atom<>(details.getGreRemoteInetAddr().getHostAddress()));
|
||||
if (details.getGreRemoteMacAddr() != null) {
|
||||
tableColumns.put("gre_remote_mac_addr", new Atom<>(details.getGreRemoteMacAddr().getAddressAsString()));
|
||||
}
|
||||
if (details.getGreTunnelName() == null) {
|
||||
LOG.info("Cannot configure GRE profile without if_name");
|
||||
return;
|
||||
}
|
||||
tableColumns.put("if_name", new Atom<>(details.getGreTunnelName()));
|
||||
tableColumns.put("if_type", new Atom<>("gre"));
|
||||
tableColumns.put("network", new Atom<>(true));
|
||||
|
||||
Reference in New Issue
Block a user