cli icon indicating copy to clipboard operation
cli copied to clipboard

Implements v2 Reverse DNS options

Open kobajagi opened this issue 3 years ago • 1 comments

This PR implements a --reverse-dns flag to compute instance and compute elastic-ip commands. Note: to delete a Reverse DNS entry, run update command with --reverse-dns "".

$ go run . c i show update my-instance --reverse-dns example.net
 ✔ Updating instance "my-instance"... 3s
┼──────────────────────┼──────────────────────────────────────┼
│   COMPUTE INSTANCE   │                                      │
┼──────────────────────┼──────────────────────────────────────┼
│ ID                   │ 27923f37-0b18-473e-a693-a10f907baf8d │
│ Name                 │ my-instance                          │
│ Creation Date        │ 2022-12-06 21:41:09 +0000 UTC        │
│ Instance Type        │ standard.micro                       │
│ Template             │ Linux Ubuntu 22.04 LTS 64-bit        │
│ Zone                 │ ch-gva-2                             │
│ Anti-Affinity Groups │ n/a                                  │
│ Security Groups      │ default                              │
│ Private Networks     │ n/a                                  │
│ Elastic IPs          │ n/a                                  │
│ IP Address           │ x.x.x.x                       │
│ IPv6 Address         │ -                                    │
│ SSH Key              │ work-laptop                          │
│ Disk Size            │ 10 GiB                               │
│ State                │ running                              │
│ Labels               │ n/a                                  │
│ Reverse DNS          │ example.net.                         │
┼──────────────────────┼──────────────────────────────────────┼

$ go run . c elastic-ip update 41380aec-4b96-4a8d-ad81-e98be0e73372 --reverse-dns example.net
 ✔ Updating Elastic IP 41380aec-4b96-4a8d-ad81-e98be0e73372... 3s
┼────────────────┼──────────────────────────────────────┼
│   ELASTIC IP   │                                      │
┼────────────────┼──────────────────────────────────────┼
│ ID             │ 41380aec-4b96-4a8d-ad81-e98be0e73372 │
│ IP Address     │ x.x.x.x                       │
│ Address Family │ inet4                                │
│ CIDR           │ x.x.x.x/32                     │
│ Description    │                                      │
│ Zone           │ ch-gva-2                             │
│ Type           │ manual                               │
│ Reverse DNS    │ example.net.                         │
┼────────────────┼──────────────────────────────────────┼

kobajagi avatar Dec 07 '22 08:12 kobajagi

This pull request has been linked to Shortcut Story #54136: Tooling: Reverse DNS.