From fb16117ff92027855428a1c7b62e7ca6fc1ba7a8 Mon Sep 17 00:00:00 2001 From: Geoff Hickey Date: Tue, 7 Nov 2017 16:05:12 -0500 Subject: [PATCH] Generate libvirt structs, unions, typedefs. --- internal/constants/constants.gen.go | 3 +- internal/lvgen/constants.tmpl | 8 +- internal/lvgen/generate.go | 232 ++- internal/lvgen/procedures.tmpl | 25 + internal/lvgen/sunrpc.y | 44 +- libvirt.gen.go | 2492 +++++++++++++++++++++++++++ 6 files changed, 2748 insertions(+), 56 deletions(-) create mode 100644 internal/lvgen/procedures.tmpl create mode 100644 libvirt.gen.go diff --git a/internal/constants/constants.gen.go b/internal/constants/constants.gen.go index 1c28ce2..7c4a43d 100644 --- a/internal/constants/constants.gen.go +++ b/internal/constants/constants.gen.go @@ -412,7 +412,7 @@ const ( ProcDomainManagedSaveGetXMLDesc = 388 ProcDomainManagedSaveDefineXML = 389 ProcDomainSetLifecycleAction = 390 - + // From consts: StringMax = 4194304 @@ -471,5 +471,4 @@ const ( DomainEventGraphicsIdentityMax = 20 Program = 0x20008086 ProtocolVersion = 1 - ) diff --git a/internal/lvgen/constants.tmpl b/internal/lvgen/constants.tmpl index 06a7240..3d7425f 100644 --- a/internal/lvgen/constants.tmpl +++ b/internal/lvgen/constants.tmpl @@ -19,10 +19,10 @@ package constants // REMOTE_PROC_DOMAIN_MIGRATE_SET_MAX_SPEED = 207, const ( // From enums: - {{range .Enums}}{{.Name}} = {{.Val}} - {{end}} +{{range .EnumVals}} {{.Name}} = {{.Val}} +{{end}} // From consts: - {{range .Consts}}{{.Name}} = {{.Val}} - {{end}} +{{range .Consts}} {{.Name}} = {{.Val}} +{{end -}} ) diff --git a/internal/lvgen/generate.go b/internal/lvgen/generate.go index 193d5ec..1bcf99d 100644 --- a/internal/lvgen/generate.go +++ b/internal/lvgen/generate.go @@ -62,10 +62,19 @@ type ConstItem struct { // Generator holds all the information parsed out of the protocol file. type Generator struct { - // Enums holds the list of enums found by the parser. - Enums []ConstItem + // Enums holds the enum declarations. The type of enums is always int32. + Enums []Decl + // EnumVals holds the list of enum values found by the parser. In sunrpc as + // in go, these are not separately namespaced. + EnumVals []ConstItem // Consts holds all the const items found by the parser. Consts []ConstItem + // Structs holds a list of all the structs found by the parser + Structs []Structure + // Typedefs hold all the type definitions from 'typedef ...' lines. + Typedefs []Typedef + // Unions hold all the discriminated unions + Unions []Union } // Gen accumulates items as the parser runs, and is then used to produce the @@ -81,6 +90,60 @@ var CurrentEnumVal int64 // runes. var oneRuneTokens = `{}[]<>(),=;:*` +var reservedIdentifiers = map[string]string{ + "type": "lvtype", + "string": "lvstring", + "error": "lverror", +} + +// Decl records a declaration, like 'int x' or 'remote_nonnull_string str' +type Decl struct { + Name, Type string +} + +// Structure records the name and members of a struct definition. +type Structure struct { + Name string + Members []Decl +} + +// Typedef holds the name and underlying type for a typedef. +type Typedef struct { + Name string + Type string +} + +// Union holds a "discriminated union", which consists of a discriminant, which +// tells you what kind of thing you're looking at, and a number of encodings. +type Union struct { + Name string + DiscriminantType string + Cases []Case +} + +// Case holds a single case of a discriminated union. +type Case struct { + DiscriminantVal string + Type Decl +} + +// CurrentStruct will point to a struct record if we're in a struct declaration. +// When the parser adds a declaration, it will be added to the open struct if +// there is one. +var CurrentStruct *Structure + +// CurrentTypedef will point to a typedef record if we're parsing one. Typedefs +// can define a struct or union type, but the preferred for is struct xxx{...}, +// so we may never see the typedef form in practice. +var CurrentTypedef *Typedef + +// CurrentUnion holds the current discriminated union record. +var CurrentUnion *Union + +// CurrentCase holds the current case record while the parser is in a union and +// a case statement. +var CurrentCase *Case + // Generate will output go bindings for libvirt. The lvPath parameter should be // the path to the root of the libvirt source directory to use for the // generation. @@ -100,35 +163,51 @@ func Generate(proto io.Reader) error { } // Generate and write the output. - wr, err := os.Create("../constants/constants.gen.go") + constFile, err := os.Create("../constants/constants.gen.go") if err != nil { return err } - defer wr.Close() + defer constFile.Close() + procFile, err := os.Create("../../libvirt.gen.go") + if err != nil { + return err + } + defer procFile.Close() - err = genGo(wr) + err = genGo(constFile, procFile) return err } -func genGo(wr io.Writer) error { - // Enums and consts from the protocol definition both become go consts in - // the generated code. We'll remove "REMOTE_" and then camel-case the - // name before making each one a go constant. - for ix, en := range Gen.Enums { - Gen.Enums[ix].Name = constNameTransform(en.Name) - } - for ix, en := range Gen.Consts { - Gen.Consts[ix].Name = constNameTransform(en.Name) - } - +func genGo(constFile, procFile io.Writer) error { t, err := template.ParseFiles("constants.tmpl") if err != nil { return err } - if err := t.Execute(wr, Gen); err != nil { + if err = t.Execute(constFile, Gen); err != nil { return err } + + t, err = template.ParseFiles("procedures.tmpl") + if err != nil { + return err + } + if err := t.Execute(procFile, Gen); err != nil { + return err + } + // Now generate the wrappers for libvirt's various public API functions. + // for _, c := range Gen.Enums { + // This appears to be the name of a libvirt procedure, so sort it into + // the right list based on the next part of its name. + // segs := camelcase.Split(c.Name) + // if len(segs) < 3 || segs[0] != "Proc" { + // continue + // } + //category := segs[1] + + //fmt.Println(segs) + // } + return nil } @@ -137,20 +216,35 @@ func genGo(wr io.Writer) error { // also tries to upcase abbreviations so a name like DOMAIN_GET_XML becomes // DomainGetXML, not DomainGetXml. func constNameTransform(name string) string { - nn := fromSnakeToCamel(strings.TrimPrefix(name, "REMOTE_")) + nn := fromSnakeToCamel(strings.TrimPrefix(name, "REMOTE_"), true) nn = fixAbbrevs(nn) return nn } +func identifierTransform(name string) string { + nn := strings.TrimPrefix(name, "remote_") + nn = fromSnakeToCamel(nn, false) + nn = fixAbbrevs(nn) + nn = checkIdentifier(nn) + return nn +} + +func typeTransform(name string) string { + nn := strings.TrimLeft(name, "*") + diff := len(name) - len(nn) + nn = identifierTransform(nn) + return name[0:diff] + nn +} + // fromSnakeToCamel transmutes a snake-cased string to a camel-cased one. All // runes that follow an underscore are up-cased, and the underscores themselves // are omitted. // // ex: "PROC_DOMAIN_GET_METADATA" -> "ProcDomainGetMetadata" -func fromSnakeToCamel(s string) string { +func fromSnakeToCamel(s string, public bool) string { buf := make([]rune, 0, len(s)) - // Start with an upper-cased rune - hump := true + // Start rune may be either upper or lower case. + hump := public for _, r := range s { if r == '_' { @@ -203,19 +297,22 @@ func fixAbbrevs(s string) string { //--------------------------------------------------------------------------- // StartEnum is called when the parser has found a valid enum. -func StartEnum() { +func StartEnum(name string) { + // Enums are always signed 32-bit integers. + name = identifierTransform(name) + Gen.Enums = append(Gen.Enums, Decl{name, "int32"}) // Set the automatic value var to -1; it will be incremented before being // assigned to an enum value. CurrentEnumVal = -1 } -// AddEnum will add a new enum value to the list. -func AddEnum(name, val string) error { +// AddEnumVal will add a new enum value to the list. +func AddEnumVal(name, val string) error { ev, err := parseNumber(val) if err != nil { return fmt.Errorf("invalid enum value %v = %v", name, val) } - return addEnum(name, ev) + return addEnumVal(name, ev) } // AddEnumAutoVal adds an enum to the list, using the automatically-incremented @@ -223,11 +320,12 @@ func AddEnum(name, val string) error { // explicit value. func AddEnumAutoVal(name string) error { CurrentEnumVal++ - return addEnum(name, CurrentEnumVal) + return addEnumVal(name, CurrentEnumVal) } -func addEnum(name string, val int64) error { - Gen.Enums = append(Gen.Enums, ConstItem{name, fmt.Sprintf("%d", val)}) +func addEnumVal(name string, val int64) error { + name = constNameTransform(name) + Gen.EnumVals = append(Gen.EnumVals, ConstItem{name, fmt.Sprintf("%d", val)}) CurrentEnumVal = val return nil } @@ -238,6 +336,7 @@ func AddConst(name, val string) error { if err != nil { return fmt.Errorf("invalid const value %v = %v", name, val) } + name = constNameTransform(name) Gen.Consts = append(Gen.Consts, ConstItem{name, val}) return nil } @@ -253,3 +352,80 @@ func parseNumber(val string) (int64, error) { n, err := strconv.ParseInt(val, base, 64) return n, err } + +// StartStruct is called from the parser when a struct definition is found, but +// before the member declarations are processed. +func StartStruct(name string) { + name = identifierTransform(name) + CurrentStruct = &Structure{Name: name} +} + +// AddStruct is called when the parser has finished parsing a struct. It adds +// the now-complete struct definition to the generator's list. +func AddStruct() { + Gen.Structs = append(Gen.Structs, *CurrentStruct) + CurrentStruct = nil +} + +func StartTypedef() { + CurrentTypedef = &Typedef{} +} + +// TODO: remove before flight +func Beacon(name string) { + fmt.Println(name) +} + +// StartUnion is called by the parser when it finds a union declaraion. +func StartUnion(name string) { + name = identifierTransform(name) + CurrentUnion = &Union{Name: name} +} + +// AddUnion is called by the parser when it has finished processing a union +// type. It adds the union to the generator's list and clears the CurrentUnion +// pointer. +func AddUnion() { + Gen.Unions = append(Gen.Unions, *CurrentUnion) + CurrentUnion = nil +} + +func StartCase(dvalue string) { + CurrentCase = &Case{DiscriminantVal: dvalue} +} + +func AddCase() { + CurrentUnion.Cases = append(CurrentUnion.Cases, *CurrentCase) + CurrentCase = nil +} + +// AddDeclaration is called by the parser when it find a declaration (int x). +// The declaration will be added to any open container (such as a struct, if the +// parser is working through a struct definition.) +func AddDeclaration(identifier, itype string) { + // TODO: panic if not in a struct/union/typedef? + // If the name is a reserved word, transform it so it isn't. + identifier = identifierTransform(identifier) + itype = typeTransform(itype) + decl := &Decl{Name: identifier, Type: itype} + if CurrentStruct != nil { + CurrentStruct.Members = append(CurrentStruct.Members, *decl) + } else if CurrentTypedef != nil { + CurrentTypedef.Name = identifier + CurrentTypedef.Type = itype + Gen.Typedefs = append(Gen.Typedefs, *CurrentTypedef) + CurrentTypedef = nil + } else if CurrentCase != nil { + CurrentCase.Type = *decl + } else if CurrentUnion != nil { + CurrentUnion.DiscriminantType = itype + } +} + +func checkIdentifier(i string) string { + nn, reserved := reservedIdentifiers[i] + if reserved { + return nn + } + return i +} diff --git a/internal/lvgen/procedures.tmpl b/internal/lvgen/procedures.tmpl new file mode 100644 index 0000000..63304cf --- /dev/null +++ b/internal/lvgen/procedures.tmpl @@ -0,0 +1,25 @@ +/* + * This file generated by internal/lvgen/generate.go. DO NOT EDIT BY HAND! + * + * To regenerate, run 'go generate' in internal/lvgen. + */ + +package libvirt + +// Typedefs: +{{range .Typedefs}}type {{.Name}} {{.Type}} +{{end}} +// Enums: +{{range .Enums}} type {{.Name}} {{.Type}} +{{end}} +// Structs: +{{range .Structs}}type {{.Name}} struct { +{{range .Members}} {{.Name}} {{.Type}} +{{end -}} +} +{{end}} +// Unions: +{{range .Unions}}type {{.Name}} struct { + discriminant {{.DiscriminantType}} +{{end -}} +} diff --git a/internal/lvgen/sunrpc.y b/internal/lvgen/sunrpc.y index 305fe48..eb1b8d6 100644 --- a/internal/lvgen/sunrpc.y +++ b/internal/lvgen/sunrpc.y @@ -46,7 +46,7 @@ definition ; enum_definition - : ENUM enum_ident '{' enum_value_list '}' { StartEnum() } + : ENUM enum_ident '{' enum_value_list '}' { StartEnum($2.val) } ; enum_value_list @@ -63,7 +63,7 @@ enum_value } } | enum_value_ident '=' value { - err := AddEnum($1.val, $3.val) + err := AddEnumVal($1.val, $3.val) if err != nil { yylex.Error(err.Error()) return 1 @@ -98,7 +98,7 @@ const_ident ; typedef_definition - : TYPEDEF declaration + : TYPEDEF {StartTypedef()} declaration ; declaration @@ -109,17 +109,17 @@ declaration ; simple_declaration - : type_specifier variable_ident + : type_specifier variable_ident {AddDeclaration($2.val, $1.val)} ; type_specifier : int_spec - | UNSIGNED int_spec - | FLOAT - | DOUBLE - | BOOL - | STRING - | OPAQUE + | UNSIGNED int_spec {$$.val = "u"+$2.val} + | FLOAT {$$.val = "float32"} + | DOUBLE {$$.val = "float64"} + | BOOL {$$.val = "bool"} + | STRING {$$.val = "string"} + | OPAQUE {$$.val = "[]byte"} | enum_definition | struct_definition | union_definition @@ -127,10 +127,10 @@ type_specifier ; int_spec - : HYPER - | INT - | SHORT - | CHAR + : HYPER {$$.val = "int64"} + | INT {$$.val = "int32"} + | SHORT {$$.val = "int16"} + | CHAR {$$.val = "int8"} ; variable_ident @@ -138,20 +138,20 @@ variable_ident ; fixed_array_declaration - : type_specifier variable_ident '[' value ']' + : type_specifier variable_ident '[' value ']' { AddDeclaration($2.val, $1.val) } // FIXME: Handle the max size (value)? ; variable_array_declaration - : type_specifier variable_ident '<' value '>' - | type_specifier variable_ident '<' '>' + : type_specifier variable_ident '<' value '>' { AddDeclaration($2.val, $1.val) } // FIXME: Handle the max size (value)? + | type_specifier variable_ident '<' '>' { AddDeclaration($2.val, $1.val) } ; pointer_declaration - : type_specifier '*' variable_ident + : type_specifier '*' variable_ident { AddDeclaration($3.val, "*"+$1.val) } ; struct_definition - : STRUCT struct_ident '{' declaration_list '}' + : STRUCT struct_ident '{' {StartStruct($2.val)} declaration_list '}' {AddStruct()} ; struct_ident @@ -164,7 +164,7 @@ declaration_list ; union_definition - : UNION union_ident SWITCH '(' simple_declaration ')' '{' case_list '}' + : UNION union_ident {StartUnion($2.val)} SWITCH '(' simple_declaration ')' '{' case_list '}' {AddUnion()} ; union_ident @@ -177,8 +177,8 @@ case_list ; case - : CASE value ':' declaration - | DEFAULT ':' declaration + : CASE value {StartCase($2.val)} ':' declaration {AddCase()} + | DEFAULT {StartCase("default")} ':' declaration {AddCase()} ; program_definition diff --git a/libvirt.gen.go b/libvirt.gen.go new file mode 100644 index 0000000..44026d9 --- /dev/null +++ b/libvirt.gen.go @@ -0,0 +1,2492 @@ +/* + * This file generated by internal/lvgen/generate.go. DO NOT EDIT BY HAND! + * + * To regenerate, run 'go generate' in internal/lvgen. + */ + +package libvirt + +// Typedefs: +type nonnullString lvstring +type lvstring *nonnullString +type uuid []byte +type domain *nonnullDomain +type network *nonnullNetwork +type nwfilter *nonnullNwfilter +type storagePool *nonnullStoragePool +type storageVol *nonnullStorageVol +type nodeDevice *nonnullNodeDevice +type secret *nonnullSecret + +// Enums: + type authType int32 + type procedure int32 + +// Structs: +type nonnullDomain struct { + name nonnullString + uuid uuid + id int32 +} +type nonnullNetwork struct { + name nonnullString + uuid uuid +} +type nonnullNwfilter struct { + name nonnullString + uuid uuid +} +type nonnullInterface struct { + name nonnullString + mac nonnullString +} +type nonnullStoragePool struct { + name nonnullString + uuid uuid +} +type nonnullStorageVol struct { + pool nonnullString + name nonnullString + key nonnullString +} +type nonnullNodeDevice struct { + name nonnullString +} +type nonnullSecret struct { + uuid uuid + usagetype int32 + usageid nonnullString +} +type nonnullDomainSnapshot struct { + name nonnullString + dom nonnullDomain +} +type lverror struct { + code int32 + domain int32 + message lvstring + level int32 + dom domain + str1 lvstring + str2 lvstring + str3 lvstring + int1 int32 + int2 int32 + net network +} +type vcpuInfo struct { + number uint32 + state int32 + cpuTime uint64 + cpu int32 +} +type typedParam struct { + field nonnullString + value typedParamValue +} +type nodeGetCPUStats struct { + field nonnullString + value uint64 +} +type nodeGetMemoryStats struct { + field nonnullString + value uint64 +} +type domainDiskError struct { + disk nonnullString + lverror int32 +} +type connectOpenArgs struct { + name lvstring + flags uint32 +} +type connectSupportsFeatureArgs struct { + feature int32 +} +type connectSupportsFeatureRet struct { + supported int32 +} +type connectGetTypeRet struct { + lvtype nonnullString +} +type connectGetVersionRet struct { + hvVer uint64 +} +type connectGetLibVersionRet struct { + libVer uint64 +} +type connectGetHostnameRet struct { + hostname nonnullString +} +type connectGetSysinfoArgs struct { + flags uint32 +} +type connectGetSysinfoRet struct { + sysinfo nonnullString +} +type connectGetUriRet struct { + uri nonnullString +} +type connectGetMaxVcpusArgs struct { + lvtype lvstring +} +type connectGetMaxVcpusRet struct { + maxVcpus int32 +} +type nodeGetInfoRet struct { + model int8 + memory uint64 + cpus int32 + mhz int32 + nodes int32 + sockets int32 + cores int32 + threads int32 +} +type connectGetCapabilitiesRet struct { + capabilities nonnullString +} +type connectGetDomainCapabilitiesArgs struct { + emulatorbin lvstring + arch lvstring + machine lvstring + virttype lvstring + flags uint32 +} +type connectGetDomainCapabilitiesRet struct { + capabilities nonnullString +} +type nodeGetCPUStatsArgs struct { + cpunum int32 + nparams int32 + flags uint32 +} +type nodeGetCPUStatsRet struct { + params nodeGetCPUStats + nparams int32 +} +type nodeGetMemoryStatsArgs struct { + nparams int32 + cellnum int32 + flags uint32 +} +type nodeGetMemoryStatsRet struct { + params nodeGetMemoryStats + nparams int32 +} +type nodeGetCellsFreeMemoryArgs struct { + startcell int32 + maxcells int32 +} +type nodeGetCellsFreeMemoryRet struct { + cells uint64 +} +type nodeGetFreeMemoryRet struct { + freemem uint64 +} +type domainGetSchedulerTypeArgs struct { + dom nonnullDomain +} +type domainGetSchedulerTypeRet struct { + lvtype nonnullString + nparams int32 +} +type domainGetSchedulerParametersArgs struct { + dom nonnullDomain + nparams int32 +} +type domainGetSchedulerParametersRet struct { + params typedParam +} +type domainGetSchedulerParametersFlagsArgs struct { + dom nonnullDomain + nparams int32 + flags uint32 +} +type domainGetSchedulerParametersFlagsRet struct { + params typedParam +} +type domainSetSchedulerParametersArgs struct { + dom nonnullDomain + params typedParam +} +type domainSetSchedulerParametersFlagsArgs struct { + dom nonnullDomain + params typedParam + flags uint32 +} +type domainSetBlkioParametersArgs struct { + dom nonnullDomain + params typedParam + flags uint32 +} +type domainGetBlkioParametersArgs struct { + dom nonnullDomain + nparams int32 + flags uint32 +} +type domainGetBlkioParametersRet struct { + params typedParam + nparams int32 +} +type domainSetMemoryParametersArgs struct { + dom nonnullDomain + params typedParam + flags uint32 +} +type domainGetMemoryParametersArgs struct { + dom nonnullDomain + nparams int32 + flags uint32 +} +type domainGetMemoryParametersRet struct { + params typedParam + nparams int32 +} +type domainBlockResizeArgs struct { + dom nonnullDomain + disk nonnullString + size uint64 + flags uint32 +} +type domainSetNumaParametersArgs struct { + dom nonnullDomain + params typedParam + flags uint32 +} +type domainGetNumaParametersArgs struct { + dom nonnullDomain + nparams int32 + flags uint32 +} +type domainGetNumaParametersRet struct { + params typedParam + nparams int32 +} +type domainSetPerfEventsArgs struct { + dom nonnullDomain + params typedParam + flags uint32 +} +type domainGetPerfEventsArgs struct { + dom nonnullDomain + flags uint32 +} +type domainGetPerfEventsRet struct { + params typedParam +} +type domainBlockStatsArgs struct { + dom nonnullDomain + path nonnullString +} +type domainBlockStatsRet struct { + rdReq int64 + rdBytes int64 + wrReq int64 + wrBytes int64 + errs int64 +} +type domainBlockStatsFlagsArgs struct { + dom nonnullDomain + path nonnullString + nparams int32 + flags uint32 +} +type domainBlockStatsFlagsRet struct { + params typedParam + nparams int32 +} +type domainInterfaceStatsArgs struct { + dom nonnullDomain + device nonnullString +} +type domainInterfaceStatsRet struct { + rxBytes int64 + rxPackets int64 + rxErrs int64 + rxDrop int64 + txBytes int64 + txPackets int64 + txErrs int64 + txDrop int64 +} +type domainSetInterfaceParametersArgs struct { + dom nonnullDomain + device nonnullString + params typedParam + flags uint32 +} +type domainGetInterfaceParametersArgs struct { + dom nonnullDomain + device nonnullString + nparams int32 + flags uint32 +} +type domainGetInterfaceParametersRet struct { + params typedParam + nparams int32 +} +type domainMemoryStatsArgs struct { + dom nonnullDomain + maxstats uint32 + flags uint32 +} +type domainMemoryStat struct { + tag int32 + val uint64 +} +type domainMemoryStatsRet struct { + stats domainMemoryStat +} +type domainBlockPeekArgs struct { + dom nonnullDomain + path nonnullString + offset uint64 + size uint32 + flags uint32 +} +type domainBlockPeekRet struct { + buffer []byte +} +type domainMemoryPeekArgs struct { + dom nonnullDomain + offset uint64 + size uint32 + flags uint32 +} +type domainMemoryPeekRet struct { + buffer []byte +} +type domainGetBlockInfoArgs struct { + dom nonnullDomain + path nonnullString + flags uint32 +} +type domainGetBlockInfoRet struct { + allocation uint64 + capacity uint64 + physical uint64 +} +type connectListDomainsArgs struct { + maxids int32 +} +type connectListDomainsRet struct { + ids int32 +} +type connectNumOfDomainsRet struct { + num int32 +} +type domainCreateXMLArgs struct { + xmlDesc nonnullString + flags uint32 +} +type domainCreateXMLRet struct { + dom nonnullDomain +} +type domainCreateXMLWithFilesArgs struct { + xmlDesc nonnullString + flags uint32 +} +type domainCreateXMLWithFilesRet struct { + dom nonnullDomain +} +type domainLookupByIDArgs struct { + id int32 +} +type domainLookupByIDRet struct { + dom nonnullDomain +} +type domainLookupByUUIDArgs struct { + uuid uuid +} +type domainLookupByUUIDRet struct { + dom nonnullDomain +} +type domainLookupByNameArgs struct { + name nonnullString +} +type domainLookupByNameRet struct { + dom nonnullDomain +} +type domainSuspendArgs struct { + dom nonnullDomain +} +type domainResumeArgs struct { + dom nonnullDomain +} +type domainPmSuspendForDurationArgs struct { + dom nonnullDomain + target uint32 + duration uint64 + flags uint32 +} +type domainPmWakeupArgs struct { + dom nonnullDomain + flags uint32 +} +type domainShutdownArgs struct { + dom nonnullDomain +} +type domainRebootArgs struct { + dom nonnullDomain + flags uint32 +} +type domainResetArgs struct { + dom nonnullDomain + flags uint32 +} +type domainDestroyArgs struct { + dom nonnullDomain +} +type domainDestroyFlagsArgs struct { + dom nonnullDomain + flags uint32 +} +type domainGetOsTypeArgs struct { + dom nonnullDomain +} +type domainGetOsTypeRet struct { + lvtype nonnullString +} +type domainGetMaxMemoryArgs struct { + dom nonnullDomain +} +type domainGetMaxMemoryRet struct { + memory uint64 +} +type domainSetMaxMemoryArgs struct { + dom nonnullDomain + memory uint64 +} +type domainSetMemoryArgs struct { + dom nonnullDomain + memory uint64 +} +type domainSetMemoryFlagsArgs struct { + dom nonnullDomain + memory uint64 + flags uint32 +} +type domainSetMemoryStatsPeriodArgs struct { + dom nonnullDomain + period int32 + flags uint32 +} +type domainGetInfoArgs struct { + dom nonnullDomain +} +type domainGetInfoRet struct { + state uint8 + maxmem uint64 + memory uint64 + nrvirtcpu uint16 + cputime uint64 +} +type domainSaveArgs struct { + dom nonnullDomain + to nonnullString +} +type domainSaveFlagsArgs struct { + dom nonnullDomain + to nonnullString + dxml lvstring + flags uint32 +} +type domainRestoreArgs struct { + from nonnullString +} +type domainRestoreFlagsArgs struct { + from nonnullString + dxml lvstring + flags uint32 +} +type domainSaveImageGetXMLDescArgs struct { + file nonnullString + flags uint32 +} +type domainSaveImageGetXMLDescRet struct { + xml nonnullString +} +type domainSaveImageDefineXMLArgs struct { + file nonnullString + dxml nonnullString + flags uint32 +} +type domainCoreDumpArgs struct { + dom nonnullDomain + to nonnullString + flags uint32 +} +type domainCoreDumpWithFormatArgs struct { + dom nonnullDomain + to nonnullString + dumpformat uint32 + flags uint32 +} +type domainScreenshotArgs struct { + dom nonnullDomain + screen uint32 + flags uint32 +} +type domainScreenshotRet struct { + mime lvstring +} +type domainGetXMLDescArgs struct { + dom nonnullDomain + flags uint32 +} +type domainGetXMLDescRet struct { + xml nonnullString +} +type domainMigratePrepareArgs struct { + uriIn lvstring + flags uint64 + dname lvstring + resource uint64 +} +type domainMigratePrepareRet struct { + cookie []byte + uriOut lvstring +} +type domainMigratePerformArgs struct { + dom nonnullDomain + cookie []byte + uri nonnullString + flags uint64 + dname lvstring + resource uint64 +} +type domainMigrateFinishArgs struct { + dname nonnullString + cookie []byte + uri nonnullString + flags uint64 +} +type domainMigrateFinishRet struct { + ddom nonnullDomain +} +type domainMigratePrepare2Args struct { + uriIn lvstring + flags uint64 + dname lvstring + resource uint64 + domXML nonnullString +} +type domainMigratePrepare2Ret struct { + cookie []byte + uriOut lvstring +} +type domainMigrateFinish2Args struct { + dname nonnullString + cookie []byte + uri nonnullString + flags uint64 + retcode int32 +} +type domainMigrateFinish2Ret struct { + ddom nonnullDomain +} +type connectListDefinedDomainsArgs struct { + maxnames int32 +} +type connectListDefinedDomainsRet struct { + names nonnullString +} +type connectNumOfDefinedDomainsRet struct { + num int32 +} +type domainCreateArgs struct { + dom nonnullDomain +} +type domainCreateWithFlagsArgs struct { + dom nonnullDomain + flags uint32 +} +type domainCreateWithFlagsRet struct { + dom nonnullDomain +} +type domainCreateWithFilesArgs struct { + dom nonnullDomain + flags uint32 +} +type domainCreateWithFilesRet struct { + dom nonnullDomain +} +type domainDefineXMLArgs struct { + xml nonnullString +} +type domainDefineXMLRet struct { + dom nonnullDomain +} +type domainDefineXMLFlagsArgs struct { + xml nonnullString + flags uint32 +} +type domainDefineXMLFlagsRet struct { + dom nonnullDomain +} +type domainUndefineArgs struct { + dom nonnullDomain +} +type domainUndefineFlagsArgs struct { + dom nonnullDomain + flags uint32 +} +type domainInjectNmiArgs struct { + dom nonnullDomain + flags uint32 +} +type domainSendKeyArgs struct { + dom nonnullDomain + codeset uint32 + holdtime uint32 + keycodes uint32 + flags uint32 +} +type domainSendProcessSignalArgs struct { + dom nonnullDomain + pidValue int64 + signum uint32 + flags uint32 +} +type domainSetVcpusArgs struct { + dom nonnullDomain + nvcpus uint32 +} +type domainSetVcpusFlagsArgs struct { + dom nonnullDomain + nvcpus uint32 + flags uint32 +} +type domainGetVcpusFlagsArgs struct { + dom nonnullDomain + flags uint32 +} +type domainGetVcpusFlagsRet struct { + num int32 +} +type domainPinVcpuArgs struct { + dom nonnullDomain + vcpu uint32 + cpumap []byte +} +type domainPinVcpuFlagsArgs struct { + dom nonnullDomain + vcpu uint32 + cpumap []byte + flags uint32 +} +type domainGetVcpuPinInfoArgs struct { + dom nonnullDomain + ncpumaps int32 + maplen int32 + flags uint32 +} +type domainGetVcpuPinInfoRet struct { + cpumaps []byte + num int32 +} +type domainPinEmulatorArgs struct { + dom nonnullDomain + cpumap []byte + flags uint32 +} +type domainGetEmulatorPinInfoArgs struct { + dom nonnullDomain + maplen int32 + flags uint32 +} +type domainGetEmulatorPinInfoRet struct { + cpumaps []byte + ret int32 +} +type domainGetVcpusArgs struct { + dom nonnullDomain + maxinfo int32 + maplen int32 +} +type domainGetVcpusRet struct { + info vcpuInfo + cpumaps []byte +} +type domainGetMaxVcpusArgs struct { + dom nonnullDomain +} +type domainGetMaxVcpusRet struct { + num int32 +} +type domainIothreadInfo struct { + iothreadID uint32 + cpumap []byte +} +type domainGetIothreadInfoArgs struct { + dom nonnullDomain + flags uint32 +} +type domainGetIothreadInfoRet struct { + info domainIothreadInfo + ret uint32 +} +type domainPinIothreadArgs struct { + dom nonnullDomain + iothreadsID uint32 + cpumap []byte + flags uint32 +} +type domainAddIothreadArgs struct { + dom nonnullDomain + iothreadID uint32 + flags uint32 +} +type domainDelIothreadArgs struct { + dom nonnullDomain + iothreadID uint32 + flags uint32 +} +type domainGetSecurityLabelArgs struct { + dom nonnullDomain +} +type domainGetSecurityLabelRet struct { + label int8 + enforcing int32 +} +type domainGetSecurityLabelListArgs struct { + dom nonnullDomain +} +type domainGetSecurityLabelListRet struct { + labels domainGetSecurityLabelRet + ret int32 +} +type nodeGetSecurityModelRet struct { + model int8 + doi int8 +} +type domainAttachDeviceArgs struct { + dom nonnullDomain + xml nonnullString +} +type domainAttachDeviceFlagsArgs struct { + dom nonnullDomain + xml nonnullString + flags uint32 +} +type domainDetachDeviceArgs struct { + dom nonnullDomain + xml nonnullString +} +type domainDetachDeviceFlagsArgs struct { + dom nonnullDomain + xml nonnullString + flags uint32 +} +type domainUpdateDeviceFlagsArgs struct { + dom nonnullDomain + xml nonnullString + flags uint32 +} +type domainGetAutostartArgs struct { + dom nonnullDomain +} +type domainGetAutostartRet struct { + autostart int32 +} +type domainSetAutostartArgs struct { + dom nonnullDomain + autostart int32 +} +type domainSetMetadataArgs struct { + dom nonnullDomain + lvtype int32 + metadata lvstring + key lvstring + uri lvstring + flags uint32 +} +type domainGetMetadataArgs struct { + dom nonnullDomain + lvtype int32 + uri lvstring + flags uint32 +} +type domainGetMetadataRet struct { + metadata nonnullString +} +type domainBlockJobAbortArgs struct { + dom nonnullDomain + path nonnullString + flags uint32 +} +type domainGetBlockJobInfoArgs struct { + dom nonnullDomain + path nonnullString + flags uint32 +} +type domainGetBlockJobInfoRet struct { + found int32 + lvtype int32 + bandwidth uint64 + cur uint64 + end uint64 +} +type domainBlockJobSetSpeedArgs struct { + dom nonnullDomain + path nonnullString + bandwidth uint64 + flags uint32 +} +type domainBlockPullArgs struct { + dom nonnullDomain + path nonnullString + bandwidth uint64 + flags uint32 +} +type domainBlockRebaseArgs struct { + dom nonnullDomain + path nonnullString + base lvstring + bandwidth uint64 + flags uint32 +} +type domainBlockCopyArgs struct { + dom nonnullDomain + path nonnullString + destxml nonnullString + params typedParam + flags uint32 +} +type domainBlockCommitArgs struct { + dom nonnullDomain + disk nonnullString + base lvstring + top lvstring + bandwidth uint64 + flags uint32 +} +type domainSetBlockIOTuneArgs struct { + dom nonnullDomain + disk nonnullString + params typedParam + flags uint32 +} +type domainGetBlockIOTuneArgs struct { + dom nonnullDomain + disk lvstring + nparams int32 + flags uint32 +} +type domainGetBlockIOTuneRet struct { + params typedParam + nparams int32 +} +type domainGetCPUStatsArgs struct { + dom nonnullDomain + nparams uint32 + startCPU int32 + ncpus uint32 + flags uint32 +} +type domainGetCPUStatsRet struct { + params typedParam + nparams int32 +} +type domainGetHostnameArgs struct { + dom nonnullDomain + flags uint32 +} +type domainGetHostnameRet struct { + hostname nonnullString +} +type connectNumOfNetworksRet struct { + num int32 +} +type connectListNetworksArgs struct { + maxnames int32 +} +type connectListNetworksRet struct { + names nonnullString +} +type connectNumOfDefinedNetworksRet struct { + num int32 +} +type connectListDefinedNetworksArgs struct { + maxnames int32 +} +type connectListDefinedNetworksRet struct { + names nonnullString +} +type networkLookupByUUIDArgs struct { + uuid uuid +} +type networkLookupByUUIDRet struct { + net nonnullNetwork +} +type networkLookupByNameArgs struct { + name nonnullString +} +type networkLookupByNameRet struct { + net nonnullNetwork +} +type networkCreateXMLArgs struct { + xml nonnullString +} +type networkCreateXMLRet struct { + net nonnullNetwork +} +type networkDefineXMLArgs struct { + xml nonnullString +} +type networkDefineXMLRet struct { + net nonnullNetwork +} +type networkUndefineArgs struct { + net nonnullNetwork +} +type networkUpdateArgs struct { + net nonnullNetwork + command uint32 + section uint32 + parentindex int32 + xml nonnullString + flags uint32 +} +type networkCreateArgs struct { + net nonnullNetwork +} +type networkDestroyArgs struct { + net nonnullNetwork +} +type networkGetXMLDescArgs struct { + net nonnullNetwork + flags uint32 +} +type networkGetXMLDescRet struct { + xml nonnullString +} +type networkGetBridgeNameArgs struct { + net nonnullNetwork +} +type networkGetBridgeNameRet struct { + name nonnullString +} +type networkGetAutostartArgs struct { + net nonnullNetwork +} +type networkGetAutostartRet struct { + autostart int32 +} +type networkSetAutostartArgs struct { + net nonnullNetwork + autostart int32 +} +type connectNumOfNwfiltersRet struct { + num int32 +} +type connectListNwfiltersArgs struct { + maxnames int32 +} +type connectListNwfiltersRet struct { + names nonnullString +} +type nwfilterLookupByUUIDArgs struct { + uuid uuid +} +type nwfilterLookupByUUIDRet struct { + nwfilter nonnullNwfilter +} +type nwfilterLookupByNameArgs struct { + name nonnullString +} +type nwfilterLookupByNameRet struct { + nwfilter nonnullNwfilter +} +type nwfilterDefineXMLArgs struct { + xml nonnullString +} +type nwfilterDefineXMLRet struct { + nwfilter nonnullNwfilter +} +type nwfilterUndefineArgs struct { + nwfilter nonnullNwfilter +} +type nwfilterGetXMLDescArgs struct { + nwfilter nonnullNwfilter + flags uint32 +} +type nwfilterGetXMLDescRet struct { + xml nonnullString +} +type connectNumOfInterfacesRet struct { + num int32 +} +type connectListInterfacesArgs struct { + maxnames int32 +} +type connectListInterfacesRet struct { + names nonnullString +} +type connectNumOfDefinedInterfacesRet struct { + num int32 +} +type connectListDefinedInterfacesArgs struct { + maxnames int32 +} +type connectListDefinedInterfacesRet struct { + names nonnullString +} +type interfaceLookupByNameArgs struct { + name nonnullString +} +type interfaceLookupByNameRet struct { + iface nonnullInterface +} +type interfaceLookupByMacStringArgs struct { + mac nonnullString +} +type interfaceLookupByMacStringRet struct { + iface nonnullInterface +} +type interfaceGetXMLDescArgs struct { + iface nonnullInterface + flags uint32 +} +type interfaceGetXMLDescRet struct { + xml nonnullString +} +type interfaceDefineXMLArgs struct { + xml nonnullString + flags uint32 +} +type interfaceDefineXMLRet struct { + iface nonnullInterface +} +type interfaceUndefineArgs struct { + iface nonnullInterface +} +type interfaceCreateArgs struct { + iface nonnullInterface + flags uint32 +} +type interfaceDestroyArgs struct { + iface nonnullInterface + flags uint32 +} +type interfaceChangeBeginArgs struct { + flags uint32 +} +type interfaceChangeCommitArgs struct { + flags uint32 +} +type interfaceChangeRollbackArgs struct { + flags uint32 +} +type authListRet struct { + types authType +} +type authSaslInitRet struct { + mechlist nonnullString +} +type authSaslStartArgs struct { + mech nonnullString + nil int32 + data int8 +} +type authSaslStartRet struct { + complete int32 + nil int32 + data int8 +} +type authSaslStepArgs struct { + nil int32 + data int8 +} +type authSaslStepRet struct { + complete int32 + nil int32 + data int8 +} +type authPolkitRet struct { + complete int32 +} +type connectNumOfStoragePoolsRet struct { + num int32 +} +type connectListStoragePoolsArgs struct { + maxnames int32 +} +type connectListStoragePoolsRet struct { + names nonnullString +} +type connectNumOfDefinedStoragePoolsRet struct { + num int32 +} +type connectListDefinedStoragePoolsArgs struct { + maxnames int32 +} +type connectListDefinedStoragePoolsRet struct { + names nonnullString +} +type connectFindStoragePoolSourcesArgs struct { + lvtype nonnullString + srcspec lvstring + flags uint32 +} +type connectFindStoragePoolSourcesRet struct { + xml nonnullString +} +type storagePoolLookupByUUIDArgs struct { + uuid uuid +} +type storagePoolLookupByUUIDRet struct { + pool nonnullStoragePool +} +type storagePoolLookupByNameArgs struct { + name nonnullString +} +type storagePoolLookupByNameRet struct { + pool nonnullStoragePool +} +type storagePoolLookupByVolumeArgs struct { + vol nonnullStorageVol +} +type storagePoolLookupByVolumeRet struct { + pool nonnullStoragePool +} +type storagePoolCreateXMLArgs struct { + xml nonnullString + flags uint32 +} +type storagePoolCreateXMLRet struct { + pool nonnullStoragePool +} +type storagePoolDefineXMLArgs struct { + xml nonnullString + flags uint32 +} +type storagePoolDefineXMLRet struct { + pool nonnullStoragePool +} +type storagePoolBuildArgs struct { + pool nonnullStoragePool + flags uint32 +} +type storagePoolUndefineArgs struct { + pool nonnullStoragePool +} +type storagePoolCreateArgs struct { + pool nonnullStoragePool + flags uint32 +} +type storagePoolDestroyArgs struct { + pool nonnullStoragePool +} +type storagePoolDeleteArgs struct { + pool nonnullStoragePool + flags uint32 +} +type storagePoolRefreshArgs struct { + pool nonnullStoragePool + flags uint32 +} +type storagePoolGetXMLDescArgs struct { + pool nonnullStoragePool + flags uint32 +} +type storagePoolGetXMLDescRet struct { + xml nonnullString +} +type storagePoolGetInfoArgs struct { + pool nonnullStoragePool +} +type storagePoolGetInfoRet struct { + state uint8 + capacity uint64 + allocation uint64 + available uint64 +} +type storagePoolGetAutostartArgs struct { + pool nonnullStoragePool +} +type storagePoolGetAutostartRet struct { + autostart int32 +} +type storagePoolSetAutostartArgs struct { + pool nonnullStoragePool + autostart int32 +} +type storagePoolNumOfVolumesArgs struct { + pool nonnullStoragePool +} +type storagePoolNumOfVolumesRet struct { + num int32 +} +type storagePoolListVolumesArgs struct { + pool nonnullStoragePool + maxnames int32 +} +type storagePoolListVolumesRet struct { + names nonnullString +} +type storageVolLookupByNameArgs struct { + pool nonnullStoragePool + name nonnullString +} +type storageVolLookupByNameRet struct { + vol nonnullStorageVol +} +type storageVolLookupByKeyArgs struct { + key nonnullString +} +type storageVolLookupByKeyRet struct { + vol nonnullStorageVol +} +type storageVolLookupByPathArgs struct { + path nonnullString +} +type storageVolLookupByPathRet struct { + vol nonnullStorageVol +} +type storageVolCreateXMLArgs struct { + pool nonnullStoragePool + xml nonnullString + flags uint32 +} +type storageVolCreateXMLRet struct { + vol nonnullStorageVol +} +type storageVolCreateXMLFromArgs struct { + pool nonnullStoragePool + xml nonnullString + clonevol nonnullStorageVol + flags uint32 +} +type storageVolCreateXMLFromRet struct { + vol nonnullStorageVol +} +type storageVolDeleteArgs struct { + vol nonnullStorageVol + flags uint32 +} +type storageVolWipeArgs struct { + vol nonnullStorageVol + flags uint32 +} +type storageVolWipePatternArgs struct { + vol nonnullStorageVol + algorithm uint32 + flags uint32 +} +type storageVolGetXMLDescArgs struct { + vol nonnullStorageVol + flags uint32 +} +type storageVolGetXMLDescRet struct { + xml nonnullString +} +type storageVolGetInfoArgs struct { + vol nonnullStorageVol +} +type storageVolGetInfoRet struct { + lvtype int8 + capacity uint64 + allocation uint64 +} +type storageVolGetInfoFlagsArgs struct { + vol nonnullStorageVol + flags uint32 +} +type storageVolGetInfoFlagsRet struct { + lvtype int8 + capacity uint64 + allocation uint64 +} +type storageVolGetPathArgs struct { + vol nonnullStorageVol +} +type storageVolGetPathRet struct { + name nonnullString +} +type storageVolResizeArgs struct { + vol nonnullStorageVol + capacity uint64 + flags uint32 +} +type nodeNumOfDevicesArgs struct { + cap lvstring + flags uint32 +} +type nodeNumOfDevicesRet struct { + num int32 +} +type nodeListDevicesArgs struct { + cap lvstring + maxnames int32 + flags uint32 +} +type nodeListDevicesRet struct { + names nonnullString +} +type nodeDeviceLookupByNameArgs struct { + name nonnullString +} +type nodeDeviceLookupByNameRet struct { + dev nonnullNodeDevice +} +type nodeDeviceLookupScsiHostByWwnArgs struct { + wwnn nonnullString + wwpn nonnullString + flags uint32 +} +type nodeDeviceLookupScsiHostByWwnRet struct { + dev nonnullNodeDevice +} +type nodeDeviceGetXMLDescArgs struct { + name nonnullString + flags uint32 +} +type nodeDeviceGetXMLDescRet struct { + xml nonnullString +} +type nodeDeviceGetParentArgs struct { + name nonnullString +} +type nodeDeviceGetParentRet struct { + parent lvstring +} +type nodeDeviceNumOfCapsArgs struct { + name nonnullString +} +type nodeDeviceNumOfCapsRet struct { + num int32 +} +type nodeDeviceListCapsArgs struct { + name nonnullString + maxnames int32 +} +type nodeDeviceListCapsRet struct { + names nonnullString +} +type nodeDeviceDettachArgs struct { + name nonnullString +} +type nodeDeviceDetachFlagsArgs struct { + name nonnullString + drivername lvstring + flags uint32 +} +type nodeDeviceReAttachArgs struct { + name nonnullString +} +type nodeDeviceResetArgs struct { + name nonnullString +} +type nodeDeviceCreateXMLArgs struct { + xmlDesc nonnullString + flags uint32 +} +type nodeDeviceCreateXMLRet struct { + dev nonnullNodeDevice +} +type nodeDeviceDestroyArgs struct { + name nonnullString +} +type connectDomainEventRegisterRet struct { + cbRegistered int32 +} +type connectDomainEventDeregisterRet struct { + cbRegistered int32 +} +type domainEventLifecycleMsg struct { + dom nonnullDomain + event int32 + detail int32 +} +type domainEventCallbackLifecycleMsg struct { + callbackid int32 + msg domainEventLifecycleMsg +} +type connectDomainXMLFromNativeArgs struct { + nativeformat nonnullString + nativeconfig nonnullString + flags uint32 +} +type connectDomainXMLFromNativeRet struct { + domainxml nonnullString +} +type connectDomainXMLToNativeArgs struct { + nativeformat nonnullString + domainxml nonnullString + flags uint32 +} +type connectDomainXMLToNativeRet struct { + nativeconfig nonnullString +} +type connectNumOfSecretsRet struct { + num int32 +} +type connectListSecretsArgs struct { + maxuuids int32 +} +type connectListSecretsRet struct { + uuids nonnullString +} +type secretLookupByUUIDArgs struct { + uuid uuid +} +type secretLookupByUUIDRet struct { + secret nonnullSecret +} +type secretDefineXMLArgs struct { + xml nonnullString + flags uint32 +} +type secretDefineXMLRet struct { + secret nonnullSecret +} +type secretGetXMLDescArgs struct { + secret nonnullSecret + flags uint32 +} +type secretGetXMLDescRet struct { + xml nonnullString +} +type secretSetValueArgs struct { + secret nonnullSecret + value []byte + flags uint32 +} +type secretGetValueArgs struct { + secret nonnullSecret + flags uint32 +} +type secretGetValueRet struct { + value []byte +} +type secretUndefineArgs struct { + secret nonnullSecret +} +type secretLookupByUsageArgs struct { + usagetype int32 + usageid nonnullString +} +type secretLookupByUsageRet struct { + secret nonnullSecret +} +type domainMigratePrepareTunnelArgs struct { + flags uint64 + dname lvstring + resource uint64 + domXML nonnullString +} +type connectIsSecureRet struct { + secure int32 +} +type domainIsActiveArgs struct { + dom nonnullDomain +} +type domainIsActiveRet struct { + active int32 +} +type domainIsPersistentArgs struct { + dom nonnullDomain +} +type domainIsPersistentRet struct { + persistent int32 +} +type domainIsUpdatedArgs struct { + dom nonnullDomain +} +type domainIsUpdatedRet struct { + updated int32 +} +type networkIsActiveArgs struct { + net nonnullNetwork +} +type networkIsActiveRet struct { + active int32 +} +type networkIsPersistentArgs struct { + net nonnullNetwork +} +type networkIsPersistentRet struct { + persistent int32 +} +type storagePoolIsActiveArgs struct { + pool nonnullStoragePool +} +type storagePoolIsActiveRet struct { + active int32 +} +type storagePoolIsPersistentArgs struct { + pool nonnullStoragePool +} +type storagePoolIsPersistentRet struct { + persistent int32 +} +type interfaceIsActiveArgs struct { + iface nonnullInterface +} +type interfaceIsActiveRet struct { + active int32 +} +type connectCompareCPUArgs struct { + xml nonnullString + flags uint32 +} +type connectCompareCPURet struct { + result int32 +} +type connectBaselineCPUArgs struct { + xmlcpus nonnullString + flags uint32 +} +type connectBaselineCPURet struct { + cpu nonnullString +} +type domainGetJobInfoArgs struct { + dom nonnullDomain +} +type domainGetJobInfoRet struct { + lvtype int32 + timeelapsed uint64 + timeremaining uint64 + datatotal uint64 + dataprocessed uint64 + dataremaining uint64 + memtotal uint64 + memprocessed uint64 + memremaining uint64 + filetotal uint64 + fileprocessed uint64 + fileremaining uint64 +} +type domainGetJobStatsArgs struct { + dom nonnullDomain + flags uint32 +} +type domainGetJobStatsRet struct { + lvtype int32 + params typedParam +} +type domainAbortJobArgs struct { + dom nonnullDomain +} +type domainMigrateGetMaxDowntimeArgs struct { + dom nonnullDomain + flags uint32 +} +type domainMigrateGetMaxDowntimeRet struct { + downtime uint64 +} +type domainMigrateSetMaxDowntimeArgs struct { + dom nonnullDomain + downtime uint64 + flags uint32 +} +type domainMigrateGetCompressionCacheArgs struct { + dom nonnullDomain + flags uint32 +} +type domainMigrateGetCompressionCacheRet struct { + cachesize uint64 +} +type domainMigrateSetCompressionCacheArgs struct { + dom nonnullDomain + cachesize uint64 + flags uint32 +} +type domainMigrateSetMaxSpeedArgs struct { + dom nonnullDomain + bandwidth uint64 + flags uint32 +} +type domainMigrateGetMaxSpeedArgs struct { + dom nonnullDomain + flags uint32 +} +type domainMigrateGetMaxSpeedRet struct { + bandwidth uint64 +} +type connectDomainEventRegisterAnyArgs struct { + eventid int32 +} +type connectDomainEventDeregisterAnyArgs struct { + eventid int32 +} +type connectDomainEventCallbackRegisterAnyArgs struct { + eventid int32 + dom domain +} +type connectDomainEventCallbackRegisterAnyRet struct { + callbackid int32 +} +type connectDomainEventCallbackDeregisterAnyArgs struct { + callbackid int32 +} +type domainEventRebootMsg struct { + dom nonnullDomain +} +type domainEventCallbackRebootMsg struct { + callbackid int32 + msg domainEventRebootMsg +} +type domainEventRtcChangeMsg struct { + dom nonnullDomain + offset int64 +} +type domainEventCallbackRtcChangeMsg struct { + callbackid int32 + msg domainEventRtcChangeMsg +} +type domainEventWatchdogMsg struct { + dom nonnullDomain + action int32 +} +type domainEventCallbackWatchdogMsg struct { + callbackid int32 + msg domainEventWatchdogMsg +} +type domainEventIOErrorMsg struct { + dom nonnullDomain + srcpath nonnullString + devalias nonnullString + action int32 +} +type domainEventCallbackIOErrorMsg struct { + callbackid int32 + msg domainEventIOErrorMsg +} +type domainEventIOErrorReasonMsg struct { + dom nonnullDomain + srcpath nonnullString + devalias nonnullString + action int32 + reason nonnullString +} +type domainEventCallbackIOErrorReasonMsg struct { + callbackid int32 + msg domainEventIOErrorReasonMsg +} +type domainEventGraphicsAddress struct { + family int32 + node nonnullString + service nonnullString +} +type domainEventGraphicsIdentity struct { + lvtype nonnullString + name nonnullString +} +type domainEventGraphicsMsg struct { + dom nonnullDomain + phase int32 + local domainEventGraphicsAddress + remote domainEventGraphicsAddress + authscheme nonnullString + subject domainEventGraphicsIdentity +} +type domainEventCallbackGraphicsMsg struct { + callbackid int32 + msg domainEventGraphicsMsg +} +type domainEventBlockJobMsg struct { + dom nonnullDomain + path nonnullString + lvtype int32 + status int32 +} +type domainEventCallbackBlockJobMsg struct { + callbackid int32 + msg domainEventBlockJobMsg +} +type domainEventDiskChangeMsg struct { + dom nonnullDomain + oldsrcpath lvstring + newsrcpath lvstring + devalias nonnullString + reason int32 +} +type domainEventCallbackDiskChangeMsg struct { + callbackid int32 + msg domainEventDiskChangeMsg +} +type domainEventTrayChangeMsg struct { + dom nonnullDomain + devalias nonnullString + reason int32 +} +type domainEventCallbackTrayChangeMsg struct { + callbackid int32 + msg domainEventTrayChangeMsg +} +type domainEventPmwakeupMsg struct { + dom nonnullDomain +} +type domainEventCallbackPmwakeupMsg struct { + callbackid int32 + reason int32 + msg domainEventPmwakeupMsg +} +type domainEventPmsuspendMsg struct { + dom nonnullDomain +} +type domainEventCallbackPmsuspendMsg struct { + callbackid int32 + reason int32 + msg domainEventPmsuspendMsg +} +type domainEventBalloonChangeMsg struct { + dom nonnullDomain + actual uint64 +} +type domainEventCallbackBalloonChangeMsg struct { + callbackid int32 + msg domainEventBalloonChangeMsg +} +type domainEventPmsuspendDiskMsg struct { + dom nonnullDomain +} +type domainEventCallbackPmsuspendDiskMsg struct { + callbackid int32 + reason int32 + msg domainEventPmsuspendDiskMsg +} +type domainManagedSaveArgs struct { + dom nonnullDomain + flags uint32 +} +type domainHasManagedSaveImageArgs struct { + dom nonnullDomain + flags uint32 +} +type domainHasManagedSaveImageRet struct { + result int32 +} +type domainManagedSaveRemoveArgs struct { + dom nonnullDomain + flags uint32 +} +type domainManagedSaveGetXMLDescArgs struct { + dom nonnullDomain + flags uint32 +} +type domainManagedSaveGetXMLDescRet struct { + xml nonnullString +} +type domainManagedSaveDefineXMLArgs struct { + dom nonnullDomain + dxml lvstring + flags uint32 +} +type domainSnapshotCreateXMLArgs struct { + dom nonnullDomain + xmlDesc nonnullString + flags uint32 +} +type domainSnapshotCreateXMLRet struct { + snap nonnullDomainSnapshot +} +type domainSnapshotGetXMLDescArgs struct { + snap nonnullDomainSnapshot + flags uint32 +} +type domainSnapshotGetXMLDescRet struct { + xml nonnullString +} +type domainSnapshotNumArgs struct { + dom nonnullDomain + flags uint32 +} +type domainSnapshotNumRet struct { + num int32 +} +type domainSnapshotListNamesArgs struct { + dom nonnullDomain + maxnames int32 + flags uint32 +} +type domainSnapshotListNamesRet struct { + names nonnullString +} +type domainListAllSnapshotsArgs struct { + dom nonnullDomain + needResults int32 + flags uint32 +} +type domainListAllSnapshotsRet struct { + snapshots nonnullDomainSnapshot + ret int32 +} +type domainSnapshotNumChildrenArgs struct { + snap nonnullDomainSnapshot + flags uint32 +} +type domainSnapshotNumChildrenRet struct { + num int32 +} +type domainSnapshotListChildrenNamesArgs struct { + snap nonnullDomainSnapshot + maxnames int32 + flags uint32 +} +type domainSnapshotListChildrenNamesRet struct { + names nonnullString +} +type domainSnapshotListAllChildrenArgs struct { + snapshot nonnullDomainSnapshot + needResults int32 + flags uint32 +} +type domainSnapshotListAllChildrenRet struct { + snapshots nonnullDomainSnapshot + ret int32 +} +type domainSnapshotLookupByNameArgs struct { + dom nonnullDomain + name nonnullString + flags uint32 +} +type domainSnapshotLookupByNameRet struct { + snap nonnullDomainSnapshot +} +type domainHasCurrentSnapshotArgs struct { + dom nonnullDomain + flags uint32 +} +type domainHasCurrentSnapshotRet struct { + result int32 +} +type domainSnapshotGetParentArgs struct { + snap nonnullDomainSnapshot + flags uint32 +} +type domainSnapshotGetParentRet struct { + snap nonnullDomainSnapshot +} +type domainSnapshotCurrentArgs struct { + dom nonnullDomain + flags uint32 +} +type domainSnapshotCurrentRet struct { + snap nonnullDomainSnapshot +} +type domainSnapshotIsCurrentArgs struct { + snap nonnullDomainSnapshot + flags uint32 +} +type domainSnapshotIsCurrentRet struct { + current int32 +} +type domainSnapshotHasMetadataArgs struct { + snap nonnullDomainSnapshot + flags uint32 +} +type domainSnapshotHasMetadataRet struct { + metadata int32 +} +type domainRevertToSnapshotArgs struct { + snap nonnullDomainSnapshot + flags uint32 +} +type domainSnapshotDeleteArgs struct { + snap nonnullDomainSnapshot + flags uint32 +} +type domainOpenConsoleArgs struct { + dom nonnullDomain + devName lvstring + flags uint32 +} +type domainOpenChannelArgs struct { + dom nonnullDomain + name lvstring + flags uint32 +} +type storageVolUploadArgs struct { + vol nonnullStorageVol + offset uint64 + length uint64 + flags uint32 +} +type storageVolDownloadArgs struct { + vol nonnullStorageVol + offset uint64 + length uint64 + flags uint32 +} +type domainGetStateArgs struct { + dom nonnullDomain + flags uint32 +} +type domainGetStateRet struct { + state int32 + reason int32 +} +type domainMigrateBegin3Args struct { + dom nonnullDomain + xmlin lvstring + flags uint64 + dname lvstring + resource uint64 +} +type domainMigrateBegin3Ret struct { + cookieOut []byte + xml nonnullString +} +type domainMigratePrepare3Args struct { + cookieIn []byte + uriIn lvstring + flags uint64 + dname lvstring + resource uint64 + domXML nonnullString +} +type domainMigratePrepare3Ret struct { + cookieOut []byte + uriOut lvstring +} +type domainMigratePrepareTunnel3Args struct { + cookieIn []byte + flags uint64 + dname lvstring + resource uint64 + domXML nonnullString +} +type domainMigratePrepareTunnel3Ret struct { + cookieOut []byte +} +type domainMigratePerform3Args struct { + dom nonnullDomain + xmlin lvstring + cookieIn []byte + dconnuri lvstring + uri lvstring + flags uint64 + dname lvstring + resource uint64 +} +type domainMigratePerform3Ret struct { + cookieOut []byte +} +type domainMigrateFinish3Args struct { + dname nonnullString + cookieIn []byte + dconnuri lvstring + uri lvstring + flags uint64 + cancelled int32 +} +type domainMigrateFinish3Ret struct { + dom nonnullDomain + cookieOut []byte +} +type domainMigrateConfirm3Args struct { + dom nonnullDomain + cookieIn []byte + flags uint64 + cancelled int32 +} +type domainEventControlErrorMsg struct { + dom nonnullDomain +} +type domainEventCallbackControlErrorMsg struct { + callbackid int32 + msg domainEventControlErrorMsg +} +type domainGetControlInfoArgs struct { + dom nonnullDomain + flags uint32 +} +type domainGetControlInfoRet struct { + state uint32 + details uint32 + statetime uint64 +} +type domainOpenGraphicsArgs struct { + dom nonnullDomain + idx uint32 + flags uint32 +} +type domainOpenGraphicsFdArgs struct { + dom nonnullDomain + idx uint32 + flags uint32 +} +type nodeSuspendForDurationArgs struct { + target uint32 + duration uint64 + flags uint32 +} +type domainShutdownFlagsArgs struct { + dom nonnullDomain + flags uint32 +} +type domainGetDiskErrorsArgs struct { + dom nonnullDomain + maxerrors uint32 + flags uint32 +} +type domainGetDiskErrorsRet struct { + errors domainDiskError + nerrors int32 +} +type connectListAllDomainsArgs struct { + needResults int32 + flags uint32 +} +type connectListAllDomainsRet struct { + domains nonnullDomain + ret uint32 +} +type connectListAllStoragePoolsArgs struct { + needResults int32 + flags uint32 +} +type connectListAllStoragePoolsRet struct { + pools nonnullStoragePool + ret uint32 +} +type storagePoolListAllVolumesArgs struct { + pool nonnullStoragePool + needResults int32 + flags uint32 +} +type storagePoolListAllVolumesRet struct { + vols nonnullStorageVol + ret uint32 +} +type connectListAllNetworksArgs struct { + needResults int32 + flags uint32 +} +type connectListAllNetworksRet struct { + nets nonnullNetwork + ret uint32 +} +type connectListAllInterfacesArgs struct { + needResults int32 + flags uint32 +} +type connectListAllInterfacesRet struct { + ifaces nonnullInterface + ret uint32 +} +type connectListAllNodeDevicesArgs struct { + needResults int32 + flags uint32 +} +type connectListAllNodeDevicesRet struct { + devices nonnullNodeDevice + ret uint32 +} +type connectListAllNwfiltersArgs struct { + needResults int32 + flags uint32 +} +type connectListAllNwfiltersRet struct { + filters nonnullNwfilter + ret uint32 +} +type connectListAllSecretsArgs struct { + needResults int32 + flags uint32 +} +type connectListAllSecretsRet struct { + secrets nonnullSecret + ret uint32 +} +type nodeSetMemoryParametersArgs struct { + params typedParam + flags uint32 +} +type nodeGetMemoryParametersArgs struct { + nparams int32 + flags uint32 +} +type nodeGetMemoryParametersRet struct { + params typedParam + nparams int32 +} +type nodeGetCPUMapArgs struct { + needMap int32 + needOnline int32 + flags uint32 +} +type nodeGetCPUMapRet struct { + cpumap []byte + online uint32 + ret int32 +} +type domainFstrimArgs struct { + dom nonnullDomain + mountpoint lvstring + minimum uint64 + flags uint32 +} +type domainGetTimeArgs struct { + dom nonnullDomain + flags uint32 +} +type domainGetTimeRet struct { + seconds int64 + nseconds uint32 +} +type domainSetTimeArgs struct { + dom nonnullDomain + seconds int64 + nseconds uint32 + flags uint32 +} +type domainMigrateBegin3ParamsArgs struct { + dom nonnullDomain + params typedParam + flags uint32 +} +type domainMigrateBegin3ParamsRet struct { + cookieOut []byte + xml nonnullString +} +type domainMigratePrepare3ParamsArgs struct { + params typedParam + cookieIn []byte + flags uint32 +} +type domainMigratePrepare3ParamsRet struct { + cookieOut []byte + uriOut lvstring +} +type domainMigratePrepareTunnel3ParamsArgs struct { + params typedParam + cookieIn []byte + flags uint32 +} +type domainMigratePrepareTunnel3ParamsRet struct { + cookieOut []byte +} +type domainMigratePerform3ParamsArgs struct { + dom nonnullDomain + dconnuri lvstring + params typedParam + cookieIn []byte + flags uint32 +} +type domainMigratePerform3ParamsRet struct { + cookieOut []byte +} +type domainMigrateFinish3ParamsArgs struct { + params typedParam + cookieIn []byte + flags uint32 + cancelled int32 +} +type domainMigrateFinish3ParamsRet struct { + dom nonnullDomain + cookieOut []byte +} +type domainMigrateConfirm3ParamsArgs struct { + dom nonnullDomain + params typedParam + cookieIn []byte + flags uint32 + cancelled int32 +} +type domainEventDeviceRemovedMsg struct { + dom nonnullDomain + devalias nonnullString +} +type domainEventCallbackDeviceRemovedMsg struct { + callbackid int32 + msg domainEventDeviceRemovedMsg +} +type domainEventBlockJob2Msg struct { + callbackid int32 + dom nonnullDomain + dst nonnullString + lvtype int32 + status int32 +} +type domainEventBlockThresholdMsg struct { + callbackid int32 + dom nonnullDomain + dev nonnullString + path lvstring + threshold uint64 + excess uint64 +} +type domainEventCallbackTunableMsg struct { + callbackid int32 + dom nonnullDomain + params typedParam +} +type domainEventCallbackDeviceAddedMsg struct { + callbackid int32 + dom nonnullDomain + devalias nonnullString +} +type connectEventConnectionClosedMsg struct { + reason int32 +} +type connectGetCPUModelNamesArgs struct { + arch nonnullString + needResults int32 + flags uint32 +} +type connectGetCPUModelNamesRet struct { + models nonnullString + ret int32 +} +type connectNetworkEventRegisterAnyArgs struct { + eventid int32 + net network +} +type connectNetworkEventRegisterAnyRet struct { + callbackid int32 +} +type connectNetworkEventDeregisterAnyArgs struct { + callbackid int32 +} +type networkEventLifecycleMsg struct { + callbackid int32 + net nonnullNetwork + event int32 + detail int32 +} +type connectStoragePoolEventRegisterAnyArgs struct { + eventid int32 + pool storagePool +} +type connectStoragePoolEventRegisterAnyRet struct { + callbackid int32 +} +type connectStoragePoolEventDeregisterAnyArgs struct { + callbackid int32 +} +type storagePoolEventLifecycleMsg struct { + callbackid int32 + pool nonnullStoragePool + event int32 + detail int32 +} +type storagePoolEventRefreshMsg struct { + callbackid int32 + pool nonnullStoragePool +} +type connectNodeDeviceEventRegisterAnyArgs struct { + eventid int32 + dev nodeDevice +} +type connectNodeDeviceEventRegisterAnyRet struct { + callbackid int32 +} +type connectNodeDeviceEventDeregisterAnyArgs struct { + callbackid int32 +} +type nodeDeviceEventLifecycleMsg struct { + callbackid int32 + dev nonnullNodeDevice + event int32 + detail int32 +} +type nodeDeviceEventUpdateMsg struct { + callbackid int32 + dev nonnullNodeDevice +} +type domainFsfreezeArgs struct { + dom nonnullDomain + mountpoints nonnullString + flags uint32 +} +type domainFsfreezeRet struct { + filesystems int32 +} +type domainFsthawArgs struct { + dom nonnullDomain + mountpoints nonnullString + flags uint32 +} +type domainFsthawRet struct { + filesystems int32 +} +type nodeGetFreePagesArgs struct { + pages uint32 + startcell int32 + cellcount uint32 + flags uint32 +} +type nodeGetFreePagesRet struct { + counts uint64 +} +type nodeAllocPagesArgs struct { + pagesizes uint32 + pagecounts uint64 + startcell int32 + cellcount uint32 + flags uint32 +} +type nodeAllocPagesRet struct { + ret int32 +} +type networkDhcpLease struct { + iface nonnullString + expirytime int64 + lvtype int32 + mac lvstring + iaid lvstring + ipaddr nonnullString + prefix uint32 + hostname lvstring + clientid lvstring +} +type networkGetDhcpLeasesArgs struct { + net nonnullNetwork + mac lvstring + needResults int32 + flags uint32 +} +type networkGetDhcpLeasesRet struct { + leases networkDhcpLease + ret uint32 +} +type domainStatsRecord struct { + dom nonnullDomain + params typedParam +} +type connectGetAllDomainStatsArgs struct { + doms nonnullDomain + stats uint32 + flags uint32 +} +type domainEventCallbackAgentLifecycleMsg struct { + callbackid int32 + dom nonnullDomain + state int32 + reason int32 +} +type connectGetAllDomainStatsRet struct { + retstats domainStatsRecord +} +type domainFsinfo struct { + mountpoint nonnullString + name nonnullString + fstype nonnullString + devAliases nonnullString +} +type domainGetFsinfoArgs struct { + dom nonnullDomain + flags uint32 +} +type domainGetFsinfoRet struct { + info domainFsinfo + ret uint32 +} +type domainIPAddr struct { + lvtype int32 + addr nonnullString + prefix uint32 +} +type domainInterface struct { + name nonnullString + hwaddr lvstring + addrs domainIPAddr +} +type domainInterfaceAddressesArgs struct { + dom nonnullDomain + source uint32 + flags uint32 +} +type domainInterfaceAddressesRet struct { + ifaces domainInterface +} +type domainSetUserPasswordArgs struct { + dom nonnullDomain + user lvstring + password lvstring + flags uint32 +} +type domainRenameArgs struct { + dom nonnullDomain + newName lvstring + flags uint32 +} +type domainRenameRet struct { + retcode int32 +} +type domainEventCallbackMigrationIterationMsg struct { + callbackid int32 + dom nonnullDomain + iteration int32 +} +type domainEventCallbackJobCompletedMsg struct { + callbackid int32 + dom nonnullDomain + params typedParam +} +type domainMigrateStartPostCopyArgs struct { + dom nonnullDomain + flags uint32 +} +type domainEventCallbackDeviceRemovalFailedMsg struct { + callbackid int32 + dom nonnullDomain + devalias nonnullString +} +type domainGetGuestVcpusArgs struct { + dom nonnullDomain + flags uint32 +} +type domainGetGuestVcpusRet struct { + params typedParam +} +type domainSetGuestVcpusArgs struct { + dom nonnullDomain + cpumap nonnullString + state int32 + flags uint32 +} +type domainSetVcpuArgs struct { + dom nonnullDomain + cpumap nonnullString + state int32 + flags uint32 +} +type domainEventCallbackMetadataChangeMsg struct { + callbackid int32 + dom nonnullDomain + lvtype int32 + nsuri lvstring +} +type connectSecretEventRegisterAnyArgs struct { + eventid int32 + secret secret +} +type connectSecretEventRegisterAnyRet struct { + callbackid int32 +} +type connectSecretEventDeregisterAnyArgs struct { + callbackid int32 +} +type secretEventLifecycleMsg struct { + callbackid int32 + secret nonnullSecret + event int32 + detail int32 +} +type secretEventValueChangedMsg struct { + callbackid int32 + secret nonnullSecret +} +type domainSetBlockThresholdArgs struct { + dom nonnullDomain + dev nonnullString + threshold uint64 + flags uint32 +} +type domainSetLifecycleActionArgs struct { + dom nonnullDomain + lvtype uint32 + action uint32 + flags uint32 +} + +// Unions: +type typedParamValue struct { + discriminant int32 +}