Files
ubicloud/spec/routes/api/cli/golden-files/fw fw4gj2v4h1fe3q28q0hnf7g8n1 show.txt
Jeremy Evans e78a7bb897 Allow using ubid without location in the cli
For example:

```
ubi vm vmdzyppz6j166jh5e9t2dwrfas show
```

This adds an object-info api route under project that returns the type,
location, and name of a supported object (currently the objects supported
by the api).  If there is no slash in the object reference in the cli,
and the object reference is a supported ubid format, then assume the
object reference is a ubid, and have the cli use the object-info endpoint
to get the location, and if a location is returned, it then uses that
location for the request.

Fix the error message for invalid references to not include an
underscore for the ubid, and to separate the location/name and ubid
formats to make it apparent to the user that location is not needed for
ubid (it is still accepted, but we don't need to document that).

Add LoadBalancer#display_location to avoid having different code for
LoadBalancer.
2025-02-26 09:23:01 -08:00

21 lines
581 B
Plaintext

id: fw4gj2v4h1fe3q28q0hnf7g8n1
name: default-eu-central-h1-default
location: eu-central-h1
description: Default firewall
rules:
1: fra7jvrz94be7qy8qrq8n1jrp1 0.0.0.0/0 0..65535
2: fr7cv7h5bz324maazy93ykn8s4 ::/0 0..65535
private subnet 1:
id: psfzm9e26xky5m9ggetw4dpqe2
name: default-eu-central-h1
state: available
location: eu-central-h1
net4: 172.27.99.128/26
net6: fdd9:1ea7:125d:5fa4::/64
nic 1:
id: nc69z0cda8jt0g5b120hamn4vf
name: test-vm-nic
private_ipv4: 10.67.141.133
private_ipv6: fda0:d79a:93e7:d4fd:1c2::2
vm_name: test-vm