epugh commented on code in PR #5353:
URL: https://github.com/apache/solr/pull/5353#discussion_r4652335930


##########
solr/core/src/java/org/apache/solr/cli/SnapshotListTool.java:
##########
@@ -98,20 +95,9 @@ void listSnapshots(SnapshotListParams params) throws 
Exception {
   }
 
   public void listSnapshots(SolrClient solrClient, String collectionName) {
-    CollectionAdminRequest.ListSnapshots listSnaps =
-        new CollectionAdminRequest.ListSnapshots(collectionName);
-    CollectionAdminResponse resp;
     try {
-      resp = listSnaps.process(solrClient);
-      if (resp.getStatus() != 0) {
-        throw new IllegalStateException(
-            "The LISTSNAPSHOTS request failed. The status code is " + 
resp.getStatus());
-      }
-
-      NamedList<?> apiResult =
-          (NamedList<?>) 
resp.getResponse().get(SolrSnapshotManager.SNAPSHOTS_INFO);
-      apiResult.forEach((name, value) -> echo(name));
-
+      var response = new 
CollectionSnapshotsApi.ListSnapshots(collectionName).process(solrClient);

Review Comment:
   goign to move it to it's own PR...



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to