(zone, reservationName)
| 121 | } |
| 122 | |
| 123 | async function deleteReservation(zone, reservationName) { |
| 124 | const projectId = await reservationsClient.getProjectId(); |
| 125 | |
| 126 | const [response] = await reservationsClient.delete({ |
| 127 | project: projectId, |
| 128 | reservation: reservationName, |
| 129 | zone, |
| 130 | }); |
| 131 | let operation = response.latestResponse; |
| 132 | const operationsClient = new compute.ZoneOperationsClient(); |
| 133 | |
| 134 | console.log(`Deleting ${reservationName}`); |
| 135 | |
| 136 | // Wait for the delete operation to complete. |
| 137 | while (operation.status !== 'DONE') { |
| 138 | [operation] = await operationsClient.wait({ |
| 139 | operation: operation.name, |
| 140 | project: projectId, |
| 141 | zone, |
| 142 | }); |
| 143 | } |
| 144 | } |
| 145 | |
| 146 | const storagePoolsClient = new compute.StoragePoolsClient(); |
| 147 |
no test coverage detected