mirror of
https://github.com/Telecominfraproject/wlan-cloud-opensync-controller.git
synced 2025-11-01 02:57:49 +00:00
WIFI-2083: Fix Enum labels on Backend
Signed-off-by: Mike Hansen <mike.hansen@connectus.ai>
This commit is contained in:
@@ -576,26 +576,25 @@ public class OvsdbHotspotConfig extends OvsdbDaoBase {
|
|||||||
rowColumns.put("access_network_type", new Atom<>(hs2Profile.getAccessNetworkType().getId()));
|
rowColumns.put("access_network_type", new Atom<>(hs2Profile.getAccessNetworkType().getId()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// # format: <1-octet encoded value as hex str>
|
// # format: <1-octet encoded value as hex str>
|
||||||
// # (ipv4_type & 0x3f) << 2 | (ipv6_type & 0x3) << 2
|
// # (ipv4_type & 0x3f) << 2 | (ipv6_type & 0x3)
|
||||||
// 0x3f = 63 in decimal
|
// 0x3f = 63 in decimal
|
||||||
// 0x3 = 3 in decimal
|
// 0x3 = 3 in decimal
|
||||||
if (PasspointIPv6AddressType.getByName(
|
if (PasspointIPv6AddressType.getByName(
|
||||||
hs2Profile.getIpAddressTypeAvailability()) != PasspointIPv6AddressType.UNSUPPORTED) {
|
hs2Profile.getIpAddressTypeAvailability()) != PasspointIPv6AddressType.UNSUPPORTED) {
|
||||||
int availability = PasspointIPv6AddressType
|
int availability = PasspointIPv6AddressType
|
||||||
.getByName(hs2Profile.getIpAddressTypeAvailability()).getId();
|
.getByName(hs2Profile.getIpAddressTypeAvailability()).getId();
|
||||||
String hexString = Integer.toHexString((availability & 3) << 2);
|
String hexString = String.format("%02x", (availability & 0x3));
|
||||||
rowColumns.put("ipaddr_type_availability", new Atom<>(hexString));
|
rowColumns.put("ipaddr_type_availability", new Atom<>(hexString));
|
||||||
} else if (PasspointIPv4AddressType.getByName(
|
}else if (PasspointIPv4AddressType.getByName(
|
||||||
hs2Profile.getIpAddressTypeAvailability()) != PasspointIPv4AddressType.UNSUPPORTED) {
|
hs2Profile.getIpAddressTypeAvailability()) != PasspointIPv4AddressType.UNSUPPORTED) {
|
||||||
int availability = PasspointIPv4AddressType
|
int availability = PasspointIPv4AddressType
|
||||||
.getByName(hs2Profile.getIpAddressTypeAvailability()).getId();
|
.getByName(hs2Profile.getIpAddressTypeAvailability()).getId();
|
||||||
String hexString = Integer.toHexString((availability & 63) << 2);
|
String hexString = String.format("%02x", ((availability & 0x3f) << 2));
|
||||||
rowColumns.put("ipaddr_type_availability", new Atom<>(hexString));
|
rowColumns.put("ipaddr_type_availability", new Atom<>(hexString));
|
||||||
}
|
}
|
||||||
|
|
||||||
Row row = new Row(rowColumns);
|
Row row = new Row(rowColumns);
|
||||||
|
|
||||||
Insert newHs20Config = new Insert(hotspot20ConfigDbTable, row);
|
Insert newHs20Config = new Insert(hotspot20ConfigDbTable, row);
|
||||||
@@ -676,8 +675,8 @@ public class OvsdbHotspotConfig extends OvsdbDaoBase {
|
|||||||
operations.add(newOsuProvider);
|
operations.add(newOsuProvider);
|
||||||
} else {
|
} else {
|
||||||
List<Condition> conditions = new ArrayList<>();
|
List<Condition> conditions = new ArrayList<>();
|
||||||
conditions.add(new Condition("server_uri", Function.EQUALS,
|
conditions.add(new Condition("osu_provider_name", Function.EQUALS,
|
||||||
new Atom<>(providerProfile.getOsuServerUri())));
|
new Atom<>(apOsuProviderName)));
|
||||||
Update updatedOsuProvider = new Update(hotspot20OsuProvidersDbTable, conditions, row);
|
Update updatedOsuProvider = new Update(hotspot20OsuProvidersDbTable, conditions, row);
|
||||||
operations.add(updatedOsuProvider);
|
operations.add(updatedOsuProvider);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user