From b54c5cda09383103bdedd463883e9f3847ce5b1f Mon Sep 17 00:00:00 2001 From: Adam O'Brien Date: Mon, 30 Sep 2024 09:53:16 +0100 Subject: [PATCH] fix: Add common client inheritence to RhelHosts (#11) --- .../inventory/client/RhelHostClient.java | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/main/java/org/project_kessel/inventory/client/RhelHostClient.java b/src/main/java/org/project_kessel/inventory/client/RhelHostClient.java index 15bae80..0dea69b 100644 --- a/src/main/java/org/project_kessel/inventory/client/RhelHostClient.java +++ b/src/main/java/org/project_kessel/inventory/client/RhelHostClient.java @@ -7,20 +7,16 @@ import org.project_kessel.api.inventory.v1beta1.resources.CreateRhelHostRequest; import org.project_kessel.api.inventory.v1beta1.resources.CreateRhelHostResponse; import org.project_kessel.api.inventory.v1beta1.resources.KesselRhelHostServiceGrpc; - +import org.project_kessel.clients.KesselClient; import java.util.logging.Logger; -public class RhelHostClient { +public class RhelHostClient extends KesselClient { private static final Logger logger = Logger.getLogger(RhelHostClient.class.getName()); - private final KesselRhelHostServiceGrpc.KesselRhelHostServiceStub asyncStub; - private final KesselRhelHostServiceGrpc.KesselRhelHostServiceBlockingStub blockingStub; - RhelHostClient(Channel channel){ - asyncStub = KesselRhelHostServiceGrpc.newStub(channel); - blockingStub = KesselRhelHostServiceGrpc.newBlockingStub(channel); + super(KesselRhelHostServiceGrpc.newStub(channel), KesselRhelHostServiceGrpc.newBlockingStub(channel)); } public void CreateRhelHost(CreateRhelHostRequest request, StreamObserver responseStreamObserver) {