package monitoring;
import static io.grpc.MethodDescriptor.generateFullMethodName;
/**
*/
@javax.annotation.Generated(
value = "by gRPC proto compiler (version 1.38.1)",
comments = "Source: monitoring.proto")
public final class MonitoringServiceGrpc {
private MonitoringServiceGrpc() {}
public static final String SERVICE_NAME = "monitoring.MonitoringService";
// Static method descriptors that strictly reflect the proto.
private static volatile io.grpc.MethodDescriptor<monitoring.Monitoring.KpiDescriptor,
monitoring.Monitoring.KpiId> getSetKpiMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "SetKpi",
requestType = monitoring.Monitoring.KpiDescriptor.class,
responseType = monitoring.Monitoring.KpiId.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor<monitoring.Monitoring.KpiDescriptor,
monitoring.Monitoring.KpiId> getSetKpiMethod() {
io.grpc.MethodDescriptor<monitoring.Monitoring.KpiDescriptor, monitoring.Monitoring.KpiId> getSetKpiMethod;
if ((getSetKpiMethod = MonitoringServiceGrpc.getSetKpiMethod) == null) {
synchronized (MonitoringServiceGrpc.class) {
if ((getSetKpiMethod = MonitoringServiceGrpc.getSetKpiMethod) == null) {
MonitoringServiceGrpc.getSetKpiMethod = getSetKpiMethod =
io.grpc.MethodDescriptor.<monitoring.Monitoring.KpiDescriptor, monitoring.Monitoring.KpiId>newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "SetKpi"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
monitoring.Monitoring.KpiDescriptor.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
monitoring.Monitoring.KpiId.getDefaultInstance()))
.setSchemaDescriptor(new MonitoringServiceMethodDescriptorSupplier("SetKpi"))
.build();
}
}
}
return getSetKpiMethod;
}
private static volatile io.grpc.MethodDescriptor<monitoring.Monitoring.KpiId,
context.ContextOuterClass.Empty> getDeleteKpiMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "DeleteKpi",
requestType = monitoring.Monitoring.KpiId.class,
responseType = context.ContextOuterClass.Empty.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor<monitoring.Monitoring.KpiId,
context.ContextOuterClass.Empty> getDeleteKpiMethod() {
io.grpc.MethodDescriptor<monitoring.Monitoring.KpiId, context.ContextOuterClass.Empty> getDeleteKpiMethod;
if ((getDeleteKpiMethod = MonitoringServiceGrpc.getDeleteKpiMethod) == null) {
synchronized (MonitoringServiceGrpc.class) {
if ((getDeleteKpiMethod = MonitoringServiceGrpc.getDeleteKpiMethod) == null) {
MonitoringServiceGrpc.getDeleteKpiMethod = getDeleteKpiMethod =
io.grpc.MethodDescriptor.<monitoring.Monitoring.KpiId, context.ContextOuterClass.Empty>newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteKpi"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
monitoring.Monitoring.KpiId.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
context.ContextOuterClass.Empty.getDefaultInstance()))
.setSchemaDescriptor(new MonitoringServiceMethodDescriptorSupplier("DeleteKpi"))
.build();
}
}
}
return getDeleteKpiMethod;
}
private static volatile io.grpc.MethodDescriptor<monitoring.Monitoring.KpiId,
monitoring.Monitoring.KpiDescriptor> getGetKpiDescriptorMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "GetKpiDescriptor",
requestType = monitoring.Monitoring.KpiId.class,
responseType = monitoring.Monitoring.KpiDescriptor.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor<monitoring.Monitoring.KpiId,
monitoring.Monitoring.KpiDescriptor> getGetKpiDescriptorMethod() {
io.grpc.MethodDescriptor<monitoring.Monitoring.KpiId, monitoring.Monitoring.KpiDescriptor> getGetKpiDescriptorMethod;
if ((getGetKpiDescriptorMethod = MonitoringServiceGrpc.getGetKpiDescriptorMethod) == null) {
synchronized (MonitoringServiceGrpc.class) {
if ((getGetKpiDescriptorMethod = MonitoringServiceGrpc.getGetKpiDescriptorMethod) == null) {
MonitoringServiceGrpc.getGetKpiDescriptorMethod = getGetKpiDescriptorMethod =
io.grpc.MethodDescriptor.<monitoring.Monitoring.KpiId, monitoring.Monitoring.KpiDescriptor>newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetKpiDescriptor"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
monitoring.Monitoring.KpiId.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
monitoring.Monitoring.KpiDescriptor.getDefaultInstance()))
.setSchemaDescriptor(new MonitoringServiceMethodDescriptorSupplier("GetKpiDescriptor"))
.build();
}
}
}
return getGetKpiDescriptorMethod;
}
private static volatile io.grpc.MethodDescriptor<context.ContextOuterClass.Empty,
monitoring.Monitoring.KpiDescriptorList> getGetKpiDescriptorListMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "GetKpiDescriptorList",
requestType = context.ContextOuterClass.Empty.class,
responseType = monitoring.Monitoring.KpiDescriptorList.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor<context.ContextOuterClass.Empty,
monitoring.Monitoring.KpiDescriptorList> getGetKpiDescriptorListMethod() {
io.grpc.MethodDescriptor<context.ContextOuterClass.Empty, monitoring.Monitoring.KpiDescriptorList> getGetKpiDescriptorListMethod;
if ((getGetKpiDescriptorListMethod = MonitoringServiceGrpc.getGetKpiDescriptorListMethod) == null) {
synchronized (MonitoringServiceGrpc.class) {
if ((getGetKpiDescriptorListMethod = MonitoringServiceGrpc.getGetKpiDescriptorListMethod) == null) {
MonitoringServiceGrpc.getGetKpiDescriptorListMethod = getGetKpiDescriptorListMethod =
io.grpc.MethodDescriptor.<context.ContextOuterClass.Empty, monitoring.Monitoring.KpiDescriptorList>newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetKpiDescriptorList"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
context.ContextOuterClass.Empty.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
monitoring.Monitoring.KpiDescriptorList.getDefaultInstance()))
.setSchemaDescriptor(new MonitoringServiceMethodDescriptorSupplier("GetKpiDescriptorList"))
.build();
}
}
}
return getGetKpiDescriptorListMethod;
}
private static volatile io.grpc.MethodDescriptor<monitoring.Monitoring.Kpi,
context.ContextOuterClass.Empty> getIncludeKpiMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "IncludeKpi",
requestType = monitoring.Monitoring.Kpi.class,
responseType = context.ContextOuterClass.Empty.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor<monitoring.Monitoring.Kpi,
context.ContextOuterClass.Empty> getIncludeKpiMethod() {
io.grpc.MethodDescriptor<monitoring.Monitoring.Kpi, context.ContextOuterClass.Empty> getIncludeKpiMethod;
if ((getIncludeKpiMethod = MonitoringServiceGrpc.getIncludeKpiMethod) == null) {
synchronized (MonitoringServiceGrpc.class) {
if ((getIncludeKpiMethod = MonitoringServiceGrpc.getIncludeKpiMethod) == null) {
MonitoringServiceGrpc.getIncludeKpiMethod = getIncludeKpiMethod =
io.grpc.MethodDescriptor.<monitoring.Monitoring.Kpi, context.ContextOuterClass.Empty>newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "IncludeKpi"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
monitoring.Monitoring.Kpi.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
context.ContextOuterClass.Empty.getDefaultInstance()))
.setSchemaDescriptor(new MonitoringServiceMethodDescriptorSupplier("IncludeKpi"))
.build();
}
}
}
return getIncludeKpiMethod;
}
private static volatile io.grpc.MethodDescriptor<monitoring.Monitoring.MonitorKpiRequest,
context.ContextOuterClass.Empty> getMonitorKpiMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "MonitorKpi",
requestType = monitoring.Monitoring.MonitorKpiRequest.class,
responseType = context.ContextOuterClass.Empty.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor<monitoring.Monitoring.MonitorKpiRequest,
context.ContextOuterClass.Empty> getMonitorKpiMethod() {
io.grpc.MethodDescriptor<monitoring.Monitoring.MonitorKpiRequest, context.ContextOuterClass.Empty> getMonitorKpiMethod;
if ((getMonitorKpiMethod = MonitoringServiceGrpc.getMonitorKpiMethod) == null) {
synchronized (MonitoringServiceGrpc.class) {
if ((getMonitorKpiMethod = MonitoringServiceGrpc.getMonitorKpiMethod) == null) {
MonitoringServiceGrpc.getMonitorKpiMethod = getMonitorKpiMethod =
io.grpc.MethodDescriptor.<monitoring.Monitoring.MonitorKpiRequest, context.ContextOuterClass.Empty>newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "MonitorKpi"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
monitoring.Monitoring.MonitorKpiRequest.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
context.ContextOuterClass.Empty.getDefaultInstance()))
.setSchemaDescriptor(new MonitoringServiceMethodDescriptorSupplier("MonitorKpi"))
.build();
}
}
}
return getMonitorKpiMethod;
}
private static volatile io.grpc.MethodDescriptor<monitoring.Monitoring.KpiQuery,
monitoring.Monitoring.RawKpiTable> getQueryKpiDataMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "QueryKpiData",
requestType = monitoring.Monitoring.KpiQuery.class,
responseType = monitoring.Monitoring.RawKpiTable.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor<monitoring.Monitoring.KpiQuery,
monitoring.Monitoring.RawKpiTable> getQueryKpiDataMethod() {
io.grpc.MethodDescriptor<monitoring.Monitoring.KpiQuery, monitoring.Monitoring.RawKpiTable> getQueryKpiDataMethod;
if ((getQueryKpiDataMethod = MonitoringServiceGrpc.getQueryKpiDataMethod) == null) {
synchronized (MonitoringServiceGrpc.class) {
if ((getQueryKpiDataMethod = MonitoringServiceGrpc.getQueryKpiDataMethod) == null) {
MonitoringServiceGrpc.getQueryKpiDataMethod = getQueryKpiDataMethod =
io.grpc.MethodDescriptor.<monitoring.Monitoring.KpiQuery, monitoring.Monitoring.RawKpiTable>newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "QueryKpiData"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
monitoring.Monitoring.KpiQuery.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
monitoring.Monitoring.RawKpiTable.getDefaultInstance()))
.setSchemaDescriptor(new MonitoringServiceMethodDescriptorSupplier("QueryKpiData"))
.build();
}
}
}
return getQueryKpiDataMethod;
}
private static volatile io.grpc.MethodDescriptor<monitoring.Monitoring.SubsDescriptor,
monitoring.Monitoring.SubsResponse> getSetKpiSubscriptionMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "SetKpiSubscription",
requestType = monitoring.Monitoring.SubsDescriptor.class,
responseType = monitoring.Monitoring.SubsResponse.class,
methodType = io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING)
public static io.grpc.MethodDescriptor<monitoring.Monitoring.SubsDescriptor,
monitoring.Monitoring.SubsResponse> getSetKpiSubscriptionMethod() {
io.grpc.MethodDescriptor<monitoring.Monitoring.SubsDescriptor, monitoring.Monitoring.SubsResponse> getSetKpiSubscriptionMethod;
if ((getSetKpiSubscriptionMethod = MonitoringServiceGrpc.getSetKpiSubscriptionMethod) == null) {
synchronized (MonitoringServiceGrpc.class) {
if ((getSetKpiSubscriptionMethod = MonitoringServiceGrpc.getSetKpiSubscriptionMethod) == null) {
MonitoringServiceGrpc.getSetKpiSubscriptionMethod = getSetKpiSubscriptionMethod =
io.grpc.MethodDescriptor.<monitoring.Monitoring.SubsDescriptor, monitoring.Monitoring.SubsResponse>newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "SetKpiSubscription"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
monitoring.Monitoring.SubsDescriptor.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
monitoring.Monitoring.SubsResponse.getDefaultInstance()))
.setSchemaDescriptor(new MonitoringServiceMethodDescriptorSupplier("SetKpiSubscription"))
.build();
}
}
}
return getSetKpiSubscriptionMethod;
}
private static volatile io.grpc.MethodDescriptor<monitoring.Monitoring.SubscriptionID,
monitoring.Monitoring.SubsDescriptor> getGetSubsDescriptorMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "GetSubsDescriptor",
requestType = monitoring.Monitoring.SubscriptionID.class,
responseType = monitoring.Monitoring.SubsDescriptor.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor<monitoring.Monitoring.SubscriptionID,
monitoring.Monitoring.SubsDescriptor> getGetSubsDescriptorMethod() {
io.grpc.MethodDescriptor<monitoring.Monitoring.SubscriptionID, monitoring.Monitoring.SubsDescriptor> getGetSubsDescriptorMethod;
if ((getGetSubsDescriptorMethod = MonitoringServiceGrpc.getGetSubsDescriptorMethod) == null) {
synchronized (MonitoringServiceGrpc.class) {
if ((getGetSubsDescriptorMethod = MonitoringServiceGrpc.getGetSubsDescriptorMethod) == null) {
MonitoringServiceGrpc.getGetSubsDescriptorMethod = getGetSubsDescriptorMethod =
io.grpc.MethodDescriptor.<monitoring.Monitoring.SubscriptionID, monitoring.Monitoring.SubsDescriptor>newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetSubsDescriptor"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
monitoring.Monitoring.SubscriptionID.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
monitoring.Monitoring.SubsDescriptor.getDefaultInstance()))
.setSchemaDescriptor(new MonitoringServiceMethodDescriptorSupplier("GetSubsDescriptor"))
.build();
}
}
}
return getGetSubsDescriptorMethod;
}
private static volatile io.grpc.MethodDescriptor<context.ContextOuterClass.Empty,
monitoring.Monitoring.SubsList> getGetSubscriptionsMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "GetSubscriptions",
requestType = context.ContextOuterClass.Empty.class,
responseType = monitoring.Monitoring.SubsList.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor<context.ContextOuterClass.Empty,
monitoring.Monitoring.SubsList> getGetSubscriptionsMethod() {
io.grpc.MethodDescriptor<context.ContextOuterClass.Empty, monitoring.Monitoring.SubsList> getGetSubscriptionsMethod;
if ((getGetSubscriptionsMethod = MonitoringServiceGrpc.getGetSubscriptionsMethod) == null) {
synchronized (MonitoringServiceGrpc.class) {
if ((getGetSubscriptionsMethod = MonitoringServiceGrpc.getGetSubscriptionsMethod) == null) {
MonitoringServiceGrpc.getGetSubscriptionsMethod = getGetSubscriptionsMethod =
io.grpc.MethodDescriptor.<context.ContextOuterClass.Empty, monitoring.Monitoring.SubsList>newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetSubscriptions"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
context.ContextOuterClass.Empty.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
monitoring.Monitoring.SubsList.getDefaultInstance()))
.setSchemaDescriptor(new MonitoringServiceMethodDescriptorSupplier("GetSubscriptions"))
.build();
}
}
}
return getGetSubscriptionsMethod;
}
private static volatile io.grpc.MethodDescriptor<monitoring.Monitoring.SubscriptionID,
context.ContextOuterClass.Empty> getDeleteSubscriptionMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "DeleteSubscription",
requestType = monitoring.Monitoring.SubscriptionID.class,
responseType = context.ContextOuterClass.Empty.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor<monitoring.Monitoring.SubscriptionID,
context.ContextOuterClass.Empty> getDeleteSubscriptionMethod() {
io.grpc.MethodDescriptor<monitoring.Monitoring.SubscriptionID, context.ContextOuterClass.Empty> getDeleteSubscriptionMethod;
if ((getDeleteSubscriptionMethod = MonitoringServiceGrpc.getDeleteSubscriptionMethod) == null) {
synchronized (MonitoringServiceGrpc.class) {
if ((getDeleteSubscriptionMethod = MonitoringServiceGrpc.getDeleteSubscriptionMethod) == null) {
MonitoringServiceGrpc.getDeleteSubscriptionMethod = getDeleteSubscriptionMethod =
io.grpc.MethodDescriptor.<monitoring.Monitoring.SubscriptionID, context.ContextOuterClass.Empty>newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteSubscription"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
monitoring.Monitoring.SubscriptionID.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
context.ContextOuterClass.Empty.getDefaultInstance()))
.setSchemaDescriptor(new MonitoringServiceMethodDescriptorSupplier("DeleteSubscription"))
.build();
}
}
}
return getDeleteSubscriptionMethod;
}
private static volatile io.grpc.MethodDescriptor<monitoring.Monitoring.AlarmDescriptor,
monitoring.Monitoring.AlarmID> getSetKpiAlarmMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "SetKpiAlarm",
requestType = monitoring.Monitoring.AlarmDescriptor.class,
responseType = monitoring.Monitoring.AlarmID.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor<monitoring.Monitoring.AlarmDescriptor,
monitoring.Monitoring.AlarmID> getSetKpiAlarmMethod() {
io.grpc.MethodDescriptor<monitoring.Monitoring.AlarmDescriptor, monitoring.Monitoring.AlarmID> getSetKpiAlarmMethod;
if ((getSetKpiAlarmMethod = MonitoringServiceGrpc.getSetKpiAlarmMethod) == null) {
synchronized (MonitoringServiceGrpc.class) {
if ((getSetKpiAlarmMethod = MonitoringServiceGrpc.getSetKpiAlarmMethod) == null) {
MonitoringServiceGrpc.getSetKpiAlarmMethod = getSetKpiAlarmMethod =
io.grpc.MethodDescriptor.<monitoring.Monitoring.AlarmDescriptor, monitoring.Monitoring.AlarmID>newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "SetKpiAlarm"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
monitoring.Monitoring.AlarmDescriptor.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
monitoring.Monitoring.AlarmID.getDefaultInstance()))
.setSchemaDescriptor(new MonitoringServiceMethodDescriptorSupplier("SetKpiAlarm"))
.build();
}
}
}
return getSetKpiAlarmMethod;
}
private static volatile io.grpc.MethodDescriptor<context.ContextOuterClass.Empty,
monitoring.Monitoring.AlarmList> getGetAlarmsMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "GetAlarms",
requestType = context.ContextOuterClass.Empty.class,
responseType = monitoring.Monitoring.AlarmList.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor<context.ContextOuterClass.Empty,
monitoring.Monitoring.AlarmList> getGetAlarmsMethod() {
io.grpc.MethodDescriptor<context.ContextOuterClass.Empty, monitoring.Monitoring.AlarmList> getGetAlarmsMethod;
if ((getGetAlarmsMethod = MonitoringServiceGrpc.getGetAlarmsMethod) == null) {
synchronized (MonitoringServiceGrpc.class) {
if ((getGetAlarmsMethod = MonitoringServiceGrpc.getGetAlarmsMethod) == null) {
MonitoringServiceGrpc.getGetAlarmsMethod = getGetAlarmsMethod =
io.grpc.MethodDescriptor.<context.ContextOuterClass.Empty, monitoring.Monitoring.AlarmList>newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetAlarms"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
context.ContextOuterClass.Empty.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
monitoring.Monitoring.AlarmList.getDefaultInstance()))
.setSchemaDescriptor(new MonitoringServiceMethodDescriptorSupplier("GetAlarms"))
.build();
}
}
}
return getGetAlarmsMethod;
}
private static volatile io.grpc.MethodDescriptor<monitoring.Monitoring.AlarmID,
monitoring.Monitoring.AlarmDescriptor> getGetAlarmDescriptorMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "GetAlarmDescriptor",
requestType = monitoring.Monitoring.AlarmID.class,
responseType = monitoring.Monitoring.AlarmDescriptor.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor<monitoring.Monitoring.AlarmID,
monitoring.Monitoring.AlarmDescriptor> getGetAlarmDescriptorMethod() {
io.grpc.MethodDescriptor<monitoring.Monitoring.AlarmID, monitoring.Monitoring.AlarmDescriptor> getGetAlarmDescriptorMethod;
if ((getGetAlarmDescriptorMethod = MonitoringServiceGrpc.getGetAlarmDescriptorMethod) == null) {
synchronized (MonitoringServiceGrpc.class) {
if ((getGetAlarmDescriptorMethod = MonitoringServiceGrpc.getGetAlarmDescriptorMethod) == null) {
MonitoringServiceGrpc.getGetAlarmDescriptorMethod = getGetAlarmDescriptorMethod =
io.grpc.MethodDescriptor.<monitoring.Monitoring.AlarmID, monitoring.Monitoring.AlarmDescriptor>newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetAlarmDescriptor"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
monitoring.Monitoring.AlarmID.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
monitoring.Monitoring.AlarmDescriptor.getDefaultInstance()))
.setSchemaDescriptor(new MonitoringServiceMethodDescriptorSupplier("GetAlarmDescriptor"))
.build();
}
}
}
return getGetAlarmDescriptorMethod;
}
private static volatile io.grpc.MethodDescriptor<monitoring.Monitoring.AlarmSubscription,
monitoring.Monitoring.AlarmResponse> getGetAlarmResponseStreamMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "GetAlarmResponseStream",
requestType = monitoring.Monitoring.AlarmSubscription.class,
responseType = monitoring.Monitoring.AlarmResponse.class,
methodType = io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING)
public static io.grpc.MethodDescriptor<monitoring.Monitoring.AlarmSubscription,
monitoring.Monitoring.AlarmResponse> getGetAlarmResponseStreamMethod() {
io.grpc.MethodDescriptor<monitoring.Monitoring.AlarmSubscription, monitoring.Monitoring.AlarmResponse> getGetAlarmResponseStreamMethod;
if ((getGetAlarmResponseStreamMethod = MonitoringServiceGrpc.getGetAlarmResponseStreamMethod) == null) {
synchronized (MonitoringServiceGrpc.class) {
if ((getGetAlarmResponseStreamMethod = MonitoringServiceGrpc.getGetAlarmResponseStreamMethod) == null) {
MonitoringServiceGrpc.getGetAlarmResponseStreamMethod = getGetAlarmResponseStreamMethod =
io.grpc.MethodDescriptor.<monitoring.Monitoring.AlarmSubscription, monitoring.Monitoring.AlarmResponse>newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetAlarmResponseStream"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
monitoring.Monitoring.AlarmSubscription.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
monitoring.Monitoring.AlarmResponse.getDefaultInstance()))
.setSchemaDescriptor(new MonitoringServiceMethodDescriptorSupplier("GetAlarmResponseStream"))
.build();
}
}
}
return getGetAlarmResponseStreamMethod;
}
private static volatile io.grpc.MethodDescriptor<monitoring.Monitoring.AlarmID,
context.ContextOuterClass.Empty> getDeleteAlarmMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "DeleteAlarm",
requestType = monitoring.Monitoring.AlarmID.class,
responseType = context.ContextOuterClass.Empty.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor<monitoring.Monitoring.AlarmID,
context.ContextOuterClass.Empty> getDeleteAlarmMethod() {
io.grpc.MethodDescriptor<monitoring.Monitoring.AlarmID, context.ContextOuterClass.Empty> getDeleteAlarmMethod;
if ((getDeleteAlarmMethod = MonitoringServiceGrpc.getDeleteAlarmMethod) == null) {
synchronized (MonitoringServiceGrpc.class) {
if ((getDeleteAlarmMethod = MonitoringServiceGrpc.getDeleteAlarmMethod) == null) {
MonitoringServiceGrpc.getDeleteAlarmMethod = getDeleteAlarmMethod =
io.grpc.MethodDescriptor.<monitoring.Monitoring.AlarmID, context.ContextOuterClass.Empty>newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteAlarm"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
monitoring.Monitoring.AlarmID.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
context.ContextOuterClass.Empty.getDefaultInstance()))
.setSchemaDescriptor(new MonitoringServiceMethodDescriptorSupplier("DeleteAlarm"))
.build();
}
}
}
return getDeleteAlarmMethod;
}
private static volatile io.grpc.MethodDescriptor<monitoring.Monitoring.KpiId,
monitoring.Monitoring.Kpi> getGetStreamKpiMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "GetStreamKpi",
requestType = monitoring.Monitoring.KpiId.class,
responseType = monitoring.Monitoring.Kpi.class,
methodType = io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING)
public static io.grpc.MethodDescriptor<monitoring.Monitoring.KpiId,
monitoring.Monitoring.Kpi> getGetStreamKpiMethod() {
io.grpc.MethodDescriptor<monitoring.Monitoring.KpiId, monitoring.Monitoring.Kpi> getGetStreamKpiMethod;
if ((getGetStreamKpiMethod = MonitoringServiceGrpc.getGetStreamKpiMethod) == null) {
synchronized (MonitoringServiceGrpc.class) {
if ((getGetStreamKpiMethod = MonitoringServiceGrpc.getGetStreamKpiMethod) == null) {
MonitoringServiceGrpc.getGetStreamKpiMethod = getGetStreamKpiMethod =
io.grpc.MethodDescriptor.<monitoring.Monitoring.KpiId, monitoring.Monitoring.Kpi>newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetStreamKpi"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
monitoring.Monitoring.KpiId.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
monitoring.Monitoring.Kpi.getDefaultInstance()))
.setSchemaDescriptor(new MonitoringServiceMethodDescriptorSupplier("GetStreamKpi"))
.build();
}
}
}
return getGetStreamKpiMethod;
}
private static volatile io.grpc.MethodDescriptor<monitoring.Monitoring.KpiId,
monitoring.Monitoring.Kpi> getGetInstantKpiMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "GetInstantKpi",
requestType = monitoring.Monitoring.KpiId.class,
responseType = monitoring.Monitoring.Kpi.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor<monitoring.Monitoring.KpiId,
monitoring.Monitoring.Kpi> getGetInstantKpiMethod() {
io.grpc.MethodDescriptor<monitoring.Monitoring.KpiId, monitoring.Monitoring.Kpi> getGetInstantKpiMethod;
if ((getGetInstantKpiMethod = MonitoringServiceGrpc.getGetInstantKpiMethod) == null) {
synchronized (MonitoringServiceGrpc.class) {
if ((getGetInstantKpiMethod = MonitoringServiceGrpc.getGetInstantKpiMethod) == null) {
MonitoringServiceGrpc.getGetInstantKpiMethod = getGetInstantKpiMethod =
io.grpc.MethodDescriptor.<monitoring.Monitoring.KpiId, monitoring.Monitoring.Kpi>newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetInstantKpi"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
monitoring.Monitoring.KpiId.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
monitoring.Monitoring.Kpi.getDefaultInstance()))
.setSchemaDescriptor(new MonitoringServiceMethodDescriptorSupplier("GetInstantKpi"))
.build();
}
}
}
return getGetInstantKpiMethod;
}
/**
* Creates a new async stub that supports all call types for the service
*/
public static MonitoringServiceStub newStub(io.grpc.Channel channel) {
io.grpc.stub.AbstractStub.StubFactory<MonitoringServiceStub> factory =
new io.grpc.stub.AbstractStub.StubFactory<MonitoringServiceStub>() {
@java.lang.Override
public MonitoringServiceStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new MonitoringServiceStub(channel, callOptions);
}
};
return MonitoringServiceStub.newStub(factory, channel);
}
/**
* Creates a new blocking-style stub that supports unary and streaming output calls on the service
*/
public static MonitoringServiceBlockingStub newBlockingStub(
io.grpc.Channel channel) {
io.grpc.stub.AbstractStub.StubFactory<MonitoringServiceBlockingStub> factory =
new io.grpc.stub.AbstractStub.StubFactory<MonitoringServiceBlockingStub>() {
@java.lang.Override
public MonitoringServiceBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new MonitoringServiceBlockingStub(channel, callOptions);
}
};
return MonitoringServiceBlockingStub.newStub(factory, channel);
}
/**
* Creates a new ListenableFuture-style stub that supports unary calls on the service
*/
public static MonitoringServiceFutureStub newFutureStub(
io.grpc.Channel channel) {
io.grpc.stub.AbstractStub.StubFactory<MonitoringServiceFutureStub> factory =
new io.grpc.stub.AbstractStub.StubFactory<MonitoringServiceFutureStub>() {
@java.lang.Override
public MonitoringServiceFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new MonitoringServiceFutureStub(channel, callOptions);
}
};
return MonitoringServiceFutureStub.newStub(factory, channel);
}
/**
*/
public static abstract class MonitoringServiceImplBase implements io.grpc.BindableService {
/**
*/
public void setKpi(monitoring.Monitoring.KpiDescriptor request,
io.grpc.stub.StreamObserver<monitoring.Monitoring.KpiId> responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getSetKpiMethod(), responseObserver);
}
/**
*/
public void deleteKpi(monitoring.Monitoring.KpiId request,
io.grpc.stub.StreamObserver<context.ContextOuterClass.Empty> responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getDeleteKpiMethod(), responseObserver);
}
/**
*/
public void getKpiDescriptor(monitoring.Monitoring.KpiId request,
io.grpc.stub.StreamObserver<monitoring.Monitoring.KpiDescriptor> responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetKpiDescriptorMethod(), responseObserver);
}
/**
*/
public void getKpiDescriptorList(context.ContextOuterClass.Empty request,
io.grpc.stub.StreamObserver<monitoring.Monitoring.KpiDescriptorList> responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetKpiDescriptorListMethod(), responseObserver);
}
/**
*/
public void includeKpi(monitoring.Monitoring.Kpi request,
io.grpc.stub.StreamObserver<context.ContextOuterClass.Empty> responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getIncludeKpiMethod(), responseObserver);
}
/**
*/
public void monitorKpi(monitoring.Monitoring.MonitorKpiRequest request,
io.grpc.stub.StreamObserver<context.ContextOuterClass.Empty> responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getMonitorKpiMethod(), responseObserver);
}
/**
*/
public void queryKpiData(monitoring.Monitoring.KpiQuery request,
io.grpc.stub.StreamObserver<monitoring.Monitoring.RawKpiTable> responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getQueryKpiDataMethod(), responseObserver);
}
/**
*/
public void setKpiSubscription(monitoring.Monitoring.SubsDescriptor request,
io.grpc.stub.StreamObserver<monitoring.Monitoring.SubsResponse> responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getSetKpiSubscriptionMethod(), responseObserver);
}
/**
*/
public void getSubsDescriptor(monitoring.Monitoring.SubscriptionID request,
io.grpc.stub.StreamObserver<monitoring.Monitoring.SubsDescriptor> responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetSubsDescriptorMethod(), responseObserver);
}
/**
*/
public void getSubscriptions(context.ContextOuterClass.Empty request,
io.grpc.stub.StreamObserver<monitoring.Monitoring.SubsList> responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetSubscriptionsMethod(), responseObserver);
}
/**
*/
public void deleteSubscription(monitoring.Monitoring.SubscriptionID request,
io.grpc.stub.StreamObserver<context.ContextOuterClass.Empty> responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getDeleteSubscriptionMethod(), responseObserver);
}
/**
*/
public void setKpiAlarm(monitoring.Monitoring.AlarmDescriptor request,
io.grpc.stub.StreamObserver<monitoring.Monitoring.AlarmID> responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getSetKpiAlarmMethod(), responseObserver);
}
/**
*/
public void getAlarms(context.ContextOuterClass.Empty request,
io.grpc.stub.StreamObserver<monitoring.Monitoring.AlarmList> responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetAlarmsMethod(), responseObserver);
}
/**
*/
public void getAlarmDescriptor(monitoring.Monitoring.AlarmID request,
io.grpc.stub.StreamObserver<monitoring.Monitoring.AlarmDescriptor> responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetAlarmDescriptorMethod(), responseObserver);
}
/**
*/
public void getAlarmResponseStream(monitoring.Monitoring.AlarmSubscription request,
io.grpc.stub.StreamObserver<monitoring.Monitoring.AlarmResponse> responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetAlarmResponseStreamMethod(), responseObserver);
}
/**
*/
public void deleteAlarm(monitoring.Monitoring.AlarmID request,
io.grpc.stub.StreamObserver<context.ContextOuterClass.Empty> responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getDeleteAlarmMethod(), responseObserver);
}
/**
*/
public void getStreamKpi(monitoring.Monitoring.KpiId request,
io.grpc.stub.StreamObserver<monitoring.Monitoring.Kpi> responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetStreamKpiMethod(), responseObserver);
}
/**
*/
public void getInstantKpi(monitoring.Monitoring.KpiId request,
io.grpc.stub.StreamObserver<monitoring.Monitoring.Kpi> responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetInstantKpiMethod(), responseObserver);
}
@java.lang.Override public final io.grpc.ServerServiceDefinition bindService() {
return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
.addMethod(
getSetKpiMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
monitoring.Monitoring.KpiDescriptor,
monitoring.Monitoring.KpiId>(
this, METHODID_SET_KPI)))
.addMethod(
getDeleteKpiMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
monitoring.Monitoring.KpiId,
context.ContextOuterClass.Empty>(
this, METHODID_DELETE_KPI)))
.addMethod(
getGetKpiDescriptorMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
monitoring.Monitoring.KpiId,
monitoring.Monitoring.KpiDescriptor>(
this, METHODID_GET_KPI_DESCRIPTOR)))
.addMethod(
getGetKpiDescriptorListMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
context.ContextOuterClass.Empty,
monitoring.Monitoring.KpiDescriptorList>(
this, METHODID_GET_KPI_DESCRIPTOR_LIST)))
.addMethod(
getIncludeKpiMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
monitoring.Monitoring.Kpi,
context.ContextOuterClass.Empty>(
this, METHODID_INCLUDE_KPI)))
.addMethod(
getMonitorKpiMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
monitoring.Monitoring.MonitorKpiRequest,
context.ContextOuterClass.Empty>(
this, METHODID_MONITOR_KPI)))
.addMethod(
getQueryKpiDataMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
monitoring.Monitoring.KpiQuery,
monitoring.Monitoring.RawKpiTable>(
this, METHODID_QUERY_KPI_DATA)))
.addMethod(
getSetKpiSubscriptionMethod(),
io.grpc.stub.ServerCalls.asyncServerStreamingCall(
new MethodHandlers<
monitoring.Monitoring.SubsDescriptor,
monitoring.Monitoring.SubsResponse>(
this, METHODID_SET_KPI_SUBSCRIPTION)))
.addMethod(
getGetSubsDescriptorMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
monitoring.Monitoring.SubscriptionID,
monitoring.Monitoring.SubsDescriptor>(
this, METHODID_GET_SUBS_DESCRIPTOR)))
.addMethod(
getGetSubscriptionsMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
context.ContextOuterClass.Empty,
monitoring.Monitoring.SubsList>(
this, METHODID_GET_SUBSCRIPTIONS)))
.addMethod(
getDeleteSubscriptionMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
monitoring.Monitoring.SubscriptionID,
context.ContextOuterClass.Empty>(
this, METHODID_DELETE_SUBSCRIPTION)))
.addMethod(
getSetKpiAlarmMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
monitoring.Monitoring.AlarmDescriptor,
monitoring.Monitoring.AlarmID>(
this, METHODID_SET_KPI_ALARM)))
.addMethod(
getGetAlarmsMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
context.ContextOuterClass.Empty,
monitoring.Monitoring.AlarmList>(
this, METHODID_GET_ALARMS)))
.addMethod(
getGetAlarmDescriptorMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
monitoring.Monitoring.AlarmID,
monitoring.Monitoring.AlarmDescriptor>(
this, METHODID_GET_ALARM_DESCRIPTOR)))
.addMethod(
getGetAlarmResponseStreamMethod(),
io.grpc.stub.ServerCalls.asyncServerStreamingCall(
new MethodHandlers<
monitoring.Monitoring.AlarmSubscription,
monitoring.Monitoring.AlarmResponse>(
this, METHODID_GET_ALARM_RESPONSE_STREAM)))
.addMethod(
getDeleteAlarmMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
monitoring.Monitoring.AlarmID,
context.ContextOuterClass.Empty>(
this, METHODID_DELETE_ALARM)))
.addMethod(
getGetStreamKpiMethod(),
io.grpc.stub.ServerCalls.asyncServerStreamingCall(
new MethodHandlers<
monitoring.Monitoring.KpiId,
monitoring.Monitoring.Kpi>(
this, METHODID_GET_STREAM_KPI)))
.addMethod(
getGetInstantKpiMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
monitoring.Monitoring.KpiId,
monitoring.Monitoring.Kpi>(
this, METHODID_GET_INSTANT_KPI)))
.build();
}
}
/**
*/
public static final class MonitoringServiceStub extends io.grpc.stub.AbstractAsyncStub<MonitoringServiceStub> {
private MonitoringServiceStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected MonitoringServiceStub build(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new MonitoringServiceStub(channel, callOptions);
}
/**
*/
public void setKpi(monitoring.Monitoring.KpiDescriptor request,
io.grpc.stub.StreamObserver<monitoring.Monitoring.KpiId> responseObserver) {
io.grpc.stub.ClientCalls.asyncUnaryCall(
getChannel().newCall(getSetKpiMethod(), getCallOptions()), request, responseObserver);
}
/**
*/
public void deleteKpi(monitoring.Monitoring.KpiId request,
io.grpc.stub.StreamObserver<context.ContextOuterClass.Empty> responseObserver) {
io.grpc.stub.ClientCalls.asyncUnaryCall(
getChannel().newCall(getDeleteKpiMethod(), getCallOptions()), request, responseObserver);
}
/**
*/
public void getKpiDescriptor(monitoring.Monitoring.KpiId request,
io.grpc.stub.StreamObserver<monitoring.Monitoring.KpiDescriptor> responseObserver) {
io.grpc.stub.ClientCalls.asyncUnaryCall(
getChannel().newCall(getGetKpiDescriptorMethod(), getCallOptions()), request, responseObserver);
}
/**
*/
public void getKpiDescriptorList(context.ContextOuterClass.Empty request,
io.grpc.stub.StreamObserver<monitoring.Monitoring.KpiDescriptorList> responseObserver) {
io.grpc.stub.ClientCalls.asyncUnaryCall(
getChannel().newCall(getGetKpiDescriptorListMethod(), getCallOptions()), request, responseObserver);
}
/**
*/
public void includeKpi(monitoring.Monitoring.Kpi request,
io.grpc.stub.StreamObserver<context.ContextOuterClass.Empty> responseObserver) {
io.grpc.stub.ClientCalls.asyncUnaryCall(
getChannel().newCall(getIncludeKpiMethod(), getCallOptions()), request, responseObserver);
}
/**
*/
public void monitorKpi(monitoring.Monitoring.MonitorKpiRequest request,
io.grpc.stub.StreamObserver<context.ContextOuterClass.Empty> responseObserver) {
io.grpc.stub.ClientCalls.asyncUnaryCall(
getChannel().newCall(getMonitorKpiMethod(), getCallOptions()), request, responseObserver);
}
/**
*/
public void queryKpiData(monitoring.Monitoring.KpiQuery request,
io.grpc.stub.StreamObserver<monitoring.Monitoring.RawKpiTable> responseObserver) {
io.grpc.stub.ClientCalls.asyncUnaryCall(
getChannel().newCall(getQueryKpiDataMethod(), getCallOptions()), request, responseObserver);
}
/**
*/
public void setKpiSubscription(monitoring.Monitoring.SubsDescriptor request,
io.grpc.stub.StreamObserver<monitoring.Monitoring.SubsResponse> responseObserver) {
io.grpc.stub.ClientCalls.asyncServerStreamingCall(
getChannel().newCall(getSetKpiSubscriptionMethod(), getCallOptions()), request, responseObserver);
}
/**
*/
public void getSubsDescriptor(monitoring.Monitoring.SubscriptionID request,
io.grpc.stub.StreamObserver<monitoring.Monitoring.SubsDescriptor> responseObserver) {
io.grpc.stub.ClientCalls.asyncUnaryCall(
getChannel().newCall(getGetSubsDescriptorMethod(), getCallOptions()), request, responseObserver);
}
/**
*/
public void getSubscriptions(context.ContextOuterClass.Empty request,
io.grpc.stub.StreamObserver<monitoring.Monitoring.SubsList> responseObserver) {
io.grpc.stub.ClientCalls.asyncUnaryCall(
getChannel().newCall(getGetSubscriptionsMethod(), getCallOptions()), request, responseObserver);
}
/**
*/
public void deleteSubscription(monitoring.Monitoring.SubscriptionID request,
io.grpc.stub.StreamObserver<context.ContextOuterClass.Empty> responseObserver) {
io.grpc.stub.ClientCalls.asyncUnaryCall(
getChannel().newCall(getDeleteSubscriptionMethod(), getCallOptions()), request, responseObserver);
}
/**
*/
public void setKpiAlarm(monitoring.Monitoring.AlarmDescriptor request,
io.grpc.stub.StreamObserver<monitoring.Monitoring.AlarmID> responseObserver) {
io.grpc.stub.ClientCalls.asyncUnaryCall(
getChannel().newCall(getSetKpiAlarmMethod(), getCallOptions()), request, responseObserver);
}
/**
*/
public void getAlarms(context.ContextOuterClass.Empty request,
io.grpc.stub.StreamObserver<monitoring.Monitoring.AlarmList> responseObserver) {
io.grpc.stub.ClientCalls.asyncUnaryCall(
getChannel().newCall(getGetAlarmsMethod(), getCallOptions()), request, responseObserver);
}
/**
*/
public void getAlarmDescriptor(monitoring.Monitoring.AlarmID request,
io.grpc.stub.StreamObserver<monitoring.Monitoring.AlarmDescriptor> responseObserver) {
io.grpc.stub.ClientCalls.asyncUnaryCall(
getChannel().newCall(getGetAlarmDescriptorMethod(), getCallOptions()), request, responseObserver);
}
/**
*/
public void getAlarmResponseStream(monitoring.Monitoring.AlarmSubscription request,
io.grpc.stub.StreamObserver<monitoring.Monitoring.AlarmResponse> responseObserver) {
io.grpc.stub.ClientCalls.asyncServerStreamingCall(
getChannel().newCall(getGetAlarmResponseStreamMethod(), getCallOptions()), request, responseObserver);
}
/**
*/
public void deleteAlarm(monitoring.Monitoring.AlarmID request,
io.grpc.stub.StreamObserver<context.ContextOuterClass.Empty> responseObserver) {
io.grpc.stub.ClientCalls.asyncUnaryCall(
getChannel().newCall(getDeleteAlarmMethod(), getCallOptions()), request, responseObserver);
}
/**
*/
public void getStreamKpi(monitoring.Monitoring.KpiId request,
io.grpc.stub.StreamObserver<monitoring.Monitoring.Kpi> responseObserver) {
io.grpc.stub.ClientCalls.asyncServerStreamingCall(
getChannel().newCall(getGetStreamKpiMethod(), getCallOptions()), request, responseObserver);
}
/**
*/
public void getInstantKpi(monitoring.Monitoring.KpiId request,
io.grpc.stub.StreamObserver<monitoring.Monitoring.Kpi> responseObserver) {
io.grpc.stub.ClientCalls.asyncUnaryCall(
getChannel().newCall(getGetInstantKpiMethod(), getCallOptions()), request, responseObserver);
}
}
/**
*/
public static final class MonitoringServiceBlockingStub extends io.grpc.stub.AbstractBlockingStub<MonitoringServiceBlockingStub> {
private MonitoringServiceBlockingStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected MonitoringServiceBlockingStub build(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new MonitoringServiceBlockingStub(channel, callOptions);
}
/**
*/
public monitoring.Monitoring.KpiId setKpi(monitoring.Monitoring.KpiDescriptor request) {
return io.grpc.stub.ClientCalls.blockingUnaryCall(
getChannel(), getSetKpiMethod(), getCallOptions(), request);
}
/**
*/
public context.ContextOuterClass.Empty deleteKpi(monitoring.Monitoring.KpiId request) {
return io.grpc.stub.ClientCalls.blockingUnaryCall(
getChannel(), getDeleteKpiMethod(), getCallOptions(), request);
}
/**
*/
public monitoring.Monitoring.KpiDescriptor getKpiDescriptor(monitoring.Monitoring.KpiId request) {
return io.grpc.stub.ClientCalls.blockingUnaryCall(
getChannel(), getGetKpiDescriptorMethod(), getCallOptions(), request);
}
/**
*/
public monitoring.Monitoring.KpiDescriptorList getKpiDescriptorList(context.ContextOuterClass.Empty request) {
return io.grpc.stub.ClientCalls.blockingUnaryCall(
getChannel(), getGetKpiDescriptorListMethod(), getCallOptions(), request);
}
/**
*/
public context.ContextOuterClass.Empty includeKpi(monitoring.Monitoring.Kpi request) {
return io.grpc.stub.ClientCalls.blockingUnaryCall(
getChannel(), getIncludeKpiMethod(), getCallOptions(), request);
}
/**
*/
public context.ContextOuterClass.Empty monitorKpi(monitoring.Monitoring.MonitorKpiRequest request) {
return io.grpc.stub.ClientCalls.blockingUnaryCall(
getChannel(), getMonitorKpiMethod(), getCallOptions(), request);
}
/**
*/
public monitoring.Monitoring.RawKpiTable queryKpiData(monitoring.Monitoring.KpiQuery request) {
return io.grpc.stub.ClientCalls.blockingUnaryCall(
getChannel(), getQueryKpiDataMethod(), getCallOptions(), request);
}
/**
*/
public java.util.Iterator<monitoring.Monitoring.SubsResponse> setKpiSubscription(
monitoring.Monitoring.SubsDescriptor request) {
return io.grpc.stub.ClientCalls.blockingServerStreamingCall(
getChannel(), getSetKpiSubscriptionMethod(), getCallOptions(), request);
}
/**
*/
public monitoring.Monitoring.SubsDescriptor getSubsDescriptor(monitoring.Monitoring.SubscriptionID request) {
return io.grpc.stub.ClientCalls.blockingUnaryCall(
getChannel(), getGetSubsDescriptorMethod(), getCallOptions(), request);
}
/**
*/
public monitoring.Monitoring.SubsList getSubscriptions(context.ContextOuterClass.Empty request) {
return io.grpc.stub.ClientCalls.blockingUnaryCall(
getChannel(), getGetSubscriptionsMethod(), getCallOptions(), request);
}
/**
*/
public context.ContextOuterClass.Empty deleteSubscription(monitoring.Monitoring.SubscriptionID request) {
return io.grpc.stub.ClientCalls.blockingUnaryCall(
getChannel(), getDeleteSubscriptionMethod(), getCallOptions(), request);
}
/**
*/
public monitoring.Monitoring.AlarmID setKpiAlarm(monitoring.Monitoring.AlarmDescriptor request) {
return io.grpc.stub.ClientCalls.blockingUnaryCall(
getChannel(), getSetKpiAlarmMethod(), getCallOptions(), request);
}
/**
*/
public monitoring.Monitoring.AlarmList getAlarms(context.ContextOuterClass.Empty request) {
return io.grpc.stub.ClientCalls.blockingUnaryCall(
getChannel(), getGetAlarmsMethod(), getCallOptions(), request);
}
/**
*/
public monitoring.Monitoring.AlarmDescriptor getAlarmDescriptor(monitoring.Monitoring.AlarmID request) {
return io.grpc.stub.ClientCalls.blockingUnaryCall(
getChannel(), getGetAlarmDescriptorMethod(), getCallOptions(), request);
}
/**
*/
public java.util.Iterator<monitoring.Monitoring.AlarmResponse> getAlarmResponseStream(
monitoring.Monitoring.AlarmSubscription request) {
return io.grpc.stub.ClientCalls.blockingServerStreamingCall(
getChannel(), getGetAlarmResponseStreamMethod(), getCallOptions(), request);
}
/**
*/
public context.ContextOuterClass.Empty deleteAlarm(monitoring.Monitoring.AlarmID request) {
return io.grpc.stub.ClientCalls.blockingUnaryCall(
getChannel(), getDeleteAlarmMethod(), getCallOptions(), request);
}
/**
*/
public java.util.Iterator<monitoring.Monitoring.Kpi> getStreamKpi(
monitoring.Monitoring.KpiId request) {
return io.grpc.stub.ClientCalls.blockingServerStreamingCall(
getChannel(), getGetStreamKpiMethod(), getCallOptions(), request);
}
/**
*/
public monitoring.Monitoring.Kpi getInstantKpi(monitoring.Monitoring.KpiId request) {
return io.grpc.stub.ClientCalls.blockingUnaryCall(
getChannel(), getGetInstantKpiMethod(), getCallOptions(), request);
}
}
/**
*/
public static final class MonitoringServiceFutureStub extends io.grpc.stub.AbstractFutureStub<MonitoringServiceFutureStub> {
private MonitoringServiceFutureStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected MonitoringServiceFutureStub build(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new MonitoringServiceFutureStub(channel, callOptions);
}
/**
*/
public com.google.common.util.concurrent.ListenableFuture<monitoring.Monitoring.KpiId> setKpi(
monitoring.Monitoring.KpiDescriptor request) {
return io.grpc.stub.ClientCalls.futureUnaryCall(
getChannel().newCall(getSetKpiMethod(), getCallOptions()), request);
}
/**
*/
public com.google.common.util.concurrent.ListenableFuture<context.ContextOuterClass.Empty> deleteKpi(
monitoring.Monitoring.KpiId request) {
return io.grpc.stub.ClientCalls.futureUnaryCall(
getChannel().newCall(getDeleteKpiMethod(), getCallOptions()), request);
}
/**
*/
public com.google.common.util.concurrent.ListenableFuture<monitoring.Monitoring.KpiDescriptor> getKpiDescriptor(
monitoring.Monitoring.KpiId request) {
return io.grpc.stub.ClientCalls.futureUnaryCall(
getChannel().newCall(getGetKpiDescriptorMethod(), getCallOptions()), request);
}
/**
*/
public com.google.common.util.concurrent.ListenableFuture<monitoring.Monitoring.KpiDescriptorList> getKpiDescriptorList(
context.ContextOuterClass.Empty request) {
return io.grpc.stub.ClientCalls.futureUnaryCall(
getChannel().newCall(getGetKpiDescriptorListMethod(), getCallOptions()), request);
}
/**
*/
public com.google.common.util.concurrent.ListenableFuture<context.ContextOuterClass.Empty> includeKpi(
monitoring.Monitoring.Kpi request) {
return io.grpc.stub.ClientCalls.futureUnaryCall(
getChannel().newCall(getIncludeKpiMethod(), getCallOptions()), request);
}
/**
*/
public com.google.common.util.concurrent.ListenableFuture<context.ContextOuterClass.Empty> monitorKpi(
monitoring.Monitoring.MonitorKpiRequest request) {
return io.grpc.stub.ClientCalls.futureUnaryCall(
getChannel().newCall(getMonitorKpiMethod(), getCallOptions()), request);
}
/**
*/
public com.google.common.util.concurrent.ListenableFuture<monitoring.Monitoring.RawKpiTable> queryKpiData(
monitoring.Monitoring.KpiQuery request) {
return io.grpc.stub.ClientCalls.futureUnaryCall(
getChannel().newCall(getQueryKpiDataMethod(), getCallOptions()), request);
}
/**
*/
public com.google.common.util.concurrent.ListenableFuture<monitoring.Monitoring.SubsDescriptor> getSubsDescriptor(
monitoring.Monitoring.SubscriptionID request) {
return io.grpc.stub.ClientCalls.futureUnaryCall(
getChannel().newCall(getGetSubsDescriptorMethod(), getCallOptions()), request);
}
/**
*/
public com.google.common.util.concurrent.ListenableFuture<monitoring.Monitoring.SubsList> getSubscriptions(
context.ContextOuterClass.Empty request) {
return io.grpc.stub.ClientCalls.futureUnaryCall(
getChannel().newCall(getGetSubscriptionsMethod(), getCallOptions()), request);
}
/**
*/
public com.google.common.util.concurrent.ListenableFuture<context.ContextOuterClass.Empty> deleteSubscription(
monitoring.Monitoring.SubscriptionID request) {
return io.grpc.stub.ClientCalls.futureUnaryCall(
getChannel().newCall(getDeleteSubscriptionMethod(), getCallOptions()), request);
}
/**
*/
public com.google.common.util.concurrent.ListenableFuture<monitoring.Monitoring.AlarmID> setKpiAlarm(
monitoring.Monitoring.AlarmDescriptor request) {
return io.grpc.stub.ClientCalls.futureUnaryCall(
getChannel().newCall(getSetKpiAlarmMethod(), getCallOptions()), request);
}
/**
*/
public com.google.common.util.concurrent.ListenableFuture<monitoring.Monitoring.AlarmList> getAlarms(
context.ContextOuterClass.Empty request) {
return io.grpc.stub.ClientCalls.futureUnaryCall(
getChannel().newCall(getGetAlarmsMethod(), getCallOptions()), request);
}
/**
*/
public com.google.common.util.concurrent.ListenableFuture<monitoring.Monitoring.AlarmDescriptor> getAlarmDescriptor(
monitoring.Monitoring.AlarmID request) {
return io.grpc.stub.ClientCalls.futureUnaryCall(
getChannel().newCall(getGetAlarmDescriptorMethod(), getCallOptions()), request);
}
/**
*/
public com.google.common.util.concurrent.ListenableFuture<context.ContextOuterClass.Empty> deleteAlarm(
monitoring.Monitoring.AlarmID request) {
return io.grpc.stub.ClientCalls.futureUnaryCall(
getChannel().newCall(getDeleteAlarmMethod(), getCallOptions()), request);
}
/**
*/
public com.google.common.util.concurrent.ListenableFuture<monitoring.Monitoring.Kpi> getInstantKpi(
monitoring.Monitoring.KpiId request) {
return io.grpc.stub.ClientCalls.futureUnaryCall(
getChannel().newCall(getGetInstantKpiMethod(), getCallOptions()), request);
}
}
private static final int METHODID_SET_KPI = 0;
private static final int METHODID_DELETE_KPI = 1;
private static final int METHODID_GET_KPI_DESCRIPTOR = 2;
private static final int METHODID_GET_KPI_DESCRIPTOR_LIST = 3;
private static final int METHODID_INCLUDE_KPI = 4;
private static final int METHODID_MONITOR_KPI = 5;
private static final int METHODID_QUERY_KPI_DATA = 6;
private static final int METHODID_SET_KPI_SUBSCRIPTION = 7;
private static final int METHODID_GET_SUBS_DESCRIPTOR = 8;
private static final int METHODID_GET_SUBSCRIPTIONS = 9;
private static final int METHODID_DELETE_SUBSCRIPTION = 10;
private static final int METHODID_SET_KPI_ALARM = 11;
private static final int METHODID_GET_ALARMS = 12;
private static final int METHODID_GET_ALARM_DESCRIPTOR = 13;
private static final int METHODID_GET_ALARM_RESPONSE_STREAM = 14;
private static final int METHODID_DELETE_ALARM = 15;
private static final int METHODID_GET_STREAM_KPI = 16;
private static final int METHODID_GET_INSTANT_KPI = 17;
private static final class MethodHandlers<Req, Resp> implements
io.grpc.stub.ServerCalls.UnaryMethod<Req, Resp>,
io.grpc.stub.ServerCalls.ServerStreamingMethod<Req, Resp>,
io.grpc.stub.ServerCalls.ClientStreamingMethod<Req, Resp>,
io.grpc.stub.ServerCalls.BidiStreamingMethod<Req, Resp> {
private final MonitoringServiceImplBase serviceImpl;
private final int methodId;
MethodHandlers(MonitoringServiceImplBase serviceImpl, int methodId) {
this.serviceImpl = serviceImpl;
this.methodId = methodId;
}
@java.lang.Override
@java.lang.SuppressWarnings("unchecked")
public void invoke(Req request, io.grpc.stub.StreamObserver<Resp> responseObserver) {
switch (methodId) {
case METHODID_SET_KPI:
serviceImpl.setKpi((monitoring.Monitoring.KpiDescriptor) request,
(io.grpc.stub.StreamObserver<monitoring.Monitoring.KpiId>) responseObserver);
break;
case METHODID_DELETE_KPI:
serviceImpl.deleteKpi((monitoring.Monitoring.KpiId) request,
(io.grpc.stub.StreamObserver<context.ContextOuterClass.Empty>) responseObserver);
break;
case METHODID_GET_KPI_DESCRIPTOR:
serviceImpl.getKpiDescriptor((monitoring.Monitoring.KpiId) request,
(io.grpc.stub.StreamObserver<monitoring.Monitoring.KpiDescriptor>) responseObserver);
break;
case METHODID_GET_KPI_DESCRIPTOR_LIST:
serviceImpl.getKpiDescriptorList((context.ContextOuterClass.Empty) request,
(io.grpc.stub.StreamObserver<monitoring.Monitoring.KpiDescriptorList>) responseObserver);
break;
case METHODID_INCLUDE_KPI:
serviceImpl.includeKpi((monitoring.Monitoring.Kpi) request,
(io.grpc.stub.StreamObserver<context.ContextOuterClass.Empty>) responseObserver);
break;
case METHODID_MONITOR_KPI:
serviceImpl.monitorKpi((monitoring.Monitoring.MonitorKpiRequest) request,
(io.grpc.stub.StreamObserver<context.ContextOuterClass.Empty>) responseObserver);
break;
case METHODID_QUERY_KPI_DATA:
serviceImpl.queryKpiData((monitoring.Monitoring.KpiQuery) request,
(io.grpc.stub.StreamObserver<monitoring.Monitoring.RawKpiTable>) responseObserver);
break;
case METHODID_SET_KPI_SUBSCRIPTION:
serviceImpl.setKpiSubscription((monitoring.Monitoring.SubsDescriptor) request,
(io.grpc.stub.StreamObserver<monitoring.Monitoring.SubsResponse>) responseObserver);
break;
case METHODID_GET_SUBS_DESCRIPTOR:
serviceImpl.getSubsDescriptor((monitoring.Monitoring.SubscriptionID) request,
(io.grpc.stub.StreamObserver<monitoring.Monitoring.SubsDescriptor>) responseObserver);
break;
case METHODID_GET_SUBSCRIPTIONS:
serviceImpl.getSubscriptions((context.ContextOuterClass.Empty) request,
(io.grpc.stub.StreamObserver<monitoring.Monitoring.SubsList>) responseObserver);
break;
case METHODID_DELETE_SUBSCRIPTION:
serviceImpl.deleteSubscription((monitoring.Monitoring.SubscriptionID) request,
(io.grpc.stub.StreamObserver<context.ContextOuterClass.Empty>) responseObserver);
break;
case METHODID_SET_KPI_ALARM:
serviceImpl.setKpiAlarm((monitoring.Monitoring.AlarmDescriptor) request,
(io.grpc.stub.StreamObserver<monitoring.Monitoring.AlarmID>) responseObserver);
break;
case METHODID_GET_ALARMS:
serviceImpl.getAlarms((context.ContextOuterClass.Empty) request,
(io.grpc.stub.StreamObserver<monitoring.Monitoring.AlarmList>) responseObserver);
break;
case METHODID_GET_ALARM_DESCRIPTOR:
serviceImpl.getAlarmDescriptor((monitoring.Monitoring.AlarmID) request,
(io.grpc.stub.StreamObserver<monitoring.Monitoring.AlarmDescriptor>) responseObserver);
break;
case METHODID_GET_ALARM_RESPONSE_STREAM:
serviceImpl.getAlarmResponseStream((monitoring.Monitoring.AlarmSubscription) request,
(io.grpc.stub.StreamObserver<monitoring.Monitoring.AlarmResponse>) responseObserver);
break;
case METHODID_DELETE_ALARM:
serviceImpl.deleteAlarm((monitoring.Monitoring.AlarmID) request,
(io.grpc.stub.StreamObserver<context.ContextOuterClass.Empty>) responseObserver);
break;
case METHODID_GET_STREAM_KPI:
serviceImpl.getStreamKpi((monitoring.Monitoring.KpiId) request,
(io.grpc.stub.StreamObserver<monitoring.Monitoring.Kpi>) responseObserver);
break;
case METHODID_GET_INSTANT_KPI:
serviceImpl.getInstantKpi((monitoring.Monitoring.KpiId) request,
(io.grpc.stub.StreamObserver<monitoring.Monitoring.Kpi>) responseObserver);
break;
default:
throw new AssertionError();
}
}
@java.lang.Override
@java.lang.SuppressWarnings("unchecked")
public io.grpc.stub.StreamObserver<Req> invoke(
io.grpc.stub.StreamObserver<Resp> responseObserver) {
switch (methodId) {
default:
throw new AssertionError();
}
}
}
private static abstract class MonitoringServiceBaseDescriptorSupplier
implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier {
MonitoringServiceBaseDescriptorSupplier() {}
@java.lang.Override
public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() {
return monitoring.Monitoring.getDescriptor();
}
@java.lang.Override
public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() {
return getFileDescriptor().findServiceByName("MonitoringService");
}
}
private static final class MonitoringServiceFileDescriptorSupplier
extends MonitoringServiceBaseDescriptorSupplier {
MonitoringServiceFileDescriptorSupplier() {}
}
private static final class MonitoringServiceMethodDescriptorSupplier
extends MonitoringServiceBaseDescriptorSupplier
implements io.grpc.protobuf.ProtoMethodDescriptorSupplier {
private final String methodName;
MonitoringServiceMethodDescriptorSupplier(String methodName) {
this.methodName = methodName;
}
@java.lang.Override
public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() {
return getServiceDescriptor().findMethodByName(methodName);
}
}
private static volatile io.grpc.ServiceDescriptor serviceDescriptor;
public static io.grpc.ServiceDescriptor getServiceDescriptor() {
io.grpc.ServiceDescriptor result = serviceDescriptor;
if (result == null) {
synchronized (MonitoringServiceGrpc.class) {
result = serviceDescriptor;
if (result == null) {
serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME)
.setSchemaDescriptor(new MonitoringServiceFileDescriptorSupplier())
.addMethod(getSetKpiMethod())
.addMethod(getDeleteKpiMethod())
.addMethod(getGetKpiDescriptorMethod())
.addMethod(getGetKpiDescriptorListMethod())
.addMethod(getIncludeKpiMethod())
.addMethod(getMonitorKpiMethod())
.addMethod(getQueryKpiDataMethod())
.addMethod(getSetKpiSubscriptionMethod())
.addMethod(getGetSubsDescriptorMethod())
.addMethod(getGetSubscriptionsMethod())
.addMethod(getDeleteSubscriptionMethod())
.addMethod(getSetKpiAlarmMethod())
.addMethod(getGetAlarmsMethod())
.addMethod(getGetAlarmDescriptorMethod())
.addMethod(getGetAlarmResponseStreamMethod())
.addMethod(getDeleteAlarmMethod())
.addMethod(getGetStreamKpiMethod())
.addMethod(getGetInstantKpiMethod())
.build();
}
}
}
return result;
}
}
package monitoring;
import static monitoring.MonitoringServiceGrpc.getServiceDescriptor;
import static io.grpc.stub.ServerCalls.asyncUnaryCall;
import static io.grpc.stub.ServerCalls.asyncServerStreamingCall;
import static io.grpc.stub.ServerCalls.asyncClientStreamingCall;
import static io.grpc.stub.ServerCalls.asyncBidiStreamingCall;
@javax.annotation.Generated(
value = "by Mutiny Grpc generator",
comments = "Source: monitoring.proto")
public final class MutinyMonitoringServiceGrpc implements io.quarkus.grpc.runtime.MutinyGrpc {
private MutinyMonitoringServiceGrpc() {}
public static MutinyMonitoringServiceStub newMutinyStub(io.grpc.Channel channel) {
return new MutinyMonitoringServiceStub(channel);
}
public static final class MutinyMonitoringServiceStub extends io.grpc.stub.AbstractStub<MutinyMonitoringServiceStub> implements io.quarkus.grpc.runtime.MutinyStub {
private MonitoringServiceGrpc.MonitoringServiceStub delegateStub;
private MutinyMonitoringServiceStub(io.grpc.Channel channel) {
super(channel);
delegateStub = MonitoringServiceGrpc.newStub(channel);
}
private MutinyMonitoringServiceStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
delegateStub = MonitoringServiceGrpc.newStub(channel).build(channel, callOptions);
}
@Override
protected MutinyMonitoringServiceStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new MutinyMonitoringServiceStub(channel, callOptions);
}
public io.smallrye.mutiny.Uni<monitoring.Monitoring.KpiId> setKpi(monitoring.Monitoring.KpiDescriptor request) {
return io.quarkus.grpc.runtime.ClientCalls.oneToOne(request, delegateStub::setKpi);
}
public io.smallrye.mutiny.Uni<context.ContextOuterClass.Empty> deleteKpi(monitoring.Monitoring.KpiId request) {
return io.quarkus.grpc.runtime.ClientCalls.oneToOne(request, delegateStub::deleteKpi);
}
public io.smallrye.mutiny.Uni<monitoring.Monitoring.KpiDescriptor> getKpiDescriptor(monitoring.Monitoring.KpiId request) {
return io.quarkus.grpc.runtime.ClientCalls.oneToOne(request, delegateStub::getKpiDescriptor);
}
public io.smallrye.mutiny.Uni<monitoring.Monitoring.KpiDescriptorList> getKpiDescriptorList(context.ContextOuterClass.Empty request) {
return io.quarkus.grpc.runtime.ClientCalls.oneToOne(request, delegateStub::getKpiDescriptorList);
}
public io.smallrye.mutiny.Uni<context.ContextOuterClass.Empty> includeKpi(monitoring.Monitoring.Kpi request) {
return io.quarkus.grpc.runtime.ClientCalls.oneToOne(request, delegateStub::includeKpi);
}
public io.smallrye.mutiny.Uni<context.ContextOuterClass.Empty> monitorKpi(monitoring.Monitoring.MonitorKpiRequest request) {
return io.quarkus.grpc.runtime.ClientCalls.oneToOne(request, delegateStub::monitorKpi);
}
public io.smallrye.mutiny.Uni<monitoring.Monitoring.RawKpiTable> queryKpiData(monitoring.Monitoring.KpiQuery request) {
return io.quarkus.grpc.runtime.ClientCalls.oneToOne(request, delegateStub::queryKpiData);
}
public io.smallrye.mutiny.Uni<monitoring.Monitoring.SubsDescriptor> getSubsDescriptor(monitoring.Monitoring.SubscriptionID request) {
return io.quarkus.grpc.runtime.ClientCalls.oneToOne(request, delegateStub::getSubsDescriptor);
}
public io.smallrye.mutiny.Uni<monitoring.Monitoring.SubsList> getSubscriptions(context.ContextOuterClass.Empty request) {
return io.quarkus.grpc.runtime.ClientCalls.oneToOne(request, delegateStub::getSubscriptions);
}
public io.smallrye.mutiny.Uni<context.ContextOuterClass.Empty> deleteSubscription(monitoring.Monitoring.SubscriptionID request) {
return io.quarkus.grpc.runtime.ClientCalls.oneToOne(request, delegateStub::deleteSubscription);
}
public io.smallrye.mutiny.Uni<monitoring.Monitoring.AlarmID> setKpiAlarm(monitoring.Monitoring.AlarmDescriptor request) {
return io.quarkus.grpc.runtime.ClientCalls.oneToOne(request, delegateStub::setKpiAlarm);
}
public io.smallrye.mutiny.Uni<monitoring.Monitoring.AlarmList> getAlarms(context.ContextOuterClass.Empty request) {
return io.quarkus.grpc.runtime.ClientCalls.oneToOne(request, delegateStub::getAlarms);
}
public io.smallrye.mutiny.Uni<monitoring.Monitoring.AlarmDescriptor> getAlarmDescriptor(monitoring.Monitoring.AlarmID request) {
return io.quarkus.grpc.runtime.ClientCalls.oneToOne(request, delegateStub::getAlarmDescriptor);
}
public io.smallrye.mutiny.Uni<context.ContextOuterClass.Empty> deleteAlarm(monitoring.Monitoring.AlarmID request) {
return io.quarkus.grpc.runtime.ClientCalls.oneToOne(request, delegateStub::deleteAlarm);
}
public io.smallrye.mutiny.Uni<monitoring.Monitoring.Kpi> getInstantKpi(monitoring.Monitoring.KpiId request) {
return io.quarkus.grpc.runtime.ClientCalls.oneToOne(request, delegateStub::getInstantKpi);
}
public io.smallrye.mutiny.Multi<monitoring.Monitoring.SubsResponse> setKpiSubscription(monitoring.Monitoring.SubsDescriptor request) {
return io.quarkus.grpc.runtime.ClientCalls.oneToMany(request, delegateStub::setKpiSubscription);
}
public io.smallrye.mutiny.Multi<monitoring.Monitoring.AlarmResponse> getAlarmResponseStream(monitoring.Monitoring.AlarmSubscription request) {
return io.quarkus.grpc.runtime.ClientCalls.oneToMany(request, delegateStub::getAlarmResponseStream);
}
public io.smallrye.mutiny.Multi<monitoring.Monitoring.Kpi> getStreamKpi(monitoring.Monitoring.KpiId request) {
return io.quarkus.grpc.runtime.ClientCalls.oneToMany(request, delegateStub::getStreamKpi);
}
}
public static abstract class MonitoringServiceImplBase implements io.grpc.BindableService {
private String compression;
/**
* Set whether the server will try to use a compressed response.
*
* @param compression the compression, e.g {@code gzip}
*/
public MonitoringServiceImplBase withCompression(String compression) {
this.compression = compression;
return this;
}
public io.smallrye.mutiny.Uni<monitoring.Monitoring.KpiId> setKpi(monitoring.Monitoring.KpiDescriptor request) {
throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED);
}
public io.smallrye.mutiny.Uni<context.ContextOuterClass.Empty> deleteKpi(monitoring.Monitoring.KpiId request) {
throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED);
}
public io.smallrye.mutiny.Uni<monitoring.Monitoring.KpiDescriptor> getKpiDescriptor(monitoring.Monitoring.KpiId request) {
throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED);
}
public io.smallrye.mutiny.Uni<monitoring.Monitoring.KpiDescriptorList> getKpiDescriptorList(context.ContextOuterClass.Empty request) {
throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED);
}
public io.smallrye.mutiny.Uni<context.ContextOuterClass.Empty> includeKpi(monitoring.Monitoring.Kpi request) {
throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED);
}
public io.smallrye.mutiny.Uni<context.ContextOuterClass.Empty> monitorKpi(monitoring.Monitoring.MonitorKpiRequest request) {
throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED);
}
public io.smallrye.mutiny.Uni<monitoring.Monitoring.RawKpiTable> queryKpiData(monitoring.Monitoring.KpiQuery request) {
throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED);
}
public io.smallrye.mutiny.Uni<monitoring.Monitoring.SubsDescriptor> getSubsDescriptor(monitoring.Monitoring.SubscriptionID request) {
throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED);
}
public io.smallrye.mutiny.Uni<monitoring.Monitoring.SubsList> getSubscriptions(context.ContextOuterClass.Empty request) {
throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED);
}
public io.smallrye.mutiny.Uni<context.ContextOuterClass.Empty> deleteSubscription(monitoring.Monitoring.SubscriptionID request) {
throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED);
}
public io.smallrye.mutiny.Uni<monitoring.Monitoring.AlarmID> setKpiAlarm(monitoring.Monitoring.AlarmDescriptor request) {
throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED);
}
public io.smallrye.mutiny.Uni<monitoring.Monitoring.AlarmList> getAlarms(context.ContextOuterClass.Empty request) {
throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED);
}
public io.smallrye.mutiny.Uni<monitoring.Monitoring.AlarmDescriptor> getAlarmDescriptor(monitoring.Monitoring.AlarmID request) {
throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED);
}
public io.smallrye.mutiny.Uni<context.ContextOuterClass.Empty> deleteAlarm(monitoring.Monitoring.AlarmID request) {
throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED);
}
public io.smallrye.mutiny.Uni<monitoring.Monitoring.Kpi> getInstantKpi(monitoring.Monitoring.KpiId request) {
throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED);
}
public io.smallrye.mutiny.Multi<monitoring.Monitoring.SubsResponse> setKpiSubscription(monitoring.Monitoring.SubsDescriptor request) {
throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED);
}
public io.smallrye.mutiny.Multi<monitoring.Monitoring.AlarmResponse> getAlarmResponseStream(monitoring.Monitoring.AlarmSubscription request) {
throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED);
}
public io.smallrye.mutiny.Multi<monitoring.Monitoring.Kpi> getStreamKpi(monitoring.Monitoring.KpiId request) {
throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED);
}
@java.lang.Override public final io.grpc.ServerServiceDefinition bindService() {
return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
.addMethod(
monitoring.MonitoringServiceGrpc.getSetKpiMethod(),
asyncUnaryCall(
new MethodHandlers<
monitoring.Monitoring.KpiDescriptor,
monitoring.Monitoring.KpiId>(
this, METHODID_SET_KPI, compression)))
.addMethod(
monitoring.MonitoringServiceGrpc.getDeleteKpiMethod(),
asyncUnaryCall(
new MethodHandlers<
monitoring.Monitoring.KpiId,
context.ContextOuterClass.Empty>(
this, METHODID_DELETE_KPI, compression)))
.addMethod(
monitoring.MonitoringServiceGrpc.getGetKpiDescriptorMethod(),
asyncUnaryCall(
new MethodHandlers<
monitoring.Monitoring.KpiId,
monitoring.Monitoring.KpiDescriptor>(
this, METHODID_GET_KPI_DESCRIPTOR, compression)))
.addMethod(
monitoring.MonitoringServiceGrpc.getGetKpiDescriptorListMethod(),
asyncUnaryCall(
new MethodHandlers<
context.ContextOuterClass.Empty,
monitoring.Monitoring.KpiDescriptorList>(
this, METHODID_GET_KPI_DESCRIPTOR_LIST, compression)))
.addMethod(
monitoring.MonitoringServiceGrpc.getIncludeKpiMethod(),
asyncUnaryCall(
new MethodHandlers<
monitoring.Monitoring.Kpi,
context.ContextOuterClass.Empty>(
this, METHODID_INCLUDE_KPI, compression)))
.addMethod(
monitoring.MonitoringServiceGrpc.getMonitorKpiMethod(),
asyncUnaryCall(
new MethodHandlers<
monitoring.Monitoring.MonitorKpiRequest,
context.ContextOuterClass.Empty>(
this, METHODID_MONITOR_KPI, compression)))
.addMethod(
monitoring.MonitoringServiceGrpc.getQueryKpiDataMethod(),
asyncUnaryCall(
new MethodHandlers<
monitoring.Monitoring.KpiQuery,
monitoring.Monitoring.RawKpiTable>(
this, METHODID_QUERY_KPI_DATA, compression)))
.addMethod(
monitoring.MonitoringServiceGrpc.getSetKpiSubscriptionMethod(),
asyncServerStreamingCall(
new MethodHandlers<
monitoring.Monitoring.SubsDescriptor,
monitoring.Monitoring.SubsResponse>(
this, METHODID_SET_KPI_SUBSCRIPTION, compression)))
.addMethod(
monitoring.MonitoringServiceGrpc.getGetSubsDescriptorMethod(),
asyncUnaryCall(
new MethodHandlers<
monitoring.Monitoring.SubscriptionID,
monitoring.Monitoring.SubsDescriptor>(
this, METHODID_GET_SUBS_DESCRIPTOR, compression)))
.addMethod(
monitoring.MonitoringServiceGrpc.getGetSubscriptionsMethod(),
asyncUnaryCall(
new MethodHandlers<
context.ContextOuterClass.Empty,
monitoring.Monitoring.SubsList>(
this, METHODID_GET_SUBSCRIPTIONS, compression)))
.addMethod(
monitoring.MonitoringServiceGrpc.getDeleteSubscriptionMethod(),
asyncUnaryCall(
new MethodHandlers<
monitoring.Monitoring.SubscriptionID,
context.ContextOuterClass.Empty>(
this, METHODID_DELETE_SUBSCRIPTION, compression)))
.addMethod(
monitoring.MonitoringServiceGrpc.getSetKpiAlarmMethod(),
asyncUnaryCall(
new MethodHandlers<
monitoring.Monitoring.AlarmDescriptor,
monitoring.Monitoring.AlarmID>(
this, METHODID_SET_KPI_ALARM, compression)))
.addMethod(
monitoring.MonitoringServiceGrpc.getGetAlarmsMethod(),
asyncUnaryCall(
new MethodHandlers<
context.ContextOuterClass.Empty,
monitoring.Monitoring.AlarmList>(
this, METHODID_GET_ALARMS, compression)))
.addMethod(
monitoring.MonitoringServiceGrpc.getGetAlarmDescriptorMethod(),
asyncUnaryCall(
new MethodHandlers<
monitoring.Monitoring.AlarmID,
monitoring.Monitoring.AlarmDescriptor>(
this, METHODID_GET_ALARM_DESCRIPTOR, compression)))
.addMethod(
monitoring.MonitoringServiceGrpc.getGetAlarmResponseStreamMethod(),
asyncServerStreamingCall(
new MethodHandlers<
monitoring.Monitoring.AlarmSubscription,
monitoring.Monitoring.AlarmResponse>(
this, METHODID_GET_ALARM_RESPONSE_STREAM, compression)))
.addMethod(
monitoring.MonitoringServiceGrpc.getDeleteAlarmMethod(),
asyncUnaryCall(
new MethodHandlers<
monitoring.Monitoring.AlarmID,
context.ContextOuterClass.Empty>(
this, METHODID_DELETE_ALARM, compression)))
.addMethod(
monitoring.MonitoringServiceGrpc.getGetStreamKpiMethod(),
asyncServerStreamingCall(
new MethodHandlers<
monitoring.Monitoring.KpiId,
monitoring.Monitoring.Kpi>(
this, METHODID_GET_STREAM_KPI, compression)))
.addMethod(
monitoring.MonitoringServiceGrpc.getGetInstantKpiMethod(),
asyncUnaryCall(
new MethodHandlers<
monitoring.Monitoring.KpiId,
monitoring.Monitoring.Kpi>(
this, METHODID_GET_INSTANT_KPI, compression)))
.build();
}
}
private static final int METHODID_SET_KPI = 0;
private static final int METHODID_DELETE_KPI = 1;
private static final int METHODID_GET_KPI_DESCRIPTOR = 2;
private static final int METHODID_GET_KPI_DESCRIPTOR_LIST = 3;
private static final int METHODID_INCLUDE_KPI = 4;
private static final int METHODID_MONITOR_KPI = 5;
private static final int METHODID_QUERY_KPI_DATA = 6;
private static final int METHODID_SET_KPI_SUBSCRIPTION = 7;
private static final int METHODID_GET_SUBS_DESCRIPTOR = 8;
private static final int METHODID_GET_SUBSCRIPTIONS = 9;
private static final int METHODID_DELETE_SUBSCRIPTION = 10;
private static final int METHODID_SET_KPI_ALARM = 11;
private static final int METHODID_GET_ALARMS = 12;
private static final int METHODID_GET_ALARM_DESCRIPTOR = 13;
private static final int METHODID_GET_ALARM_RESPONSE_STREAM = 14;
private static final int METHODID_DELETE_ALARM = 15;
private static final int METHODID_GET_STREAM_KPI = 16;
private static final int METHODID_GET_INSTANT_KPI = 17;
private static final class MethodHandlers<Req, Resp> implements
io.grpc.stub.ServerCalls.UnaryMethod<Req, Resp>,
io.grpc.stub.ServerCalls.ServerStreamingMethod<Req, Resp>,
io.grpc.stub.ServerCalls.ClientStreamingMethod<Req, Resp>,
io.grpc.stub.ServerCalls.BidiStreamingMethod<Req, Resp> {
private final MonitoringServiceImplBase serviceImpl;
private final int methodId;
private final String compression;
MethodHandlers(MonitoringServiceImplBase serviceImpl, int methodId, String compression) {
this.serviceImpl = serviceImpl;
this.methodId = methodId;
this.compression = compression;
}
@java.lang.Override
@java.lang.SuppressWarnings("unchecked")
public void invoke(Req request, io.grpc.stub.StreamObserver<Resp> responseObserver) {
switch (methodId) {
case METHODID_SET_KPI:
io.quarkus.grpc.runtime.ServerCalls.oneToOne((monitoring.Monitoring.KpiDescriptor) request,
(io.grpc.stub.StreamObserver<monitoring.Monitoring.KpiId>) responseObserver,
compression,
serviceImpl::setKpi);
break;
case METHODID_DELETE_KPI:
io.quarkus.grpc.runtime.ServerCalls.oneToOne((monitoring.Monitoring.KpiId) request,
(io.grpc.stub.StreamObserver<context.ContextOuterClass.Empty>) responseObserver,
compression,
serviceImpl::deleteKpi);
break;
case METHODID_GET_KPI_DESCRIPTOR:
io.quarkus.grpc.runtime.ServerCalls.oneToOne((monitoring.Monitoring.KpiId) request,
(io.grpc.stub.StreamObserver<monitoring.Monitoring.KpiDescriptor>) responseObserver,
compression,
serviceImpl::getKpiDescriptor);
break;
case METHODID_GET_KPI_DESCRIPTOR_LIST:
io.quarkus.grpc.runtime.ServerCalls.oneToOne((context.ContextOuterClass.Empty) request,
(io.grpc.stub.StreamObserver<monitoring.Monitoring.KpiDescriptorList>) responseObserver,
compression,
serviceImpl::getKpiDescriptorList);
break;
case METHODID_INCLUDE_KPI:
io.quarkus.grpc.runtime.ServerCalls.oneToOne((monitoring.Monitoring.Kpi) request,
(io.grpc.stub.StreamObserver<context.ContextOuterClass.Empty>) responseObserver,
compression,
serviceImpl::includeKpi);
break;
case METHODID_MONITOR_KPI:
io.quarkus.grpc.runtime.ServerCalls.oneToOne((monitoring.Monitoring.MonitorKpiRequest) request,
(io.grpc.stub.StreamObserver<context.ContextOuterClass.Empty>) responseObserver,
compression,
serviceImpl::monitorKpi);
break;
case METHODID_QUERY_KPI_DATA:
io.quarkus.grpc.runtime.ServerCalls.oneToOne((monitoring.Monitoring.KpiQuery) request,
(io.grpc.stub.StreamObserver<monitoring.Monitoring.RawKpiTable>) responseObserver,
compression,
serviceImpl::queryKpiData);
break;
case METHODID_SET_KPI_SUBSCRIPTION:
io.quarkus.grpc.runtime.ServerCalls.oneToMany((monitoring.Monitoring.SubsDescriptor) request,
(io.grpc.stub.StreamObserver<monitoring.Monitoring.SubsResponse>) responseObserver,
compression,
serviceImpl::setKpiSubscription);
break;
case METHODID_GET_SUBS_DESCRIPTOR:
io.quarkus.grpc.runtime.ServerCalls.oneToOne((monitoring.Monitoring.SubscriptionID) request,
(io.grpc.stub.StreamObserver<monitoring.Monitoring.SubsDescriptor>) responseObserver,
compression,
serviceImpl::getSubsDescriptor);
break;
case METHODID_GET_SUBSCRIPTIONS:
io.quarkus.grpc.runtime.ServerCalls.oneToOne((context.ContextOuterClass.Empty) request,
(io.grpc.stub.StreamObserver<monitoring.Monitoring.SubsList>) responseObserver,
compression,
serviceImpl::getSubscriptions);
break;
case METHODID_DELETE_SUBSCRIPTION:
io.quarkus.grpc.runtime.ServerCalls.oneToOne((monitoring.Monitoring.SubscriptionID) request,
(io.grpc.stub.StreamObserver<context.ContextOuterClass.Empty>) responseObserver,
compression,
serviceImpl::deleteSubscription);
break;
case METHODID_SET_KPI_ALARM:
io.quarkus.grpc.runtime.ServerCalls.oneToOne((monitoring.Monitoring.AlarmDescriptor) request,
(io.grpc.stub.StreamObserver<monitoring.Monitoring.AlarmID>) responseObserver,
compression,
serviceImpl::setKpiAlarm);
break;
case METHODID_GET_ALARMS:
io.quarkus.grpc.runtime.ServerCalls.oneToOne((context.ContextOuterClass.Empty) request,
(io.grpc.stub.StreamObserver<monitoring.Monitoring.AlarmList>) responseObserver,
compression,
serviceImpl::getAlarms);
break;
case METHODID_GET_ALARM_DESCRIPTOR:
io.quarkus.grpc.runtime.ServerCalls.oneToOne((monitoring.Monitoring.AlarmID) request,
(io.grpc.stub.StreamObserver<monitoring.Monitoring.AlarmDescriptor>) responseObserver,
compression,
serviceImpl::getAlarmDescriptor);
break;
case METHODID_GET_ALARM_RESPONSE_STREAM:
io.quarkus.grpc.runtime.ServerCalls.oneToMany((monitoring.Monitoring.AlarmSubscription) request,
(io.grpc.stub.StreamObserver<monitoring.Monitoring.AlarmResponse>) responseObserver,
compression,
serviceImpl::getAlarmResponseStream);
break;
case METHODID_DELETE_ALARM:
io.quarkus.grpc.runtime.ServerCalls.oneToOne((monitoring.Monitoring.AlarmID) request,
(io.grpc.stub.StreamObserver<context.ContextOuterClass.Empty>) responseObserver,
compression,
serviceImpl::deleteAlarm);
break;
case METHODID_GET_STREAM_KPI:
io.quarkus.grpc.runtime.ServerCalls.oneToMany((monitoring.Monitoring.KpiId) request,
(io.grpc.stub.StreamObserver<monitoring.Monitoring.Kpi>) responseObserver,
compression,
serviceImpl::getStreamKpi);
break;
case METHODID_GET_INSTANT_KPI:
io.quarkus.grpc.runtime.ServerCalls.oneToOne((monitoring.Monitoring.KpiId) request,
(io.grpc.stub.StreamObserver<monitoring.Monitoring.Kpi>) responseObserver,
compression,
serviceImpl::getInstantKpi);
break;
default:
throw new java.lang.AssertionError();
}
}
@java.lang.Override
@java.lang.SuppressWarnings("unchecked")
public io.grpc.stub.StreamObserver<Req> invoke(io.grpc.stub.StreamObserver<Resp> responseObserver) {
switch (methodId) {
default:
throw new java.lang.AssertionError();
}
}
}
}
\ No newline at end of file
# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
---
apiVersion: v1
kind: Service
metadata:
annotations:
app.quarkus.io/commit-id: 8d0654b519e90fe0127e7d1419adce25fa3a179d
app.quarkus.io/build-timestamp: 2023-07-10 - 09:42:53 +0000
prometheus.io/scrape: "true"
prometheus.io/path: /q/metrics
prometheus.io/port: "8080"
prometheus.io/scheme: http
labels:
app.kubernetes.io/name: automationservice
app: automationservice
name: automationservice
spec:
ports:
- name: http
port: 9192
targetPort: 8080
- name: grpc-server
port: 5050
targetPort: 5050
selector:
app.kubernetes.io/name: automationservice
type: ClusterIP
---
apiVersion: apps/v1
kind: Deployment
metadata:
annotations:
app.quarkus.io/commit-id: 8d0654b519e90fe0127e7d1419adce25fa3a179d
app.quarkus.io/build-timestamp: 2023-07-10 - 09:42:53 +0000
prometheus.io/scrape: "true"
prometheus.io/path: /q/metrics
prometheus.io/port: "8080"
prometheus.io/scheme: http
labels:
app: automationservice
app.kubernetes.io/name: automationservice
name: automationservice
spec:
replicas: 1
selector:
matchLabels:
app.kubernetes.io/name: automationservice
template:
metadata:
annotations:
app.quarkus.io/commit-id: 8d0654b519e90fe0127e7d1419adce25fa3a179d
app.quarkus.io/build-timestamp: 2023-07-10 - 09:42:53 +0000
prometheus.io/scrape: "true"
prometheus.io/path: /q/metrics
prometheus.io/port: "8080"
prometheus.io/scheme: http
labels:
app: automationservice
app.kubernetes.io/name: automationservice
spec:
containers:
- env:
- name: KUBERNETES_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
- name: DEVICE_SERVICE_HOST
value: deviceservice
- name: CONTEXT_SERVICE_HOST
value: contextservice
image: labs.etsi.org:5050/tfs/controller/automation:0.2.0
imagePullPolicy: Always
livenessProbe:
failureThreshold: 3
httpGet:
path: /q/health/live
port: 8080
scheme: HTTP
initialDelaySeconds: 2
periodSeconds: 10
successThreshold: 1
timeoutSeconds: 10
name: automationservice
ports:
- containerPort: 8080
name: http
protocol: TCP
- containerPort: 5050
name: grpc-server
protocol: TCP
readinessProbe:
failureThreshold: 3
httpGet:
path: /q/health/ready
port: 8080
scheme: HTTP
initialDelaySeconds: 2
periodSeconds: 10
successThreshold: 1
timeoutSeconds: 10
resources:
limits:
cpu: 500m
memory: 2048Mi
requests:
cpu: 50m
memory: 512Mi
# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/)
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Build, tag, and push the Docker image to the GitLab Docker registry
build bgpls_speaker:
variables:
IMAGE_NAME: 'bgpls_speaker' # name of the microservice
IMAGE_TAG: 'latest' # tag of the container image (production, development, etc)
stage: build
before_script:
- docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
script:
- docker buildx build -t "$IMAGE_NAME:$IMAGE_TAG" -f ./src/$IMAGE_NAME/Dockerfile .
- docker tag "$IMAGE_NAME:$IMAGE_TAG" "$CI_REGISTRY_IMAGE/$IMAGE_NAME:$IMAGE_TAG"
- docker push "$CI_REGISTRY_IMAGE/$IMAGE_NAME:$IMAGE_TAG"
after_script:
- docker images --filter="dangling=true" --quiet | xargs -r docker rmi
rules:
- if: '$CI_PIPELINE_SOURCE == "merge_request_event" && ($CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "develop" || $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == $CI_DEFAULT_BRANCH)'
- if: '$CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH == "develop"'
- changes:
- src/common/**/*.py
- proto/*.proto
- src/$IMAGE_NAME/**/*.{py,in,yml}
- src/$IMAGE_NAME/Dockerfile
- src/$IMAGE_NAME/tests/*.py
- manifests/${IMAGE_NAME}service.yaml
- .gitlab-ci.yml
## Apply unit test to the component
#unit_test bgpls_speaker:
# variables:
# IMAGE_NAME: 'bgpls_speaker' # name of the microservice
# IMAGE_TAG: 'latest' # tag of the container image (production, development, etc)
# stage: unit_test
# needs:
# - build bgpls_speaker
# before_script:
# - docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
# - if docker network list | grep teraflowbridge; then echo "teraflowbridge is already created"; else docker network create --driver=bridge teraflowbridge; fi
# - if docker container ls | grep $IMAGE_NAME; then docker rm -f $IMAGE_NAME; else echo "$IMAGE_NAME image is not in the system"; fi
# script:
# - docker pull "$CI_REGISTRY_IMAGE/$IMAGE_NAME:$IMAGE_TAG"
# - docker run --name $IMAGE_NAME -d -p 20030:20030 -v "$PWD/src/$IMAGE_NAME/tests:/opt/results" --network=teraflowbridge $CI_REGISTRY_IMAGE/$IMAGE_NAME:$IMAGE_TAG
# - sleep 5
# - docker ps -a
# - docker logs $IMAGE_NAME
# - docker exec -i $IMAGE_NAME bash -c "coverage run -m pytest --log-level=INFO --verbose $IMAGE_NAME/tests/test_unitary.py --junitxml=/opt/results/${IMAGE_NAME}_report.xml"
# - docker exec -i $IMAGE_NAME bash -c "coverage report --include='${IMAGE_NAME}/*' --show-missing"
# coverage: '/TOTAL\s+\d+\s+\d+\s+(\d+%)/'
# after_script:
# - docker rm -f $IMAGE_NAME
# - docker network rm teraflowbridge
# rules:
# - if: '$CI_PIPELINE_SOURCE == "merge_request_event" && ($CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "develop" || $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == $CI_DEFAULT_BRANCH)'
# - if: '$CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH == "develop"'
# - changes:
# - src/common/**/*.py
# - proto/*.proto
# - src/$IMAGE_NAME/**/*.{py,in,yml}
# - src/$IMAGE_NAME/Dockerfile
# - src/$IMAGE_NAME/tests/*.py
# - manifests/${IMAGE_NAME}service.yaml
# - .gitlab-ci.yml
# artifacts:
# when: always
# reports:
# junit: src/$IMAGE_NAME/tests/${IMAGE_NAME}_report.xml
## Deployment of the service in Kubernetes Cluster
#deploy bgpls_speaker:
# variables:
# IMAGE_NAME: 'bgpls_speaker' # name of the microservice
# IMAGE_TAG: 'latest' # tag of the container image (production, development, etc)
# stage: deploy
# needs:
# - unit test bgpls_speaker
# # - integ_test execute
# script:
# - 'sed -i "s/$IMAGE_NAME:.*/$IMAGE_NAME:$IMAGE_TAG/" manifests/${IMAGE_NAME}service.yaml'
# - kubectl version
# - kubectl get all
# - kubectl apply -f "manifests/${IMAGE_NAME}service.yaml"
# - kubectl get all
# # environment:
# # name: test
# # url: https://example.com
# # kubernetes:
# # namespace: test
# rules:
# - if: '$CI_PIPELINE_SOURCE == "merge_request_event" && ($CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "develop" || $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == $CI_DEFAULT_BRANCH)'
# when: manual
# - if: '$CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH == "develop"'
# when: manual
# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/)
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/)
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# Maven install stage
#
# ----------------------------------------------
# FROM alpine/git:latest AS repo
# WORKDIR /usr/src/app
# RUN git clone https://github.com/telefonicaid/netphony-network-protocols.git .
FROM maven:3.8.8-eclipse-temurin-17 AS build
WORKDIR /
COPY src/bgpls_speaker/service/java/netphony-topology/ netphony-topology/
COPY src/bgpls_speaker/service/java/netphony-topology/pom.xml netphony-topology/pom.xml
WORKDIR /netphony-topology/
RUN mvn clean compile -DskipTests -X
RUN mvn package assembly:single -P bgp-ls-speaker -DskipTests
WORKDIR /netphony-topology/target/
# ENTRYPOINT [ "ls" ,"-a"]
# -------------------------------------------
# jar created in /netphony-topology/target/bgp-ls-speaker-jar-with-dependencies.jar
#
# Stage 2
#
FROM python:3.9-slim
# Install dependencies
RUN apt-get --yes --quiet --quiet update && \
apt-get --yes --quiet --quiet install wget g++ && \
rm -rf /var/lib/apt/lists/*
# Set Python to show logs as they occur
ENV PYTHONUNBUFFERED=0
# Download the gRPC health probe
RUN GRPC_HEALTH_PROBE_VERSION=v0.2.0 && \
wget -qO/bin/grpc_health_probe https://github.com/grpc-ecosystem/grpc-health-probe/releases/download/${GRPC_HEALTH_PROBE_VERSION}/grpc_health_probe-linux-amd64 && \
chmod +x /bin/grpc_health_probe
# Get generic Python packages
RUN python3 -m pip install --upgrade pip
RUN python3 -m pip install --upgrade setuptools wheel
RUN python3 -m pip install --upgrade pip-tools
# Install OpenJDK-11
RUN apt-get update && \
apt-get install -y openjdk-17-jre && \
apt-get clean;
# Get common Python packages
# Note: this step enables sharing the previous Docker build steps among all the Python components
WORKDIR /var/teraflow
COPY common_requirements.in common_requirements.in
RUN pip-compile --quiet --output-file=common_requirements.txt common_requirements.in
RUN python3 -m pip install -r common_requirements.txt
# Add common files into working directory
WORKDIR /var/teraflow/common
COPY src/common/. ./
RUN rm -rf proto
# Create proto sub-folder, copy .proto files, and generate Python code
RUN mkdir -p /var/teraflow/common/proto
WORKDIR /var/teraflow/common/proto
RUN touch __init__.py
COPY proto/*.proto ./
RUN python3 -m grpc_tools.protoc -I=. --python_out=. --grpc_python_out=. *.proto
RUN rm *.proto
RUN find . -type f -exec sed -i -E 's/(import\ .*)_pb2/from . \1_pb2/g' {} \;
# Create component sub-folders, get specific Python packages
RUN mkdir -p /var/teraflow/bgpls_speaker
WORKDIR /var/teraflow/bgpls_speaker
COPY src/bgpls_speaker/requirements.in requirements.in
RUN pip-compile --quiet --output-file=requirements.txt requirements.in
RUN python3 -m pip install -r requirements.txt
# Java module necessary config files
WORKDIR /var/teraflow/bgpls_speaker
RUN mkdir -p /java
COPY src/bgpls_speaker/service/java/* /java/
COPY --from=build /netphony-topology/target/bgp-ls-speaker-jar-with-dependencies.jar /var/teraflow/bgpls_speaker/service/java/bgp_ls.jar
# Add component files into working directory
WORKDIR /var/teraflow
COPY src/context/__init__.py context/__init__.py
COPY src/context/client/. context/client/
COPY src/bgpls_speaker/. bgpls_speaker/
# Start the service
ENTRYPOINT ["python", "-m", "bgpls_speaker.service"]
# ENTRYPOINT [ "ls","-R" ]
\ No newline at end of file
# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/)
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/)
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import grpc, logging
from common.Constants import ServiceNameEnum
from common.Settings import get_service_host, get_service_port_grpc
from common.proto.context_pb2 import Empty, Service, ServiceId
from common.proto.service_pb2_grpc import ServiceServiceStub
from common.proto.bgpls_pb2_grpc import BgplsServiceStub
from common.proto.bgpls_pb2 import BgplsSpeaker, DiscoveredDeviceList,DiscoveredLinkList,BgplsSpeakerId, NodeDescriptors
from common.tools.client.RetryDecorator import retry, delay_exponential
from common.tools.grpc.Tools import grpc_message_to_json_string
LOGGER = logging.getLogger(__name__)
MAX_RETRIES = 15
DELAY_FUNCTION = delay_exponential(initial=0.01, increment=2.0, maximum=5.0)
RETRY_DECORATOR = retry(max_retries=MAX_RETRIES, delay_function=DELAY_FUNCTION, prepare_method_name='connect')
class BgplsClient:
def __init__(self, host=None, port=None):
if not host: host = get_service_host(ServiceNameEnum.BGPLS)
if not port: port = get_service_port_grpc(ServiceNameEnum.BGPLS)
self.endpoint = '{:s}:{:s}'.format(str(host), str(port))
LOGGER.info('Creating channel to {:s}...'.format(str(self.endpoint)))
self.channel = None
self.stub = None
self.connect()
LOGGER.info('Channel created')
def connect(self):
self.channel = grpc.insecure_channel(self.endpoint)
self.stub = BgplsServiceStub(self.channel)
def close(self):
if self.channel is not None: self.channel.close()
self.channel = None
self.stub = None
@RETRY_DECORATOR
def ListDiscoveredDevices(self, request: Empty) -> DiscoveredDeviceList:
LOGGER.info('ListDiscoveredDevices request: {:s}'.format(grpc_message_to_json_string(request)))
response = self.stub.ListDiscoveredDevices(request)
LOGGER.info('ListDiscoveredDevices result: {:s}'.format(grpc_message_to_json_string(response)))
return response
@RETRY_DECORATOR
def ListDiscoveredLinks(self, request: Empty) -> DiscoveredLinkList:
LOGGER.info('ListDiscoveredDevices request: {:s}'.format(grpc_message_to_json_string(request)))
response = self.stub.ListDiscoveredLinks(request)
LOGGER.info('ListDiscoveredDevices result: {:s}'.format(grpc_message_to_json_string(response)))
return response
@RETRY_DECORATOR
def AddBgplsSpeaker(self, request: BgplsSpeaker) -> str:
LOGGER.info('AddBgplsSpeaker request: {:s}'.format(grpc_message_to_json_string(request)))
response = self.stub.AddBgplsSpeaker(request)
LOGGER.info('AddBgplsSpeaker result: {:s}'.format(grpc_message_to_json_string(response)))
return response
@RETRY_DECORATOR
def ListBgplsSpeakers(self, request: Empty) -> BgplsSpeakerId:
LOGGER.info('ListBgplsSpeakers request: {:s}'.format(grpc_message_to_json_string(request)))
response = self.stub.ListBgplsSpeakers(request)
LOGGER.info('ListBgplsSpeakers result: {:s}'.format(grpc_message_to_json_string(response)))
return response
@RETRY_DECORATOR
def DisconnectFromSpeaker(self, request: BgplsSpeaker) -> bool:
LOGGER.info('DisconnectFromSpeaker request: {:s}'.format(grpc_message_to_json_string(request)))
response = self.stub.DisconnectFromSpeaker(request)
LOGGER.info('DisconnectFromSpeaker result: {:s}'.format(grpc_message_to_json_string(response)))
return response
@RETRY_DECORATOR
def GetSpeakerInfoFromId(self, request: BgplsSpeakerId) -> BgplsSpeaker:
LOGGER.info('GetSpeakerInfoFromId request: {:s}'.format(grpc_message_to_json_string(request)))
response = self.stub.GetSpeakerInfoFromId(request)
LOGGER.info('GetSpeakerInfoFromId result: {:s}'.format(grpc_message_to_json_string(response)))
return response
@RETRY_DECORATOR
def NotifyAddNodeToContext(self, request: NodeDescriptors) -> str:
LOGGER.info('NotifyAddNodeToContext request: {:s}'.format(grpc_message_to_json_string(request)))
response = self.stub.NotifyAddNodeToContext(request)
LOGGER.info('NotifyAddNodeToContext result: {:s}'.format(grpc_message_to_json_string(response)))
return response
# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/)
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#!/bin/bash
# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/)
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
########################################################################################################################
# Read deployment settings
########################################################################################################################
# ----- TeraFlowSDN ------------------------------------------------------------
# If not already set, set the URL of the Docker registry where the images will be uploaded to.
# By default, assume internal MicroK8s registry is used.
export TFS_REGISTRY_IMAGES=${TFS_REGISTRY_IMAGES:-"http://localhost:32000/tfs/"}
# If not already set, set the list of components, separated by spaces, you want to build images for, and deploy.
# By default, only basic components are deployed
export TFS_COMPONENTS=${TFS_COMPONENTS:-"context device pathcomp service slice nbi webui load_generator bgpls_speaker"}
# If not already set, set the tag you want to use for your images.
export TFS_IMAGE_TAG=${TFS_IMAGE_TAG:-"dev"}
# If not already set, set the name of the Kubernetes namespace to deploy TFS to.
export TFS_K8S_NAMESPACE=${TFS_K8S_NAMESPACE:-"tfs"}
# If not already set, set additional manifest files to be applied after the deployment
export TFS_EXTRA_MANIFESTS=${TFS_EXTRA_MANIFESTS:-""}
# If not already set, set the new Grafana admin password
export TFS_GRAFANA_PASSWORD=${TFS_GRAFANA_PASSWORD:-"admin123+"}
# If not already set, disable skip-build flag to rebuild the Docker images.
# If TFS_SKIP_BUILD is "YES", the containers are not rebuilt-retagged-repushed and existing ones are used.
export TFS_SKIP_BUILD=${TFS_SKIP_BUILD:-"YES"}
# If TFS_SKIP_BUILD is "YES", select the containers to be build
# Any other container will use previous docker images
export TFS_QUICK_COMPONENTS="bgpls_speaker"
# ----- CockroachDB ------------------------------------------------------------
# If not already set, set the namespace where CockroackDB will be deployed.
export CRDB_NAMESPACE=${CRDB_NAMESPACE:-"crdb"}
# If not already set, set the database username to be used by Context.
export CRDB_USERNAME=${CRDB_USERNAME:-"tfs"}
# If not already set, set the database user's password to be used by Context.
export CRDB_PASSWORD=${CRDB_PASSWORD:-"tfs123"}
# If not already set, set the database name to be used by Context.
export CRDB_DATABASE=${CRDB_DATABASE:-"tfs"}
# ----- NATS -------------------------------------------------------------------
# If not already set, set the namespace where NATS will be deployed.
export NATS_NAMESPACE=${NATS_NAMESPACE:-"nats"}
# ----- QuestDB ----------------------------------------------------------------
# If not already set, set the namespace where QuestDB will be deployed.
export QDB_NAMESPACE=${QDB_NAMESPACE:-"qdb"}
# If not already set, set the database username to be used for QuestDB.
export QDB_USERNAME=${QDB_USERNAME:-"admin"}
# If not already set, set the database user's password to be used for QuestDB.
export QDB_PASSWORD=${QDB_PASSWORD:-"quest"}
# If not already set, set the table name to be used by Monitoring for KPIs.
export QDB_TABLE_MONITORING_KPIS=${QDB_TABLE_MONITORING_KPIS:-"tfs_monitoring_kpis"}
# If not already set, set the table name to be used by Slice for plotting groups.
export QDB_TABLE_SLICE_GROUPS=${QDB_TABLE_SLICE_GROUPS:-"tfs_slice_groups"}
########################################################################################################################
# Automated steps start here
########################################################################################################################
# Constants
GITLAB_REPO_URL="labs.etsi.org:5050/tfs/controller"
TMP_FOLDER="./tmp"
# Create a tmp folder for files modified during the deployment
TMP_MANIFESTS_FOLDER="$TMP_FOLDER/manifests"
mkdir -p $TMP_MANIFESTS_FOLDER
TMP_LOGS_FOLDER="$TMP_FOLDER/logs"
mkdir -p $TMP_LOGS_FOLDER
echo "Deleting and Creating a new namespace..."
kubectl delete namespace $TFS_K8S_NAMESPACE --ignore-not-found
kubectl create namespace $TFS_K8S_NAMESPACE
printf "\n"
echo "Create secret with CockroachDB data"
CRDB_SQL_PORT=$(kubectl --namespace ${CRDB_NAMESPACE} get service cockroachdb-public -o 'jsonpath={.spec.ports[?(@.name=="sql")].port}')
kubectl create secret generic crdb-data --namespace ${TFS_K8S_NAMESPACE} --type='Opaque' \
--from-literal=CRDB_NAMESPACE=${CRDB_NAMESPACE} \
--from-literal=CRDB_SQL_PORT=${CRDB_SQL_PORT} \
--from-literal=CRDB_DATABASE=${CRDB_DATABASE} \
--from-literal=CRDB_USERNAME=${CRDB_USERNAME} \
--from-literal=CRDB_PASSWORD=${CRDB_PASSWORD} \
--from-literal=CRDB_SSLMODE=require
printf "\n"
echo "Create secret with NATS data"
NATS_CLIENT_PORT=$(kubectl --namespace ${NATS_NAMESPACE} get service nats -o 'jsonpath={.spec.ports[?(@.name=="client")].port}')
kubectl create secret generic nats-data --namespace ${TFS_K8S_NAMESPACE} --type='Opaque' \
--from-literal=NATS_NAMESPACE=${NATS_NAMESPACE} \
--from-literal=NATS_CLIENT_PORT=${NATS_CLIENT_PORT}
printf "\n"
echo "Create secret with QuestDB data"
QDB_HTTP_PORT=$(kubectl --namespace ${QDB_NAMESPACE} get service questdb-public -o 'jsonpath={.spec.ports[?(@.name=="http")].port}')
QDB_ILP_PORT=$(kubectl --namespace ${QDB_NAMESPACE} get service questdb-public -o 'jsonpath={.spec.ports[?(@.name=="ilp")].port}')
QDB_SQL_PORT=$(kubectl --namespace ${QDB_NAMESPACE} get service questdb-public -o 'jsonpath={.spec.ports[?(@.name=="sql")].port}')
METRICSDB_HOSTNAME="questdb-public.${QDB_NAMESPACE}.svc.cluster.local"
kubectl create secret generic qdb-data --namespace ${TFS_K8S_NAMESPACE} --type='Opaque' \
--from-literal=QDB_NAMESPACE=${QDB_NAMESPACE} \
--from-literal=METRICSDB_HOSTNAME=${METRICSDB_HOSTNAME} \
--from-literal=METRICSDB_REST_PORT=${QDB_HTTP_PORT} \
--from-literal=METRICSDB_ILP_PORT=${QDB_ILP_PORT} \
--from-literal=METRICSDB_SQL_PORT=${QDB_SQL_PORT} \
--from-literal=METRICSDB_TABLE_MONITORING_KPIS=${QDB_TABLE_MONITORING_KPIS} \
--from-literal=METRICSDB_TABLE_SLICE_GROUPS=${QDB_TABLE_SLICE_GROUPS} \
--from-literal=METRICSDB_USERNAME=${QDB_USERNAME} \
--from-literal=METRICSDB_PASSWORD=${QDB_PASSWORD}
printf "\n"
echo "Deploying components and collecting environment variables..."
ENV_VARS_SCRIPT=tfs_runtime_env_vars.sh
echo "# Environment variables for TeraFlowSDN deployment" > $ENV_VARS_SCRIPT
PYTHONPATH=$(pwd)/src
echo "export PYTHONPATH=${PYTHONPATH}" >> $ENV_VARS_SCRIPT
for COMPONENT in $TFS_COMPONENTS; do
echo "Processing '$COMPONENT' component..."
if [ "$TFS_SKIP_BUILD" != "YES" ]; then
echo " Building Docker image..."
BUILD_LOG="$TMP_LOGS_FOLDER/build_${COMPONENT}.log"
if [ "$COMPONENT" == "automation" ] || [ "$COMPONENT" == "policy" ]; then
docker build -t "$COMPONENT:$TFS_IMAGE_TAG" -f ./src/"$COMPONENT"/Dockerfile ./src/"$COMPONENT"/ > "$BUILD_LOG"
elif [ "$COMPONENT" == "pathcomp" ]; then
BUILD_LOG="$TMP_LOGS_FOLDER/build_${COMPONENT}-frontend.log"
docker build -t "$COMPONENT-frontend:$TFS_IMAGE_TAG" -f ./src/"$COMPONENT"/frontend/Dockerfile . > "$BUILD_LOG"
BUILD_LOG="$TMP_LOGS_FOLDER/build_${COMPONENT}-backend.log"
docker build -t "$COMPONENT-backend:$TFS_IMAGE_TAG" -f ./src/"$COMPONENT"/backend/Dockerfile . > "$BUILD_LOG"
# next command is redundant, but helpful to keep cache updated between rebuilds
IMAGE_NAME="$COMPONENT-backend:$TFS_IMAGE_TAG-builder"
docker build -t "$IMAGE_NAME" --target builder -f ./src/"$COMPONENT"/backend/Dockerfile . >> "$BUILD_LOG"
elif [ "$COMPONENT" == "dlt" ]; then
BUILD_LOG="$TMP_LOGS_FOLDER/build_${COMPONENT}-connector.log"
docker build -t "$COMPONENT-connector:$TFS_IMAGE_TAG" -f ./src/"$COMPONENT"/connector/Dockerfile . > "$BUILD_LOG"
BUILD_LOG="$TMP_LOGS_FOLDER/build_${COMPONENT}-gateway.log"
docker build -t "$COMPONENT-gateway:$TFS_IMAGE_TAG" -f ./src/"$COMPONENT"/gateway/Dockerfile . > "$BUILD_LOG"
else
docker build -t "$COMPONENT:$TFS_IMAGE_TAG" -f ./src/"$COMPONENT"/Dockerfile . > "$BUILD_LOG"
fi
echo " Pushing Docker image to '$TFS_REGISTRY_IMAGES'..."
if [ "$COMPONENT" == "pathcomp" ]; then
IMAGE_URL=$(echo "$TFS_REGISTRY_IMAGES/$COMPONENT-frontend:$TFS_IMAGE_TAG" | sed 's,//,/,g' | sed 's,http:/,,g')
TAG_LOG="$TMP_LOGS_FOLDER/tag_${COMPONENT}-frontend.log"
docker tag "$COMPONENT-frontend:$TFS_IMAGE_TAG" "$IMAGE_URL" > "$TAG_LOG"
PUSH_LOG="$TMP_LOGS_FOLDER/push_${COMPONENT}-frontend.log"
docker push "$IMAGE_URL" > "$PUSH_LOG"
IMAGE_URL=$(echo "$TFS_REGISTRY_IMAGES/$COMPONENT-backend:$TFS_IMAGE_TAG" | sed 's,//,/,g' | sed 's,http:/,,g')
TAG_LOG="$TMP_LOGS_FOLDER/tag_${COMPONENT}-backend.log"
docker tag "$COMPONENT-backend:$TFS_IMAGE_TAG" "$IMAGE_URL" > "$TAG_LOG"
PUSH_LOG="$TMP_LOGS_FOLDER/push_${COMPONENT}-backend.log"
docker push "$IMAGE_URL" > "$PUSH_LOG"
elif [ "$COMPONENT" == "dlt" ]; then
IMAGE_URL=$(echo "$TFS_REGISTRY_IMAGES/$COMPONENT-connector:$TFS_IMAGE_TAG" | sed 's,//,/,g' | sed 's,http:/,,g')
TAG_LOG="$TMP_LOGS_FOLDER/tag_${COMPONENT}-connector.log"
docker tag "$COMPONENT-connector:$TFS_IMAGE_TAG" "$IMAGE_URL" > "$TAG_LOG"
PUSH_LOG="$TMP_LOGS_FOLDER/push_${COMPONENT}-connector.log"
docker push "$IMAGE_URL" > "$PUSH_LOG"
IMAGE_URL=$(echo "$TFS_REGISTRY_IMAGES/$COMPONENT-gateway:$TFS_IMAGE_TAG" | sed 's,//,/,g' | sed 's,http:/,,g')
TAG_LOG="$TMP_LOGS_FOLDER/tag_${COMPONENT}-gateway.log"
docker tag "$COMPONENT-gateway:$TFS_IMAGE_TAG" "$IMAGE_URL" > "$TAG_LOG"
PUSH_LOG="$TMP_LOGS_FOLDER/push_${COMPONENT}-gateway.log"
docker push "$IMAGE_URL" > "$PUSH_LOG"
else
IMAGE_URL=$(echo "$TFS_REGISTRY_IMAGES/$COMPONENT:$TFS_IMAGE_TAG" | sed 's,//,/,g' | sed 's,http:/,,g')
TAG_LOG="$TMP_LOGS_FOLDER/tag_${COMPONENT}.log"
docker tag "$COMPONENT:$TFS_IMAGE_TAG" "$IMAGE_URL" > "$TAG_LOG"
PUSH_LOG="$TMP_LOGS_FOLDER/push_${COMPONENT}.log"
docker push "$IMAGE_URL" > "$PUSH_LOG"
fi
else
for QUICK_COMPONENT in $TFS_QUICK_COMPONENTS; do
if [ "$COMPONENT" == "$QUICK_COMPONENT" ]; then
echo " Building Docker image..."
BUILD_LOG="$TMP_LOGS_FOLDER/build_${QUICK_COMPONENT}.log"
docker build -t "$QUICK_COMPONENT:$TFS_IMAGE_TAG" -f ./src/"$QUICK_COMPONENT"/Dockerfile . > "$BUILD_LOG"
echo " Pushing Docker image to '$TFS_REGISTRY_IMAGES'..."
IMAGE_URL=$(echo "$TFS_REGISTRY_IMAGES/$QUICK_COMPONENT:$TFS_IMAGE_TAG" | sed 's,//,/,g' | sed 's,http:/,,g')
TAG_LOG="$TMP_LOGS_FOLDER/tag_${QUICK_COMPONENT}.log"
docker tag "$QUICK_COMPONENT:$TFS_IMAGE_TAG" "$IMAGE_URL" > "$TAG_LOG"
PUSH_LOG="$TMP_LOGS_FOLDER/push_${QUICK_COMPONENT}.log"
docker push "$IMAGE_URL" > "$PUSH_LOG"
fi
done
fi
echo " Adapting '$COMPONENT' manifest file..."
MANIFEST="$TMP_MANIFESTS_FOLDER/${COMPONENT}service.yaml"
cp ./manifests/"${COMPONENT}"service.yaml "$MANIFEST"
if [ "$COMPONENT" == "pathcomp" ]; then
IMAGE_URL=$(echo "$TFS_REGISTRY_IMAGES/$COMPONENT-frontend:$TFS_IMAGE_TAG" | sed 's,//,/,g' | sed 's,http:/,,g')
VERSION=$(grep -i "${GITLAB_REPO_URL}/${COMPONENT}-frontend:" "$MANIFEST" | cut -d ":" -f4)
sed -E -i "s#image: $GITLAB_REPO_URL/$COMPONENT-frontend:${VERSION}#image: $IMAGE_URL#g" "$MANIFEST"
IMAGE_URL=$(echo "$TFS_REGISTRY_IMAGES/$COMPONENT-backend:$TFS_IMAGE_TAG" | sed 's,//,/,g' | sed 's,http:/,,g')
VERSION=$(grep -i "${GITLAB_REPO_URL}/${COMPONENT}-backend:" "$MANIFEST" | cut -d ":" -f4)
sed -E -i "s#image: $GITLAB_REPO_URL/$COMPONENT-backend:${VERSION}#image: $IMAGE_URL#g" "$MANIFEST"
elif [ "$COMPONENT" == "dlt" ]; then
IMAGE_URL=$(echo "$TFS_REGISTRY_IMAGES/$COMPONENT-connector:$TFS_IMAGE_TAG" | sed 's,//,/,g' | sed 's,http:/,,g')
VERSION=$(grep -i "${GITLAB_REPO_URL}/${COMPONENT}-connector:" "$MANIFEST" | cut -d ":" -f4)
sed -E -i "s#image: $GITLAB_REPO_URL/$COMPONENT-connector:${VERSION}#image: $IMAGE_URL#g" "$MANIFEST"
IMAGE_URL=$(echo "$TFS_REGISTRY_IMAGES/$COMPONENT-gateway:$TFS_IMAGE_TAG" | sed 's,//,/,g' | sed 's,http:/,,g')
VERSION=$(grep -i "${GITLAB_REPO_URL}/${COMPONENT}-gateway:" "$MANIFEST" | cut -d ":" -f4)
sed -E -i "s#image: $GITLAB_REPO_URL/$COMPONENT-gateway:${VERSION}#image: $IMAGE_URL#g" "$MANIFEST"
else
IMAGE_URL=$(echo "$TFS_REGISTRY_IMAGES/$COMPONENT:$TFS_IMAGE_TAG" | sed 's,//,/,g' | sed 's,http:/,,g')
VERSION=$(grep -i "${GITLAB_REPO_URL}/${COMPONENT}:" "$MANIFEST" | cut -d ":" -f4)
sed -E -i "s#image: $GITLAB_REPO_URL/$COMPONENT:${VERSION}#image: $IMAGE_URL#g" "$MANIFEST"
fi
sed -E -i "s#imagePullPolicy: .*#imagePullPolicy: Always#g" "$MANIFEST"
# TODO: harmonize names of the monitoring component
echo " Deploying '$COMPONENT' component to Kubernetes..."
DEPLOY_LOG="$TMP_LOGS_FOLDER/deploy_${COMPONENT}.log"
kubectl --namespace $TFS_K8S_NAMESPACE apply -f "$MANIFEST" > "$DEPLOY_LOG"
COMPONENT_OBJNAME=$(echo "${COMPONENT}" | sed "s/\_/-/")
#kubectl --namespace $TFS_K8S_NAMESPACE scale deployment --replicas=0 ${COMPONENT_OBJNAME}service >> "$DEPLOY_LOG"
#kubectl --namespace $TFS_K8S_NAMESPACE scale deployment --replicas=1 ${COMPONENT_OBJNAME}service >> "$DEPLOY_LOG"
echo " Collecting env-vars for '$COMPONENT' component..."
SERVICE_DATA=$(kubectl get service ${COMPONENT_OBJNAME}service --namespace $TFS_K8S_NAMESPACE -o json)
if [ -z "${SERVICE_DATA}" ]; then continue; fi
# Env vars for service's host address
SERVICE_HOST=$(echo ${SERVICE_DATA} | jq -r '.spec.clusterIP')
if [ -z "${SERVICE_HOST}" ]; then continue; fi
ENVVAR_HOST=$(echo "${COMPONENT}service_SERVICE_HOST" | tr '[:lower:]' '[:upper:]')
echo "export ${ENVVAR_HOST}=${SERVICE_HOST}" >> $ENV_VARS_SCRIPT
# Env vars for service's 'grpc' port (if any)
SERVICE_PORT_GRPC=$(echo ${SERVICE_DATA} | jq -r '.spec.ports[] | select(.name=="grpc") | .port')
if [ -n "${SERVICE_PORT_GRPC}" ]; then
ENVVAR_PORT_GRPC=$(echo "${COMPONENT}service_SERVICE_PORT_GRPC" | tr '[:lower:]' '[:upper:]')
echo "export ${ENVVAR_PORT_GRPC}=${SERVICE_PORT_GRPC}" >> $ENV_VARS_SCRIPT
fi
# Env vars for service's 'http' port (if any)
SERVICE_PORT_HTTP=$(echo ${SERVICE_DATA} | jq -r '.spec.ports[] | select(.name=="http") | .port')
if [ -n "${SERVICE_PORT_HTTP}" ]; then
ENVVAR_PORT_HTTP=$(echo "${COMPONENT}service_SERVICE_PORT_HTTP" | tr '[:lower:]' '[:upper:]')
echo "export ${ENVVAR_PORT_HTTP}=${SERVICE_PORT_HTTP}" >> $ENV_VARS_SCRIPT
fi
printf "\n"
done
echo "Deploying extra manifests..."
for EXTRA_MANIFEST in $TFS_EXTRA_MANIFESTS; do
echo "Processing manifest '$EXTRA_MANIFEST'..."
if [[ "$EXTRA_MANIFEST" == *"servicemonitor"* ]]; then
kubectl apply -f $EXTRA_MANIFEST
else
kubectl --namespace $TFS_K8S_NAMESPACE apply -f $EXTRA_MANIFEST
fi
printf "\n"
done
printf "\n"
for COMPONENT in $TFS_COMPONENTS; do
echo "Waiting for '$COMPONENT' component..."
COMPONENT_OBJNAME=$(echo "${COMPONENT}" | sed "s/\_/-/")
kubectl wait --namespace $TFS_K8S_NAMESPACE \
--for='condition=available' --timeout=300s deployment/${COMPONENT_OBJNAME}service
printf "\n"
done
if [[ "$TFS_COMPONENTS" == *"webui"* ]] && [[ "$TFS_COMPONENTS" == *"monitoring"* ]]; then
echo "Configuring WebUI DataStores and Dashboards..."
sleep 5
# Exposed through the ingress controller "tfs-ingress"
GRAFANA_URL="127.0.0.1:80/grafana"
# Default Grafana credentials
GRAFANA_USERNAME="admin"
GRAFANA_PASSWORD="admin"
# Configure Grafana Admin Password
# Ref: https://grafana.com/docs/grafana/latest/http_api/user/#change-password
GRAFANA_URL_DEFAULT="http://${GRAFANA_USERNAME}:${GRAFANA_PASSWORD}@${GRAFANA_URL}"
echo ">> Updating Grafana 'admin' password..."
curl -X PUT -H "Content-Type: application/json" -d '{
"oldPassword": "'${GRAFANA_PASSWORD}'",
"newPassword": "'${TFS_GRAFANA_PASSWORD}'",
"confirmNew" : "'${TFS_GRAFANA_PASSWORD}'"
}' ${GRAFANA_URL_DEFAULT}/api/user/password
echo
echo
# Updated Grafana API URL
GRAFANA_URL_UPDATED="http://${GRAFANA_USERNAME}:${TFS_GRAFANA_PASSWORD}@${GRAFANA_URL}"
echo "export GRAFANA_URL_UPDATED=${GRAFANA_URL_UPDATED}" >> $ENV_VARS_SCRIPT
echo ">> Installing Scatter Plot plugin..."
curl -X POST -H "Content-Type: application/json" -H "Content-Length: 0" \
${GRAFANA_URL_UPDATED}/api/plugins/michaeldmoore-scatter-panel/install
echo
# Ref: https://grafana.com/docs/grafana/latest/http_api/data_source/
QDB_HOST_PORT="${METRICSDB_HOSTNAME}:${QDB_SQL_PORT}"
echo ">> Creating datasources..."
curl -X POST -H "Content-Type: application/json" -H "Accept: application/json" -d '{
"access" : "proxy",
"type" : "postgres",
"name" : "questdb-mon-kpi",
"url" : "'${QDB_HOST_PORT}'",
"database" : "'${QDB_TABLE_MONITORING_KPIS}'",
"user" : "'${QDB_USERNAME}'",
"basicAuth": false,
"isDefault": true,
"jsonData" : {
"sslmode" : "disable",
"postgresVersion" : 1100,
"maxOpenConns" : 0,
"maxIdleConns" : 2,
"connMaxLifetime" : 14400,
"tlsAuth" : false,
"tlsAuthWithCACert" : false,
"timescaledb" : false,
"tlsConfigurationMethod": "file-path",
"tlsSkipVerify" : true
},
"secureJsonData": {"password": "'${QDB_PASSWORD}'"}
}' ${GRAFANA_URL_UPDATED}/api/datasources
echo
curl -X POST -H "Content-Type: application/json" -H "Accept: application/json" -d '{
"access" : "proxy",
"type" : "postgres",
"name" : "questdb-slc-grp",
"url" : "'${QDB_HOST_PORT}'",
"database" : "'${QDB_TABLE_SLICE_GROUPS}'",
"user" : "'${QDB_USERNAME}'",
"basicAuth": false,
"isDefault": false,
"jsonData" : {
"sslmode" : "disable",
"postgresVersion" : 1100,
"maxOpenConns" : 0,
"maxIdleConns" : 2,
"connMaxLifetime" : 14400,
"tlsAuth" : false,
"tlsAuthWithCACert" : false,
"timescaledb" : false,
"tlsConfigurationMethod": "file-path",
"tlsSkipVerify" : true
},
"secureJsonData": {"password": "'${QDB_PASSWORD}'"}
}' ${GRAFANA_URL_UPDATED}/api/datasources
printf "\n\n"
echo ">> Creating dashboards..."
# Ref: https://grafana.com/docs/grafana/latest/http_api/dashboard/
curl -X POST -H "Content-Type: application/json" -d '@src/webui/grafana_db_mon_kpis_psql.json' \
${GRAFANA_URL_UPDATED}/api/dashboards/db
echo
curl -X POST -H "Content-Type: application/json" -d '@src/webui/grafana_db_slc_grps_psql.json' \
${GRAFANA_URL_UPDATED}/api/dashboards/db
printf "\n\n"
echo ">> Staring dashboards..."
DASHBOARD_URL="${GRAFANA_URL_UPDATED}/api/dashboards/uid/tfs-l3-monit"
DASHBOARD_ID=$(curl -s "${DASHBOARD_URL}" | jq '.dashboard.id')
curl -X POST ${GRAFANA_URL_UPDATED}/api/user/stars/dashboard/${DASHBOARD_ID}
echo
DASHBOARD_URL="${GRAFANA_URL_UPDATED}/api/dashboards/uid/tfs-slice-grps"
DASHBOARD_ID=$(curl -s "${DASHBOARD_URL}" | jq '.dashboard.id')
curl -X POST ${GRAFANA_URL_UPDATED}/api/user/stars/dashboard/${DASHBOARD_ID}
echo
printf "\n\n"
fi
# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/)
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
anytree==2.8.0
APScheduler==3.8.1
ncclient==0.6.13
python-json-logger==2.0.2
lxml==4.9.1
pytz==2021.3
xmltodict==0.12.0
grpcio==1.47.*
protobuf==3.20.*
\ No newline at end of file
# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/)
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
from bgpls_speaker.service.tools.DiscoveredDBManager import DiscoveredDBManager
from bgpls_speaker.service.tools.GrpcServer import GrpcServer
from common.Constants import ServiceNameEnum
from common.Settings import get_service_port_grpc
from common.proto.bgpls_pb2_grpc import add_BgplsServiceServicer_to_server
from common.tools.service.GenericGrpcService import GenericGrpcService
from .BgplsServiceServicerImpl import BgplsServiceServicerImpl
class BgplsService(GenericGrpcService):
def __init__(self, discoveredDB : DiscoveredDBManager,
speakerServer : GrpcServer,cls_name: str = __name__) -> None:
port = get_service_port_grpc(ServiceNameEnum.BGPLS) # El enum en common.constants
super().__init__(port, cls_name=cls_name)
self.bgpls_servicer = BgplsServiceServicerImpl(discoveredDB,speakerServer)
def install_servicers(self):
add_BgplsServiceServicer_to_server(self.bgpls_servicer, self.server)
# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/)
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import grpc, json, logging
from typing import List, Tuple, Union
from bgpls_speaker.service.tools.DiscoveredDBManager import DiscoveredDBManager, GetContextDevices, getEndpointFromIpInterface
from bgpls_speaker.service.tools.GrpcServer import GrpcServer
from common.method_wrappers.Decorator import MetricsPool, safe_and_metered_rpc_method
from common.proto.context_pb2 import DeviceId, Empty, EndPointId, Link, LinkId, Uuid
from context.client.ContextClient import ContextClient
from common.proto.bgpls_pb2 import (
BgplsSpeaker, BgplsSpeakerId, DiscoveredDeviceList, DiscoveredDevice,
DiscoveredLink, DiscoveredLinkList, NodeDescriptors, BgplsSpeakerList
)
from common.proto.bgpls_pb2_grpc import BgplsServiceServicer
LOGGER = logging.getLogger(__name__)
METRICS_POOL = MetricsPool('Service', 'RPC')
class BgplsServiceServicerImpl(BgplsServiceServicer):
def __init__(self,discoveredDB : DiscoveredDBManager,
speakerServer : GrpcServer) -> None:
LOGGER.debug('Creating Servicer...')
self.speaker_handler_factory = 1
self.speaker_server=speakerServer
self.discoveredDB=discoveredDB
LOGGER.debug('Servicer Created')
@safe_and_metered_rpc_method(METRICS_POOL, LOGGER)
def ListDiscoveredDevices(self, request : Empty, context : grpc.ServicerContext) -> DiscoveredDeviceList:
"""
Get devices discovered from bgpls protocol
"""
device_names=self.discoveredDB.GetNodeNamesFromDiscoveredDB()
nodes = self.discoveredDB.GetNodesFromDiscoveredDB()
devices = [DiscoveredDevice(nodeName=node.node_name,igpID=node.igp_id,learntFrom=node.learnt_from) for node in nodes]
return DiscoveredDeviceList(discovereddevices=devices)
@safe_and_metered_rpc_method(METRICS_POOL, LOGGER)
def ListDiscoveredLinks(self, request : Empty, context : grpc.ServicerContext) -> DiscoveredLinkList:
"""
Get links discovered from bgpls protocol
"""
self.discoveredDB.UpdateNodeNameInLink()
links = self.discoveredDB.GetLinksFromDiscoveredDB()
links_info=[]
for link in links:
local=NodeDescriptors(igp_id=link.local_id,nodeName=link.local_id)
remote=NodeDescriptors(igp_id=link.remote_id,nodeName=link.remote_id)
links_info.append(DiscoveredLink(local=local,remote=remote,learntFrom=link.learnt_from,
local_ipv4=link.local_ipv4_id,remote_ipv4=link.remote_ipv4_id))
return DiscoveredLinkList(discoveredlinks=links_info)
@safe_and_metered_rpc_method(METRICS_POOL, LOGGER)
def AddBgplsSpeaker(self, request : BgplsSpeaker, context : grpc.ServicerContext) -> BgplsSpeakerId:
"""
Creates a new connection with an speaker with the given ip address, port and as.
Returns de id of the speaker created (to kill proccess¿)
"""
LOGGER.debug("(AddBgplsSpeaker) Create speaker instance %s",request)
speaker_id=self.speaker_server.connectToJavaBgpls(request.address,request.port,request.asNumber)
return BgplsSpeakerId(id=speaker_id)
@safe_and_metered_rpc_method(METRICS_POOL, LOGGER)
def ListBgplsSpeakers(self, request : Empty, context : grpc.ServicerContext) -> BgplsSpeakerId:
"""
Returns a list of the IDs of the BGP-LS speakers with open connections.
"""
speaker_list=[]
bgpls_speaker_list=[]
speaker_list=self.speaker_server.getSpeakerListIds()
for speaker in speaker_list:
bgpls_speaker_list.append(BgplsSpeakerId(id=speaker))
return BgplsSpeakerList(speakers=bgpls_speaker_list)
@safe_and_metered_rpc_method(METRICS_POOL, LOGGER)
def DisconnectFromSpeaker(self, request : BgplsSpeaker, context : grpc.ServicerContext) -> bool:
"""
Disconencts from the BGP-LS speaker given its ipv4 address.
"""
speaker_id=self.speaker_server.getSpeakerIdFromIpAddr(request.address)
self.speaker_server.terminateRunnerById(speaker_id)
return Empty()
@safe_and_metered_rpc_method(METRICS_POOL, LOGGER)
def GetSpeakerInfoFromId(self, request : BgplsSpeakerId, context : grpc.ServicerContext) -> BgplsSpeaker:
"""
Get the address, port and as number of the speaker given its id.
"""
address,as_number,port=self.speaker_server.getSpeakerFromId(request.id)
return BgplsSpeaker(address=address,port=port,asNumber=as_number)
@safe_and_metered_rpc_method(METRICS_POOL, LOGGER)
def NotifyAddNodeToContext(self, request : DiscoveredDevice, context : grpc.ServicerContext) :
"""
When a node is added to context via bgpls module this function checks if there are other nodes in the
topology connected by links discovered via bgpls. Then, if the link exist adds it to the context.
"""
node_name=request.nodeName
node_igp=self.discoveredDB.GetIgpIdFromNodeName(node_name)
LOGGER.debug("(NotifyAddNodeToContext) Find links to nodes %s:%s",node_name,node_igp)
# Get nodes connected and links were the igpID appears
nodes_conected, links_local, links_remote=self.discoveredDB.FindConnectedNodes(node_igp)
o=[LOGGER.debug("(NotifyAddNodeToContext) Links local: %s %s",link_local.local_id, link_local.remote_id) for link_local in links_local]
o=[LOGGER.debug("(NotifyAddNodeToContext) Links remote: %s %s",links_remote.local_id,links_remote.remote_id) for links_remote in links_remote]
# Check if nodes are in context
context_client=ContextClient()
context_client.connect()
# devices=context_client.ListDevices(Empty())
device_names,devices_ips=GetContextDevices(context_client)
LOGGER.debug("(NotifyAddNodeToContext) Devices in context: %s", device_names)
LOGGER.debug("(NotifyAddNodeToContext) Nodes conected in context: %s", nodes_conected)
nodes_conected_in_context=list(set(nodes_conected) & set(device_names))
LOGGER.debug("(NotifyAddNodeToContext) nodes_conected_in_context: %s", nodes_conected_in_context)
# TODO: next to function
for remote_node in nodes_conected_in_context:
LOGGER.info("(NotifyAddNodeToContext) creating link to...: %s", remote_node)
remote_igp=self.discoveredDB.GetIgpIdFromNodeName(remote_node)
# Get source device from name
device_uuid_src=DeviceId(device_uuid=Uuid(uuid=node_name))
device_src=context_client.GetDevice(device_uuid_src)
# Get destination device from name
device_uuid_dest=DeviceId(device_uuid=Uuid(uuid=remote_node))
device_dest=context_client.GetDevice(device_uuid_dest)
# Here I assume one link will always have same link in other direction
# First direction for link
# Get endpoints associated to link between devices
for link_local in links_local:
LOGGER.debug("(NotifyAddNodeToContext) local: %s %s", link_local.local_id,link_local.remote_id)
LOGGER.debug("(NotifyAddNodeToContext) matches: %s %s", node_igp,remote_igp)
if link_local.local_id == node_igp and link_local.remote_id == remote_igp:
LOGGER.debug("(NotifyAddNodeToContext) local_ipv4_id: %s", link_local.local_ipv4_id)
end_point1,ip_1=getEndpointFromIpInterface(device_src,link_local.local_ipv4_id)
LOGGER.debug("(NotifyAddNodeToContext) end_point1: %s", end_point1)
LOGGER.debug("(NotifyAddNodeToContext) remote_ipv4_id: %s", link_local.remote_ipv4_id)
end_point2,ip_2=getEndpointFromIpInterface(device_dest,link_local.remote_ipv4_id)
LOGGER.debug("(NotifyAddNodeToContext) end_point2: %s", end_point2)
# LOGGER.debug("(NotifyAddNodeToContext) Source: %s Destination: %s", end_point1,end_point2)
link_name_src_dest=node_name+"/"+end_point1+"=="+remote_node+"/"+end_point2
end_point_uuid1=Uuid(uuid=end_point1)
end_point_uuid2=Uuid(uuid=end_point2)
end_point_id1=EndPointId(endpoint_uuid=end_point_uuid1,device_id=device_uuid_src)
link_name_dest_src=remote_node+"/"+end_point2+"=="+node_name+"/"+end_point1
end_point_id2=EndPointId(endpoint_uuid=end_point_uuid2,device_id=device_uuid_dest)
end_point_ids_src_dest=[end_point_id1,end_point_id2]
end_point_ids_dest_src=[end_point_id2,end_point_id1]
link_id_src=context_client.SetLink(Link(link_id=LinkId(link_uuid=Uuid(uuid=link_name_src_dest)),
link_endpoint_ids=end_point_ids_src_dest))
link_id_dst=context_client.SetLink(Link(link_id=LinkId(link_uuid=Uuid(uuid=link_name_dest_src)),
link_endpoint_ids=end_point_ids_dest_src))
LOGGER.debug("(NotifyAddNodeToContext) Link set id src--->dst: %s", link_id_src)
context_client.close()
return Empty()
# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/)
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
\ No newline at end of file
# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/)
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import logging, signal, sys, threading
from prometheus_client import start_http_server
from common.Settings import get_log_level, get_metrics_port
from .tools.DiscoveredDBManager import DiscoveredDBManager
from .BgplsService import BgplsService
from .tools.GrpcServer import GrpcServer
terminate = threading.Event()
LOGGER : logging.Logger = None
_ONE_DAY_IN_SECONDS = 60 * 60 * 24
def signal_handler(signal, frame):
LOGGER.warning('Terminate signal received')
LOGGER.warning(signal)
terminate.set()
def main():
global LOGGER
log_level = get_log_level()
logging.basicConfig(level=log_level, format="[%(asctime)s] %(levelname)s:%(name)s:%(message)s")
LOGGER = logging.getLogger(__name__)
signal.signal(signal.SIGINT, signal_handler)
signal.signal(signal.SIGTERM, signal_handler)
LOGGER.info('Starting...')
# Start metrics server
metrics_port = get_metrics_port()
start_http_server(metrics_port)
# One common database for all bgpls_speakers connection
DB=DiscoveredDBManager()
speaker_server = GrpcServer(DB)
speaker_server.Connect()
grpc_service = BgplsService(DB,speaker_server)
grpc_service.start()
# Wait for termination signal
while not terminate.wait(timeout=0.1): pass
LOGGER.info('Terminating...')
speaker_server.terminateGrpcServer()
grpc_service.stop()
LOGGER.info('Bye')
return 0
if __name__ == '__main__':
sys.exit(main())
<!-- Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/)
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License. -->
<config>
<!-- TCP port where the BGP is listening for incoming bgp4 connections. Optional Parameter. Default value: 179 (BGP Port) -->
<BGP4Port>12179</BGP4Port>
<BGPIdentifier>7.7.7.7</BGPIdentifier>
<!-- TCP port to connect to manage the BGP connection. Default value: 1112 -->
<BGP4ManagementPort>1112</BGP4ManagementPort>
<!-- Peers to which this Peer is going to establish connection -->
<configPeer>
<peer>10.95.90.43</peer>
<export>false</export>
<import>true</import>
<peerPort>179</peerPort>
</configPeer>
<!-- Ficheros log (servidor, protocolo PCEP y OSPF). Campos opcionales-->
<BGP4LogFile>BGP4Parser2.log</BGP4LogFile><!-- Default value: BGP4Parser.log -->
<BGP4LogFileClient>BGP4Client2.log</BGP4LogFileClient><!-- Default value: BGP4Client.log-->
<BGP4LogFileServer>BGP4Server2.log</BGP4LogFileServer><!-- Default value: BGP4Server.log-->
<!-- If the tcp no delay option is used or not. Optional Parameter. Default value: false. -->
<nodelay>true</nodelay>
<!-- Waiting Time to re-connect to clients. Default value: 6000 ms. -->
<delay>40000</delay>
<setTraces>true</setTraces>
<!-- OPEN Parameters -->
<!-- RFC 4271. This 2-octet unsigned integer indicates the number of seconds the sender proposes for the value of the Hold Timer.
Upon receipt of an OPEN message, a BGP speaker MUST calculate the value of the Hold Timer by using the smaller of its configured
Hold Time and the Hold Time received in the OPEN message. The Hold Time MUST be either zero or at least three seconds. An
implementation MAY reject connections on the basis of the Hold Time. The calculated value indicates the maximum number of
seconds that may elapse between the receipt of successive KEEPALIVE and/or UPDATE messages from the sender. -->
<holdTime>180</holdTime><!-- Optional Parameter. Default value: 3. -->
<!-- RFC 4271. This 1-octet unsigned integer indicates the protocol version number of the message. The current BGP version number is 4. -->
<version>4</version><!-- Optional Parameter. Default value: 4. -->
<!-- RFC 4271. This 2-octet unsigned integer indicates the Autonomous System number of the sender.-->
<myAutonomousSystem>65006</myAutonomousSystem>
<!-- RFC 4271. This 4-octet unsigned integer indicates the BGP Identifier of the sender. A given BGP speaker sets the value of its BGP
Identifier to an IP address that is assigned to that BGP speaker. The value of the BGP Identifier is determined upon
startup and is the same for every local interface and BGP peer. -->
<!--<BGPIdentifier>192.168.1.200</BGPIdentifier> -->
<!-- If the peer is in charge of sending its topology (only the interdomain Links) to the other BGP peer it is connected to. Default: false -->
<sendTopology>false</sendTopology>
<!-- If the peer is in charge of sending its whole topology to the other BGP peer it is connected to. Default: false -->
<sendIntradomainLinks>true</sendIntradomainLinks>
<!-- Optional Parameter. How to learn the topology. Possibilities: fromXML, fromBGP. Default: fromBGP -->
<learnTopology>fromBGP</learnTopology>
<!-- Topology network to read. It is mandatory if and only if learnTopology parameter is fromXML. -->
<!--<topologyFile>src/test/resources/network1.xml</topologyFile>-->
<!-- Optional Parameter. Instance Identifier for node and link NLRI. See rfc 6549. Default value: 0-->
<!--<instanceID>0</instanceID>-->
<!-- Optional Parameter. Default value: localhost -->
<localBGPAddress>0.0.0.0</localBGPAddress>
</config>
\ No newline at end of file
# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/)
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#!/bin/bash
cd netphony-topology/
"/home/ubuntu/downloads/apache-maven-3.8.8/bin/mvn" clean package -P bgp-ls-speaker assembly:single -DskipTests
cd ..
sudo java -jar netphony-topology/target/bgp-ls-speaker-jar-with-dependencies.jar BGP4Parameters_3.xml
\ No newline at end of file
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
org.eclipse.jdt.core.compiler.compliance=1.8
org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=ignore
org.eclipse.jdt.core.compiler.release=disabled
org.eclipse.jdt.core.compiler.source=1.8
<!-- Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/)
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License. -->
<config>
<!-- TCP port where the BGP is listening for incoming bgp4 connections. Optional Parameter. Default value: 179 (BGP Port) -->
<BGP4Port>12179</BGP4Port>
<BGPIdentifier>7.7.7.7</BGPIdentifier>
<!-- TCP port to connect to manage the BGP connection. Default value: 1112 -->
<BGP4ManagementPort>1112</BGP4ManagementPort>
<!-- Peers to which this Peer is going to establish connection -->
<configPeer>
<peer>10.95.90.43</peer>
<export>false</export>
<import>true</import>
<peerPort>179</peerPort>
</configPeer>
<!-- Ficheros log (servidor, protocolo PCEP y OSPF). Campos opcionales-->
<BGP4LogFile>BGP4Parser2.log</BGP4LogFile><!-- Default value: BGP4Parser.log -->
<BGP4LogFileClient>BGP4Client2.log</BGP4LogFileClient><!-- Default value: BGP4Client.log-->
<BGP4LogFileServer>BGP4Server2.log</BGP4LogFileServer><!-- Default value: BGP4Server.log-->
<!-- If the tcp no delay option is used or not. Optional Parameter. Default value: false. -->
<nodelay>true</nodelay>
<!-- Waiting Time to re-connect to clients. Default value: 6000 ms. -->
<delay>40000</delay>
<setTraces>true</setTraces>
<!-- OPEN Parameters -->
<!-- RFC 4271. This 2-octet unsigned integer indicates the number of seconds the sender proposes for the value of the Hold Timer.
Upon receipt of an OPEN message, a BGP speaker MUST calculate the value of the Hold Timer by using the smaller of its configured
Hold Time and the Hold Time received in the OPEN message. The Hold Time MUST be either zero or at least three seconds. An
implementation MAY reject connections on the basis of the Hold Time. The calculated value indicates the maximum number of
seconds that may elapse between the receipt of successive KEEPALIVE and/or UPDATE messages from the sender. -->
<holdTime>180</holdTime><!-- Optional Parameter. Default value: 3. -->
<!-- RFC 4271. This 1-octet unsigned integer indicates the protocol version number of the message. The current BGP version number is 4. -->
<version>4</version><!-- Optional Parameter. Default value: 4. -->
<!-- RFC 4271. This 2-octet unsigned integer indicates the Autonomous System number of the sender.-->
<myAutonomousSystem>100</myAutonomousSystem>
<!-- RFC 4271. This 4-octet unsigned integer indicates the BGP Identifier of the sender. A given BGP speaker sets the value of its BGP
Identifier to an IP address that is assigned to that BGP speaker. The value of the BGP Identifier is determined upon
startup and is the same for every local interface and BGP peer. -->
<!--<BGPIdentifier>192.168.1.200</BGPIdentifier> -->
<!-- If the peer is in charge of sending its topology (only the interdomain Links) to the other BGP peer it is connected to. Default: false -->
<sendTopology>false</sendTopology>
<!-- If the peer is in charge of sending its whole topology to the other BGP peer it is connected to. Default: false -->
<sendIntradomainLinks>true</sendIntradomainLinks>
<!-- Optional Parameter. How to learn the topology. Possibilities: fromXML, fromBGP. Default: fromBGP -->
<learnTopology>fromBGP</learnTopology>
<!-- Topology network to read. It is mandatory if and only if learnTopology parameter is fromXML. -->
<!--<topologyFile>src/test/resources/network1.xml</topologyFile>-->
<!-- Optional Parameter. Instance Identifier for node and link NLRI. See rfc 6549. Default value: 0-->
<!--<instanceID>0</instanceID>-->
<!-- Optional Parameter. Default value: localhost -->
<localBGPAddress>0.0.0.0</localBGPAddress>
</config>
\ No newline at end of file
# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/)
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
v1.3.3
- Topology Module added
- Topology Module: Export via RESCONF with COP model
- Topology Module: Export via RESTCONF with IETF model (nodes only)
- Topology Module: Export via UNIFY model
- Topology Module: Import via XML
- Topology Module: Import/Export via BGP-LS
v1.3.2
- Supports network-protocols 1.3.2
- Update to support reading multiple AS_PATH
- Apache 2.0 license
- Moved to slf4j logging framework
- Added method to pass multiple TEDs from en external program
- Added docker support in travis
v1.3
- Compile with networking-protocols v1.3.0 (available in maven central)
- JUnit Test upgrade to check intraTEDBs after sending
- Added functionality: read multiple intraTEDBs from xml file
- Added support to draft-previdi-idr-bgpls-te-metric-extensions-00
v1.2.2
- Added travis integration
- Javadoc errors fixed
- Ready to meet maven central requirements
- Compile with networking-protocols v1.2.3 (available in maven central)
v1.2.1
- Compile with networking-protocols v1.2.1
v1.2
- JUnit Test added
- Bugfixes
- Reduced number of logs
- Updated README with explanation of parameters
v1.1.1
- Added configuration instructions of the standalone BGP Peer
- Added dependencies to pom.xml
v1.1.0
First Public Release