[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[libvirt] Report guest IPs as XML or struct?



I've proposed both approaches in the past. However, none of them was
accepted as we ought to agree on $subj first. Frankly, both makes sense
to me, both has advantages and disadvantages.

XML - keeps things more consistent as libvirt is tied to XML, right?
Pros:
  - can add items over the time
Cons:
  - more complicated to parse and dump info (apps would have to query
multiple XPATHs to get answer - at least with my implementation I've sent)

struct - it would be a linked list or array of structs in fact
Pros:
  - easier to dump useful data
Cons:
  - once struct is released we cannot change it if we don't want to
break ABI.

What things do we want to expose for now?
qemu guest agent reports:
- type of IP address (v4/v6)
- prefix length
- actual address (string)
(these can repeat multiple times, since there's 1:* relationship between
interface an IP addresses)

- hw address
- name as seen within guest
(HW address can be omitted - not all interfaces must have one).
The only element that will be there for sure is name then.

The whole QAPI schema can be found in qapi-schema-guest.json [1].

Suggestions are welcome.

Michal

1:
http://git.qemu.org/?p=qemu.git;a=blob;f=qapi-schema-guest.json;h=ed0eb698c63f431089fc9dbcf7b44ce491f3f548;hb=HEAD#l460


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]