diff --git a/proto/automation.proto b/proto/automation.proto index 02aba0a9cd3d5867a8c7f5d6581ade426ea0c290..f41bef9e28588fbd2a0acf416d347eb530c48df0 100644 --- a/proto/automation.proto +++ b/proto/automation.proto @@ -23,7 +23,7 @@ service AutomationService { rpc ZtpAdd(DeviceRole) returns (DeviceRoleState) {} rpc ZtpUpdate(DeviceRole) returns (DeviceRoleState) {} rpc ZtpDelete(DeviceRole) returns (DeviceRoleState) {} - rpc ZtpDeleteAll(Empty) returns (DeviceDeletionResult) {} + rpc ZtpDeleteAll(context.Empty) returns (DeviceDeletionResult) {} } enum DeviceRoleType { @@ -56,8 +56,6 @@ message DeviceDeletionResult { repeated string deleted = 1; } -message Empty {} - enum ZtpDeviceState { ZTP_DEV_STATE_UNDEFINED = 0; ZTP_DEV_STATE_CREATED = 1; diff --git a/src/automation/src/main/java/eu/teraflow/automation/AutomationGatewayImpl.java b/src/automation/src/main/java/eu/teraflow/automation/AutomationGatewayImpl.java index 72ab633aff296765f3a03ade814cff05b5235dfd..c160387c3e3448f29d01a185afc31127b025c2b6 100644 --- a/src/automation/src/main/java/eu/teraflow/automation/AutomationGatewayImpl.java +++ b/src/automation/src/main/java/eu/teraflow/automation/AutomationGatewayImpl.java @@ -80,7 +80,7 @@ public class AutomationGatewayImpl implements AutomationGateway { } @Override - public Uni<Automation.DeviceDeletionResult> ztpDeleteAll(Automation.Empty empty) { + public Uni<Automation.DeviceDeletionResult> ztpDeleteAll(ContextOuterClass.Empty empty) { return Uni.createFrom().item(() -> Automation.DeviceDeletionResult.newBuilder().build()); } diff --git a/src/automation/src/test/java/eu/teraflow/automation/AutomationServiceTest.java b/src/automation/src/test/java/eu/teraflow/automation/AutomationServiceTest.java index d56ef139234df5da19f20364b5a93fd58ba35b4d..bd69616bcb8331919faf3ed90b6612f01a7321b9 100644 --- a/src/automation/src/test/java/eu/teraflow/automation/AutomationServiceTest.java +++ b/src/automation/src/test/java/eu/teraflow/automation/AutomationServiceTest.java @@ -20,6 +20,7 @@ import static org.assertj.core.api.Assertions.assertThat; import automation.Automation; import automation.AutomationService; +import context.ContextOuterClass; import eu.teraflow.automation.context.ContextGateway; import eu.teraflow.automation.context.model.ConfigActionEnum; import eu.teraflow.automation.context.model.ConfigRule; @@ -236,7 +237,7 @@ class AutomationServiceTest { void shouldDeleteAllDevicesRolesByDeviceId() throws ExecutionException, InterruptedException, TimeoutException { CompletableFuture<String> message = new CompletableFuture<>(); - final var empty = Automation.Empty.newBuilder().build(); + final var empty = ContextOuterClass.Empty.newBuilder().build(); client .ztpDeleteAll(empty) diff --git a/src/automation/target/generated-sources/grpc/automation/Automation.java b/src/automation/target/generated-sources/grpc/automation/Automation.java index a44bc42294078fdba325d9dc9f149eaf1bd2bcbc..f3918e0fc18e6d97b8fd669fb307dcb94964b0e0 100644 --- a/src/automation/target/generated-sources/grpc/automation/Automation.java +++ b/src/automation/target/generated-sources/grpc/automation/Automation.java @@ -3977,424 +3977,6 @@ public final class Automation { } - public interface EmptyOrBuilder extends - // @@protoc_insertion_point(interface_extends:automation.Empty) - com.google.protobuf.MessageOrBuilder { - } - /** - * Protobuf type {@code automation.Empty} - */ - public static final class Empty extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:automation.Empty) - EmptyOrBuilder { - private static final long serialVersionUID = 0L; - // Use Empty.newBuilder() to construct. - private Empty(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { - super(builder); - } - private Empty() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Empty(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private Empty( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return automation.Automation.internal_static_automation_Empty_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return automation.Automation.internal_static_automation_Empty_fieldAccessorTable - .ensureFieldAccessorsInitialized( - automation.Automation.Empty.class, automation.Automation.Empty.Builder.class); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof automation.Automation.Empty)) { - return super.equals(obj); - } - automation.Automation.Empty other = (automation.Automation.Empty) obj; - - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static automation.Automation.Empty parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static automation.Automation.Empty parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static automation.Automation.Empty parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static automation.Automation.Empty parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static automation.Automation.Empty parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static automation.Automation.Empty parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static automation.Automation.Empty parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static automation.Automation.Empty parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static automation.Automation.Empty parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static automation.Automation.Empty parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static automation.Automation.Empty parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static automation.Automation.Empty parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(automation.Automation.Empty prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code automation.Empty} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements - // @@protoc_insertion_point(builder_implements:automation.Empty) - automation.Automation.EmptyOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return automation.Automation.internal_static_automation_Empty_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return automation.Automation.internal_static_automation_Empty_fieldAccessorTable - .ensureFieldAccessorsInitialized( - automation.Automation.Empty.class, automation.Automation.Empty.Builder.class); - } - - // Construct using automation.Automation.Empty.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return automation.Automation.internal_static_automation_Empty_descriptor; - } - - @java.lang.Override - public automation.Automation.Empty getDefaultInstanceForType() { - return automation.Automation.Empty.getDefaultInstance(); - } - - @java.lang.Override - public automation.Automation.Empty build() { - automation.Automation.Empty result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public automation.Automation.Empty buildPartial() { - automation.Automation.Empty result = new automation.Automation.Empty(this); - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof automation.Automation.Empty) { - return mergeFrom((automation.Automation.Empty)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(automation.Automation.Empty other) { - if (other == automation.Automation.Empty.getDefaultInstance()) return this; - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - automation.Automation.Empty parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (automation.Automation.Empty) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:automation.Empty) - } - - // @@protoc_insertion_point(class_scope:automation.Empty) - private static final automation.Automation.Empty DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new automation.Automation.Empty(); - } - - public static automation.Automation.Empty getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser<Empty> - PARSER = new com.google.protobuf.AbstractParser<Empty>() { - @java.lang.Override - public Empty parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Empty(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser<Empty> parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser<Empty> getParserForType() { - return PARSER; - } - - @java.lang.Override - public automation.Automation.Empty getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - private static final com.google.protobuf.Descriptors.Descriptor internal_static_automation_DeviceRoleId_descriptor; private static final @@ -4420,11 +4002,6 @@ public final class Automation { private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_automation_DeviceDeletionResult_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_automation_Empty_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_automation_Empty_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { @@ -4445,23 +4022,23 @@ public final class Automation { "evRoleId\030\001 \001(\0132\030.automation.DeviceRoleId" + "\0220\n\014devRoleState\030\002 \001(\0162\032.automation.ZtpD" + "eviceState\"\'\n\024DeviceDeletionResult\022\017\n\007de" + - "leted\030\001 \003(\t\"\007\n\005Empty*H\n\016DeviceRoleType\022\010" + - "\n\004NONE\020\000\022\013\n\007DEV_OPS\020\001\022\014\n\010DEV_CONF\020\002\022\021\n\rP" + - "IPELINE_CONF\020\003*~\n\016ZtpDeviceState\022\033\n\027ZTP_" + - "DEV_STATE_UNDEFINED\020\000\022\031\n\025ZTP_DEV_STATE_C" + - "REATED\020\001\022\031\n\025ZTP_DEV_STATE_UPDATED\020\002\022\031\n\025Z" + - "TP_DEV_STATE_DELETED\020\0032\273\003\n\021AutomationSer" + - "vice\022F\n\020ZtpGetDeviceRole\022\030.automation.De" + - "viceRoleId\032\026.automation.DeviceRole\"\000\022N\n\033" + - "ZtpGetDeviceRolesByDeviceId\022\021.context.De" + - "viceId\032\032.automation.DeviceRoleList\"\000\022?\n\006" + - "ZtpAdd\022\026.automation.DeviceRole\032\033.automat" + - "ion.DeviceRoleState\"\000\022B\n\tZtpUpdate\022\026.aut" + - "omation.DeviceRole\032\033.automation.DeviceRo" + - "leState\"\000\022B\n\tZtpDelete\022\026.automation.Devi" + - "ceRole\032\033.automation.DeviceRoleState\"\000\022E\n" + - "\014ZtpDeleteAll\022\021.automation.Empty\032 .autom" + - "ation.DeviceDeletionResult\"\000b\006proto3" + "leted\030\001 \003(\t*H\n\016DeviceRoleType\022\010\n\004NONE\020\000\022" + + "\013\n\007DEV_OPS\020\001\022\014\n\010DEV_CONF\020\002\022\021\n\rPIPELINE_C" + + "ONF\020\003*~\n\016ZtpDeviceState\022\033\n\027ZTP_DEV_STATE" + + "_UNDEFINED\020\000\022\031\n\025ZTP_DEV_STATE_CREATED\020\001\022" + + "\031\n\025ZTP_DEV_STATE_UPDATED\020\002\022\031\n\025ZTP_DEV_ST" + + "ATE_DELETED\020\0032\270\003\n\021AutomationService\022F\n\020Z" + + "tpGetDeviceRole\022\030.automation.DeviceRoleI" + + "d\032\026.automation.DeviceRole\"\000\022N\n\033ZtpGetDev" + + "iceRolesByDeviceId\022\021.context.DeviceId\032\032." + + "automation.DeviceRoleList\"\000\022?\n\006ZtpAdd\022\026." + + "automation.DeviceRole\032\033.automation.Devic" + + "eRoleState\"\000\022B\n\tZtpUpdate\022\026.automation.D" + + "eviceRole\032\033.automation.DeviceRoleState\"\000" + + "\022B\n\tZtpDelete\022\026.automation.DeviceRole\032\033." + + "automation.DeviceRoleState\"\000\022B\n\014ZtpDelet" + + "eAll\022\016.context.Empty\032 .automation.Device" + + "DeletionResult\"\000b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor .internalBuildGeneratedFileFrom(descriptorData, @@ -4498,12 +4075,6 @@ public final class Automation { com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_automation_DeviceDeletionResult_descriptor, new java.lang.String[] { "Deleted", }); - internal_static_automation_Empty_descriptor = - getDescriptor().getMessageTypes().get(5); - internal_static_automation_Empty_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_automation_Empty_descriptor, - new java.lang.String[] { }); context.ContextOuterClass.getDescriptor(); } diff --git a/src/automation/target/generated-sources/grpc/automation/AutomationService.java b/src/automation/target/generated-sources/grpc/automation/AutomationService.java index 9b772a499617f341ba742ccfe8ae8ade34366831..4df9e1098d2028bba58da0959512310ed3d2c4ba 100644 --- a/src/automation/target/generated-sources/grpc/automation/AutomationService.java +++ b/src/automation/target/generated-sources/grpc/automation/AutomationService.java @@ -18,7 +18,7 @@ public interface AutomationService extends MutinyService { io.smallrye.mutiny.Uni<automation.Automation.DeviceRoleState> ztpDelete(automation.Automation.DeviceRole request); - io.smallrye.mutiny.Uni<automation.Automation.DeviceDeletionResult> ztpDeleteAll(automation.Automation.Empty request); + io.smallrye.mutiny.Uni<automation.Automation.DeviceDeletionResult> ztpDeleteAll(context.ContextOuterClass.Empty request); diff --git a/src/automation/target/generated-sources/grpc/automation/AutomationServiceBean.java b/src/automation/target/generated-sources/grpc/automation/AutomationServiceBean.java index 52b1425cf6d3c5c59ae99621204689176892d043..74d420a1ee8c3c11f824c30fb96f694ddddc64fe 100644 --- a/src/automation/target/generated-sources/grpc/automation/AutomationServiceBean.java +++ b/src/automation/target/generated-sources/grpc/automation/AutomationServiceBean.java @@ -56,7 +56,7 @@ public class AutomationServiceBean extends MutinyAutomationServiceGrpc.Automatio } } @Override - public io.smallrye.mutiny.Uni<automation.Automation.DeviceDeletionResult> ztpDeleteAll(automation.Automation.Empty request) { + public io.smallrye.mutiny.Uni<automation.Automation.DeviceDeletionResult> ztpDeleteAll(context.ContextOuterClass.Empty request) { try { return delegate.ztpDeleteAll(request); } catch (UnsupportedOperationException e) { diff --git a/src/automation/target/generated-sources/grpc/automation/AutomationServiceClient.java b/src/automation/target/generated-sources/grpc/automation/AutomationServiceClient.java index 5dde73d5bfdbb401ed9fd89e38a6caa3e75cabbe..9dcad532a0238f6f14d8e6ca2aa64b445747e9e6 100644 --- a/src/automation/target/generated-sources/grpc/automation/AutomationServiceClient.java +++ b/src/automation/target/generated-sources/grpc/automation/AutomationServiceClient.java @@ -41,7 +41,7 @@ public class AutomationServiceClient implements AutomationService, MutinyClient< return stub.ztpDelete(request); } @Override - public io.smallrye.mutiny.Uni<automation.Automation.DeviceDeletionResult> ztpDeleteAll(automation.Automation.Empty request) { + public io.smallrye.mutiny.Uni<automation.Automation.DeviceDeletionResult> ztpDeleteAll(context.ContextOuterClass.Empty request) { return stub.ztpDeleteAll(request); } diff --git a/src/automation/target/generated-sources/grpc/automation/AutomationServiceGrpc.java b/src/automation/target/generated-sources/grpc/automation/AutomationServiceGrpc.java index 9f805796624bff8dfbd5f4b428fa21cf066ffb80..25f5feaf327702102d1ec6cd9ca6cc8ab74cf14f 100644 --- a/src/automation/target/generated-sources/grpc/automation/AutomationServiceGrpc.java +++ b/src/automation/target/generated-sources/grpc/automation/AutomationServiceGrpc.java @@ -169,27 +169,27 @@ public final class AutomationServiceGrpc { return getZtpDeleteMethod; } - private static volatile io.grpc.MethodDescriptor<automation.Automation.Empty, + private static volatile io.grpc.MethodDescriptor<context.ContextOuterClass.Empty, automation.Automation.DeviceDeletionResult> getZtpDeleteAllMethod; @io.grpc.stub.annotations.RpcMethod( fullMethodName = SERVICE_NAME + '/' + "ZtpDeleteAll", - requestType = automation.Automation.Empty.class, + requestType = context.ContextOuterClass.Empty.class, responseType = automation.Automation.DeviceDeletionResult.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor<automation.Automation.Empty, + public static io.grpc.MethodDescriptor<context.ContextOuterClass.Empty, automation.Automation.DeviceDeletionResult> getZtpDeleteAllMethod() { - io.grpc.MethodDescriptor<automation.Automation.Empty, automation.Automation.DeviceDeletionResult> getZtpDeleteAllMethod; + io.grpc.MethodDescriptor<context.ContextOuterClass.Empty, automation.Automation.DeviceDeletionResult> getZtpDeleteAllMethod; if ((getZtpDeleteAllMethod = AutomationServiceGrpc.getZtpDeleteAllMethod) == null) { synchronized (AutomationServiceGrpc.class) { if ((getZtpDeleteAllMethod = AutomationServiceGrpc.getZtpDeleteAllMethod) == null) { AutomationServiceGrpc.getZtpDeleteAllMethod = getZtpDeleteAllMethod = - io.grpc.MethodDescriptor.<automation.Automation.Empty, automation.Automation.DeviceDeletionResult>newBuilder() + io.grpc.MethodDescriptor.<context.ContextOuterClass.Empty, automation.Automation.DeviceDeletionResult>newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.UNARY) .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ZtpDeleteAll")) .setSampledToLocalTracing(true) .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - automation.Automation.Empty.getDefaultInstance())) + context.ContextOuterClass.Empty.getDefaultInstance())) .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( automation.Automation.DeviceDeletionResult.getDefaultInstance())) .setSchemaDescriptor(new AutomationServiceMethodDescriptorSupplier("ZtpDeleteAll")) @@ -285,7 +285,7 @@ public final class AutomationServiceGrpc { /** */ - public void ztpDeleteAll(automation.Automation.Empty request, + public void ztpDeleteAll(context.ContextOuterClass.Empty request, io.grpc.stub.StreamObserver<automation.Automation.DeviceDeletionResult> responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getZtpDeleteAllMethod(), responseObserver); } @@ -331,7 +331,7 @@ public final class AutomationServiceGrpc { getZtpDeleteAllMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall( new MethodHandlers< - automation.Automation.Empty, + context.ContextOuterClass.Empty, automation.Automation.DeviceDeletionResult>( this, METHODID_ZTP_DELETE_ALL))) .build(); @@ -394,7 +394,7 @@ public final class AutomationServiceGrpc { /** */ - public void ztpDeleteAll(automation.Automation.Empty request, + public void ztpDeleteAll(context.ContextOuterClass.Empty request, io.grpc.stub.StreamObserver<automation.Automation.DeviceDeletionResult> responseObserver) { io.grpc.stub.ClientCalls.asyncUnaryCall( getChannel().newCall(getZtpDeleteAllMethod(), getCallOptions()), request, responseObserver); @@ -452,7 +452,7 @@ public final class AutomationServiceGrpc { /** */ - public automation.Automation.DeviceDeletionResult ztpDeleteAll(automation.Automation.Empty request) { + public automation.Automation.DeviceDeletionResult ztpDeleteAll(context.ContextOuterClass.Empty request) { return io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getZtpDeleteAllMethod(), getCallOptions(), request); } @@ -515,7 +515,7 @@ public final class AutomationServiceGrpc { /** */ public com.google.common.util.concurrent.ListenableFuture<automation.Automation.DeviceDeletionResult> ztpDeleteAll( - automation.Automation.Empty request) { + context.ContextOuterClass.Empty request) { return io.grpc.stub.ClientCalls.futureUnaryCall( getChannel().newCall(getZtpDeleteAllMethod(), getCallOptions()), request); } @@ -566,7 +566,7 @@ public final class AutomationServiceGrpc { (io.grpc.stub.StreamObserver<automation.Automation.DeviceRoleState>) responseObserver); break; case METHODID_ZTP_DELETE_ALL: - serviceImpl.ztpDeleteAll((automation.Automation.Empty) request, + serviceImpl.ztpDeleteAll((context.ContextOuterClass.Empty) request, (io.grpc.stub.StreamObserver<automation.Automation.DeviceDeletionResult>) responseObserver); break; default: diff --git a/src/automation/target/generated-sources/grpc/automation/MutinyAutomationServiceGrpc.java b/src/automation/target/generated-sources/grpc/automation/MutinyAutomationServiceGrpc.java index 0783cbc965e487a020a36d25acca55c5a17c0640..9b641fcdd7733828c58ce563651ac3d46e697287 100644 --- a/src/automation/target/generated-sources/grpc/automation/MutinyAutomationServiceGrpc.java +++ b/src/automation/target/generated-sources/grpc/automation/MutinyAutomationServiceGrpc.java @@ -61,7 +61,7 @@ public final class MutinyAutomationServiceGrpc implements io.quarkus.grpc.runtim } - public io.smallrye.mutiny.Uni<automation.Automation.DeviceDeletionResult> ztpDeleteAll(automation.Automation.Empty request) { + public io.smallrye.mutiny.Uni<automation.Automation.DeviceDeletionResult> ztpDeleteAll(context.ContextOuterClass.Empty request) { return io.quarkus.grpc.runtime.ClientCalls.oneToOne(request, delegateStub::ztpDeleteAll); } @@ -108,7 +108,7 @@ public final class MutinyAutomationServiceGrpc implements io.quarkus.grpc.runtim } - public io.smallrye.mutiny.Uni<automation.Automation.DeviceDeletionResult> ztpDeleteAll(automation.Automation.Empty request) { + public io.smallrye.mutiny.Uni<automation.Automation.DeviceDeletionResult> ztpDeleteAll(context.ContextOuterClass.Empty request) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } @@ -153,7 +153,7 @@ public final class MutinyAutomationServiceGrpc implements io.quarkus.grpc.runtim automation.AutomationServiceGrpc.getZtpDeleteAllMethod(), asyncUnaryCall( new MethodHandlers< - automation.Automation.Empty, + context.ContextOuterClass.Empty, automation.Automation.DeviceDeletionResult>( this, METHODID_ZTP_DELETE_ALL, compression))) .build(); @@ -217,7 +217,7 @@ public final class MutinyAutomationServiceGrpc implements io.quarkus.grpc.runtim serviceImpl::ztpDelete); break; case METHODID_ZTP_DELETE_ALL: - io.quarkus.grpc.runtime.ServerCalls.oneToOne((automation.Automation.Empty) request, + io.quarkus.grpc.runtime.ServerCalls.oneToOne((context.ContextOuterClass.Empty) request, (io.grpc.stub.StreamObserver<automation.Automation.DeviceDeletionResult>) responseObserver, compression, serviceImpl::ztpDeleteAll); diff --git a/src/automation/target/kubernetes/kubernetes.yml b/src/automation/target/kubernetes/kubernetes.yml index 5fa64eaa3ff3f5f32659f226ee892ec78f5eedd2..321ce20d110da0042b427af531a4473abde0721a 100644 --- a/src/automation/target/kubernetes/kubernetes.yml +++ b/src/automation/target/kubernetes/kubernetes.yml @@ -3,20 +3,20 @@ apiVersion: v1 kind: Service metadata: annotations: - app.quarkus.io/commit-id: cc97cda43489c948a3267ddcb2833ae67f5880cc - app.quarkus.io/build-timestamp: 2022-07-22 - 11:36:51 +0000 + app.quarkus.io/commit-id: 70662d960465062d0c21ccce778af4ddb5619bec + app.quarkus.io/build-timestamp: 2022-08-01 - 11:18:43 +0000 labels: app.kubernetes.io/name: automationservice app: automationservice name: automationservice spec: ports: - - name: grpc - port: 5050 - targetPort: 5050 - name: http port: 8080 targetPort: 8080 + - name: grpc + port: 5050 + targetPort: 5050 selector: app.kubernetes.io/name: automationservice type: ClusterIP @@ -25,8 +25,8 @@ apiVersion: apps/v1 kind: Deployment metadata: annotations: - app.quarkus.io/commit-id: cc97cda43489c948a3267ddcb2833ae67f5880cc - app.quarkus.io/build-timestamp: 2022-07-22 - 11:36:51 +0000 + app.quarkus.io/commit-id: 70662d960465062d0c21ccce778af4ddb5619bec + app.quarkus.io/build-timestamp: 2022-08-01 - 11:18:43 +0000 labels: app: automationservice app.kubernetes.io/name: automationservice @@ -39,8 +39,8 @@ spec: template: metadata: annotations: - app.quarkus.io/commit-id: cc97cda43489c948a3267ddcb2833ae67f5880cc - app.quarkus.io/build-timestamp: 2022-07-22 - 11:36:51 +0000 + app.quarkus.io/commit-id: 70662d960465062d0c21ccce778af4ddb5619bec + app.quarkus.io/build-timestamp: 2022-08-01 - 11:18:43 +0000 labels: app: automationservice app.kubernetes.io/name: automationservice @@ -51,10 +51,10 @@ spec: valueFrom: fieldRef: fieldPath: metadata.namespace - - name: DEVICE_SERVICE_HOST - value: DeviceService - name: CONTEXT_SERVICE_HOST value: ContextService + - name: DEVICE_SERVICE_HOST + value: DeviceService image: registry.gitlab.com/teraflow-h2020/controller/automation:0.2.0 imagePullPolicy: Always livenessProbe: @@ -69,12 +69,12 @@ spec: timeoutSeconds: 10 name: automationservice ports: - - containerPort: 5050 - name: grpc - protocol: TCP - containerPort: 8080 name: http protocol: TCP + - containerPort: 5050 + name: grpc + protocol: TCP readinessProbe: failureThreshold: 3 httpGet: