mirror of
https://github.com/Telecominfraproject/wlan-cloud-opensync-controller.git
synced 2025-11-01 02:57:49 +00:00
Revert back to using VIF if mapping based on radio band vs radio number until AP changes to support otherwise are present
This commit is contained in:
@@ -21,5 +21,5 @@
|
||||
<stringAttribute key="org.eclipse.jdt.launching.MODULE_NAME" value="opensync-gateway-cloud-process"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="opensync-gateway-cloud-process"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.m2e.launchconfig.sourcepathProvider"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="--add-opens java.base/java.lang=ALL-UNNAMED -Dssl.props=file://${project_loc:opensync-gateway-cloud-process}/src/main/resources/app/certs/ssl.properties -Dtip.wlan.httpClientConfig=file://${project_loc:opensync-gateway-cloud-process}/src/main/resources/app/certs/httpClientConfig.json -Djavax.net.ssl.keyStore=${tip_wlan_service_certs}/client_keystore.jks -Djavax.net.ssl.keyStorePassword=mypassword -Djavax.net.ssl.trustStore=${tip_wlan_service_certs}/truststore.jks -Djavax.net.ssl.trustStorePassword=mypassword -Dtip.wlan.ovsdb.managerAddr=${local_server_address} -Dtip.wlan.ovsdb.listenPort=6640 -Dtip.wlan.ovsdb.redirector.listenPort=6643 -Dtip.wlan.ovsdb.timeoutSec=30 -Dtip.wlan.ovsdb.trustStore=${tip_wlan_service_certs}/truststore.jks -Dtip.wlan.ovsdb.keyStore=${tip_wlan_service_certs}/server.pkcs12 -Dtip.wlan.mqttBroker.address.internal=${local_server_address} -Dtip.wlan.mqttBroker.address.external=${local_server_address} -Dtip.wlan.mqttBroker.listenPort=1883 -Dtip.wlan.ovsdb.wifi-iface.default_bridge=br-lan -Dtip.wlan.introspectTokenApi.host=${local_server_address}:9096 -Dtip.wlan.introspectTokenApi.clientToken=token_placeholder -Dtip.wlan.ovsdb.autoProvisionedCustomerId=2 -Dtip.wlan.ovsdb.autoProvisionedSsid=TipWlan-cloud -Dserver.port=9096 -Dtip.wlan.secondaryPort=7071 -Dspring.profiles.include=opensync_cloud_config,mqtt_receiver,ovsdb_redirector,ovsdb_manager"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="--add-opens java.base/java.lang=ALL-UNNAMED -Dssl.props=file://${project_loc:opensync-gateway-cloud-process}/src/main/resources/app/certs/ssl.properties -Dtip.wlan.httpClientConfig=file://${project_loc:opensync-gateway-cloud-process}/src/main/resources/app/certs/httpClientConfig.json -Djavax.net.ssl.keyStore=${tip_wlan_service_certs}/client_keystore.jks -Djavax.net.ssl.keyStorePassword=mypassword -Djavax.net.ssl.trustStore=${tip_wlan_service_certs}/truststore.jks -Djavax.net.ssl.trustStorePassword=mypassword -Dtip.wlan.ovsdb.managerAddr=${local_server_address} -Dtip.wlan.ovsdb.listenPort=6640 -Dtip.wlan.ovsdb.redirector.listenPort=6643 -Dtip.wlan.ovsdb.timeoutSec=30 -Dtip.wlan.ovsdb.trustStore=${tip_wlan_service_certs}/truststore.jks -Dtip.wlan.ovsdb.keyStore=${tip_wlan_service_certs}/server.pkcs12 -Dtip.wlan.mqttBroker.address.internal=${mqtt_broker_address} -Dtip.wlan.mqttBroker.address.external=${mqtt_broker_address} -Dtip.wlan.mqttBroker.listenPort=1883 -Dtip.wlan.ovsdb.wifi-iface.default_bridge=lan -Dtip.wlan.introspectTokenApi.host=${local_server_address}:9096 -Dtip.wlan.introspectTokenApi.clientToken=token_placeholder -Dtip.wlan.ovsdb.autoProvisionedCustomerId=2 -Dtip.wlan.ovsdb.autoProvisionedSsid=TipWlan-cloud -Dserver.port=9096 -Dtip.wlan.secondaryPort=7071 -Dspring.profiles.include=opensync_cloud_config,mqtt_receiver,ovsdb_redirector,ovsdb_manager"/>
|
||||
</launchConfiguration>
|
||||
|
||||
@@ -39,12 +39,14 @@ OVSDB_RADIUSPROFILE_CONFIG_FILE="${OVSDB_RADIUSPROFILE_CONFIG_FILE:=/app/opensyn
|
||||
|
||||
OVSDB_IF_DEFAULT_BRIDGE="${OVSDB_IF_DEFAULT_BRIDGE:=br-home}"
|
||||
echo $OVSDB_IF_DEFAULT_BRIDGE
|
||||
OVSDB_IF_DEFAULT_RADIO_0="${OVSDB_IF_DEFAULT_RADIO_0:=home-ap-24}"
|
||||
echo $OVSDB_IF_DEFAULT_RADIO_0
|
||||
OVSDB_IF_DEFAULT_RADIO_1="${OVSDB_IF_DEFAULT_RADIO_1:=home-ap-l50}"
|
||||
echo $OVSDB_IF_DEFAULT_RADIO_1
|
||||
OVSDB_IF_DEFAULT_RADIO_2="${OVSDB_IF_DEFAULT_RADIO_2:=home-ap-u50}"
|
||||
echo $OVSDB_IF_DEFAULT_RADIO_2
|
||||
OVSDB_IF_DEFAULT_RADIO_2G="${OVSDB_IF_DEFAULT_RADIO_2G:=home-ap-24}"
|
||||
echo $OVSDB_IF_DEFAULT_RADIO_2G
|
||||
OVSDB_IF_DEFAULT_RADIO_5GL="${OVSDB_IF_DEFAULT_RADIO_5GL:=home-ap-l50}"
|
||||
echo $OVSDB_IF_DEFAULT_RADIO_5GL
|
||||
OVSDB_IF_DEFAULT_RADIO_5GU="${OVSDB_IF_DEFAULT_RADIO_5GU:=home-ap-u50}"
|
||||
echo $OVSDB_IF_DEFAULT_RADIO_5GU
|
||||
OVSDB_IF_DEFAULT_RADIO_5G="${OVSDB_IF_DEFAULT_RADIO_5GU:=home-ap-50}"
|
||||
echo $OVSDB_IF_DEFAULT_RADIO_5G
|
||||
OVSDB_DEVICE_DEFAULT_WAN_TYPE="${OVSDB_DEVICE_DEFAULT_WAN_TYPE:=eth}"
|
||||
echo $OVSDB_DEVICE_DEFAULT_WAN_TYPE
|
||||
OVSDB_DEVICE_DEFAULT_WAN_NAME="${OVSDB_DEVICE_DEFAULT_WAN_NAME:=eth1}"
|
||||
@@ -136,9 +138,10 @@ OVSDB_PROPS="$OVSDB_PROPS -Dtip.wlan.ovsdb.wifi-iface.default_wan_type=$OVSDB_DE
|
||||
OVSDB_PROPS="$OVSDB_PROPS -Dtip.wlan.ovsdb.wifi-iface.default_wan_name=$OVSDB_DEVICE_DEFAULT_WAN_NAME"
|
||||
OVSDB_PROPS="$OVSDB_PROPS -Dtip.wlan.ovsdb.wifi-iface.default_lan_type=$OVSDB_DEVICE_DEFAULT_LAN_TYPE"
|
||||
OVSDB_PROPS="$OVSDB_PROPS -Dtip.wlan.ovsdb.wifi-iface.default_lan_name=$OVSDB_DEVICE_DEFAULT_LAN_NAME"
|
||||
OVSDB_PROPS="$OVSDB_PROPS -Dtip.wlan.ovsdb.wifi-iface.default_radio0=$OVSDB_IF_DEFAULT_RADIO_0"
|
||||
OVSDB_PROPS="$OVSDB_PROPS -Dtip.wlan.ovsdb.wifi-iface.default_radio1=$OVSDB_IF_DEFAULT_RADIO_1"
|
||||
OVSDB_PROPS="$OVSDB_PROPS -Dtip.wlan.ovsdb.wifi-iface.default_radio2=$OVSDB_IF_DEFAULT_RADIO_2"
|
||||
OVSDB_PROPS="$OVSDB_PROPS -Dtip.wlan.ovsdb.wifi-iface.default_radio2g=$OVSDB_IF_DEFAULT_RADIO_2G"
|
||||
OVSDB_PROPS="$OVSDB_PROPS -Dtip.wlan.ovsdb.wifi-iface.default_radio5gl=$OVSDB_IF_DEFAULT_RADIO_5GL"
|
||||
OVSDB_PROPS="$OVSDB_PROPS -Dtip.wlan.ovsdb.wifi-iface.default_radio5gu=$OVSDB_IF_DEFAULT_RADIO_5GU"
|
||||
OVSDB_PROPS="$OVSDB_PROPS -Dtip.wlan.ovsdb.wifi-iface.default_radio5g=$OVSDB_IF_DEFAULT_RADIO_5G"
|
||||
|
||||
echo OVSDB_PROPS $OVSDB_PROPS
|
||||
|
||||
|
||||
@@ -29,9 +29,10 @@ OVSDB_PROPS+=" -Dtip.wlan.ovsdb.wifi-iface.default_wan_type=$OVSDB_DEVICE_DEFAUL
|
||||
OVSDB_PROPS+=" -Dtip.wlan.ovsdb.wifi-iface.default_wan_name=$OVSDB_DEVICE_DEFAULT_WAN_NAME"
|
||||
OVSDB_PROPS+=" -Dtip.wlan.ovsdb.wifi-iface.default_lan_type=$OVSDB_DEVICE_DEFAULT_LAN_TYPE"
|
||||
OVSDB_PROPS+=" -Dtip.wlan.ovsdb.wifi-iface.default_lan_name=$OVSDB_DEVICE_DEFAULT_LAN_NAME"
|
||||
OVSDB_PROPS+=" -Dtip.wlan.ovsdb.wifi-iface.default_radio0=$OVSDB_IF_DEFAULT_RADIO_0"
|
||||
OVSDB_PROPS+=" -Dtip.wlan.ovsdb.wifi-iface.default_radio1=$OVSDB_IF_DEFAULT_RADIO_1"
|
||||
OVSDB_PROPS+=" -Dtip.wlan.ovsdb.wifi-iface.default_radio2=$OVSDB_IF_DEFAULT_RADIO_2"
|
||||
OVSDB_PROPS+=" -Dtip.wlan.ovsdb.wifi-iface.default_radio2g=$OVSDB_IF_DEFAULT_RADIO_2G"
|
||||
OVSDB_PROPS+=" -Dtip.wlan.ovsdb.wifi-iface.default_radio5gl=$OVSDB_IF_DEFAULT_RADIO_5GL"
|
||||
OVSDB_PROPS+=" -Dtip.wlan.ovsdb.wifi-iface.default_radio5gu=$OVSDB_IF_DEFAULT_RADIO_5GU"
|
||||
OVSDB_PROPS+=" -Dtip.wlan.ovsdb.wifi-iface.default_radio5g=$OVSDB_IF_DEFAULT_RADIO_5G"
|
||||
|
||||
echo OVSDB_PROPS $OVSDB_PROPS
|
||||
|
||||
|
||||
@@ -14,5 +14,5 @@
|
||||
<stringAttribute key="org.eclipse.jdt.launching.MODULE_NAME" value="opensync-gateway-static-process"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="opensync-gateway-static-process"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.m2e.launchconfig.sourcepathProvider"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="--add-opens java.base/java.lang=ALL-UNNAMED -Dssl.props=file://${project_loc:opensync-gateway-static-process}/src/main/resources/app/certs/ssl.properties -Dtip.wlan.httpClientConfig=file://${project_loc:opensync-gateway-static-process}/src/main/resources/app/certs/httpClientConfig.json -Djavax.net.ssl.keyStore=${tip_wlan_service_certs}/client_keystore.jks -Djavax.net.ssl.keyStorePassword=mypassword -Djavax.net.ssl.trustStore=${tip_wlan_service_certs}/truststore.jks -Djavax.net.ssl.trustStorePassword=mypassword -Dtip.wlan.ovsdb.managerAddr=${local_server_address} -Dtip.wlan.ovsdb.listenPort=6640 -Dtip.wlan.ovsdb.redirector.listenPort=6643 -Dtip.wlan.ovsdb.timeoutSec=30 -Dtip.wlan.ovsdb.trustStore=${tip_wlan_service_certs}/truststore.jks -Dtip.wlan.ovsdb.keyStore=${tip_wlan_service_certs}/server.pkcs12 -Dtip.wlan.ovsdb.customerEquipmentFileName=${project_loc:opensync-ext-static}/src/main/resources/EquipmentExample.json -Dtip.wlan.ovsdb.apProfileFileName=${project_loc:opensync-ext-static}/src/main/resources/ProfileAPExample.json -Dtip.wlan.ovsdb.ssidProfileFileName=${project_loc:opensync-ext-static}/src/main/resources/ProfileSsid.json -Dtip.wlan.ovsdb.locationFileName=${project_loc:opensync-ext-static}/src/main/resources/LocationBuildingExample.json -Dtip.wlan.ovsdb.radiusProfileFileName=${project_loc:opensync-ext-static}/src/main/resources/ProfileRadius.json -Dtip.wlan.ovsdb.captiveProfileFileName=${project_loc:opensync-ext-static}/src/main/resources/ProfileCaptive.json -Dtip.wlan.mqttBroker.address.internal=${local_server_address} -Dtip.wlan.mqttBroker.address.external=${local_server_address} -Dtip.wlan.mqttBroker.listenPort=1883 -Dtip.wlan.ovsdb.wifi-iface.default_radio0=home-ap-24 -Dtip.wlan.ovsdb.wifi-iface.default_radio1=home-ap-l50 -Dtip.wlan.ovsdb.wifi-iface.default_radio2=home-ap-u50 -Dtip.wlan.ovsdb.wifi-iface.default_wan_type=eth -Dtip.wlan.ovsdb.wifi-iface.default_wan_name=eth1 -Dtip.wlan.ovsdb.wifi-iface.default_lan_type=bridge -Dtip.wlan.ovsdb.wifi-iface.default_lan_name=lan -Dspring.profiles.include=use_ssl,use_webtoken_auth,use_single_ds,RestTemplateConfiguration_X509_client_cert_auth,opensync_static_config,mqtt_receiver,ovsdb_redirector,ovsdb_manager"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="--add-opens java.base/java.lang=ALL-UNNAMED -Dssl.props=file://${project_loc:opensync-gateway-static-process}/src/main/resources/app/certs/ssl.properties -Dtip.wlan.httpClientConfig=file://${project_loc:opensync-gateway-static-process}/src/main/resources/app/certs/httpClientConfig.json -Djavax.net.ssl.keyStore=${tip_wlan_service_certs}/client_keystore.jks -Djavax.net.ssl.keyStorePassword=mypassword -Djavax.net.ssl.trustStore=${tip_wlan_service_certs}/truststore.jks -Djavax.net.ssl.trustStorePassword=mypassword -Dtip.wlan.ovsdb.managerAddr=${local_server_address} -Dtip.wlan.ovsdb.listenPort=6640 -Dtip.wlan.ovsdb.redirector.listenPort=6643 -Dtip.wlan.ovsdb.timeoutSec=30 -Dtip.wlan.ovsdb.trustStore=${tip_wlan_service_certs}/truststore.jks -Dtip.wlan.ovsdb.keyStore=${tip_wlan_service_certs}/server.pkcs12 -Dtip.wlan.ovsdb.customerEquipmentFileName=${project_loc:opensync-ext-static}/src/main/resources/EquipmentExample.json -Dtip.wlan.ovsdb.apProfileFileName=${project_loc:opensync-ext-static}/src/main/resources/ProfileAPExample.json -Dtip.wlan.ovsdb.ssidProfileFileName=${project_loc:opensync-ext-static}/src/main/resources/ProfileSsid.json -Dtip.wlan.ovsdb.locationFileName=${project_loc:opensync-ext-static}/src/main/resources/LocationBuildingExample.json -Dtip.wlan.ovsdb.radiusProfileFileName=${project_loc:opensync-ext-static}/src/main/resources/ProfileRadius.json -Dtip.wlan.ovsdb.captiveProfileFileName=${project_loc:opensync-ext-static}/src/main/resources/ProfileCaptive.json -Dtip.wlan.mqttBroker.address.internal=${local_server_address} -Dtip.wlan.mqttBroker.address.external=${local_server_address} -Dtip.wlan.mqttBroker.listenPort=1883 -Dtip.wlan.ovsdb.wifi-iface.default_radio2g=home-ap-24 -Dtip.wlan.ovsdb.wifi-iface.default_radio5gl=home-ap-l50 -Dtip.wlan.ovsdb.wifi-iface.default_radio5gu=home-ap-u50 -Dtip.wlan.ovsdb.wifi-iface.default_radio5g=home-ap-50 -Dtip.wlan.ovsdb.wifi-iface.default_wan_type=eth -Dtip.wlan.ovsdb.wifi-iface.default_wan_name=eth1 -Dtip.wlan.ovsdb.wifi-iface.default_lan_type=bridge -Dtip.wlan.ovsdb.wifi-iface.default_lan_name=lan -Dspring.profiles.include=use_ssl,use_webtoken_auth,use_single_ds,RestTemplateConfiguration_X509_client_cert_auth,opensync_static_config,mqtt_receiver,ovsdb_redirector,ovsdb_manager"/>
|
||||
</launchConfiguration>
|
||||
|
||||
@@ -565,9 +565,7 @@ public class TipWlanOvsdbClient implements OvsdbClientInterface {
|
||||
|
||||
});
|
||||
|
||||
List<OpensyncAPVIFState> vifStates = ovsdbDao.getOpensyncAPVIFState(vsCf.join(), key, ovsdbClient);
|
||||
LOG.info("Calling wifiVIFStateDbTableUpdate init for {}, {}", vifStates, key);
|
||||
extIntegrationInterface.wifiVIFStateDbTableUpdate(vifStates, key);
|
||||
extIntegrationInterface.wifiVIFStateDbTableUpdate(ovsdbDao.getOpensyncAPVIFState(vsCf.join(), key, ovsdbClient), key);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -108,18 +108,20 @@ public class OvsdbDao {
|
||||
public String defaultLanInterfaceType;
|
||||
@org.springframework.beans.factory.annotation.Value("${tip.wlan.ovsdb.wifi-iface.default_lan_type:lan}")
|
||||
public String defaultLanInterfaceName;
|
||||
|
||||
|
||||
@org.springframework.beans.factory.annotation.Value("${tip.wlan.ovsdb.wifi-iface.default_wan_type:eth}")
|
||||
public String defaultWanInterfaceType;
|
||||
@org.springframework.beans.factory.annotation.Value("${tip.wlan.ovsdb.wifi-iface.default_wan_name:eth1}")
|
||||
public String defaultWanInterfaceName;
|
||||
|
||||
@org.springframework.beans.factory.annotation.Value("${tip.wlan.ovsdb.wifi-iface.default_radio0:home-ap-24}")
|
||||
public String defaultRadio0;
|
||||
@org.springframework.beans.factory.annotation.Value("${tip.wlan.ovsdb.wifi-iface.default_radio1:home-ap-l50}")
|
||||
public String defaultRadio1;
|
||||
@org.springframework.beans.factory.annotation.Value("${tip.wlan.ovsdb.wifi-iface.default_radio2:home-ap-u50}")
|
||||
public String defaultRadio2;
|
||||
|
||||
@org.springframework.beans.factory.annotation.Value("${tip.wlan.ovsdb.wifi-iface.default_radio2g:home-ap-24}")
|
||||
public String defaultRadio2g;
|
||||
@org.springframework.beans.factory.annotation.Value("${tip.wlan.ovsdb.wifi-iface.default_radio5gl:home-ap-l50}")
|
||||
public String defaultRadio5gl;
|
||||
@org.springframework.beans.factory.annotation.Value("${tip.wlan.ovsdb.wifi-iface.default_radio5gu:home-ap-u50}")
|
||||
public String defaultRadio5gu;
|
||||
@org.springframework.beans.factory.annotation.Value("${tip.wlan.ovsdb.wifi-iface.default_radio5g:home-ap-50}")
|
||||
public String defaultRadio5g;
|
||||
|
||||
@org.springframework.beans.factory.annotation.Value("${tip.wlan.ovsdb.wifi-device.radio0:wifi0}")
|
||||
public String radio0;
|
||||
@@ -135,7 +137,7 @@ public class OvsdbDao {
|
||||
public long upgradeDlTimerSeconds;
|
||||
@org.springframework.beans.factory.annotation.Value("${tip.wlan.ovsdb.awlan-node.upgrade_timer:90}")
|
||||
public long upgradeTimerSeconds;
|
||||
|
||||
|
||||
@org.springframework.beans.factory.annotation.Value("${tip.wlan.fileStoreDirectory:/tmp/tip-wlan-filestore}")
|
||||
private String fileStoreDirectory;
|
||||
@org.springframework.beans.factory.annotation.Value("${tip.wlan.externalFileStoreURL:https://localhost:9096}")
|
||||
@@ -486,7 +488,7 @@ public class OvsdbDao {
|
||||
if ((ret.mqttSettings == null) || !ret.mqttSettings.equals(newMqttSettings)) {
|
||||
@SuppressWarnings("unchecked")
|
||||
com.vmware.ovsdb.protocol.operation.notation.Map<String, String> mgttSettings = com.vmware.ovsdb.protocol.operation.notation.Map
|
||||
.of(newMqttSettings);
|
||||
.of(newMqttSettings);
|
||||
ret.mqttSettings = newMqttSettings;
|
||||
updateColumns.put("mqtt_settings", mgttSettings);
|
||||
}
|
||||
@@ -1140,7 +1142,7 @@ public class OvsdbDao {
|
||||
if (ftPsk != null) {
|
||||
wifiVifConfigInfo.ftPsk = ftPsk.intValue();
|
||||
}
|
||||
|
||||
|
||||
Long ftMobilityDomain = getSingleValueFromSet(row, "ft_mobility_domain");
|
||||
if (ftMobilityDomain != null) {
|
||||
wifiVifConfigInfo.ftMobilityDomain = ftMobilityDomain.intValue();
|
||||
@@ -1358,7 +1360,7 @@ public class OvsdbDao {
|
||||
String interfaceType, Map<String, String> interfaceOptions,
|
||||
Map<String, InterfaceInfo> provisionedInterfaces, Map<String, PortInfo> provisionedPorts,
|
||||
Map<String, BridgeInfo> provisionedBridges)
|
||||
throws OvsdbClientException, TimeoutException, ExecutionException, InterruptedException {
|
||||
throws OvsdbClientException, TimeoutException, ExecutionException, InterruptedException {
|
||||
|
||||
LOG.debug("InterfaceName {} BridgeName {} InterfaceType {}", interfaceName, bridgeName, interfaceType);
|
||||
if (!provisionedInterfaces.containsKey(interfaceName)) {
|
||||
@@ -1380,7 +1382,7 @@ public class OvsdbDao {
|
||||
if (interfaceOptions != null) {
|
||||
@SuppressWarnings("unchecked")
|
||||
com.vmware.ovsdb.protocol.operation.notation.Map<String, String> ifOptions = com.vmware.ovsdb.protocol.operation.notation.Map
|
||||
.of(interfaceOptions);
|
||||
.of(interfaceOptions);
|
||||
updateColumns.put("options", ifOptions);
|
||||
}
|
||||
|
||||
@@ -1562,11 +1564,13 @@ public class OvsdbDao {
|
||||
provisionedInterfaces, provisionedPorts, provisionedBridges);
|
||||
provisionSingleBridgePortInterface(ovsdbClient, patchW2h, defaultWanInterfaceType, "patch", patchW2hOptions,
|
||||
provisionedInterfaces, provisionedPorts, provisionedBridges);
|
||||
provisionSingleBridgePortInterface(ovsdbClient, defaultRadio0, bridgeNameVifInterfaces, "vif", null,
|
||||
provisionSingleBridgePortInterface(ovsdbClient, defaultRadio2g, bridgeNameVifInterfaces, "vif", null,
|
||||
provisionedInterfaces, provisionedPorts, provisionedBridges);
|
||||
provisionSingleBridgePortInterface(ovsdbClient, defaultRadio1, bridgeNameVifInterfaces, "vif", null,
|
||||
provisionSingleBridgePortInterface(ovsdbClient, defaultRadio5gl, bridgeNameVifInterfaces, "vif", null,
|
||||
provisionedInterfaces, provisionedPorts, provisionedBridges);
|
||||
provisionSingleBridgePortInterface(ovsdbClient, defaultRadio2, bridgeNameVifInterfaces, "vif", null,
|
||||
provisionSingleBridgePortInterface(ovsdbClient, defaultRadio5gu, bridgeNameVifInterfaces, "vif", null,
|
||||
provisionedInterfaces, provisionedPorts, provisionedBridges);
|
||||
provisionSingleBridgePortInterface(ovsdbClient, defaultRadio5g, bridgeNameVifInterfaces, "vif", null,
|
||||
provisionedInterfaces, provisionedPorts, provisionedBridges);
|
||||
|
||||
} catch (OvsdbClientException | TimeoutException | ExecutionException | InterruptedException e) {
|
||||
@@ -1653,9 +1657,9 @@ public class OvsdbDao {
|
||||
public void configureWifiRadios(OvsdbClient ovsdbClient, OpensyncAPConfig opensyncAPConfig) {
|
||||
|
||||
String country = opensyncAPConfig.getCountryCode(); // should be the
|
||||
// same for all
|
||||
// radios on this AP
|
||||
// ;-)
|
||||
// same for all
|
||||
// radios on this AP
|
||||
// ;-)
|
||||
|
||||
ApElementConfiguration apElementConfiguration = (ApElementConfiguration) opensyncAPConfig.getCustomerEquipment()
|
||||
.getDetails();
|
||||
@@ -2180,7 +2184,7 @@ public class OvsdbDao {
|
||||
|
||||
public void configureWifiRadios(OvsdbClient ovsdbClient, String freqBand, int channel, Map<String, String> hwConfig,
|
||||
String country, int beaconInterval, boolean enabled, String ht_mode, int txPower)
|
||||
throws OvsdbClientException, TimeoutException, ExecutionException, InterruptedException {
|
||||
throws OvsdbClientException, TimeoutException, ExecutionException, InterruptedException {
|
||||
|
||||
List<Operation> operations = new ArrayList<>();
|
||||
Map<String, Value> updateColumns = new HashMap<>();
|
||||
@@ -2191,7 +2195,7 @@ public class OvsdbDao {
|
||||
updateColumns.put("country", new Atom<>(country));
|
||||
@SuppressWarnings("unchecked")
|
||||
com.vmware.ovsdb.protocol.operation.notation.Map<String, String> hwConfigMap = com.vmware.ovsdb.protocol.operation.notation.Map
|
||||
.of(hwConfig);
|
||||
.of(hwConfig);
|
||||
updateColumns.put("hw_config", hwConfigMap);
|
||||
updateColumns.put("bcn_int", new Atom<>(beaconInterval));
|
||||
updateColumns.put("enabled", new Atom<>(enabled));
|
||||
@@ -2272,7 +2276,7 @@ public class OvsdbDao {
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
com.vmware.ovsdb.protocol.operation.notation.Map<String, String> securityMap = com.vmware.ovsdb.protocol.operation.notation.Map
|
||||
.of(security);
|
||||
.of(security);
|
||||
updateColumns.put("security", securityMap);
|
||||
|
||||
updateBlockList(updateColumns, macBlockList);
|
||||
@@ -2351,7 +2355,7 @@ public class OvsdbDao {
|
||||
|
||||
Row row = new Row(updateColumns);
|
||||
List<Condition> conditions = new ArrayList<>(); // No condition,
|
||||
// apply all ssid
|
||||
// apply all ssid
|
||||
operations.add(new Update(wifiVifConfigDbTable, conditions, row));
|
||||
|
||||
CompletableFuture<OperationResult[]> fResult = ovsdbClient.transact(ovsdbName, operations);
|
||||
@@ -2371,7 +2375,7 @@ public class OvsdbDao {
|
||||
|
||||
private void updateVifConfigsSetForRadio(OvsdbClient ovsdbClient, String ssid, String radioFreqBand,
|
||||
List<Operation> operations, Map<String, Value> updateColumns, Uuid vifConfigUuid)
|
||||
throws OvsdbClientException, InterruptedException, ExecutionException, TimeoutException {
|
||||
throws OvsdbClientException, InterruptedException, ExecutionException, TimeoutException {
|
||||
Row row;
|
||||
CompletableFuture<OperationResult[]> fResult;
|
||||
OperationResult[] result;
|
||||
@@ -2441,58 +2445,23 @@ public class OvsdbDao {
|
||||
ApElementConfiguration apElementConfig = (ApElementConfiguration) opensyncApConfig.getCustomerEquipment()
|
||||
.getDetails();
|
||||
for (RadioType radioType : ssidConfig.getAppliedRadios()) {
|
||||
// Still put profiles on disabled radios for now.
|
||||
//
|
||||
// if (!enabledRadiosFromAp.contains(radioType)) {
|
||||
// // Not on this AP
|
||||
// LOG.debug(
|
||||
// "AP {} does not have a radio where frequency band is {}.
|
||||
// Cannot provision this radio profile on AP.",
|
||||
// opensyncApConfig.getCustomerEquipment().getInventoryId(),
|
||||
// radioType);
|
||||
// continue;
|
||||
// }
|
||||
|
||||
Map<String, WifiRadioConfigInfo> provisionedRadioConfigs = getProvisionedWifiRadioConfigs(ovsdbClient);
|
||||
String freqBand = null;
|
||||
String ifName = null;
|
||||
String radioName = null;
|
||||
for (Entry<String, WifiRadioConfigInfo> entry : provisionedRadioConfigs.entrySet()) {
|
||||
if (radioType == RadioType.is2dot4GHz && entry.getValue().freqBand.equals("2.4G")) {
|
||||
freqBand = "2.4G";
|
||||
radioName = entry.getKey();
|
||||
break;
|
||||
} else if (radioType == RadioType.is5GHzL && entry.getValue().freqBand.equals("5GL")) {
|
||||
freqBand = "5GL";
|
||||
radioName = entry.getKey();
|
||||
break;
|
||||
} else if (radioType == RadioType.is5GHzU && entry.getValue().freqBand.equals("5GU")) {
|
||||
freqBand = "5GU";
|
||||
radioName = entry.getKey();
|
||||
break;
|
||||
} else if (radioType == RadioType.is5GHz && entry.getValue().freqBand.equals("5G")) {
|
||||
freqBand = "5G";
|
||||
radioName = entry.getKey();
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (radioName == null || freqBand == null) {
|
||||
LOG.debug("Cannot provision SSID with radio if_name {} and freqBand {}", radioName, freqBand);
|
||||
continue;
|
||||
}
|
||||
if (radioName.equals(radio0)) {
|
||||
ifName = defaultRadio0;
|
||||
} else if (radioName.equals(radio1)) {
|
||||
ifName = defaultRadio1;
|
||||
} else if (radioName.equals(radio2)) {
|
||||
ifName = defaultRadio2;
|
||||
}
|
||||
if (ifName == null) {
|
||||
LOG.debug("Cannot provision SSID for radio {} freqBand {} with VIF if_name {}", radioName, freqBand,
|
||||
ifName);
|
||||
continue;
|
||||
if (radioType == RadioType.is2dot4GHz) {
|
||||
freqBand = "2.4G";
|
||||
ifName = defaultRadio2g;
|
||||
} else if (radioType == RadioType.is5GHzL) {
|
||||
freqBand = "5GL";
|
||||
ifName = defaultRadio5gl;
|
||||
} else if (radioType == RadioType.is5GHzU) {
|
||||
freqBand = "5GU";
|
||||
ifName = defaultRadio5gu;
|
||||
} else if (radioType == RadioType.is5GHz) {
|
||||
freqBand = "5G";
|
||||
ifName = defaultRadio5g;
|
||||
}
|
||||
|
||||
|
||||
int keyRefresh = ssidConfig.getKeyRefresh();
|
||||
|
||||
boolean ssidBroadcast = ssidConfig.getBroadcastSsid() == StateSetting.enabled;
|
||||
@@ -2598,7 +2567,7 @@ public class OvsdbDao {
|
||||
security.put("mode", "1");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// TODO put into AP captive parameter
|
||||
Map<String, String> captiveMap = new HashMap<>();
|
||||
List<String> walledGardenAllowlist = new ArrayList<>();
|
||||
@@ -2665,13 +2634,13 @@ public class OvsdbDao {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void getCaptiveConfiguration(OpensyncAPConfig opensyncApConfig, SsidConfiguration ssidConfig,
|
||||
Map<String, String> captiveMap, List<String> walledGardenAllowlist) {
|
||||
Map<String, String> captiveMap, List<String> walledGardenAllowlist) {
|
||||
if (ssidConfig.getCaptivePortalId() != null && opensyncApConfig.getCaptiveProfiles() != null) {
|
||||
for (Profile profileCaptive : opensyncApConfig.getCaptiveProfiles()) {
|
||||
if (ssidConfig.getCaptivePortalId() == profileCaptive.getId() &&
|
||||
profileCaptive.getDetails() != null) {
|
||||
profileCaptive.getDetails() != null) {
|
||||
CaptivePortalConfiguration captiveProfileDetails = ((CaptivePortalConfiguration) profileCaptive.getDetails());
|
||||
captiveMap.put("sessionTimeoutInMinutes", String.valueOf(captiveProfileDetails.getSessionTimeoutInMinutes()));
|
||||
captiveMap.put("redirectURL", captiveProfileDetails.getRedirectURL());
|
||||
@@ -2692,10 +2661,10 @@ public class OvsdbDao {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private String getCaptiveFileUrl(String fileDesc, ManagedFileInfo fileInfo) {
|
||||
if (fileInfo == null || fileInfo.getApExportUrl() == null) {
|
||||
return "";
|
||||
return "";
|
||||
}
|
||||
if (fileInfo.getApExportUrl().startsWith(HTTP)) {
|
||||
return fileInfo.getApExportUrl();
|
||||
@@ -2705,7 +2674,7 @@ public class OvsdbDao {
|
||||
return "";
|
||||
}
|
||||
LOG.debug("Captive file {}: {}", fileDesc, externalFileStoreURL + fileStoreDirectory + "/" +
|
||||
fileInfo.getApExportUrl());
|
||||
fileInfo.getApExportUrl());
|
||||
|
||||
return externalFileStoreURL + fileStoreDirectory + "/" + fileInfo.getApExportUrl();
|
||||
}
|
||||
@@ -2885,7 +2854,7 @@ public class OvsdbDao {
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
com.vmware.ovsdb.protocol.operation.notation.Map<String, Integer> thresholds = com.vmware.ovsdb.protocol.operation.notation.Map
|
||||
.of(thresholdMap);
|
||||
.of(thresholdMap);
|
||||
|
||||
Map<String, WifiRadioConfigInfo> radioConfigs = getProvisionedWifiRadioConfigs(ovsdbClient);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user