Compare commits

..

4 Commits

Author SHA1 Message Date
norm-traxler
3df47c5914 Merge pull request #62 from Telecominfraproject/WIFI-2079-master
[WIFI-2079] change survey_interval_ms from 50ms to 120ms
2021-08-30 12:41:44 -04:00
Thomas-Leung2021
2a7d3ece55 [WIFI-2079] change survey_interval_ms from 50ms to 120ms 2021-08-30 11:20:28 -04:00
norm-traxler
fe24ece405 Merge pull request #60 from Telecominfraproject/WIFI-3471
WIFI-3471 Update SDK master to use image tag 1.3.0-SNAPSHOT
2021-08-17 16:34:01 -04:00
Mike Hansen
8af79b03c0 [WIFI-3472] AP creates a custom WAN.VLAN interface and obtains an IP address on it
Vlan Fix for Wifi_Inet_Config

Remove vlan on 'lan' interface
For vlan on 'wan' interface, set the ip_assign_scheme to "none"

Signed-off-by: Mike Hansen <mike.hansen@netexperience.com>
2021-08-13 19:46:15 -04:00
2 changed files with 4 additions and 32 deletions

View File

@@ -212,34 +212,8 @@ public class OvsdbNetworkConfig extends OvsdbDaoBase {
List<Operation> operations = new ArrayList<>(); List<Operation> operations = new ArrayList<>();
Map<String, Value> tableColumns = new HashMap<>(); Map<String, Value> tableColumns = new HashMap<>();
Map<String, WifiInetConfigInfo> inetConfigMap = ovsdbGet.getProvisionedWifiInetConfigs(ovsdbClient); Map<String, WifiInetConfigInfo> inetConfigMap = ovsdbGet.getProvisionedWifiInetConfigs(ovsdbClient);
WifiInetConfigInfo parentLanInterface = inetConfigMap.get(defaultLanInterfaceName);
if (parentLanInterface == null) {
throw new RuntimeException(
"Cannot get lan interface " + defaultLanInterfaceName + " for vlan " + vlanId);
}
tableColumns.put("if_type", new Atom<>("vlan"));
tableColumns.put("vlan_id", new Atom<>(vlanId));
tableColumns.put("if_name", new Atom<>(parentLanInterface.ifName + "_" + Integer.toString(vlanId)));
tableColumns.put("parent_ifname", new Atom<>(parentLanInterface.ifName));
tableColumns.put("enabled", new Atom<>(true));
tableColumns.put("network", new Atom<>(true));
tableColumns.put("ip_assign_scheme", new Atom<>(parentLanInterface.ipAssignScheme));
tableColumns.put("NAT", new Atom<>(parentLanInterface.nat));
tableColumns.put("mtu", new Atom<>(1500));
String[] inetAddress = parentLanInterface.inetAddr.split("\\.");
String vlanAddress = inetAddress[0] + "." + inetAddress[1] + "." + vlanId + "." + inetAddress[3];
tableColumns.put("inet_addr", new Atom<>(vlanAddress));
tableColumns.put("netmask", new Atom<>(parentLanInterface.netmask));
tableColumns.put("dhcpd", com.vmware.ovsdb.protocol.operation.notation.Map.of(parentLanInterface.dhcpd));
Row row = new Row(tableColumns); Row row = new Row(tableColumns);
if (inetConfigMap.containsKey(parentLanInterface.ifName + "_" + Integer.toString(vlanId))) {
List<Condition> conditions = new ArrayList<>();
conditions.add(new Condition("vlan_id", Function.EQUALS, new Atom<>(vlanId)));
conditions.add(new Condition("parent_ifname", Function.EQUALS, new Atom<>(parentLanInterface.ifName)));
operations.add(new Update(wifiInetConfigDbTable, conditions, row));
} else {
operations.add(new Insert(wifiInetConfigDbTable, row));
}
WifiInetConfigInfo parentWanInterface = inetConfigMap.get(defaultWanInterfaceName); WifiInetConfigInfo parentWanInterface = inetConfigMap.get(defaultWanInterfaceName);
if (parentWanInterface == null) { if (parentWanInterface == null) {
throw new RuntimeException( throw new RuntimeException(
@@ -251,8 +225,7 @@ public class OvsdbNetworkConfig extends OvsdbDaoBase {
tableColumns.put("if_name", new Atom<>(parentWanInterface.ifName + "_" + Integer.toString(vlanId))); tableColumns.put("if_name", new Atom<>(parentWanInterface.ifName + "_" + Integer.toString(vlanId)));
tableColumns.put("parent_ifname", new Atom<>(parentWanInterface.ifName)); tableColumns.put("parent_ifname", new Atom<>(parentWanInterface.ifName));
tableColumns.put("enabled", new Atom<>(true)); tableColumns.put("enabled", new Atom<>(true));
tableColumns.put("network", new Atom<>(true)); tableColumns.put("ip_assign_scheme", new Atom<>("none"));
tableColumns.put("ip_assign_scheme", new Atom<>(parentWanInterface.ipAssignScheme));
tableColumns.put("NAT", new Atom<>(parentWanInterface.nat)); tableColumns.put("NAT", new Atom<>(parentWanInterface.nat));
tableColumns.put("mtu", new Atom<>(1500)); tableColumns.put("mtu", new Atom<>(1500));
row = new Row(tableColumns); row = new Row(tableColumns);
@@ -278,8 +251,7 @@ public class OvsdbNetworkConfig extends OvsdbDaoBase {
} }
inetConfigMap = ovsdbGet.getProvisionedWifiInetConfigs(ovsdbClient); inetConfigMap = ovsdbGet.getProvisionedWifiInetConfigs(ovsdbClient);
LOG.debug("Provisioned vlan on wan {} and lan {}", LOG.debug("Provisioned vlan on wan {} and lan {}",
inetConfigMap.get(parentWanInterface.ifName + "_" + Integer.toString(vlanId)), inetConfigMap.get(parentWanInterface.ifName + "_" + Integer.toString(vlanId)));
inetConfigMap.get(parentLanInterface.ifName + "_" + Integer.toString(vlanId)));
} catch (OvsdbClientException | TimeoutException | ExecutionException | InterruptedException e) { } catch (OvsdbClientException | TimeoutException | ExecutionException | InterruptedException e) {
LOG.error("Error in provisioning Vlan", e); LOG.error("Error in provisioning Vlan", e);
throw new RuntimeException(e); throw new RuntimeException(e);

View File

@@ -352,7 +352,7 @@ public class OvsdbStatsConfig extends OvsdbDaoBase {
rowColumns.put("stats_type", new Atom<>("survey")); rowColumns.put("stats_type", new Atom<>("survey"));
rowColumns.put("survey_type", new Atom<>("off-chan")); rowColumns.put("survey_type", new Atom<>("off-chan"));
rowColumns.put("sampling_interval", new Atom<>(10)); rowColumns.put("sampling_interval", new Atom<>(10));
rowColumns.put("survey_interval_ms", new Atom<>(50)); rowColumns.put("survey_interval_ms", new Atom<>(120));
rowColumns.put("threshold", thresholds); rowColumns.put("threshold", thresholds);
Row updateRow = new Row(rowColumns); Row updateRow = new Row(rowColumns);
operations.add(new Insert(wifiStatsConfigDbTable, updateRow)); operations.add(new Insert(wifiStatsConfigDbTable, updateRow));