Skip to content

Commit 4d573ca

Browse files
Deleted redundant code
1 parent cb8ed83 commit 4d573ca

File tree

1 file changed

+0
-17
lines changed
  • compute/cloud-client/src/test/java/compute

1 file changed

+0
-17
lines changed

compute/cloud-client/src/test/java/compute/Util.java

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@
3737
import compute.deleteprotection.SetDeleteProtection;
3838
import compute.disks.DeleteDisk;
3939
import compute.disks.DeleteSnapshot;
40-
import compute.disks.RegionalDelete;
4140
import compute.reservation.DeleteReservation;
4241
import java.io.IOException;
4342
import java.nio.charset.StandardCharsets;
@@ -218,22 +217,6 @@ && isCreatedBeforeThresholdTime(disk.getCreationTimestamp())) {
218217
}
219218
}
220219

221-
// Delete regional disks which starts with the given prefixToDelete and
222-
// has creation timestamp >24 hours.
223-
public static void cleanUpExistingRegionalDisks(
224-
String prefixToDelete, String projectId, String region)
225-
throws IOException, ExecutionException, InterruptedException, TimeoutException {
226-
try (RegionDisksClient disksClient = RegionDisksClient.create()) {
227-
for (Disk disk : disksClient.list(projectId, region).iterateAll()) {
228-
if (disk.getName().contains(prefixToDelete)
229-
&& disk.getRegion().equals(region)
230-
&& isCreatedBeforeThresholdTime(disk.getCreationTimestamp())) {
231-
RegionalDelete.deleteRegionalDisk(projectId, region, disk.getName());
232-
}
233-
}
234-
}
235-
}
236-
237220
// Delete snapshots which starts with the given prefixToDelete and
238221
// has creation timestamp >24 hours.
239222
public static void cleanUpExistingSnapshots(String prefixToDelete, String projectId)

0 commit comments

Comments
 (0)