(zone, storagePoolName)
| 180 | } |
| 181 | |
| 182 | async function deleteStoragePool(zone, storagePoolName) { |
| 183 | const projectId = await storagePoolsClient.getProjectId(); |
| 184 | |
| 185 | const [response] = await storagePoolsClient.delete({ |
| 186 | project: projectId, |
| 187 | storagePool: storagePoolName, |
| 188 | zone, |
| 189 | }); |
| 190 | let operation = response.latestResponse; |
| 191 | const operationsClient = new compute.ZoneOperationsClient(); |
| 192 | |
| 193 | console.log(`Deleting ${storagePoolName}`); |
| 194 | |
| 195 | // Wait for the delete operation to complete. |
| 196 | while (operation.status !== 'DONE') { |
| 197 | [operation] = await operationsClient.wait({ |
| 198 | operation: operation.name, |
| 199 | project: projectId, |
| 200 | zone, |
| 201 | }); |
| 202 | } |
| 203 | } |
| 204 | |
| 205 | const disksClient = new compute.DisksClient(); |
| 206 |
no test coverage detected