Hi On Tue, Mar 28, 2017 at 7:15 AM Vinzenz Feenstra <vfeen...@redhat.com> wrote:
> Eric, what you think of this below way, instead? > > > > > OK So how about something like this: > > > > {‘struct’: ‘GuestWindowsVersionInfo’, > > ‘data’: { > > ‘version’: ‘str’, > > ‘name’: ‘str’, > > } } > > > > {‘struct’: ‘GuestLinuxOSRelease’, > > ‘data’: { > > ‘id’: ‘str’, > > ‘name’: ‘str' > > ‘*version’: ‘str’, > > ‘*variant’: ‘str’ > > ‘*codename’: ‘str’ > > } } > > > > {‘enum’: ‘GuestOSVersionInfo’, > > ‘data’: {‘linux’: ‘ GuestLinuxOSRelease’, > > ‘win’: ‘ GuestWindowsVersionInfo’ > > }} > > > I think this will be rejected. You could instead use a flat 'union' with a 'type' (see SocketAddressFlat for ex). Otherwise, I like the approach better if the various os-specific details are needed. Wouldn't it be nice instead to return xdg os-release content? On OS that don't have it, it could be crafted manually. Just an idea.. > { 'struct': 'GuestOSInfo’, > > 'data': { > > ‘machine': 'str’, > > ’sysname': 'GuestOSType’, > > ‘release': ‘str’, > > ‘*version_info’: ‘GuestOSVersionInfo’, > > } } > > > -- Marc-André Lureau