-
Notifications
You must be signed in to change notification settings - Fork 92
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add cleanup for gcp cli mirroring #133
Conversation
cli/src/gcp/cleanup.ts
Outdated
if (metloRegexResp.length != 2) { | ||
throw new Error("Packet Mirroring policy didn't match expected pattern. Please try manual deletion.") | ||
} | ||
let metloId = regexPattern.exec(mirrorInstance.name)[1] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
validate that this is a uuid
cli/src/gcp/cleanup.ts
Outdated
// Delete GCP Packet Mirroring | ||
try { | ||
let resp_pack = await conn.stop_packet_mirroring({ | ||
packetMirroringURL: mirrorInstance.selfLink.split("/").at(-1), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pull out and validate uuid
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
spinner.succeed("Deleted Forwarding Rule") | ||
|
||
spinner.start("Deleting Load Balancer") | ||
const [backends, ,] = await conn.list_backend_service() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
check whole name
cli/src/gcp/cleanup.ts
Outdated
|
||
spinner.start("Deleting Health Check") | ||
const [healthChecks, ,] = await conn.list_health_checks() | ||
const check = healthChecks.find((_check) => _check.name.includes(metloId)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
check whole name
No description provided.