Skip to content

Commit f2ca349

Browse files
Reverted not related changes
1 parent 9d1635b commit f2ca349

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;
@@ -267,22 +266,6 @@ public static void deleteStoragePool(String project, String zone, String storage
267266
}
268267
}
269268

270-
// Delete disks which starts with the given prefixToDelete and
271-
// has creation timestamp >24 hours.
272-
public static void cleanUpExistingRegionalDisks(
273-
String prefixToDelete, String projectId, String region)
274-
throws IOException, ExecutionException, InterruptedException, TimeoutException {
275-
try (RegionDisksClient disksClient = RegionDisksClient.create()) {
276-
for (Disk disk : disksClient.list(projectId, region).iterateAll()) {
277-
if (disk.getName().contains(prefixToDelete)
278-
&& disk.getRegion().equals(region)
279-
&& isCreatedBeforeThresholdTime(disk.getCreationTimestamp())) {
280-
RegionalDelete.deleteRegionalDisk(projectId, region, disk.getName());
281-
}
282-
}
283-
}
284-
}
285-
286269
public static boolean containPrefixToDeleteAndZone(
287270
Object resource, String prefixToDelete, String zone) {
288271
boolean containPrefixAndZone = false;

0 commit comments

Comments
 (0)