mirror of
https://github.com/Telecominfraproject/wlan-cloud-opensync-controller.git
synced 2025-11-02 19:47:52 +00:00
WIFI-437: CloudSDK Client DHCP attributes processing. WIFI-425: Cloud Back End for Events phase 2
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -531,13 +531,11 @@ public class OpensyncExternalIntegrationCloudTest {
|
||||
|
||||
opensyncExternalIntegrationCloud.processMqttMessage(topic, report);
|
||||
|
||||
Mockito.verify(clientServiceInterface, Mockito.times(2)).getOrNull(Mockito.anyInt(),
|
||||
Mockito.verify(clientServiceInterface, Mockito.times(4)).getOrNull(Mockito.anyInt(),
|
||||
Mockito.any(MacAddress.class));
|
||||
Mockito.verify(clientServiceInterface, Mockito.times(2)).getSessionOrNull(Mockito.anyInt(), Mockito.anyLong(),
|
||||
Mockito.verify(clientServiceInterface, Mockito.times(4)).getSessionOrNull(Mockito.anyInt(), Mockito.anyLong(),
|
||||
Mockito.any(MacAddress.class));
|
||||
Mockito.verify(clientServiceInterface, Mockito.times(2)).updateSession(Mockito.any(ClientSession.class));
|
||||
Mockito.verify(clientServiceInterface, Mockito.times(2))
|
||||
.update(Mockito.any(com.telecominfraproject.wlan.client.models.Client.class));
|
||||
Mockito.verify(clientServiceInterface, Mockito.times(4)).updateSession(Mockito.any(ClientSession.class));
|
||||
Mockito.verify(statusServiceInterface, Mockito.times(3)).getOrNull(Mockito.anyInt(), Mockito.anyLong(),
|
||||
Mockito.eq(StatusDataType.ACTIVE_BSSIDS));
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.telecominfraproject.wlan.opensync.external.integration;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import com.telecominfraproject.wlan.opensync.external.integration.models.ConnectNodeInfo;
|
||||
import com.telecominfraproject.wlan.opensync.external.integration.models.OpensyncAPConfig;
|
||||
@@ -46,4 +47,7 @@ public interface OpensyncExternalIntegrationInterface {
|
||||
void wifiAssociatedClientsDbTableDelete(String deletedClientMac, String apId);
|
||||
|
||||
void awlanNodeDbTableUpdate(OpensyncAWLANNode opensyncAPState, String apId);
|
||||
|
||||
void dhcpLeasedIpDbTableUpdate(List<Map<String,String>> dhcpAttributes, String apId, RowUpdateOperation rowUpdateOperation);
|
||||
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@ package com.telecominfraproject.wlan.opensync.external.integration;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.annotation.PostConstruct;
|
||||
|
||||
@@ -191,4 +192,11 @@ public class OpensyncExternalIntegrationSimple implements OpensyncExternalIntegr
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void dhcpLeasedIpDbTableUpdate(List<Map<String, String>> dhcpAttributes, String apId,
|
||||
RowUpdateOperation rowUpdateOperation) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -19,6 +19,7 @@ import org.springframework.stereotype.Component;
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
import com.telecominfraproject.wlan.core.model.equipment.MacAddress;
|
||||
import com.telecominfraproject.wlan.opensync.external.integration.OpensyncExternalIntegrationInterface;
|
||||
import com.telecominfraproject.wlan.opensync.external.integration.OpensyncExternalIntegrationInterface.RowUpdateOperation;
|
||||
import com.telecominfraproject.wlan.opensync.external.integration.OvsdbClientInterface;
|
||||
import com.telecominfraproject.wlan.opensync.external.integration.OvsdbSession;
|
||||
import com.telecominfraproject.wlan.opensync.external.integration.OvsdbSessionMapInterface;
|
||||
@@ -404,19 +405,19 @@ public class TipWlanOvsdbClient implements OvsdbClientInterface {
|
||||
}
|
||||
}
|
||||
|
||||
// -- mikehansen1970 --
|
||||
//TODO: when AP has schema and functionality in place to support it's
|
||||
// additional attributes this will be enhanced to either
|
||||
// follow the same approach as the other table state
|
||||
// changes, in which case an additional model will be
|
||||
// defined in the opensync-ext-interface project along
|
||||
// with appropriate interface methods to handle changes.
|
||||
// Alternatively this may be handled in the events from
|
||||
// the AP when that comes online.
|
||||
if (!insert.isEmpty()) {
|
||||
extIntegrationInterface.dhcpLeasedIpDbTableUpdate(insert, key,RowUpdateOperation.INSERT);
|
||||
}
|
||||
|
||||
LOG.debug("insert {}", insert);
|
||||
LOG.debug("delete {}", delete);
|
||||
LOG.debug("modify {}", update);
|
||||
if (!delete.isEmpty()) {
|
||||
extIntegrationInterface.dhcpLeasedIpDbTableUpdate(delete, key,RowUpdateOperation.DELETE);
|
||||
|
||||
}
|
||||
|
||||
if (!update.isEmpty()) {
|
||||
extIntegrationInterface.dhcpLeasedIpDbTableUpdate(update, key,RowUpdateOperation.MODIFY);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user