Commit Graph

7 Commits

Author SHA1 Message Date
Geoff Hickey
fcd4f72b3c Rename the main structure types for clarity
libvirt follows a convention where structure types used in its API are
named "remote_nonnull_domain", and optional values for those  structures
are called "remote_domain". The generator was translating these into go
names like "NonnullDomain" and "Domain". In go this seems unnatural, and
doesn't match the way the pre-generator version of go-libvirt named
things. So this commit changes the names: "remote_nonnull_domain" will
now be "Domain" in go; "remote_domain" will be "OptDomain". This pattern
is applied to all types.
2017-11-20 13:50:32 -05:00
Geoff Hickey
3c5bd59dc7 Build changes:
- Bump the minimum libvirt version from 1.2.2 to 1.2.12, because
virDomainDefineXMLFlags wasn't introduced until that version.
- Use the correct format for the generated file notice, so that golint
ignores the generated files.
2017-11-16 19:14:34 -05:00
Geoff Hickey
57b9cae05d add licenses and fix the license checking script. 2017-11-16 18:44:11 -05:00
Geoff Hickey
b59e9d42f4 Migrate all libvirt calls to the generated code.
- Update libvirt.go so that all libvirt calls now go through the
generated routines.
- Remove some libvirt routines that had the same name as generated ones,
leave the rest as convenience routines.
- Fix the handling of Optional-values (the declarations of which in the
.x file look like pointers)
2017-11-16 14:17:46 -05:00
Geoff Hickey
deb7a54ff8 Generate libvirt procedure wrappers.
The generated wrappers have an argument for every field in their "Args"
struct, and return everything in their "Ret" struct (these structs are
defined in the protocol file, and identified by procedure name).
Marshaling and unmarshaling is handled inside the generated procedures.
2017-11-13 15:18:18 -05:00
Geoff Hickey
fb16117ff9 Generate libvirt structs, unions, typedefs. 2017-11-07 16:05:12 -05:00
Geoff Hickey
5a6654f07a Generate libvirt constants from libvirt sources.
- Add a yacc-based parser and a hand-written lexer to read the
remote_protocol.x file from libvirt's sources.
- Use the new parser to generate the constants used to communicate with
libvirt.
2017-11-02 19:42:44 -04:00