diff --git a/opensync-gateway-cloud-docker/src/main/docker/app/run.sh b/opensync-gateway-cloud-docker/src/main/docker/app/run.sh index 726173b..7f2b8ca 100755 --- a/opensync-gateway-cloud-docker/src/main/docker/app/run.sh +++ b/opensync-gateway-cloud-docker/src/main/docker/app/run.sh @@ -30,7 +30,8 @@ MQTT_PROPS=" " MQTT_PROPS+=" -Dconnectus.mqttBroker.address=$MQTT_BROKER_HOST" MQTT_PROPS+=" -Dconnectus.mqttBroker.listenPort=1883" -LOGGING_PROPS=" -Dlogging.config=file:/app/opensync/logback.xml" +LOGBACK_CONFIG_FILE="${LOGBACK_CONFIG_FILE:=/app/opensync/logback.xml}" +LOGGING_PROPS=" -Dlogging.config=file:$LOGBACK_CONFIG_FILE" RESTAPI_PROPS=" " RESTAPI_PROPS+=" -Dserver.port=443 -Dtip.wlan.secondaryPort=444" @@ -59,9 +60,11 @@ then fi DEFAULT_BRIDGE="${DEFAULT_BRIDGE:=br-lan}" +AUTO_PROV_CUSTOMER_ID="${AUTO_PROV_CUSTOMER_ID:=2}" PROV_PROPS=" " PROV_PROPS+=" -Dconnectus.ovsdb.wifi-iface.default_bridge=$DEFAULT_BRIDGE" +PROV_PROPS+=" -Dconnectus.ovsdb.autoProvisionedCustomerId=$AUTO_PROV_CUSTOMER_ID" export ALL_PROPS="$PROFILES $SSL_PROPS $CLIENT_MQTT_SSL_PROPS $OVSDB_PROPS $MQTT_PROPS $LOGGING_PROPS $RESTAPI_PROPS $SPRING_EXTRA_PROPS $HOST_PROPS $PROV_PROPS" diff --git a/opensync-gateway/src/main/java/com/telecominfraproject/wlan/opensync/ovsdb/dao/OvsdbDao.java b/opensync-gateway/src/main/java/com/telecominfraproject/wlan/opensync/ovsdb/dao/OvsdbDao.java index a2b6be0..8a20227 100644 --- a/opensync-gateway/src/main/java/com/telecominfraproject/wlan/opensync/ovsdb/dao/OvsdbDao.java +++ b/opensync-gateway/src/main/java/com/telecominfraproject/wlan/opensync/ovsdb/dao/OvsdbDao.java @@ -1,6 +1,7 @@ package com.telecominfraproject.wlan.opensync.ovsdb.dao; import java.util.ArrayList; +import java.util.Collections; import java.util.HashMap; import java.util.HashSet; import java.util.List; @@ -930,6 +931,9 @@ public class OvsdbDao { WifiStatsConfigInfo wifiStatsConfigInfo = new WifiStatsConfigInfo(); wifiStatsConfigInfo.channelList = row.getSetColumn("channel_list"); + if(wifiStatsConfigInfo.channelList==null) { + wifiStatsConfigInfo.channelList = Collections.emptySet(); + } wifiStatsConfigInfo.radioType = row.getStringColumn("radio_type"); wifiStatsConfigInfo.reportingInterval = row.getIntegerColumn("reporting_interval").intValue(); wifiStatsConfigInfo.samplingInterval = row.getIntegerColumn("sampling_interval").intValue(); @@ -2545,6 +2549,18 @@ public class OvsdbDao { com.vmware.ovsdb.protocol.operation.notation.Set channels5gu = com.vmware.ovsdb.protocol.operation.notation.Set .of(allowedChannels.get("5GU")); + if(channels2g == null) { + channels2g = com.vmware.ovsdb.protocol.operation.notation.Set.of(Collections.emptySet()); + } + + if(channels5gl == null) { + channels5gl= com.vmware.ovsdb.protocol.operation.notation.Set.of(Collections.emptySet()); + } + + if(channels5gu == null) { + channels5gu= com.vmware.ovsdb.protocol.operation.notation.Set.of(Collections.emptySet()); + } + if (!provisionedWifiStatsConfigs.containsKey("2.4G_neighbor_off-chan")) { updateColumns = new HashMap<>(); updateColumns.put("channel_list", channels2g); @@ -2612,6 +2628,18 @@ public class OvsdbDao { com.vmware.ovsdb.protocol.operation.notation.Set channels5gu = com.vmware.ovsdb.protocol.operation.notation.Set .of(allowedChannels.get("5GU")); + + if(channels2g == null) { + channels2g = com.vmware.ovsdb.protocol.operation.notation.Set.of(Collections.emptySet()); + } + + if(channels5gl == null) { + channels5gl= com.vmware.ovsdb.protocol.operation.notation.Set.of(Collections.emptySet()); + } + + if(channels5gu == null) { + channels5gu= com.vmware.ovsdb.protocol.operation.notation.Set.of(Collections.emptySet()); + } Map updateColumns; Row row;