From 9e038265edc9201fb855df1f2b74965b29fd1de2 Mon Sep 17 00:00:00 2001 From: marcos-albornoz Date: Thu, 1 Sep 2022 14:26:06 -0500 Subject: [PATCH] fix: The Ping function is not supported by VaaS --- .../venafi/vcert/sdk/connectors/cloud/Cloud.java | 4 ---- .../sdk/connectors/cloud/CloudConnector.java | 15 +++++---------- 2 files changed, 5 insertions(+), 14 deletions(-) diff --git a/src/main/java/com/venafi/vcert/sdk/connectors/cloud/Cloud.java b/src/main/java/com/venafi/vcert/sdk/connectors/cloud/Cloud.java index 0c148db..2a26a91 100644 --- a/src/main/java/com/venafi/vcert/sdk/connectors/cloud/Cloud.java +++ b/src/main/java/com/venafi/vcert/sdk/connectors/cloud/Cloud.java @@ -66,10 +66,6 @@ Response retrieveCertificate(@Param("id") String id, @Param("apiKey") String api @RequestLine("GET /outagedetection/v1/certificates/{id}") CertificateDetails certificateDetails(@Param("id") String id, @Param("apiKey") String apiKey); - @RequestLine("GET ping") - @Headers("x-venafi-api-key: {apiKey}") - Response ping(@Param("apiKey") String apiKey); - @RequestLine("GET /v1/certificateauthorities/{CA}/accounts") @Headers("tppl-api-key: {apiKey}") CAAccountsList getCAAccounts(@Param("CA") String caName, @Param("apiKey") String apiKey); diff --git a/src/main/java/com/venafi/vcert/sdk/connectors/cloud/CloudConnector.java b/src/main/java/com/venafi/vcert/sdk/connectors/cloud/CloudConnector.java index 69063c1..6e31032 100644 --- a/src/main/java/com/venafi/vcert/sdk/connectors/cloud/CloudConnector.java +++ b/src/main/java/com/venafi/vcert/sdk/connectors/cloud/CloudConnector.java @@ -104,17 +104,12 @@ public String getVendorAndProductName() { return vendorAndProductName; } + /** + * @deprecated The ping capability is not longer supported by VaaS. + */ @Override - public void ping() throws VCertException { - Response response = doPing(); - if (response.status() != 200) { - throw new CloudPingException( response.status(), response.reason()); - } - } - - private Response doPing() { - return cloud.ping(credentials.apiKey()); - } + @Deprecated + public void ping() throws VCertException {} /** * {@inheritDoc}