Loading src/automation/src/main/docker/Dockerfile.multistage.jvm +1 −0 Original line number Diff line number Diff line Loading @@ -37,6 +37,7 @@ FROM registry.access.redhat.com/ubi8/ubi-minimal:8.4 AS release ARG JAVA_PACKAGE=java-11-openjdk-headless ARG RUN_JAVA_VERSION=1.3.8 ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' ENV QUARKUS_LAUNCH_DEVMODE="true" # Install java and the run-java script # Also set up permissions for user `1001` RUN microdnf install curl ca-certificates ${JAVA_PACKAGE} \ Loading src/automation/src/main/java/eu/teraflow/automation/AutomationServiceImpl.java +21 −1 Original line number Diff line number Diff line Loading @@ -41,15 +41,21 @@ public class AutomationServiceImpl implements AutomationService { @Override public Uni<Device> addDevice(String deviceId) { final var deserializedDeviceUni = contextService.getDevice(deviceId); deserializedDeviceUni .onFailure() .recoverWithNull() .subscribe() .with( device -> { final var id = deviceId; if (device == null) { LOGGER.warnf("%s is null. Ignoring...", device); return; } if (device.isEnabled()) { LOGGER.warnf("%s has already been enabled. Ignoring...", device); return; Loading Loading @@ -88,11 +94,18 @@ public class AutomationServiceImpl implements AutomationService { final var deserializedDeviceUni = contextService.getDevice(deviceId); deserializedDeviceUni .onFailure() .recoverWithNull() .subscribe() .with( device -> { final var id = deviceId; if (device == null) { LOGGER.warnf("%s is null. Ignoring...", device); return; } if (device.isDisabled()) { LOGGER.warnf("%s has already been disabled. Ignoring...", device); return; Loading Loading @@ -120,11 +133,18 @@ public class AutomationServiceImpl implements AutomationService { final var deserializedDeviceUni = contextService.getDevice(deviceId); deserializedDeviceUni .onFailure() .recoverWithNull() .subscribe() .with( device -> { final var id = deviceId; if (device == null) { LOGGER.warnf("%s is null. Ignoring...", device); return; } if (!device.isEnabled()) { LOGGER.warnf("Cannot update disabled device %s. Ignoring...", device); return; Loading src/automation/src/main/resources/application.yml +5 −0 Original line number Diff line number Diff line Loading @@ -15,6 +15,11 @@ automation: should-subscribe-to-context-component: true quarkus: package: type: mutable-jar live-reload: password: 1234 url: http://0.0.0.0:8080 banner: path: teraflow-automation-banner.txt grpc: Loading src/automation/target/generated-sources/grpc/context/ContextOuterClass.java +27235 −20442 File changed.Preview size limit exceeded, changes collapsed. Show changes src/automation/target/generated-sources/grpc/context/ContextService.java +4 −0 Original line number Diff line number Diff line Loading @@ -24,6 +24,8 @@ public interface ContextService extends MutinyService { io.smallrye.mutiny.Uni<context.ContextOuterClass.Topology> getTopology(context.ContextOuterClass.TopologyId request); io.smallrye.mutiny.Uni<context.ContextOuterClass.TopologyDetails> getTopologyDetails(context.ContextOuterClass.TopologyId request); io.smallrye.mutiny.Uni<context.ContextOuterClass.TopologyId> setTopology(context.ContextOuterClass.Topology request); io.smallrye.mutiny.Uni<context.ContextOuterClass.Empty> removeTopology(context.ContextOuterClass.TopologyId request); Loading @@ -38,6 +40,8 @@ public interface ContextService extends MutinyService { io.smallrye.mutiny.Uni<context.ContextOuterClass.Empty> removeDevice(context.ContextOuterClass.DeviceId request); io.smallrye.mutiny.Uni<context.ContextOuterClass.EndPointNameList> listEndPointNames(context.ContextOuterClass.EndPointIdList request); io.smallrye.mutiny.Uni<context.ContextOuterClass.LinkIdList> listLinkIds(context.ContextOuterClass.Empty request); io.smallrye.mutiny.Uni<context.ContextOuterClass.LinkList> listLinks(context.ContextOuterClass.Empty request); Loading Loading
src/automation/src/main/docker/Dockerfile.multistage.jvm +1 −0 Original line number Diff line number Diff line Loading @@ -37,6 +37,7 @@ FROM registry.access.redhat.com/ubi8/ubi-minimal:8.4 AS release ARG JAVA_PACKAGE=java-11-openjdk-headless ARG RUN_JAVA_VERSION=1.3.8 ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' ENV QUARKUS_LAUNCH_DEVMODE="true" # Install java and the run-java script # Also set up permissions for user `1001` RUN microdnf install curl ca-certificates ${JAVA_PACKAGE} \ Loading
src/automation/src/main/java/eu/teraflow/automation/AutomationServiceImpl.java +21 −1 Original line number Diff line number Diff line Loading @@ -41,15 +41,21 @@ public class AutomationServiceImpl implements AutomationService { @Override public Uni<Device> addDevice(String deviceId) { final var deserializedDeviceUni = contextService.getDevice(deviceId); deserializedDeviceUni .onFailure() .recoverWithNull() .subscribe() .with( device -> { final var id = deviceId; if (device == null) { LOGGER.warnf("%s is null. Ignoring...", device); return; } if (device.isEnabled()) { LOGGER.warnf("%s has already been enabled. Ignoring...", device); return; Loading Loading @@ -88,11 +94,18 @@ public class AutomationServiceImpl implements AutomationService { final var deserializedDeviceUni = contextService.getDevice(deviceId); deserializedDeviceUni .onFailure() .recoverWithNull() .subscribe() .with( device -> { final var id = deviceId; if (device == null) { LOGGER.warnf("%s is null. Ignoring...", device); return; } if (device.isDisabled()) { LOGGER.warnf("%s has already been disabled. Ignoring...", device); return; Loading Loading @@ -120,11 +133,18 @@ public class AutomationServiceImpl implements AutomationService { final var deserializedDeviceUni = contextService.getDevice(deviceId); deserializedDeviceUni .onFailure() .recoverWithNull() .subscribe() .with( device -> { final var id = deviceId; if (device == null) { LOGGER.warnf("%s is null. Ignoring...", device); return; } if (!device.isEnabled()) { LOGGER.warnf("Cannot update disabled device %s. Ignoring...", device); return; Loading
src/automation/src/main/resources/application.yml +5 −0 Original line number Diff line number Diff line Loading @@ -15,6 +15,11 @@ automation: should-subscribe-to-context-component: true quarkus: package: type: mutable-jar live-reload: password: 1234 url: http://0.0.0.0:8080 banner: path: teraflow-automation-banner.txt grpc: Loading
src/automation/target/generated-sources/grpc/context/ContextOuterClass.java +27235 −20442 File changed.Preview size limit exceeded, changes collapsed. Show changes
src/automation/target/generated-sources/grpc/context/ContextService.java +4 −0 Original line number Diff line number Diff line Loading @@ -24,6 +24,8 @@ public interface ContextService extends MutinyService { io.smallrye.mutiny.Uni<context.ContextOuterClass.Topology> getTopology(context.ContextOuterClass.TopologyId request); io.smallrye.mutiny.Uni<context.ContextOuterClass.TopologyDetails> getTopologyDetails(context.ContextOuterClass.TopologyId request); io.smallrye.mutiny.Uni<context.ContextOuterClass.TopologyId> setTopology(context.ContextOuterClass.Topology request); io.smallrye.mutiny.Uni<context.ContextOuterClass.Empty> removeTopology(context.ContextOuterClass.TopologyId request); Loading @@ -38,6 +40,8 @@ public interface ContextService extends MutinyService { io.smallrye.mutiny.Uni<context.ContextOuterClass.Empty> removeDevice(context.ContextOuterClass.DeviceId request); io.smallrye.mutiny.Uni<context.ContextOuterClass.EndPointNameList> listEndPointNames(context.ContextOuterClass.EndPointIdList request); io.smallrye.mutiny.Uni<context.ContextOuterClass.LinkIdList> listLinkIds(context.ContextOuterClass.Empty request); io.smallrye.mutiny.Uni<context.ContextOuterClass.LinkList> listLinks(context.ContextOuterClass.Empty request); Loading