usbalbin / xo-api-client

Rust library for accessing Xen Orchestra through its websocket API
Apache License 2.0
0 stars 0 forks source link

What should the type of Vm::addresses look like #5

Open usbalbin opened 3 years ago

usbalbin commented 3 years ago

What we get from xo-server might look something like this for address value in a vm object

Pfsense VM:

"addresses": {
    "0/ipv4/0": "10.0.0.13 10.0.0.12 10.0.0.16 10.0.0.7",
    "0/ipv4/1": "10.0.0.12",                              <--- Virtual IP CARP
    "0/ipv4/2": "10.0.0.16",                              <--- Virtual IP CARP
    "0/ipv4/3": "10.0.0.7",                               <--- Virtual IP CARP
    "1/ipv4/0": "192.168.71.2 192.168.71.1",
    "1/ipv4/1": "192.168.71.1",                           <--- Virtual IP CARP
    "2/ipv4/0": "192.168.72.2 192.168.72.1",
    "2/ipv4/1": "192.168.72.1"                            <--- Virtual IP CARP
}

Windows VM

"addresses": {
    "0/ipv4/0": "192.168.7.42",
    "0/ipv6/0": "fe80:0000:0000:0000:dead:beaf:dead:beaa",
    "1/ipv4/0": "192.168.8.42",
    "1/ipv6/0": "fe80:0000:0000:0000:dead:beaf:dead:beab",
    "2/ipv4/0": "192.168.9.42",
    "2/ipv6/0": "fe80:0000:0000:0000:dead:beaf:dead:beac",
    "3/ipv4/0": "169.254.149.176",
    "3/ipv6/0": "fe80:0000:0000:0000:dead:beaf:dead:bead"
}

TODO:

usbalbin commented 3 years ago

Some ip-related info here maybe? https://github.com/vatesfr/xen-orchestra/issues/5801. Is this the PR that introduced to current format? https://github.com/vatesfr/xen-orchestra/pull/5805/files