cli
cli copied to clipboard
Compute Instance delete: Remove multiple entities by their IDs/Names
Description
Compute Instance delete, remove multiple entities by their IDs/Names
Checklist
(For exoscale contributors)
- [x] Changelog updated (under Unreleased block)
- [x] Testing
Testing
Deleting a list of instance
go run main.go c i delete test1 test2 test3
[+] Are you sure you want to delete instance "test1"? [yN]: y
[+] Are you sure you want to delete instance "test2"? [yN]: y
[+] Are you sure you want to delete instance "test3"? [yN]: y
✔ Deleting instance "test1, test2, test3"... 9s
Not existing instance in list
go run main.go c i delete test1 test2 test404 test3
[+] Are you sure you want to delete instance "test1"? [yN]: y
[+] Are you sure you want to delete instance "test2"? [yN]: y
error: "test404" not found in ListInstancesResponse: resource not found
exit status 1
Force deletion like rm cmd even if not exist
go run main.go c i delete test1 test2 test404 test3 testNotexist -f
✔ Deleting instance "test1, test2, test404, test3, testNotexist"... 9s
Nothing happen here
go run main.go c i delete 404 dummy notfound -f