use of org.omecproject.up4.Up4Service in project up4 by omec-project.
the class SessionDownlinkCommand method doExecute.
@Override
protected void doExecute() throws Exception {
Up4Service app = get(Up4Service.class);
UpfSessionDownlink.Builder sessBuilder = UpfSessionDownlink.builder().needsBuffering(buff).needsDropping(drop).withUeAddress(Ip4Address.valueOf(ueAddr));
if (tunnelPeer != -1) {
sessBuilder.withGtpTunnelPeerId(tunnelPeer);
}
if (sessMeterIdx != -1) {
sessBuilder.withSessionMeterIdx(sessMeterIdx);
}
if (delete) {
app.delete(sessBuilder.build());
} else {
app.apply(sessBuilder.build());
}
}
use of org.omecproject.up4.Up4Service in project up4 by omec-project.
the class TerminationUplinkCommand method doExecute.
@Override
protected void doExecute() throws Exception {
Up4Service app = get(Up4Service.class);
UpfTerminationUplink.Builder termBuilder = UpfTerminationUplink.builder().needsDropping(drop).withUeSessionId(Ip4Address.valueOf(ueAddr)).withApplicationId(appId).withCounterId(counterID);
if (trafficClass != -1) {
termBuilder.withTrafficClass(trafficClass);
}
if (appMeterIdx != -1) {
termBuilder.withAppMeterIdx(appMeterIdx);
}
if (delete) {
app.delete(termBuilder.build());
} else {
app.apply(termBuilder.build());
}
}
use of org.omecproject.up4.Up4Service in project up4 by omec-project.
the class UpfAppMeterCommand method doExecute.
@Override
protected void doExecute() throws Exception {
Up4Service app = get(Up4Service.class);
if (delete) {
app.apply(UpfMeter.resetApplication(cellId));
} else {
if (pir == null || pburst == null) {
print("PIR and PBURST must be provided when creating a meter");
return;
}
if (cir == null || cburst == null) {
print("CIR and CBURST must be provided when creating a meter");
return;
}
UpfMeter.Builder appMeterBuilder = UpfMeter.builder().setCellId(cellId).setPeakBand(pir, pburst).setApplication().setCommittedBand(cir, cburst);
app.apply(appMeterBuilder.build());
}
}
Aggregations