From 5a6654f07a5f7d57d72ba6a7a41c5680341dba62 Mon Sep 17 00:00:00 2001 From: Geoff Hickey Date: Thu, 2 Nov 2017 19:42:44 -0400 Subject: [PATCH 01/20] 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. --- internal/constants/constants.gen.go | 474 +++++++++++++++++++++++ internal/constants/constants.go | 43 --- internal/lvgen/.gitignore | 4 + internal/lvgen/gen/main.go | 43 +++ internal/lvgen/generate.go | 564 ++++++++++++++++++++++++++++ internal/lvgen/lv-gen.go | 4 + internal/lvgen/sunrpc.y | 218 +++++++++++ libvirt.go | 45 +-- libvirttest/libvirt.go | 4 +- rpc.go | 8 +- rpc_test.go | 8 +- 11 files changed, 1340 insertions(+), 75 deletions(-) create mode 100644 internal/constants/constants.gen.go create mode 100644 internal/lvgen/.gitignore create mode 100644 internal/lvgen/gen/main.go create mode 100644 internal/lvgen/generate.go create mode 100644 internal/lvgen/lv-gen.go create mode 100644 internal/lvgen/sunrpc.y diff --git a/internal/constants/constants.gen.go b/internal/constants/constants.gen.go new file mode 100644 index 0000000..5e5a631 --- /dev/null +++ b/internal/constants/constants.gen.go @@ -0,0 +1,474 @@ +/* + * This file generated by internal/lvgen/generate.go. DO NOT EDIT BY HAND! + * + * To regenerate, run 'go generate' in internal/lvgen. + */ +package constants + +// libvirt procedure identifiers and other enums +// +// These are libvirt procedure numbers which correspond to each respective +// API call between remote_internal driver and libvirtd. Each procedure is +// identified by a unique number which *may change in any future libvirt +// update*. +// +// Examples: +// REMOTE_PROC_CONNECT_OPEN = 1 +// REMOTE_PROC_DOMAIN_DEFINE_XML = 11 +// REMOTE_PROC_DOMAIN_MIGRATE_SET_MAX_SPEED = 207, +const ( + // From enums: + AuthNone = 0 + AuthSasl = 1 + AuthPolkit = 2 + ProcConnectOpen = 1 + ProcConnectClose = 2 + ProcConnectGetType = 3 + ProcConnectGetVersion = 4 + ProcConnectGetMaxVcpus = 5 + ProcNodeGetInfo = 6 + ProcConnectGetCapabilities = 7 + ProcDomainAttachDevice = 8 + ProcDomainCreate = 9 + ProcDomainCreateXML = 10 + ProcDomainDefineXML = 11 + ProcDomainDestroy = 12 + ProcDomainDetachDevice = 13 + ProcDomainGetXMLDesc = 14 + ProcDomainGetAutostart = 15 + ProcDomainGetInfo = 16 + ProcDomainGetMaxMemory = 17 + ProcDomainGetMaxVcpus = 18 + ProcDomainGetOsType = 19 + ProcDomainGetVcpus = 20 + ProcConnectListDefinedDomains = 21 + ProcDomainLookupByID = 22 + ProcDomainLookupByName = 23 + ProcDomainLookupByUUID = 24 + ProcConnectNumOfDefinedDomains = 25 + ProcDomainPinVcpu = 26 + ProcDomainReboot = 27 + ProcDomainResume = 28 + ProcDomainSetAutostart = 29 + ProcDomainSetMaxMemory = 30 + ProcDomainSetMemory = 31 + ProcDomainSetVcpus = 32 + ProcDomainShutdown = 33 + ProcDomainSuspend = 34 + ProcDomainUndefine = 35 + ProcConnectListDefinedNetworks = 36 + ProcConnectListDomains = 37 + ProcConnectListNetworks = 38 + ProcNetworkCreate = 39 + ProcNetworkCreateXML = 40 + ProcNetworkDefineXML = 41 + ProcNetworkDestroy = 42 + ProcNetworkGetXMLDesc = 43 + ProcNetworkGetAutostart = 44 + ProcNetworkGetBridgeName = 45 + ProcNetworkLookupByName = 46 + ProcNetworkLookupByUUID = 47 + ProcNetworkSetAutostart = 48 + ProcNetworkUndefine = 49 + ProcConnectNumOfDefinedNetworks = 50 + ProcConnectNumOfDomains = 51 + ProcConnectNumOfNetworks = 52 + ProcDomainCoreDump = 53 + ProcDomainRestore = 54 + ProcDomainSave = 55 + ProcDomainGetSchedulerType = 56 + ProcDomainGetSchedulerParameters = 57 + ProcDomainSetSchedulerParameters = 58 + ProcConnectGetHostname = 59 + ProcConnectSupportsFeature = 60 + ProcDomainMigratePrepare = 61 + ProcDomainMigratePerform = 62 + ProcDomainMigrateFinish = 63 + ProcDomainBlockStats = 64 + ProcDomainInterfaceStats = 65 + ProcAuthList = 66 + ProcAuthSaslInit = 67 + ProcAuthSaslStart = 68 + ProcAuthSaslStep = 69 + ProcAuthPolkit = 70 + ProcConnectNumOfStoragePools = 71 + ProcConnectListStoragePools = 72 + ProcConnectNumOfDefinedStoragePools = 73 + ProcConnectListDefinedStoragePools = 74 + ProcConnectFindStoragePoolSources = 75 + ProcStoragePoolCreateXML = 76 + ProcStoragePoolDefineXML = 77 + ProcStoragePoolCreate = 78 + ProcStoragePoolBuild = 79 + ProcStoragePoolDestroy = 80 + ProcStoragePoolDelete = 81 + ProcStoragePoolUndefine = 82 + ProcStoragePoolRefresh = 83 + ProcStoragePoolLookupByName = 84 + ProcStoragePoolLookupByUUID = 85 + ProcStoragePoolLookupByVolume = 86 + ProcStoragePoolGetInfo = 87 + ProcStoragePoolGetXMLDesc = 88 + ProcStoragePoolGetAutostart = 89 + ProcStoragePoolSetAutostart = 90 + ProcStoragePoolNumOfVolumes = 91 + ProcStoragePoolListVolumes = 92 + ProcStorageVolCreateXML = 93 + ProcStorageVolDelete = 94 + ProcStorageVolLookupByName = 95 + ProcStorageVolLookupByKey = 96 + ProcStorageVolLookupByPath = 97 + ProcStorageVolGetInfo = 98 + ProcStorageVolGetXMLDesc = 99 + ProcStorageVolGetPath = 100 + ProcNodeGetCellsFreeMemory = 101 + ProcNodeGetFreeMemory = 102 + ProcDomainBlockPeek = 103 + ProcDomainMemoryPeek = 104 + ProcConnectDomainEventRegister = 105 + ProcConnectDomainEventDeregister = 106 + ProcDomainEventLifecycle = 107 + ProcDomainMigratePrepare2 = 108 + ProcDomainMigrateFinish2 = 109 + ProcConnectGetUri = 110 + ProcNodeNumOfDevices = 111 + ProcNodeListDevices = 112 + ProcNodeDeviceLookupByName = 113 + ProcNodeDeviceGetXMLDesc = 114 + ProcNodeDeviceGetParent = 115 + ProcNodeDeviceNumOfCaps = 116 + ProcNodeDeviceListCaps = 117 + ProcNodeDeviceDettach = 118 + ProcNodeDeviceReAttach = 119 + ProcNodeDeviceReset = 120 + ProcDomainGetSecurityLabel = 121 + ProcNodeGetSecurityModel = 122 + ProcNodeDeviceCreateXML = 123 + ProcNodeDeviceDestroy = 124 + ProcStorageVolCreateXMLFrom = 125 + ProcConnectNumOfInterfaces = 126 + ProcConnectListInterfaces = 127 + ProcInterfaceLookupByName = 128 + ProcInterfaceLookupByMacString = 129 + ProcInterfaceGetXMLDesc = 130 + ProcInterfaceDefineXML = 131 + ProcInterfaceUndefine = 132 + ProcInterfaceCreate = 133 + ProcInterfaceDestroy = 134 + ProcConnectDomainXMLFromNative = 135 + ProcConnectDomainXMLToNative = 136 + ProcConnectNumOfDefinedInterfaces = 137 + ProcConnectListDefinedInterfaces = 138 + ProcConnectNumOfSecrets = 139 + ProcConnectListSecrets = 140 + ProcSecretLookupByUUID = 141 + ProcSecretDefineXML = 142 + ProcSecretGetXMLDesc = 143 + ProcSecretSetValue = 144 + ProcSecretGetValue = 145 + ProcSecretUndefine = 146 + ProcSecretLookupByUsage = 147 + ProcDomainMigratePrepareTunnel = 148 + ProcConnectIsSecure = 149 + ProcDomainIsActive = 150 + ProcDomainIsPersistent = 151 + ProcNetworkIsActive = 152 + ProcNetworkIsPersistent = 153 + ProcStoragePoolIsActive = 154 + ProcStoragePoolIsPersistent = 155 + ProcInterfaceIsActive = 156 + ProcConnectGetLibVersion = 157 + ProcConnectCompareCPU = 158 + ProcDomainMemoryStats = 159 + ProcDomainAttachDeviceFlags = 160 + ProcDomainDetachDeviceFlags = 161 + ProcConnectBaselineCPU = 162 + ProcDomainGetJobInfo = 163 + ProcDomainAbortJob = 164 + ProcStorageVolWipe = 165 + ProcDomainMigrateSetMaxDowntime = 166 + ProcConnectDomainEventRegisterAny = 167 + ProcConnectDomainEventDeregisterAny = 168 + ProcDomainEventReboot = 169 + ProcDomainEventRtcChange = 170 + ProcDomainEventWatchdog = 171 + ProcDomainEventIOError = 172 + ProcDomainEventGraphics = 173 + ProcDomainUpdateDeviceFlags = 174 + ProcNwfilterLookupByName = 175 + ProcNwfilterLookupByUUID = 176 + ProcNwfilterGetXMLDesc = 177 + ProcConnectNumOfNwfilters = 178 + ProcConnectListNwfilters = 179 + ProcNwfilterDefineXML = 180 + ProcNwfilterUndefine = 181 + ProcDomainManagedSave = 182 + ProcDomainHasManagedSaveImage = 183 + ProcDomainManagedSaveRemove = 184 + ProcDomainSnapshotCreateXML = 185 + ProcDomainSnapshotGetXMLDesc = 186 + ProcDomainSnapshotNum = 187 + ProcDomainSnapshotListNames = 188 + ProcDomainSnapshotLookupByName = 189 + ProcDomainHasCurrentSnapshot = 190 + ProcDomainSnapshotCurrent = 191 + ProcDomainRevertToSnapshot = 192 + ProcDomainSnapshotDelete = 193 + ProcDomainGetBlockInfo = 194 + ProcDomainEventIOErrorReason = 195 + ProcDomainCreateWithFlags = 196 + ProcDomainSetMemoryParameters = 197 + ProcDomainGetMemoryParameters = 198 + ProcDomainSetVcpusFlags = 199 + ProcDomainGetVcpusFlags = 200 + ProcDomainOpenConsole = 201 + ProcDomainIsUpdated = 202 + ProcConnectGetSysinfo = 203 + ProcDomainSetMemoryFlags = 204 + ProcDomainSetBlkioParameters = 205 + ProcDomainGetBlkioParameters = 206 + ProcDomainMigrateSetMaxSpeed = 207 + ProcStorageVolUpload = 208 + ProcStorageVolDownload = 209 + ProcDomainInjectNmi = 210 + ProcDomainScreenshot = 211 + ProcDomainGetState = 212 + ProcDomainMigrateBegin3 = 213 + ProcDomainMigratePrepare3 = 214 + ProcDomainMigratePrepareTunnel3 = 215 + ProcDomainMigratePerform3 = 216 + ProcDomainMigrateFinish3 = 217 + ProcDomainMigrateConfirm3 = 218 + ProcDomainSetSchedulerParametersFlags = 219 + ProcInterfaceChangeBegin = 220 + ProcInterfaceChangeCommit = 221 + ProcInterfaceChangeRollback = 222 + ProcDomainGetSchedulerParametersFlags = 223 + ProcDomainEventControlError = 224 + ProcDomainPinVcpuFlags = 225 + ProcDomainSendKey = 226 + ProcNodeGetCPUStats = 227 + ProcNodeGetMemoryStats = 228 + ProcDomainGetControlInfo = 229 + ProcDomainGetVcpuPinInfo = 230 + ProcDomainUndefineFlags = 231 + ProcDomainSaveFlags = 232 + ProcDomainRestoreFlags = 233 + ProcDomainDestroyFlags = 234 + ProcDomainSaveImageGetXMLDesc = 235 + ProcDomainSaveImageDefineXML = 236 + ProcDomainBlockJobAbort = 237 + ProcDomainGetBlockJobInfo = 238 + ProcDomainBlockJobSetSpeed = 239 + ProcDomainBlockPull = 240 + ProcDomainEventBlockJob = 241 + ProcDomainMigrateGetMaxSpeed = 242 + ProcDomainBlockStatsFlags = 243 + ProcDomainSnapshotGetParent = 244 + ProcDomainReset = 245 + ProcDomainSnapshotNumChildren = 246 + ProcDomainSnapshotListChildrenNames = 247 + ProcDomainEventDiskChange = 248 + ProcDomainOpenGraphics = 249 + ProcNodeSuspendForDuration = 250 + ProcDomainBlockResize = 251 + ProcDomainSetBlockIOTune = 252 + ProcDomainGetBlockIOTune = 253 + ProcDomainSetNumaParameters = 254 + ProcDomainGetNumaParameters = 255 + ProcDomainSetInterfaceParameters = 256 + ProcDomainGetInterfaceParameters = 257 + ProcDomainShutdownFlags = 258 + ProcStorageVolWipePattern = 259 + ProcStorageVolResize = 260 + ProcDomainPmSuspendForDuration = 261 + ProcDomainGetCPUStats = 262 + ProcDomainGetDiskErrors = 263 + ProcDomainSetMetadata = 264 + ProcDomainGetMetadata = 265 + ProcDomainBlockRebase = 266 + ProcDomainPmWakeup = 267 + ProcDomainEventTrayChange = 268 + ProcDomainEventPmwakeup = 269 + ProcDomainEventPmsuspend = 270 + ProcDomainSnapshotIsCurrent = 271 + ProcDomainSnapshotHasMetadata = 272 + ProcConnectListAllDomains = 273 + ProcDomainListAllSnapshots = 274 + ProcDomainSnapshotListAllChildren = 275 + ProcDomainEventBalloonChange = 276 + ProcDomainGetHostname = 277 + ProcDomainGetSecurityLabelList = 278 + ProcDomainPinEmulator = 279 + ProcDomainGetEmulatorPinInfo = 280 + ProcConnectListAllStoragePools = 281 + ProcStoragePoolListAllVolumes = 282 + ProcConnectListAllNetworks = 283 + ProcConnectListAllInterfaces = 284 + ProcConnectListAllNodeDevices = 285 + ProcConnectListAllNwfilters = 286 + ProcConnectListAllSecrets = 287 + ProcNodeSetMemoryParameters = 288 + ProcNodeGetMemoryParameters = 289 + ProcDomainBlockCommit = 290 + ProcNetworkUpdate = 291 + ProcDomainEventPmsuspendDisk = 292 + ProcNodeGetCPUMap = 293 + ProcDomainFstrim = 294 + ProcDomainSendProcessSignal = 295 + ProcDomainOpenChannel = 296 + ProcNodeDeviceLookupScsiHostByWwn = 297 + ProcDomainGetJobStats = 298 + ProcDomainMigrateGetCompressionCache = 299 + ProcDomainMigrateSetCompressionCache = 300 + ProcNodeDeviceDetachFlags = 301 + ProcDomainMigrateBegin3Params = 302 + ProcDomainMigratePrepare3Params = 303 + ProcDomainMigratePrepareTunnel3Params = 304 + ProcDomainMigratePerform3Params = 305 + ProcDomainMigrateFinish3Params = 306 + ProcDomainMigrateConfirm3Params = 307 + ProcDomainSetMemoryStatsPeriod = 308 + ProcDomainCreateXMLWithFiles = 309 + ProcDomainCreateWithFiles = 310 + ProcDomainEventDeviceRemoved = 311 + ProcConnectGetCPUModelNames = 312 + ProcConnectNetworkEventRegisterAny = 313 + ProcConnectNetworkEventDeregisterAny = 314 + ProcNetworkEventLifecycle = 315 + ProcConnectDomainEventCallbackRegisterAny = 316 + ProcConnectDomainEventCallbackDeregisterAny = 317 + ProcDomainEventCallbackLifecycle = 318 + ProcDomainEventCallbackReboot = 319 + ProcDomainEventCallbackRtcChange = 320 + ProcDomainEventCallbackWatchdog = 321 + ProcDomainEventCallbackIOError = 322 + ProcDomainEventCallbackGraphics = 323 + ProcDomainEventCallbackIOErrorReason = 324 + ProcDomainEventCallbackControlError = 325 + ProcDomainEventCallbackBlockJob = 326 + ProcDomainEventCallbackDiskChange = 327 + ProcDomainEventCallbackTrayChange = 328 + ProcDomainEventCallbackPmwakeup = 329 + ProcDomainEventCallbackPmsuspend = 330 + ProcDomainEventCallbackBalloonChange = 331 + ProcDomainEventCallbackPmsuspendDisk = 332 + ProcDomainEventCallbackDeviceRemoved = 333 + ProcDomainCoreDumpWithFormat = 334 + ProcDomainFsfreeze = 335 + ProcDomainFsthaw = 336 + ProcDomainGetTime = 337 + ProcDomainSetTime = 338 + ProcDomainEventBlockJob2 = 339 + ProcNodeGetFreePages = 340 + ProcNetworkGetDhcpLeases = 341 + ProcConnectGetDomainCapabilities = 342 + ProcDomainOpenGraphicsFd = 343 + ProcConnectGetAllDomainStats = 344 + ProcDomainBlockCopy = 345 + ProcDomainEventCallbackTunable = 346 + ProcNodeAllocPages = 347 + ProcDomainEventCallbackAgentLifecycle = 348 + ProcDomainGetFsinfo = 349 + ProcDomainDefineXMLFlags = 350 + ProcDomainGetIothreadInfo = 351 + ProcDomainPinIothread = 352 + ProcDomainInterfaceAddresses = 353 + ProcDomainEventCallbackDeviceAdded = 354 + ProcDomainAddIothread = 355 + ProcDomainDelIothread = 356 + ProcDomainSetUserPassword = 357 + ProcDomainRename = 358 + ProcDomainEventCallbackMigrationIteration = 359 + ProcConnectRegisterCloseCallback = 360 + ProcConnectUnregisterCloseCallback = 361 + ProcConnectEventConnectionClosed = 362 + ProcDomainEventCallbackJobCompleted = 363 + ProcDomainMigrateStartPostCopy = 364 + ProcDomainGetPerfEvents = 365 + ProcDomainSetPerfEvents = 366 + ProcDomainEventCallbackDeviceRemovalFailed = 367 + ProcConnectStoragePoolEventRegisterAny = 368 + ProcConnectStoragePoolEventDeregisterAny = 369 + ProcStoragePoolEventLifecycle = 370 + ProcDomainGetGuestVcpus = 371 + ProcDomainSetGuestVcpus = 372 + ProcStoragePoolEventRefresh = 373 + ProcConnectNodeDeviceEventRegisterAny = 374 + ProcConnectNodeDeviceEventDeregisterAny = 375 + ProcNodeDeviceEventLifecycle = 376 + ProcNodeDeviceEventUpdate = 377 + ProcStorageVolGetInfoFlags = 378 + ProcDomainEventCallbackMetadataChange = 379 + ProcConnectSecretEventRegisterAny = 380 + ProcConnectSecretEventDeregisterAny = 381 + ProcSecretEventLifecycle = 382 + ProcSecretEventValueChanged = 383 + ProcDomainSetVcpu = 384 + ProcDomainEventBlockThreshold = 385 + ProcDomainSetBlockThreshold = 386 + ProcDomainMigrateGetMaxDowntime = 387 + ProcDomainManagedSaveGetXMLDesc = 388 + ProcDomainManagedSaveDefineXML = 389 + ProcDomainSetLifecycleAction = 390 + + + // From consts: + StringMax = 4194304 + DomainListMax = 16384 + CpumapMax = 2048 + VcpuinfoMax = 16384 + CpumapsMax = 8388608 + IothreadInfoMax = 16384 + MigrateCookieMax = 4194304 + NetworkListMax = 16384 + InterfaceListMax = 16384 + StoragePoolListMax = 16384 + StorageVolListMax = 16384 + NodeDeviceListMax = 65536 + NodeDeviceCapsListMax = 65536 + NwfilterListMax = 16384 + DomainSchedulerParametersMax = 16 + DomainBlkioParametersMax = 16 + DomainMemoryParametersMax = 16 + DomainBlockIOTuneParametersMax = 32 + DomainNumaParametersMax = 16 + DomainPerfEventsMax = 64 + DomainBlockCopyParametersMax = 16 + NodeCPUStatsMax = 16 + NodeMemoryStatsMax = 16 + DomainBlockStatsParametersMax = 16 + NodeMaxCells = 1024 + AuthSaslDataMax = 65536 + AuthTypeListMax = 20 + DomainMemoryStatsMax = 1024 + DomainSnapshotListMax = 16384 + DomainBlockPeekBufferMax = 4194304 + DomainMemoryPeekBufferMax = 4194304 + SecurityLabelListMax = 64 + SecretValueMax = 65536 + SecretListMax = 16384 + CPUBaselineMax = 256 + DomainSendKeyMax = 16 + DomainInterfaceParametersMax = 16 + DomainGetCPUStatsNcpusMax = 128 + DomainGetCPUStatsMax = 2048 + DomainDiskErrorsMax = 256 + NodeMemoryParametersMax = 64 + DomainMigrateParamListMax = 64 + DomainJobStatsMax = 64 + ConnectCPUModelsMax = 8192 + DomainFsfreezeMountpointsMax = 256 + NetworkDhcpLeasesMax = 65536 + ConnectGetAllDomainStatsMax = 262144 + DomainEventTunableMax = 2048 + DomainFsinfoMax = 256 + DomainFsinfoDisksMax = 256 + DomainInterfaceMax = 2048 + DomainIPAddrMax = 2048 + DomainGuestVcpuParamsMax = 64 + DomainEventGraphicsIdentityMax = 20 + Program = 0x20008086 + ProtocolVersion = 1 + +) diff --git a/internal/constants/constants.go b/internal/constants/constants.go index d77b3a9..d321bec 100644 --- a/internal/constants/constants.go +++ b/internal/constants/constants.go @@ -15,54 +15,11 @@ // Package constants provides shared data for the libvirt package. package constants -// protocol procedure numbers const ( - ProgramVersion = 1 - ProgramRemote = 0x20008086 ProgramQEMU = 0x20008087 ProgramKeepAlive = 0x6b656570 ) -// libvirt procedure identifiers -// These are libvirt procedure numbers which correspond to each respective -// API call between remote_internal driver and libvirtd. Although stable. -// Each call is identified by a unique number which *may change at any time*. -// -// Examples: -// REMOTE_PROC_CONNECT_OPEN = 1 -// REMOTE_PROC_DOMAIN_DEFINE_XML = 11 -// REMOTE_PROC_DOMAIN_MIGRATE_SET_MAX_SPEED = 207, -// -// See: -// https://libvirt.org/git/?p=libvirt.git;a=blob_plain;f=src/remote/remote_protocol.x;hb=HEAD -const ( - ProcConnectOpen = 1 - ProcConnectClose = 2 - ProcConnectGetCapabilties = 7 - ProcDomainGetXMLDesc = 14 - ProcDomainLookupByName = 23 - ProcDomainReboot = 27 - ProcAuthList = 66 - ProcStoragePoolRefresh = 83 - ProcStoragePoolLookupByName = 84 - ProcConnectGetLibVersion = 157 - ProcDomainMemoryStats = 159 - ProcDomainCreateWithFlags = 196 - ProcDomainMigrateSetMaxSpeed = 207 - ProcDomainGetState = 212 - ProcDomainUndefineFlags = 231 - ProcDomainDestroyFlags = 234 - ProcDomainReset = 245 - ProcDomainSetBlockIOTune = 252 - ProcDomainGetBlockIOTune = 253 - ProcDomainShutdownFlags = 258 - ProcConnectListAllDomains = 273 - ProcConnectListAllStoragePools = 281 - ProcConnectListAllSecrets = 287 - ProcMigratePerformParams = 305 - ProcDomainDefineXMLFlags = 350 -) - // qemu procedure identifiers const ( QEMUDomainMonitor = 1 diff --git a/internal/lvgen/.gitignore b/internal/lvgen/.gitignore new file mode 100644 index 0000000..a12bedf --- /dev/null +++ b/internal/lvgen/.gitignore @@ -0,0 +1,4 @@ +# Ignore the yacc intermediate files. +y.go +y.output + diff --git a/internal/lvgen/gen/main.go b/internal/lvgen/gen/main.go new file mode 100644 index 0000000..640c767 --- /dev/null +++ b/internal/lvgen/gen/main.go @@ -0,0 +1,43 @@ +// Copyright 2017 The go-libvirt Authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package main + +import ( + "fmt" + "os" + "path" + + "github.com/digitalocean/go-libvirt/internal/lvgen" +) + +// TODO: make these an argument +const lvPath = "../../../libvirt" +const protoPath = "src/remote/remote_protocol.x" + +func main() { + fmt.Println("Generating golang bindings for libvirt") + lvFile := path.Join(lvPath, protoPath) + rdr, err := os.Open(lvFile) + if err != nil { + fmt.Printf("failed to open protocol file at %v: %v\n", lvFile, err) + os.Exit(1) + } + defer rdr.Close() + + if err = lvgen.Generate(rdr); err != nil { + fmt.Println("go-libvirt code generator failed:", err) + os.Exit(1) + } +} diff --git a/internal/lvgen/generate.go b/internal/lvgen/generate.go new file mode 100644 index 0000000..b534d23 --- /dev/null +++ b/internal/lvgen/generate.go @@ -0,0 +1,564 @@ +// Copyright 2017 The go-libvirt Authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package lvgen + +// The libvirt API is divided into several categories. (Gallia est omnis divisa +// in partes tres.) The generator will output code for each category in a +// package underneath the go-libvirt directory. + +import ( + "fmt" + "io" + "io/ioutil" + "os" + "strconv" + "strings" + "text/template" + "unicode" + "unicode/utf8" +) + +var keywords = map[string]int{ + "hyper": HYPER, + "int": INT, + "short": SHORT, + "char": CHAR, + "bool": BOOL, + "case": CASE, + "const": CONST, + "default": DEFAULT, + "double": DOUBLE, + "enum": ENUM, + "float": FLOAT, + "opaque": OPAQUE, + "string": STRING, + "struct": STRUCT, + "switch": SWITCH, + "typedef": TYPEDEF, + "union": UNION, + "unsigned": UNSIGNED, + "void": VOID, + "program": PROGRAM, + "version": VERSION, +} + +// ConstItem stores an const's symbol and value from the parser. This struct is +// also used for enums. +type ConstItem struct { + Name string + Val string +} + +type Generator struct { + // Enums holds the list of enums found by the parser. + Enums []ConstItem + // Consts holds all the const items found by the parser. + Consts []ConstItem +} + +// Gen accumulates items as the parser runs, and is then used to produce the +// output. +var Gen Generator + +// CurrentEnumVal is the auto-incrementing value assigned to enums that aren't +// explicitly given a value. +var CurrentEnumVal int64 + +// oneRuneTokens lists the runes the lexer will consider to be tokens when it +// finds them. These are returned to the parser using the integer value of their +// runes. +var oneRuneTokens = `{}[]<>(),=;:*` + +// 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. +func Generate(proto io.Reader) error { + lexer, err := NewLexer(proto) + if err != nil { + return err + } + go lexer.Run() + parser := yyNewParser() + yyErrorVerbose = true + // Turn this on if you're debugging. + // yyDebug = 3 + rv := parser.Parse(lexer) + if rv != 0 { + return fmt.Errorf("failed to parse libvirt protocol: %v", rv) + } + + // Generate and write the output. + wr, err := os.Create("../constants/constants.gen.go") + if err != nil { + return err + } + defer wr.Close() + + err = genGo(wr) + + return err +} + +func genGo(wr io.Writer) error { + // TODO: Move this someplace nice. + const consttempl = `/* + * This file generated by internal/lvgen/generate.go. DO NOT EDIT BY HAND! + * + * To regenerate, run 'go generate' in internal/lvgen. + */ +package constants + +// libvirt procedure identifiers and other enums +// +// These are libvirt procedure numbers which correspond to each respective +// API call between remote_internal driver and libvirtd. Each procedure is +// identified by a unique number which *may change in any future libvirt +// update*. +// +// Examples: +// REMOTE_PROC_CONNECT_OPEN = 1 +// REMOTE_PROC_DOMAIN_DEFINE_XML = 11 +// REMOTE_PROC_DOMAIN_MIGRATE_SET_MAX_SPEED = 207, +const ( + // From enums: + {{range .Enums}}{{.Name}} = {{.Val}} + {{end}} + + // From consts: + {{range .Consts}}{{.Name}} = {{.Val}} + {{end}} +) +` + // 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) + } + + t := template.Must(template.New("consts").Parse(consttempl)) + if err := t.Execute(wr, Gen); err != nil { + return err + } + return nil +} + +// constNameTransform changes an upcased, snake-style name like +// REMOTE_PROTOCOL_VERSION to a comfortable Go name like ProtocolVersion. It +// 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 = fixAbbrevs(nn) + return 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 { + buf := make([]rune, 0, len(s)) + // Start with an upper-cased rune + hump := true + + for _, r := range s { + if r == '_' { + hump = true + } else { + var transform func(rune) rune + if hump == true { + transform = unicode.ToUpper + } else { + transform = unicode.ToLower + } + buf = append(buf, transform(r)) + hump = false + } + } + + return string(buf) +} + +// abbrevs is a list of abbreviations which should be all upper-case in a name. +// (This is really just to keep the go linters happy and to produce names that +// are intuitive to a go developer.) +var abbrevs = []string{"Xml", "Io", "Uuid", "Cpu", "Id", "Ip"} + +// fixAbbrevs up-cases all instances of anything in the 'abbrevs' array. This +// would be a simple matter, but we don't want to upcase an abbreviation if it's +// actually part of a larger word, so it's not so simple. +func fixAbbrevs(s string) string { + for _, a := range abbrevs { + for loc := 0; ; { + loc = strings.Index(s[loc:], a) + if loc == -1 { + break + } + r := 'A' + if len(a) < len(s[loc:]) { + r, _ = utf8.DecodeRune([]byte(s[loc+len(a):])) + } + if unicode.IsLower(r) == false { + s = s[:loc] + strings.Replace(s[loc:], a, strings.ToUpper(a), 1) + } + loc++ + } + } + return s +} + +// TODO: Move this lexer to its own file? + +// eof is returned by the lexer when there's no more input. +const eof = -1 + +type item struct { + typ int + val string + line, column int +} + +// String will display lexer items for humans to debug. There are some +// calculations here due to the way goyacc arranges token values; see the +// generated file y.go for an idea what's going on here, but the basic idea is +// that the lower token type values are reserved for single-rune tokens, which +// the lexer reports using the value of the rune itself. Everything else is +// allocated a range of type value up above all the possible single-rune values. +func (i item) String() string { + tokType := i.typ + if tokType >= yyPrivate { + if tokType < yyPrivate+len(yyTok2) { + tokType = yyTok2[tokType-yyPrivate] + } + } + rv := fmt.Sprintf("%s %q %d:%d", yyTokname(tokType), i.val, i.line, i.column) + return rv +} + +// Lexer stores the state of this lexer. +type Lexer struct { + input string // the string we're scanning. + start int // start position of the item. + pos int // current position in the input. + line int // the current line (for error reporting). + column int // current position within the current line. + width int // width of the last rune scanned. + items chan item // channel of scanned lexer items (lexemes). + lastItem item // The last item the lexer handed the parser +} + +// NewLexer will return a new lexer for the passed-in reader. +func NewLexer(rdr io.Reader) (*Lexer, error) { + l := &Lexer{} + + b, err := ioutil.ReadAll(rdr) + if err != nil { + return nil, err + } + l.input = string(b) + l.items = make(chan item) + + return l, nil +} + +// Run starts the lexer, and should be called in a goroutine. +func (l *Lexer) Run() { + for state := lexText; state != nil; { + state = state(l) + } + close(l.items) +} + +// emit returns a token to the parser. +func (l *Lexer) emit(t int) { + l.items <- item{t, l.input[l.start:l.pos], l.line, l.column} + l.start = l.pos +} + +// Lex gets the next token. +func (l *Lexer) Lex(st *yySymType) int { + s := <-l.items + l.lastItem = s + st.val = s.val + // fmt.Println("Lex returning", s) + return int(s.typ) +} + +// Error is called by the parser when it finds a problem. +func (l *Lexer) Error(s string) { + fmt.Printf("parse error at %d:%d: %v\n", l.lastItem.line+1, l.lastItem.column+1, s) + fmt.Printf("error at %q\n", l.lastItem.val) +} + +// errorf is used by the lexer to report errors. It inserts an ERROR token into +// the items channel, and sets the state to nil, which stops the lexer's state +// machine. +func (l *Lexer) errorf(format string, args ...interface{}) stateFn { + l.items <- item{ERROR, fmt.Sprintf(format, args), l.line, l.column} + return nil +} + +// next returns the rune at the current location, and advances to the next rune +// in the input. +func (l *Lexer) next() (r rune) { + if l.pos >= len(l.input) { + l.width = 0 + return eof + } + r, l.width = utf8.DecodeRuneInString(l.input[l.pos:]) + l.pos += l.width + l.column++ + if r == '\n' { + l.line++ + l.column = 0 + } + return r +} + +// ignore discards the current text from start to pos. +func (l *Lexer) ignore() { + l.start = l.pos +} + +// backup moves back one character, but can only be called once per next() call. +func (l *Lexer) backup() { + l.pos -= l.width + if l.column > 0 { + l.column-- + } else { + l.line-- + } + l.width = 0 +} + +// peek looks ahead at the next rune in the stream without consuming it. +func (l *Lexer) peek() rune { + r := l.next() + l.backup() + return r +} + +// accept will advance to the next rune if it's contained in the string of valid +// runes passed in by the caller. +func (l *Lexer) accept(valid string) bool { + if strings.IndexRune(valid, l.next()) >= 0 { + return true + } + l.backup() + return false +} + +// acceptRun advances over a number of valid runes, stopping as soon as it hits +// one not on the list. +func (l *Lexer) acceptRun(valid string) { + for strings.IndexRune(valid, l.next()) >= 0 { + } + l.backup() +} + +// keyword checks whether the current lexeme is a keyword or not. If so it +// returns the keyword's token id, otherwise it returns IDENTIFIER. +func (l *Lexer) keyword() int { + ident := l.input[l.start:l.pos] + tok, ok := keywords[ident] + if ok == true { + return int(tok) + } + return IDENTIFIER +} + +// oneRuneToken determines whether a rune is a token. If so it returns the token +// id and true, otherwise it returns false. +func (l *Lexer) oneRuneToken(r rune) (int, bool) { + if strings.IndexRune(oneRuneTokens, r) >= 0 { + return int(r), true + } + + return 0, false +} + +// State functions +type stateFn func(*Lexer) stateFn + +// lexText is the master lex routine. The lexer is started in this state. +func lexText(l *Lexer) stateFn { + for { + if strings.HasPrefix(l.input[l.pos:], "/*") { + return lexBlockComment + } + r := l.next() + if r == eof { + break + } + if unicode.IsSpace(r) { + l.ignore() + return lexText + } + if l.column == 1 && r == '%' { + l.backup() + return lexDirective + } + if unicode.IsLetter(r) { + l.backup() + return lexIdent + } + if unicode.IsNumber(r) || r == '-' { + l.backup() + return lexNumber + } + if t, isToken := l.oneRuneToken(r); isToken == true { + l.emit(t) + } + } + + return nil +} + +// lexBlockComment is used when we find a comment marker '/*' in the input. +func lexBlockComment(l *Lexer) stateFn { + for { + if strings.HasPrefix(l.input[l.pos:], "*/") { + // Found the end. Advance past the '*/' and discard the comment body. + l.next() + l.next() + l.ignore() + return lexText + } + if l.next() == eof { + return l.errorf("unterminated block comment") + } + } +} + +// lexIdent handles identifiers. +func lexIdent(l *Lexer) stateFn { + for { + r := l.next() + if unicode.IsLetter(r) || unicode.IsDigit(r) || r == '_' { + continue + } + l.backup() + break + } + // We may have a keyword, so check for that before emitting. + l.emit(l.keyword()) + + return lexText +} + +// lexNumber handles decimal and hexadecimal numbers. Decimal numbers may begin +// with a '-'; hex numbers begin with '0x' and do not accept leading '-'. +func lexNumber(l *Lexer) stateFn { + // Leading '-' is ok + digits := "0123456789" + neg := l.accept("-") + if !neg { + // allow '0x' for hex numbers, as long as there's not a leading '-'. + r := l.peek() + if r == '0' { + l.next() + if l.accept("x") { + digits = "0123456789ABCDEFabcdef" + } + } + } + // followed by any number of digits + l.acceptRun(digits) + r := l.peek() + if unicode.IsLetter(r) { + l.next() + return l.errorf("invalid number: %q", l.input[l.start:l.pos]) + } + l.emit(CONSTANT) + return lexText +} + +// lexDirective handles lines beginning with '%'. These are used to emit C code +// directly to the output file. For now we're ignoring them, but some of the +// constants in the protocol file do depend on values from #included header +// files, so that may need to change. +func lexDirective(l *Lexer) stateFn { + for { + r := l.next() + if r == '\n' { + l.ignore() + return lexText + } + if r == eof { + return l.errorf("unterminated directive") + } + } +} + +//--------------------------------------------------------------------------- +// Routines called by the parser's actions. +//--------------------------------------------------------------------------- + +// StartEnum is called when the parser has found a valid enum. +func StartEnum() { + // 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 { + ev, err := parseNumber(val) + if err != nil { + return fmt.Errorf("invalid enum value %v = %v", name, val) + } + return addEnum(name, ev) +} + +// AddEnumAutoVal adds an enum to the list, using the automatically-incremented +// value. This is called when the parser finds an enum definition without an +// explicit value. +func AddEnumAutoVal(name string) error { + CurrentEnumVal++ + return addEnum(name, CurrentEnumVal) +} + +func addEnum(name string, val int64) error { + Gen.Enums = append(Gen.Enums, ConstItem{name, fmt.Sprintf("%d", val)}) + CurrentEnumVal = val + return nil +} + +// AddConst adds a new constant to the parser's list. +func AddConst(name, val string) error { + _, err := parseNumber(val) + if err != nil { + return fmt.Errorf("invalid const value %v = %v", name, val) + } + Gen.Consts = append(Gen.Consts, ConstItem{name, val}) + return nil +} + +// parseNumber makes sure that a parsed numerical value can be parsed to a 64- +// bit integer. +func parseNumber(val string) (int64, error) { + base := 10 + if strings.HasPrefix(val, "0x") { + base = 16 + val = val[2:] + } + n, err := strconv.ParseInt(val, base, 64) + return n, err +} diff --git a/internal/lvgen/lv-gen.go b/internal/lvgen/lv-gen.go new file mode 100644 index 0000000..3dec8b1 --- /dev/null +++ b/internal/lvgen/lv-gen.go @@ -0,0 +1,4 @@ +package lvgen + +//go:generate goyacc sunrpc.y +//go:generate go run gen/main.go diff --git a/internal/lvgen/sunrpc.y b/internal/lvgen/sunrpc.y new file mode 100644 index 0000000..305fe48 --- /dev/null +++ b/internal/lvgen/sunrpc.y @@ -0,0 +1,218 @@ +%{ + +package lvgen + +import ( + //"fmt" +) + +%} + +// SymType +%union{ + val string +} + +// XDR tokens: +%token BOOL CASE CONST DEFAULT DOUBLE ENUM FLOAT OPAQUE STRING STRUCT +%token SWITCH TYPEDEF UNION UNSIGNED VOID HYPER INT SHORT CHAR +%token IDENTIFIER CONSTANT ERROR +// RPCL additional tokens: +%token PROGRAM VERSION + +%% + +specification + : definition_list + ; + +value + : IDENTIFIER + | CONSTANT + ; + +definition_list + : definition ';' + | definition ';' definition_list + ; + +definition + : enum_definition + | const_definition + | typedef_definition + | struct_definition + | union_definition + | program_definition + ; + +enum_definition + : ENUM enum_ident '{' enum_value_list '}' { StartEnum() } + ; + +enum_value_list + : enum_value + | enum_value ',' enum_value_list + ; + +enum_value + : enum_value_ident { + err := AddEnumAutoVal($1.val) + if err != nil { + yylex.Error(err.Error()) + return 1 + } + } + | enum_value_ident '=' value { + err := AddEnum($1.val, $3.val) + if err != nil { + yylex.Error(err.Error()) + return 1 + } + } + ; + +enum_ident + : IDENTIFIER + ; + +enum_value_ident + : IDENTIFIER + ; + +// Ignore consts that are set to IDENTIFIERs - this isn't allowed by the spec, +// but occurs in the file because libvirt runs the pre-processor on the protocol +// file, and it handles replacing the identifier with it's #defined value. +const_definition + : CONST const_ident '=' IDENTIFIER + | CONST const_ident '=' CONSTANT { + err := AddConst($2.val, $4.val) + if err != nil { + yylex.Error(err.Error()) + return 1 + } + } + ; + +const_ident + : IDENTIFIER + ; + +typedef_definition + : TYPEDEF declaration + ; + +declaration + : simple_declaration + | fixed_array_declaration + | variable_array_declaration + | pointer_declaration + ; + +simple_declaration + : type_specifier variable_ident + ; + +type_specifier + : int_spec + | UNSIGNED int_spec + | FLOAT + | DOUBLE + | BOOL + | STRING + | OPAQUE + | enum_definition + | struct_definition + | union_definition + | IDENTIFIER + ; + +int_spec + : HYPER + | INT + | SHORT + | CHAR + ; + +variable_ident + : IDENTIFIER + ; + +fixed_array_declaration + : type_specifier variable_ident '[' value ']' + ; + +variable_array_declaration + : type_specifier variable_ident '<' value '>' + | type_specifier variable_ident '<' '>' + ; + +pointer_declaration + : type_specifier '*' variable_ident + ; + +struct_definition + : STRUCT struct_ident '{' declaration_list '}' + ; + +struct_ident + : IDENTIFIER + ; + +declaration_list + : declaration ';' + | declaration ';' declaration_list + ; + +union_definition + : UNION union_ident SWITCH '(' simple_declaration ')' '{' case_list '}' + ; + +union_ident + : IDENTIFIER + ; + +case_list + : case ';' + | case ';' case_list + ; + +case + : CASE value ':' declaration + | DEFAULT ':' declaration + ; + +program_definition + : PROGRAM program_ident '{' version_list '}' '=' value + ; + +program_ident + : IDENTIFIER + ; + +version_list + : version ';' + | version ';' version_list + ; + +version + : VERSION version_ident '{' procedure_list '}' '=' value ';' + ; + +version_ident + : IDENTIFIER + ; + +procedure_list + : procedure ';' + | procedure ';' procedure_list + ; + +procedure + : type_specifier procedure_ident '(' type_specifier ')' '=' value ';' + ; + +procedure_ident + : IDENTIFIER + ; + +%% diff --git a/libvirt.go b/libvirt.go index 0368315..94ed3d2 100644 --- a/libvirt.go +++ b/libvirt.go @@ -514,7 +514,7 @@ type DomainMemoryStat struct { // Capabilities returns an XML document describing the host's capabilties. func (l *Libvirt) Capabilities() ([]byte, error) { - resp, err := l.request(constants.ProcConnectGetCapabilties, constants.ProgramRemote, nil) + resp, err := l.request(constants.ProcConnectGetCapabilities, constants.Program, nil) if err != nil { return nil, err } @@ -571,7 +571,7 @@ func (l *Libvirt) Domains() ([]Domain, error) { return nil, err } - resp, err := l.request(constants.ProcConnectListAllDomains, constants.ProgramRemote, &buf) + resp, err := l.request(constants.ProcConnectListAllDomains, constants.Program, &buf) if err != nil { return nil, err } @@ -613,7 +613,7 @@ func (l *Libvirt) DomainCreateWithFlags(dom string, flags DomainCreateFlags) err if err != nil { return err } - resp, err := l.request(constants.ProcDomainCreateWithFlags, constants.ProgramRemote, &buf) + resp, err := l.request(constants.ProcDomainCreateWithFlags, constants.Program, &buf) if err != nil { return err } @@ -647,7 +647,7 @@ func (l *Libvirt) DomainMemoryStats(dom string) ([]DomainMemoryStat, error) { return nil, err } - resp, err := l.request(constants.ProcDomainMemoryStats, constants.ProgramRemote, &buf) + resp, err := l.request(constants.ProcDomainMemoryStats, constants.Program, &buf) if err != nil { return nil, err } @@ -687,7 +687,7 @@ func (l *Libvirt) DomainState(dom string) (DomainState, error) { return DomainStateNoState, err } - resp, err := l.request(constants.ProcDomainGetState, constants.ProgramRemote, &buf) + resp, err := l.request(constants.ProcDomainGetState, constants.Program, &buf) if err != nil { return DomainStateNoState, err } @@ -814,7 +814,8 @@ func (l *Libvirt) Migrate(dom string, dest string, flags MigrateFlags) error { return err } - resp, err := l.request(constants.ProcMigratePerformParams, constants.ProgramRemote, &buf) + resp, err := l.request(constants.ProcDomainMigratePerform3Params, + constants.Program, &buf) if err != nil { return err } @@ -852,7 +853,7 @@ func (l *Libvirt) MigrateSetMaxSpeed(dom string, speed int64) error { return err } - resp, err := l.request(constants.ProcDomainMigrateSetMaxSpeed, constants.ProgramRemote, &buf) + resp, err := l.request(constants.ProcDomainMigrateSetMaxSpeed, constants.Program, &buf) if err != nil { return err } @@ -932,7 +933,7 @@ func (l *Libvirt) Secrets() ([]Secret, error) { return nil, err } - resp, err := l.request(constants.ProcConnectListAllSecrets, constants.ProgramRemote, &buf) + resp, err := l.request(constants.ProcConnectListAllSecrets, constants.Program, &buf) if err != nil { return nil, err } @@ -970,7 +971,7 @@ func (l *Libvirt) StoragePool(name string) (*StoragePool, error) { return nil, err } - resp, err := l.request(constants.ProcStoragePoolLookupByName, constants.ProgramRemote, &buf) + resp, err := l.request(constants.ProcStoragePoolLookupByName, constants.Program, &buf) if err != nil { return nil, err } @@ -1013,7 +1014,7 @@ func (l *Libvirt) StoragePoolRefresh(name string) error { return err } - resp, err := l.request(constants.ProcStoragePoolRefresh, constants.ProgramRemote, &buf) + resp, err := l.request(constants.ProcStoragePoolRefresh, constants.Program, &buf) if err != nil { return err } @@ -1042,7 +1043,7 @@ func (l *Libvirt) StoragePools(flags StoragePoolsFlags) ([]StoragePool, error) { return nil, err } - resp, err := l.request(constants.ProcConnectListAllStoragePools, constants.ProgramRemote, &buf) + resp, err := l.request(constants.ProcConnectListAllStoragePools, constants.Program, &buf) if err != nil { return nil, err } @@ -1089,7 +1090,7 @@ func (l *Libvirt) Undefine(dom string, flags UndefineFlags) error { return err } - resp, err := l.request(constants.ProcDomainUndefineFlags, constants.ProgramRemote, &buf) + resp, err := l.request(constants.ProcDomainUndefineFlags, constants.Program, &buf) if err != nil { return err } @@ -1125,7 +1126,7 @@ func (l *Libvirt) Destroy(dom string, flags DestroyFlags) error { return err } - resp, err := l.request(constants.ProcDomainDestroyFlags, constants.ProgramRemote, &buf) + resp, err := l.request(constants.ProcDomainDestroyFlags, constants.Program, &buf) if err != nil { return err } @@ -1159,7 +1160,7 @@ func (l *Libvirt) XML(dom string, flags DomainXMLFlags) ([]byte, error) { return nil, err } - resp, err := l.request(constants.ProcDomainGetXMLDesc, constants.ProgramRemote, &buf) + resp, err := l.request(constants.ProcDomainGetXMLDesc, constants.Program, &buf) if err != nil { return nil, err } @@ -1194,7 +1195,7 @@ func (l *Libvirt) DefineXML(x []byte, flags DomainDefineXMLFlags) error { return err } - resp, err := l.request(constants.ProcDomainDefineXMLFlags, constants.ProgramRemote, &buf) + resp, err := l.request(constants.ProcDomainDefineXMLFlags, constants.Program, &buf) if err != nil { return err } @@ -1209,7 +1210,7 @@ func (l *Libvirt) DefineXML(x []byte, flags DomainDefineXMLFlags) error { // Version returns the version of the libvirt daemon. func (l *Libvirt) Version() (string, error) { - resp, err := l.request(constants.ProcConnectGetLibVersion, constants.ProgramRemote, nil) + resp, err := l.request(constants.ProcConnectGetLibVersion, constants.Program, nil) if err != nil { return "", err } @@ -1263,7 +1264,7 @@ func (l *Libvirt) Shutdown(dom string, flags ShutdownFlags) error { return err } - resp, err := l.request(constants.ProcDomainShutdownFlags, constants.ProgramRemote, &buf) + resp, err := l.request(constants.ProcDomainShutdownFlags, constants.Program, &buf) if err != nil { return err } @@ -1297,7 +1298,7 @@ func (l *Libvirt) Reboot(dom string, flags RebootFlags) error { return err } - resp, err := l.request(constants.ProcDomainReboot, constants.ProgramRemote, &buf) + resp, err := l.request(constants.ProcDomainReboot, constants.Program, &buf) if err != nil { return err } @@ -1330,7 +1331,7 @@ func (l *Libvirt) Reset(dom string) error { return err } - resp, err := l.request(constants.ProcDomainReset, constants.ProgramRemote, &buf) + resp, err := l.request(constants.ProcDomainReset, constants.Program, &buf) if err != nil { return err } @@ -1418,7 +1419,7 @@ func (l *Libvirt) SetBlockIOTune(dom string, disk string, limits ...BlockLimit) if err != nil { return err } - resp, err := l.request(constants.ProcDomainSetBlockIOTune, constants.ProgramRemote, &buf) + resp, err := l.request(constants.ProcDomainSetBlockIOTune, constants.Program, &buf) if err != nil { return err } @@ -1456,7 +1457,7 @@ func (l *Libvirt) GetBlockIOTune(dom string, disk string) ([]BlockLimit, error) return nil, err } - resp, err := l.request(constants.ProcDomainGetBlockIOTune, constants.ProgramRemote, &buf) + resp, err := l.request(constants.ProcDomainGetBlockIOTune, constants.Program, &buf) if err != nil { return nil, err } @@ -1525,7 +1526,7 @@ func (l *Libvirt) lookup(name string) (*Domain, error) { return nil, err } - resp, err := l.request(constants.ProcDomainLookupByName, constants.ProgramRemote, &buf) + resp, err := l.request(constants.ProcDomainLookupByName, constants.Program, &buf) if err != nil { return nil, err } diff --git a/libvirttest/libvirt.go b/libvirttest/libvirt.go index 0c7a18f..8d65039 100644 --- a/libvirttest/libvirt.go +++ b/libvirttest/libvirt.go @@ -563,7 +563,7 @@ func (m *MockLibvirt) handle(conn net.Conn) { proc := binary.BigEndian.Uint32(buf[12:16]) switch prog { - case constants.ProgramRemote: + case constants.Program: m.handleRemote(proc, conn) case constants.ProgramQEMU: m.handleQEMU(proc, conn) @@ -599,7 +599,7 @@ func (m *MockLibvirt) handleRemote(procedure uint32, conn net.Conn) { conn.Write(m.reply(testDomainMemoryStatsReply)) case constants.ProcDomainMigrateSetMaxSpeed: conn.Write(m.reply(testSetSpeedReply)) - case constants.ProcMigratePerformParams: + case constants.ProcDomainMigratePerform3Params: conn.Write(m.reply(testMigrateReply)) case constants.ProcDomainUndefineFlags: conn.Write(m.reply(testUndefineReply)) diff --git a/rpc.go b/rpc.go index 87ea71d..8bc6bf0 100644 --- a/rpc.go +++ b/rpc.go @@ -131,7 +131,7 @@ func (l *Libvirt) connect() error { // libvirt requires that we call auth-list prior to connecting, // event when no authentication is used. - resp, err := l.request(constants.ProcAuthList, constants.ProgramRemote, &buf) + resp, err := l.request(constants.ProcAuthList, constants.Program, &buf) if err != nil { return err } @@ -141,7 +141,7 @@ func (l *Libvirt) connect() error { return decodeError(r.Payload) } - resp, err = l.request(constants.ProcConnectOpen, constants.ProgramRemote, &buf) + resp, err = l.request(constants.ProcConnectOpen, constants.Program, &buf) if err != nil { return err } @@ -155,7 +155,7 @@ func (l *Libvirt) connect() error { } func (l *Libvirt) disconnect() error { - resp, err := l.request(constants.ProcConnectClose, constants.ProgramRemote, nil) + resp, err := l.request(constants.ProcConnectClose, constants.Program, nil) if err != nil { return err } @@ -329,7 +329,7 @@ func (l *Libvirt) request(proc uint32, program uint32, payload *bytes.Buffer) (< Len: uint32(size), Header: header{ Program: program, - Version: constants.ProgramVersion, + Version: constants.ProtocolVersion, Procedure: proc, Type: Call, Serial: serial, diff --git a/rpc_test.go b/rpc_test.go index ae84340..9b8aef5 100644 --- a/rpc_test.go +++ b/rpc_test.go @@ -120,12 +120,12 @@ func TestExtractHeader(t *testing.T) { t.Error(err) } - if h.Program != constants.ProgramRemote { - t.Errorf("expected Program %q, got %q", constants.ProgramRemote, h.Program) + if h.Program != constants.Program { + t.Errorf("expected Program %q, got %q", constants.Program, h.Program) } - if h.Version != constants.ProgramVersion { - t.Errorf("expected version %q, got %q", constants.ProgramVersion, h.Version) + if h.Version != constants.ProtocolVersion { + t.Errorf("expected version %q, got %q", constants.ProtocolVersion, h.Version) } if h.Procedure != constants.ProcConnectOpen { From 6e924657b1a53b2dc0e8946cfe17001e4267c5a9 Mon Sep 17 00:00:00 2001 From: Geoff Hickey Date: Fri, 3 Nov 2017 13:37:16 -0400 Subject: [PATCH 02/20] Move the rpcgen lexer to its own file. --- internal/constants/constants.go | 5 +- internal/lvgen/generate.go | 285 +---------------------------- internal/lvgen/lvlexer.go | 305 ++++++++++++++++++++++++++++++++ 3 files changed, 310 insertions(+), 285 deletions(-) create mode 100644 internal/lvgen/lvlexer.go diff --git a/internal/constants/constants.go b/internal/constants/constants.go index d321bec..4b7a90c 100644 --- a/internal/constants/constants.go +++ b/internal/constants/constants.go @@ -12,7 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. -// Package constants provides shared data for the libvirt package. +// Package constants provides shared data for the libvirt package. This file +// includes only things not generated automatically by the parser that runs on +// libvirt's remote_protocol.x file - see constants.gen.go for the generated +// definitions. package constants const ( diff --git a/internal/lvgen/generate.go b/internal/lvgen/generate.go index b534d23..7f6ff4a 100644 --- a/internal/lvgen/generate.go +++ b/internal/lvgen/generate.go @@ -21,7 +21,6 @@ package lvgen import ( "fmt" "io" - "io/ioutil" "os" "strconv" "strings" @@ -61,6 +60,7 @@ type ConstItem struct { Val string } +// 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 @@ -224,289 +224,6 @@ func fixAbbrevs(s string) string { return s } -// TODO: Move this lexer to its own file? - -// eof is returned by the lexer when there's no more input. -const eof = -1 - -type item struct { - typ int - val string - line, column int -} - -// String will display lexer items for humans to debug. There are some -// calculations here due to the way goyacc arranges token values; see the -// generated file y.go for an idea what's going on here, but the basic idea is -// that the lower token type values are reserved for single-rune tokens, which -// the lexer reports using the value of the rune itself. Everything else is -// allocated a range of type value up above all the possible single-rune values. -func (i item) String() string { - tokType := i.typ - if tokType >= yyPrivate { - if tokType < yyPrivate+len(yyTok2) { - tokType = yyTok2[tokType-yyPrivate] - } - } - rv := fmt.Sprintf("%s %q %d:%d", yyTokname(tokType), i.val, i.line, i.column) - return rv -} - -// Lexer stores the state of this lexer. -type Lexer struct { - input string // the string we're scanning. - start int // start position of the item. - pos int // current position in the input. - line int // the current line (for error reporting). - column int // current position within the current line. - width int // width of the last rune scanned. - items chan item // channel of scanned lexer items (lexemes). - lastItem item // The last item the lexer handed the parser -} - -// NewLexer will return a new lexer for the passed-in reader. -func NewLexer(rdr io.Reader) (*Lexer, error) { - l := &Lexer{} - - b, err := ioutil.ReadAll(rdr) - if err != nil { - return nil, err - } - l.input = string(b) - l.items = make(chan item) - - return l, nil -} - -// Run starts the lexer, and should be called in a goroutine. -func (l *Lexer) Run() { - for state := lexText; state != nil; { - state = state(l) - } - close(l.items) -} - -// emit returns a token to the parser. -func (l *Lexer) emit(t int) { - l.items <- item{t, l.input[l.start:l.pos], l.line, l.column} - l.start = l.pos -} - -// Lex gets the next token. -func (l *Lexer) Lex(st *yySymType) int { - s := <-l.items - l.lastItem = s - st.val = s.val - // fmt.Println("Lex returning", s) - return int(s.typ) -} - -// Error is called by the parser when it finds a problem. -func (l *Lexer) Error(s string) { - fmt.Printf("parse error at %d:%d: %v\n", l.lastItem.line+1, l.lastItem.column+1, s) - fmt.Printf("error at %q\n", l.lastItem.val) -} - -// errorf is used by the lexer to report errors. It inserts an ERROR token into -// the items channel, and sets the state to nil, which stops the lexer's state -// machine. -func (l *Lexer) errorf(format string, args ...interface{}) stateFn { - l.items <- item{ERROR, fmt.Sprintf(format, args), l.line, l.column} - return nil -} - -// next returns the rune at the current location, and advances to the next rune -// in the input. -func (l *Lexer) next() (r rune) { - if l.pos >= len(l.input) { - l.width = 0 - return eof - } - r, l.width = utf8.DecodeRuneInString(l.input[l.pos:]) - l.pos += l.width - l.column++ - if r == '\n' { - l.line++ - l.column = 0 - } - return r -} - -// ignore discards the current text from start to pos. -func (l *Lexer) ignore() { - l.start = l.pos -} - -// backup moves back one character, but can only be called once per next() call. -func (l *Lexer) backup() { - l.pos -= l.width - if l.column > 0 { - l.column-- - } else { - l.line-- - } - l.width = 0 -} - -// peek looks ahead at the next rune in the stream without consuming it. -func (l *Lexer) peek() rune { - r := l.next() - l.backup() - return r -} - -// accept will advance to the next rune if it's contained in the string of valid -// runes passed in by the caller. -func (l *Lexer) accept(valid string) bool { - if strings.IndexRune(valid, l.next()) >= 0 { - return true - } - l.backup() - return false -} - -// acceptRun advances over a number of valid runes, stopping as soon as it hits -// one not on the list. -func (l *Lexer) acceptRun(valid string) { - for strings.IndexRune(valid, l.next()) >= 0 { - } - l.backup() -} - -// keyword checks whether the current lexeme is a keyword or not. If so it -// returns the keyword's token id, otherwise it returns IDENTIFIER. -func (l *Lexer) keyword() int { - ident := l.input[l.start:l.pos] - tok, ok := keywords[ident] - if ok == true { - return int(tok) - } - return IDENTIFIER -} - -// oneRuneToken determines whether a rune is a token. If so it returns the token -// id and true, otherwise it returns false. -func (l *Lexer) oneRuneToken(r rune) (int, bool) { - if strings.IndexRune(oneRuneTokens, r) >= 0 { - return int(r), true - } - - return 0, false -} - -// State functions -type stateFn func(*Lexer) stateFn - -// lexText is the master lex routine. The lexer is started in this state. -func lexText(l *Lexer) stateFn { - for { - if strings.HasPrefix(l.input[l.pos:], "/*") { - return lexBlockComment - } - r := l.next() - if r == eof { - break - } - if unicode.IsSpace(r) { - l.ignore() - return lexText - } - if l.column == 1 && r == '%' { - l.backup() - return lexDirective - } - if unicode.IsLetter(r) { - l.backup() - return lexIdent - } - if unicode.IsNumber(r) || r == '-' { - l.backup() - return lexNumber - } - if t, isToken := l.oneRuneToken(r); isToken == true { - l.emit(t) - } - } - - return nil -} - -// lexBlockComment is used when we find a comment marker '/*' in the input. -func lexBlockComment(l *Lexer) stateFn { - for { - if strings.HasPrefix(l.input[l.pos:], "*/") { - // Found the end. Advance past the '*/' and discard the comment body. - l.next() - l.next() - l.ignore() - return lexText - } - if l.next() == eof { - return l.errorf("unterminated block comment") - } - } -} - -// lexIdent handles identifiers. -func lexIdent(l *Lexer) stateFn { - for { - r := l.next() - if unicode.IsLetter(r) || unicode.IsDigit(r) || r == '_' { - continue - } - l.backup() - break - } - // We may have a keyword, so check for that before emitting. - l.emit(l.keyword()) - - return lexText -} - -// lexNumber handles decimal and hexadecimal numbers. Decimal numbers may begin -// with a '-'; hex numbers begin with '0x' and do not accept leading '-'. -func lexNumber(l *Lexer) stateFn { - // Leading '-' is ok - digits := "0123456789" - neg := l.accept("-") - if !neg { - // allow '0x' for hex numbers, as long as there's not a leading '-'. - r := l.peek() - if r == '0' { - l.next() - if l.accept("x") { - digits = "0123456789ABCDEFabcdef" - } - } - } - // followed by any number of digits - l.acceptRun(digits) - r := l.peek() - if unicode.IsLetter(r) { - l.next() - return l.errorf("invalid number: %q", l.input[l.start:l.pos]) - } - l.emit(CONSTANT) - return lexText -} - -// lexDirective handles lines beginning with '%'. These are used to emit C code -// directly to the output file. For now we're ignoring them, but some of the -// constants in the protocol file do depend on values from #included header -// files, so that may need to change. -func lexDirective(l *Lexer) stateFn { - for { - r := l.next() - if r == '\n' { - l.ignore() - return lexText - } - if r == eof { - return l.errorf("unterminated directive") - } - } -} - //--------------------------------------------------------------------------- // Routines called by the parser's actions. //--------------------------------------------------------------------------- diff --git a/internal/lvgen/lvlexer.go b/internal/lvgen/lvlexer.go new file mode 100644 index 0000000..7504e43 --- /dev/null +++ b/internal/lvgen/lvlexer.go @@ -0,0 +1,305 @@ +// Copyright 2017 The go-libvirt Authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package lvgen + +import ( + "fmt" + "io" + "io/ioutil" + "strings" + "unicode" + "unicode/utf8" +) + +// eof is returned by the lexer when there's no more input. +const eof = -1 + +type item struct { + typ int + val string + line, column int +} + +// String will display lexer items for humans to debug. There are some +// calculations here due to the way goyacc arranges token values; see the +// generated file y.go for an idea what's going on here, but the basic idea is +// that the lower token type values are reserved for single-rune tokens, which +// the lexer reports using the value of the rune itself. Everything else is +// allocated a range of type value up above all the possible single-rune values. +func (i item) String() string { + tokType := i.typ + if tokType >= yyPrivate { + if tokType < yyPrivate+len(yyTok2) { + tokType = yyTok2[tokType-yyPrivate] + } + } + rv := fmt.Sprintf("%s %q %d:%d", yyTokname(tokType), i.val, i.line, i.column) + return rv +} + +// Lexer stores the state of this lexer. +type Lexer struct { + input string // the string we're scanning. + start int // start position of the item. + pos int // current position in the input. + line int // the current line (for error reporting). + column int // current position within the current line. + width int // width of the last rune scanned. + items chan item // channel of scanned lexer items (lexemes). + lastItem item // The last item the lexer handed the parser +} + +// NewLexer will return a new lexer for the passed-in reader. +func NewLexer(rdr io.Reader) (*Lexer, error) { + l := &Lexer{} + + b, err := ioutil.ReadAll(rdr) + if err != nil { + return nil, err + } + l.input = string(b) + l.items = make(chan item) + + return l, nil +} + +// Run starts the lexer, and should be called in a goroutine. +func (l *Lexer) Run() { + for state := lexText; state != nil; { + state = state(l) + } + close(l.items) +} + +// emit returns a token to the parser. +func (l *Lexer) emit(t int) { + l.items <- item{t, l.input[l.start:l.pos], l.line, l.column} + l.start = l.pos +} + +// Lex gets the next token. +func (l *Lexer) Lex(st *yySymType) int { + s := <-l.items + l.lastItem = s + st.val = s.val + // fmt.Println("Lex returning", s) + return int(s.typ) +} + +// Error is called by the parser when it finds a problem. +func (l *Lexer) Error(s string) { + fmt.Printf("parse error at %d:%d: %v\n", l.lastItem.line+1, l.lastItem.column+1, s) + fmt.Printf("error at %q\n", l.lastItem.val) +} + +// errorf is used by the lexer to report errors. It inserts an ERROR token into +// the items channel, and sets the state to nil, which stops the lexer's state +// machine. +func (l *Lexer) errorf(format string, args ...interface{}) stateFn { + l.items <- item{ERROR, fmt.Sprintf(format, args), l.line, l.column} + return nil +} + +// next returns the rune at the current location, and advances to the next rune +// in the input. +func (l *Lexer) next() (r rune) { + if l.pos >= len(l.input) { + l.width = 0 + return eof + } + r, l.width = utf8.DecodeRuneInString(l.input[l.pos:]) + l.pos += l.width + l.column++ + if r == '\n' { + l.line++ + l.column = 0 + } + return r +} + +// ignore discards the current text from start to pos. +func (l *Lexer) ignore() { + l.start = l.pos +} + +// backup moves back one character, but can only be called once per next() call. +func (l *Lexer) backup() { + l.pos -= l.width + if l.column > 0 { + l.column-- + } else { + l.line-- + } + l.width = 0 +} + +// peek looks ahead at the next rune in the stream without consuming it. +func (l *Lexer) peek() rune { + r := l.next() + l.backup() + return r +} + +// accept will advance to the next rune if it's contained in the string of valid +// runes passed in by the caller. +func (l *Lexer) accept(valid string) bool { + if strings.IndexRune(valid, l.next()) >= 0 { + return true + } + l.backup() + return false +} + +// acceptRun advances over a number of valid runes, stopping as soon as it hits +// one not on the list. +func (l *Lexer) acceptRun(valid string) { + for strings.IndexRune(valid, l.next()) >= 0 { + } + l.backup() +} + +// keyword checks whether the current lexeme is a keyword or not. If so it +// returns the keyword's token id, otherwise it returns IDENTIFIER. +func (l *Lexer) keyword() int { + ident := l.input[l.start:l.pos] + tok, ok := keywords[ident] + if ok == true { + return int(tok) + } + return IDENTIFIER +} + +// oneRuneToken determines whether a rune is a token. If so it returns the token +// id and true, otherwise it returns false. +func (l *Lexer) oneRuneToken(r rune) (int, bool) { + if strings.IndexRune(oneRuneTokens, r) >= 0 { + return int(r), true + } + + return 0, false +} + +// State functions +type stateFn func(*Lexer) stateFn + +// lexText is the master lex routine. The lexer is started in this state. +func lexText(l *Lexer) stateFn { + for { + if strings.HasPrefix(l.input[l.pos:], "/*") { + return lexBlockComment + } + r := l.next() + if r == eof { + break + } + if unicode.IsSpace(r) { + l.ignore() + return lexText + } + if l.column == 1 && r == '%' { + l.backup() + return lexDirective + } + if unicode.IsLetter(r) { + l.backup() + return lexIdent + } + if unicode.IsNumber(r) || r == '-' { + l.backup() + return lexNumber + } + if t, isToken := l.oneRuneToken(r); isToken == true { + l.emit(t) + } + } + + return nil +} + +// lexBlockComment is used when we find a comment marker '/*' in the input. +func lexBlockComment(l *Lexer) stateFn { + for { + if strings.HasPrefix(l.input[l.pos:], "*/") { + // Found the end. Advance past the '*/' and discard the comment body. + l.next() + l.next() + l.ignore() + return lexText + } + if l.next() == eof { + return l.errorf("unterminated block comment") + } + } +} + +// lexIdent handles identifiers. +func lexIdent(l *Lexer) stateFn { + for { + r := l.next() + if unicode.IsLetter(r) || unicode.IsDigit(r) || r == '_' { + continue + } + l.backup() + break + } + // We may have a keyword, so check for that before emitting. + l.emit(l.keyword()) + + return lexText +} + +// lexNumber handles decimal and hexadecimal numbers. Decimal numbers may begin +// with a '-'; hex numbers begin with '0x' and do not accept leading '-'. +func lexNumber(l *Lexer) stateFn { + // Leading '-' is ok + digits := "0123456789" + neg := l.accept("-") + if !neg { + // allow '0x' for hex numbers, as long as there's not a leading '-'. + r := l.peek() + if r == '0' { + l.next() + if l.accept("x") { + digits = "0123456789ABCDEFabcdef" + } + } + } + // followed by any number of digits + l.acceptRun(digits) + r := l.peek() + if unicode.IsLetter(r) { + l.next() + return l.errorf("invalid number: %q", l.input[l.start:l.pos]) + } + l.emit(CONSTANT) + return lexText +} + +// lexDirective handles lines beginning with '%'. These are used to emit C code +// directly to the output file. For now we're ignoring them, but some of the +// constants in the protocol file do depend on values from #included header +// files, so that may need to change. +func lexDirective(l *Lexer) stateFn { + for { + r := l.next() + if r == '\n' { + l.ignore() + return lexText + } + if r == eof { + return l.errorf("unterminated directive") + } + } +} From f88cbd7a8ef177fffba62e3c657382b05bb3ecfe Mon Sep 17 00:00:00 2001 From: Geoff Hickey Date: Fri, 3 Nov 2017 13:58:41 -0400 Subject: [PATCH 03/20] Move the constants.go template to its own file. --- internal/constants/constants.gen.go | 1 + internal/lvgen/constants.tmpl | 28 ++++++++++++++++++++++++ internal/lvgen/generate.go | 34 ++++------------------------- 3 files changed, 33 insertions(+), 30 deletions(-) create mode 100644 internal/lvgen/constants.tmpl diff --git a/internal/constants/constants.gen.go b/internal/constants/constants.gen.go index 5e5a631..1c28ce2 100644 --- a/internal/constants/constants.gen.go +++ b/internal/constants/constants.gen.go @@ -3,6 +3,7 @@ * * To regenerate, run 'go generate' in internal/lvgen. */ + package constants // libvirt procedure identifiers and other enums diff --git a/internal/lvgen/constants.tmpl b/internal/lvgen/constants.tmpl new file mode 100644 index 0000000..06a7240 --- /dev/null +++ b/internal/lvgen/constants.tmpl @@ -0,0 +1,28 @@ +/* + * This file generated by internal/lvgen/generate.go. DO NOT EDIT BY HAND! + * + * To regenerate, run 'go generate' in internal/lvgen. + */ + +package constants + +// libvirt procedure identifiers and other enums +// +// These are libvirt procedure numbers which correspond to each respective +// API call between remote_internal driver and libvirtd. Each procedure is +// identified by a unique number which *may change in any future libvirt +// update*. +// +// Examples: +// REMOTE_PROC_CONNECT_OPEN = 1 +// REMOTE_PROC_DOMAIN_DEFINE_XML = 11 +// REMOTE_PROC_DOMAIN_MIGRATE_SET_MAX_SPEED = 207, +const ( + // From enums: + {{range .Enums}}{{.Name}} = {{.Val}} + {{end}} + + // From consts: + {{range .Consts}}{{.Name}} = {{.Val}} + {{end}} +) diff --git a/internal/lvgen/generate.go b/internal/lvgen/generate.go index 7f6ff4a..193d5ec 100644 --- a/internal/lvgen/generate.go +++ b/internal/lvgen/generate.go @@ -112,35 +112,6 @@ func Generate(proto io.Reader) error { } func genGo(wr io.Writer) error { - // TODO: Move this someplace nice. - const consttempl = `/* - * This file generated by internal/lvgen/generate.go. DO NOT EDIT BY HAND! - * - * To regenerate, run 'go generate' in internal/lvgen. - */ -package constants - -// libvirt procedure identifiers and other enums -// -// These are libvirt procedure numbers which correspond to each respective -// API call between remote_internal driver and libvirtd. Each procedure is -// identified by a unique number which *may change in any future libvirt -// update*. -// -// Examples: -// REMOTE_PROC_CONNECT_OPEN = 1 -// REMOTE_PROC_DOMAIN_DEFINE_XML = 11 -// REMOTE_PROC_DOMAIN_MIGRATE_SET_MAX_SPEED = 207, -const ( - // From enums: - {{range .Enums}}{{.Name}} = {{.Val}} - {{end}} - - // From consts: - {{range .Consts}}{{.Name}} = {{.Val}} - {{end}} -) -` // 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. @@ -151,7 +122,10 @@ const ( Gen.Consts[ix].Name = constNameTransform(en.Name) } - t := template.Must(template.New("consts").Parse(consttempl)) + t, err := template.ParseFiles("constants.tmpl") + if err != nil { + return err + } if err := t.Execute(wr, Gen); err != nil { return err } From fb16117ff92027855428a1c7b62e7ca6fc1ba7a8 Mon Sep 17 00:00:00 2001 From: Geoff Hickey Date: Tue, 7 Nov 2017 16:05:12 -0500 Subject: [PATCH 04/20] 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 +} From deb7a54ff8b8a5bdeb4faa8f555e9a7394eb5948 Mon Sep 17 00:00:00 2001 From: Geoff Hickey Date: Mon, 13 Nov 2017 15:18:18 -0500 Subject: [PATCH 05/20] 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. --- AUTHORS | 1 + internal/lvgen/generate.go | 243 +- internal/lvgen/lvlexer.go | 5 + internal/lvgen/procedures.tmpl | 68 +- internal/lvgen/sunrpc.y | 10 +- libvirt.gen.go | 18119 ++++++++++++++++++++++++++----- libvirt.go | 352 +- libvirt_test.go | 32 +- rpc_test.go | 4 +- 9 files changed, 16134 insertions(+), 2700 deletions(-) diff --git a/AUTHORS b/AUTHORS index 1abc5a7..1db99ce 100644 --- a/AUTHORS +++ b/AUTHORS @@ -16,3 +16,4 @@ Michael Koppmann Simarpreet Singh Alexander Polyakov Amanda Andrade +Geoff Hickey diff --git a/internal/lvgen/generate.go b/internal/lvgen/generate.go index 1bcf99d..eef98d1 100644 --- a/internal/lvgen/generate.go +++ b/internal/lvgen/generate.go @@ -71,10 +71,14 @@ type Generator struct { 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. + // StructMap is a map of the structs we find for quick searching. + StructMap map[string]int + // Typedefs holds all the type definitions from 'typedef ...' lines. Typedefs []Typedef - // Unions hold all the discriminated unions + // Unions holds all the discriminated unions. Unions []Union + // Procs holds all the discovered libvirt procedures. + Procs []Proc } // Gen accumulates items as the parser runs, and is then used to produce the @@ -85,15 +89,48 @@ var Gen Generator // explicitly given a value. var CurrentEnumVal int64 -// oneRuneTokens lists the runes the lexer will consider to be tokens when it -// finds them. These are returned to the parser using the integer value of their -// runes. -var oneRuneTokens = `{}[]<>(),=;:*` +// goEquivTypes maps the basic types defined in the rpc spec to their golang +// equivalents. +var goEquivTypes = map[string]string{ + // Some of the identifiers in the rpc specification are reserved words or + // pre-existing types in go. This renames them to something safe. + "type": "lvtype", + "error": "lverror", + "nil": "lvnil", -var reservedIdentifiers = map[string]string{ - "type": "lvtype", - "string": "lvstring", - "error": "lverror", + // The libvirt spec uses this NonnullString type, which is a string with a + // specified maximum length. This makes the go code more confusing, and + // we're not enforcing the limit anyway, so collapse it here. This also + // requires us to ditch the typedef that would otherwise be generated. + "NonnullString": "string", + + "String": "string", + "Int": "int", + "Uint": "uint", + "Int8": "int8", + "Uint8": "uint8", + "Int16": "int16", + "Uint16": "uint16", + "Int32": "int32", + "Uint32": "uint32", + "Int64": "int64", + "Uint64": "uint64", + "Float32": "float32", + "Float64": "float64", + "Bool": "bool", + "Byte": "byte", +} + +// These defines are from libvirt-common.h. They should be fetched from there, +// but for now they're hardcoded here. +var lvTypedParams = map[string]uint32{ + "VIR_TYPED_PARAM_INT": 1, + "VIR_TYPED_PARAM_UINT": 2, + "VIR_TYPED_PARAM_LLONG": 3, + "VIR_TYPED_PARAM_ULLONG": 4, + "VIR_TYPED_PARAM_DOUBLE": 5, + "VIR_TYPED_PARAM_BOOLEAN": 6, + "VIR_TYPED_PARAM_STRING": 7, } // Decl records a declaration, like 'int x' or 'remote_nonnull_string str' @@ -123,14 +160,50 @@ type Union struct { // Case holds a single case of a discriminated union. type Case struct { + CaseName string DiscriminantVal string - Type Decl + Decl } +// Proc holds information about a libvirt procedure the parser has found. +type Proc struct { + Num int64 + Name string + Args []Decl + Ret []Decl + ArgsStruct string + RetStruct string +} + +type structStack []*Structure + // 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 +var CurrentStruct structStack + +// Since it's possible to have an embedded struct definition, this implements +// a stack to keep track of the current structure. +func (s *structStack) empty() bool { + return len(*s) == 0 +} +func (s *structStack) push(st *Structure) { + *s = append(*s, st) +} +func (s *structStack) pop() *Structure { + if s.empty() { + return nil + } + st := (*s)[len(*s)-1] + *s = (*s)[:len(*s)-1] + return st +} +func (s *structStack) peek() *Structure { + if s.empty() { + return nil + } + return (*s)[len(*s)-1] +} // 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{...}, @@ -148,6 +221,7 @@ var CurrentCase *Case // the path to the root of the libvirt source directory to use for the // generation. func Generate(proto io.Reader) error { + Gen.StructMap = make(map[string]int) lexer, err := NewLexer(proto) if err != nil { return err @@ -162,6 +236,10 @@ func Generate(proto io.Reader) error { return fmt.Errorf("failed to parse libvirt protocol: %v", rv) } + // When parsing is done, we can link the procedures we've found to their + // argument types. + procLink() + // Generate and write the output. constFile, err := os.Create("../constants/constants.gen.go") if err != nil { @@ -216,26 +294,44 @@ func genGo(constFile, procFile 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_"), true) + decamelize := strings.ContainsRune(name, '_') + nn := strings.TrimPrefix(name, "REMOTE_") + if decamelize { + nn = fromSnakeToCamel(nn, true) + } nn = fixAbbrevs(nn) return nn } func identifierTransform(name string) string { + decamelize := strings.ContainsRune(name, '_') nn := strings.TrimPrefix(name, "remote_") - nn = fromSnakeToCamel(nn, false) + if decamelize { + nn = fromSnakeToCamel(nn, true) + } else { + nn = publicize(nn) + } nn = fixAbbrevs(nn) nn = checkIdentifier(nn) return nn } func typeTransform(name string) string { - nn := strings.TrimLeft(name, "*") + nn := strings.TrimLeft(name, "*[]") diff := len(name) - len(nn) nn = identifierTransform(nn) return name[0:diff] + nn } +func publicize(name string) string { + if len(name) <= 0 { + return name + } + r, n := utf8.DecodeRuneInString(name) + name = string(unicode.ToUpper(r)) + name[n:] + return name +} + // 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. @@ -292,6 +388,30 @@ func fixAbbrevs(s string) string { return s } +// procLink associates a libvirt procedure with the types that are its arguments +// and return values, filling out those fields in the procedure struct. These +// types are extracted by iterating through the argument and return structures +// defined in the protocol file. If one or both of these structs is not defined +// then either the args or return values are empty. +func procLink() { + for ix, proc := range Gen.Procs { + argsName := proc.Name + "Args" + retName := proc.Name + "Ret" + argsIx, hasArgs := Gen.StructMap[argsName] + retIx, hasRet := Gen.StructMap[retName] + if hasArgs { + argsStruct := Gen.Structs[argsIx] + Gen.Procs[ix].ArgsStruct = argsStruct.Name + Gen.Procs[ix].Args = argsStruct.Members + } + if hasRet { + retStruct := Gen.Structs[retIx] + Gen.Procs[ix].RetStruct = retStruct.Name + Gen.Procs[ix].Ret = retStruct.Members + } + } +} + //--------------------------------------------------------------------------- // Routines called by the parser's actions. //--------------------------------------------------------------------------- @@ -327,6 +447,7 @@ func addEnumVal(name string, val int64) error { name = constNameTransform(name) Gen.EnumVals = append(Gen.EnumVals, ConstItem{name, fmt.Sprintf("%d", val)}) CurrentEnumVal = val + addProc(name, val) return nil } @@ -341,6 +462,17 @@ func AddConst(name, val string) error { return nil } +// addProc checks an enum value to see if it's a procedure number. If so, we +// add the procedure to our list for later generation. +func addProc(name string, val int64) { + if !strings.HasPrefix(name, "Proc") { + return + } + name = name[4:] + proc := &Proc{Num: val, Name: name} + Gen.Procs = append(Gen.Procs, *proc) +} + // parseNumber makes sure that a parsed numerical value can be parsed to a 64- // bit integer. func parseNumber(val string) (int64, error) { @@ -357,25 +489,22 @@ func parseNumber(val string) (int64, error) { // before the member declarations are processed. func StartStruct(name string) { name = identifierTransform(name) - CurrentStruct = &Structure{Name: name} + CurrentStruct.push(&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 + st := *CurrentStruct.pop() + Gen.Structs = append(Gen.Structs, st) + Gen.StructMap[st.Name] = len(Gen.Structs) - 1 } +// StartTypedef is called when the parser finds a typedef. 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) @@ -384,16 +513,34 @@ func StartUnion(name string) { // 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. +// pointer. We handle unions by declaring an interface for the union type, and +// adding methods to each of the cases so that they satisfy the interface. func AddUnion() { Gen.Unions = append(Gen.Unions, *CurrentUnion) CurrentUnion = nil } +// StartCase is called when the parser finds a case statement within a union. func StartCase(dvalue string) { - CurrentCase = &Case{DiscriminantVal: dvalue} + // In libvirt, the discriminant values are all C pre- processor definitions. + // Since we don't run the C pre-processor on the protocol file, they're + // still just names when we get them - we don't actually have their integer + // values. We'll use the strings to build the type names, although this is + // brittle, because we're defining a type for each of the case values, and + // that type needs a name. + caseName := dvalue + if ix := strings.LastIndexByte(caseName, '_'); ix != -1 { + caseName = caseName[ix+1:] + } + caseName = fromSnakeToCamel(caseName, true) + dv, ok := lvTypedParams[dvalue] + if ok { + dvalue = strconv.FormatUint(uint64(dv), 10) + } + CurrentCase = &Case{CaseName: caseName, DiscriminantVal: dvalue} } +// AddCase is called when the parser finishes parsing a case. func AddCase() { CurrentUnion.Cases = append(CurrentUnion.Cases, *CurrentCase) CurrentCase = nil @@ -403,27 +550,59 @@ func AddCase() { // 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? + // fmt.Println("adding", identifier, itype) // 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) + decl := Decl{Name: identifier, Type: itype} + if !CurrentStruct.empty() { + st := CurrentStruct.peek() + st.Members = append(st.Members, decl) } else if CurrentTypedef != nil { CurrentTypedef.Name = identifier CurrentTypedef.Type = itype - Gen.Typedefs = append(Gen.Typedefs, *CurrentTypedef) + if identifier != "string" { + // Omit recursive typedefs. These happen because we're massaging + // some of the type names. + Gen.Typedefs = append(Gen.Typedefs, *CurrentTypedef) + } CurrentTypedef = nil } else if CurrentCase != nil { - CurrentCase.Type = *decl + CurrentCase.Name = identifier + CurrentCase.Type = itype } else if CurrentUnion != nil { CurrentUnion.DiscriminantType = itype } } +// AddFixedArray is called by the parser to add a fixed-length array to the +// current container (struct, union, etc). Fixed-length arrays are not length- +// prefixed. +func AddFixedArray(identifier, itype, len string) { + atype := fmt.Sprintf("[%v]%v", len, itype) + AddDeclaration(identifier, atype) +} + +// AddVariableArray is called by the parser to add a variable-length array. +// Variable-length arrays are prefixed with a 32-bit unsigned length, and may +// also have a maximum length specified. +func AddVariableArray(identifier, itype, len string) { + // FIXME: This ignores the length restriction, so as of now we can't check + // to make sure that we're not exceeding that restriction when we fill in + // message buffers. That may not matter, if libvirt's checking is careful + // enough. This could be handled with a map, however. + atype := fmt.Sprintf("[]%v", itype) + // Handle strings specially. In the rpcgen definition a string is specified + // as a variable-length array, either with or without a max length. We want + // these to be go strings, so we'll just remove the array specifier. + if itype == "string" { + atype = itype + } + AddDeclaration(identifier, atype) +} + func checkIdentifier(i string) string { - nn, reserved := reservedIdentifiers[i] + nn, reserved := goEquivTypes[i] if reserved { return nn } diff --git a/internal/lvgen/lvlexer.go b/internal/lvgen/lvlexer.go index 7504e43..28aa718 100644 --- a/internal/lvgen/lvlexer.go +++ b/internal/lvgen/lvlexer.go @@ -26,6 +26,11 @@ import ( // eof is returned by the lexer when there's no more input. const eof = -1 +// oneRuneTokens lists the runes the lexer will consider to be tokens when it +// finds them. These are returned to the parser using the integer value of their +// runes. +var oneRuneTokens = `{}[]<>(),=;:*` + type item struct { typ int val string diff --git a/internal/lvgen/procedures.tmpl b/internal/lvgen/procedures.tmpl index 63304cf..ec7058a 100644 --- a/internal/lvgen/procedures.tmpl +++ b/internal/lvgen/procedures.tmpl @@ -6,20 +6,82 @@ package libvirt +import ( + "bytes" + + "github.com/davecgh/go-xdr/xdr2" + "github.com/digitalocean/go-libvirt/internal/constants" +) + +const ( + VirUUIDBuflen = 16 +) + // Typedefs: {{range .Typedefs}}type {{.Name}} {{.Type}} {{end}} // Enums: -{{range .Enums}} type {{.Name}} {{.Type}} +{{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}} +{{range .Unions}}type {{.Name}} interface { + Get() interface{} {{end -}} } + +{{range .Unions}}{{$uname := .Name}}{{range .Cases}}{{$casetype := printf "%v%v" $uname .CaseName}} +type {{$casetype}} struct { + DVal uint32 + {{.Name}} {{.Type}} +} +func New{{$casetype}}(v {{.Type}}) *{{$casetype}} { return &{{$casetype}}{DVal: {{.DiscriminantVal}}, {{.Name}}: v} } +func (c *{{$casetype}}) Get() interface{} { return c.{{.Name}} } +{{end}} +{{- end}} + +// Procedures: +{{range .Procs}} +func (l *Libvirt) {{.Name}}({{range $ix, $arg := .Args}}{{if $ix}}, {{end}}{{.Name}} {{.Type}}{{end}}) ({{range .Ret}}r{{.Name}} {{.Type}}, {{end}}err error) { + var buf bytes.Buffer +{{if .ArgsStruct}} + args := {{.ArgsStruct}} { +{{range .Args}} {{.Name}}: {{.Name}}, +{{end}} } + + buf, err = encode(&args) + if err != nil { + return + } +{{end}} + var resp <-chan response + resp, err = l.request({{.Num}}, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } +{{if .RetStruct}} + result := {{.RetStruct}}{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + +{{range .Ret}} r{{.Name}} = result.{{.Name}} +{{end}}{{end}} + return +} +{{end}} diff --git a/internal/lvgen/sunrpc.y b/internal/lvgen/sunrpc.y index eb1b8d6..a72586c 100644 --- a/internal/lvgen/sunrpc.y +++ b/internal/lvgen/sunrpc.y @@ -119,7 +119,7 @@ type_specifier | DOUBLE {$$.val = "float64"} | BOOL {$$.val = "bool"} | STRING {$$.val = "string"} - | OPAQUE {$$.val = "[]byte"} + | OPAQUE {$$.val = "byte"} | enum_definition | struct_definition | union_definition @@ -138,12 +138,12 @@ variable_ident ; fixed_array_declaration - : type_specifier variable_ident '[' value ']' { AddDeclaration($2.val, $1.val) } // FIXME: Handle the max size (value)? + : type_specifier variable_ident '[' value ']' { AddFixedArray($2.val, $1.val, $4.val) } ; variable_array_declaration - : 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) } + : type_specifier variable_ident '<' value '>' { AddVariableArray($2.val, $1.val, $4.val) } + | type_specifier variable_ident '<' '>' { AddVariableArray($2.val, $1.val, "") } ; pointer_declaration @@ -151,7 +151,7 @@ pointer_declaration ; struct_definition - : STRUCT struct_ident '{' {StartStruct($2.val)} declaration_list '}' {AddStruct()} + : STRUCT struct_ident '{' {StartStruct($2.val)} declaration_list '}' { AddStruct() } ; struct_ident diff --git a/libvirt.gen.go b/libvirt.gen.go index 44026d9..b6318a4 100644 --- a/libvirt.gen.go +++ b/libvirt.gen.go @@ -6,2487 +6,15654 @@ package libvirt +import ( + "bytes" + + "github.com/davecgh/go-xdr/xdr2" + "github.com/digitalocean/go-libvirt/internal/constants" +) + +const ( + VirUUIDBuflen = 16 +) + // 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 +type UUID [VirUUIDBuflen]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 +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 +type NonnullDomain struct { + Name string + UUID UUID + ID int32 } -// Unions: -type typedParamValue struct { - discriminant int32 +type NonnullNetwork struct { + Name string + UUID UUID } + +type NonnullNwfilter struct { + Name string + UUID UUID +} + +type NonnullInterface struct { + Name string + Mac string +} + +type NonnullStoragePool struct { + Name string + UUID UUID +} + +type NonnullStorageVol struct { + Pool string + Name string + Key string +} + +type NonnullNodeDevice struct { + Name string +} + +type NonnullSecret struct { + UUID UUID + UsageType int32 + UsageID string +} + +type NonnullDomainSnapshot struct { + Name string + Dom NonnullDomain +} + +type Error struct { + Code int32 + Domain int32 + Message string + Level int32 + Dom Domain + Str1 string + Str2 string + Str3 string + Int1 int32 + Int2 int32 + Net Network +} + +type VcpuInfo struct { + Number uint32 + State int32 + CPUTime uint64 + CPU int32 +} + +type TypedParam struct { + Field string + Value TypedParamValue +} + +type NodeGetCPUStats struct { + Field string + Value uint64 +} + +type NodeGetMemoryStats struct { + Field string + Value uint64 +} + +type DomainDiskError struct { + Disk string + Error int32 +} + +type ConnectOpenArgs struct { + Name string + Flags uint32 +} + +type ConnectSupportsFeatureArgs struct { + Feature int32 +} + +type ConnectSupportsFeatureRet struct { + Supported int32 +} + +type ConnectGetTypeRet struct { + Type string +} + +type ConnectGetVersionRet struct { + HvVer uint64 +} + +type ConnectGetLibVersionRet struct { + LibVer uint64 +} + +type ConnectGetHostnameRet struct { + Hostname string +} + +type ConnectGetSysinfoArgs struct { + Flags uint32 +} + +type ConnectGetSysinfoRet struct { + Sysinfo string +} + +type ConnectGetUriRet struct { + Uri string +} + +type ConnectGetMaxVcpusArgs struct { + Type string +} + +type ConnectGetMaxVcpusRet struct { + MaxVcpus int32 +} + +type NodeGetInfoRet struct { + Model [32]int8 + Memory uint64 + Cpus int32 + Mhz int32 + Nodes int32 + Sockets int32 + Cores int32 + Threads int32 +} + +type ConnectGetCapabilitiesRet struct { + Capabilities string +} + +type ConnectGetDomainCapabilitiesArgs struct { + Emulatorbin string + Arch string + Machine string + Virttype string + Flags uint32 +} + +type ConnectGetDomainCapabilitiesRet struct { + Capabilities string +} + +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 { + Type string + 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 string + 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 string +} + +type DomainBlockStatsRet struct { + RdReq int64 + RdBytes int64 + WrReq int64 + WrBytes int64 + Errs int64 +} + +type DomainBlockStatsFlagsArgs struct { + Dom NonnullDomain + Path string + Nparams int32 + Flags uint32 +} + +type DomainBlockStatsFlagsRet struct { + Params []TypedParam + Nparams int32 +} + +type DomainInterfaceStatsArgs struct { + Dom NonnullDomain + Device string +} + +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 string + Params []TypedParam + Flags uint32 +} + +type DomainGetInterfaceParametersArgs struct { + Dom NonnullDomain + Device string + 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 string + 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 string + 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 string + Flags uint32 +} + +type DomainCreateXMLRet struct { + Dom NonnullDomain +} + +type DomainCreateXMLWithFilesArgs struct { + XMLDesc string + 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 string +} + +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 { + Type string +} + +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 string +} + +type DomainSaveFlagsArgs struct { + Dom NonnullDomain + To string + Dxml string + Flags uint32 +} + +type DomainRestoreArgs struct { + From string +} + +type DomainRestoreFlagsArgs struct { + From string + Dxml string + Flags uint32 +} + +type DomainSaveImageGetXMLDescArgs struct { + File string + Flags uint32 +} + +type DomainSaveImageGetXMLDescRet struct { + XML string +} + +type DomainSaveImageDefineXMLArgs struct { + File string + Dxml string + Flags uint32 +} + +type DomainCoreDumpArgs struct { + Dom NonnullDomain + To string + Flags uint32 +} + +type DomainCoreDumpWithFormatArgs struct { + Dom NonnullDomain + To string + Dumpformat uint32 + Flags uint32 +} + +type DomainScreenshotArgs struct { + Dom NonnullDomain + Screen uint32 + Flags uint32 +} + +type DomainScreenshotRet struct { + Mime string +} + +type DomainGetXMLDescArgs struct { + Dom NonnullDomain + Flags uint32 +} + +type DomainGetXMLDescRet struct { + XML string +} + +type DomainMigratePrepareArgs struct { + UriIn string + Flags uint64 + Dname string + Resource uint64 +} + +type DomainMigratePrepareRet struct { + Cookie []byte + UriOut string +} + +type DomainMigratePerformArgs struct { + Dom NonnullDomain + Cookie []byte + Uri string + Flags uint64 + Dname string + Resource uint64 +} + +type DomainMigrateFinishArgs struct { + Dname string + Cookie []byte + Uri string + Flags uint64 +} + +type DomainMigrateFinishRet struct { + Ddom NonnullDomain +} + +type DomainMigratePrepare2Args struct { + UriIn string + Flags uint64 + Dname string + Resource uint64 + DomXML string +} + +type DomainMigratePrepare2Ret struct { + Cookie []byte + UriOut string +} + +type DomainMigrateFinish2Args struct { + Dname string + Cookie []byte + Uri string + Flags uint64 + Retcode int32 +} + +type DomainMigrateFinish2Ret struct { + Ddom NonnullDomain +} + +type ConnectListDefinedDomainsArgs struct { + Maxnames int32 +} + +type ConnectListDefinedDomainsRet struct { + Names []string +} + +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 string +} + +type DomainDefineXMLRet struct { + Dom NonnullDomain +} + +type DomainDefineXMLFlagsArgs struct { + XML string + 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 string +} + +type DomainAttachDeviceFlagsArgs struct { + Dom NonnullDomain + XML string + Flags uint32 +} + +type DomainDetachDeviceArgs struct { + Dom NonnullDomain + XML string +} + +type DomainDetachDeviceFlagsArgs struct { + Dom NonnullDomain + XML string + Flags uint32 +} + +type DomainUpdateDeviceFlagsArgs struct { + Dom NonnullDomain + XML string + Flags uint32 +} + +type DomainGetAutostartArgs struct { + Dom NonnullDomain +} + +type DomainGetAutostartRet struct { + Autostart int32 +} + +type DomainSetAutostartArgs struct { + Dom NonnullDomain + Autostart int32 +} + +type DomainSetMetadataArgs struct { + Dom NonnullDomain + Type int32 + Metadata string + Key string + Uri string + Flags uint32 +} + +type DomainGetMetadataArgs struct { + Dom NonnullDomain + Type int32 + Uri string + Flags uint32 +} + +type DomainGetMetadataRet struct { + Metadata string +} + +type DomainBlockJobAbortArgs struct { + Dom NonnullDomain + Path string + Flags uint32 +} + +type DomainGetBlockJobInfoArgs struct { + Dom NonnullDomain + Path string + Flags uint32 +} + +type DomainGetBlockJobInfoRet struct { + Found int32 + Type int32 + Bandwidth uint64 + Cur uint64 + End uint64 +} + +type DomainBlockJobSetSpeedArgs struct { + Dom NonnullDomain + Path string + Bandwidth uint64 + Flags uint32 +} + +type DomainBlockPullArgs struct { + Dom NonnullDomain + Path string + Bandwidth uint64 + Flags uint32 +} + +type DomainBlockRebaseArgs struct { + Dom NonnullDomain + Path string + Base string + Bandwidth uint64 + Flags uint32 +} + +type DomainBlockCopyArgs struct { + Dom NonnullDomain + Path string + Destxml string + Params []TypedParam + Flags uint32 +} + +type DomainBlockCommitArgs struct { + Dom NonnullDomain + Disk string + Base string + Top string + Bandwidth uint64 + Flags uint32 +} + +type DomainSetBlockIOTuneArgs struct { + Dom NonnullDomain + Disk string + Params []TypedParam + Flags uint32 +} + +type DomainGetBlockIOTuneArgs struct { + Dom NonnullDomain + Disk string + 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 string +} + +type ConnectNumOfNetworksRet struct { + Num int32 +} + +type ConnectListNetworksArgs struct { + Maxnames int32 +} + +type ConnectListNetworksRet struct { + Names []string +} + +type ConnectNumOfDefinedNetworksRet struct { + Num int32 +} + +type ConnectListDefinedNetworksArgs struct { + Maxnames int32 +} + +type ConnectListDefinedNetworksRet struct { + Names []string +} + +type NetworkLookupByUUIDArgs struct { + UUID UUID +} + +type NetworkLookupByUUIDRet struct { + Net NonnullNetwork +} + +type NetworkLookupByNameArgs struct { + Name string +} + +type NetworkLookupByNameRet struct { + Net NonnullNetwork +} + +type NetworkCreateXMLArgs struct { + XML string +} + +type NetworkCreateXMLRet struct { + Net NonnullNetwork +} + +type NetworkDefineXMLArgs struct { + XML string +} + +type NetworkDefineXMLRet struct { + Net NonnullNetwork +} + +type NetworkUndefineArgs struct { + Net NonnullNetwork +} + +type NetworkUpdateArgs struct { + Net NonnullNetwork + Command uint32 + Section uint32 + ParentIndex int32 + XML string + Flags uint32 +} + +type NetworkCreateArgs struct { + Net NonnullNetwork +} + +type NetworkDestroyArgs struct { + Net NonnullNetwork +} + +type NetworkGetXMLDescArgs struct { + Net NonnullNetwork + Flags uint32 +} + +type NetworkGetXMLDescRet struct { + XML string +} + +type NetworkGetBridgeNameArgs struct { + Net NonnullNetwork +} + +type NetworkGetBridgeNameRet struct { + Name string +} + +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 []string +} + +type NwfilterLookupByUUIDArgs struct { + UUID UUID +} + +type NwfilterLookupByUUIDRet struct { + Nwfilter NonnullNwfilter +} + +type NwfilterLookupByNameArgs struct { + Name string +} + +type NwfilterLookupByNameRet struct { + Nwfilter NonnullNwfilter +} + +type NwfilterDefineXMLArgs struct { + XML string +} + +type NwfilterDefineXMLRet struct { + Nwfilter NonnullNwfilter +} + +type NwfilterUndefineArgs struct { + Nwfilter NonnullNwfilter +} + +type NwfilterGetXMLDescArgs struct { + Nwfilter NonnullNwfilter + Flags uint32 +} + +type NwfilterGetXMLDescRet struct { + XML string +} + +type ConnectNumOfInterfacesRet struct { + Num int32 +} + +type ConnectListInterfacesArgs struct { + Maxnames int32 +} + +type ConnectListInterfacesRet struct { + Names []string +} + +type ConnectNumOfDefinedInterfacesRet struct { + Num int32 +} + +type ConnectListDefinedInterfacesArgs struct { + Maxnames int32 +} + +type ConnectListDefinedInterfacesRet struct { + Names []string +} + +type InterfaceLookupByNameArgs struct { + Name string +} + +type InterfaceLookupByNameRet struct { + Iface NonnullInterface +} + +type InterfaceLookupByMacStringArgs struct { + Mac string +} + +type InterfaceLookupByMacStringRet struct { + Iface NonnullInterface +} + +type InterfaceGetXMLDescArgs struct { + Iface NonnullInterface + Flags uint32 +} + +type InterfaceGetXMLDescRet struct { + XML string +} + +type InterfaceDefineXMLArgs struct { + XML string + 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 string +} + +type AuthSaslStartArgs struct { + Mech string + 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 []string +} + +type ConnectNumOfDefinedStoragePoolsRet struct { + Num int32 +} + +type ConnectListDefinedStoragePoolsArgs struct { + Maxnames int32 +} + +type ConnectListDefinedStoragePoolsRet struct { + Names []string +} + +type ConnectFindStoragePoolSourcesArgs struct { + Type string + SrcSpec string + Flags uint32 +} + +type ConnectFindStoragePoolSourcesRet struct { + XML string +} + +type StoragePoolLookupByUUIDArgs struct { + UUID UUID +} + +type StoragePoolLookupByUUIDRet struct { + Pool NonnullStoragePool +} + +type StoragePoolLookupByNameArgs struct { + Name string +} + +type StoragePoolLookupByNameRet struct { + Pool NonnullStoragePool +} + +type StoragePoolLookupByVolumeArgs struct { + Vol NonnullStorageVol +} + +type StoragePoolLookupByVolumeRet struct { + Pool NonnullStoragePool +} + +type StoragePoolCreateXMLArgs struct { + XML string + Flags uint32 +} + +type StoragePoolCreateXMLRet struct { + Pool NonnullStoragePool +} + +type StoragePoolDefineXMLArgs struct { + XML string + 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 string +} + +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 []string +} + +type StorageVolLookupByNameArgs struct { + Pool NonnullStoragePool + Name string +} + +type StorageVolLookupByNameRet struct { + Vol NonnullStorageVol +} + +type StorageVolLookupByKeyArgs struct { + Key string +} + +type StorageVolLookupByKeyRet struct { + Vol NonnullStorageVol +} + +type StorageVolLookupByPathArgs struct { + Path string +} + +type StorageVolLookupByPathRet struct { + Vol NonnullStorageVol +} + +type StorageVolCreateXMLArgs struct { + Pool NonnullStoragePool + XML string + Flags uint32 +} + +type StorageVolCreateXMLRet struct { + Vol NonnullStorageVol +} + +type StorageVolCreateXMLFromArgs struct { + Pool NonnullStoragePool + XML string + 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 string +} + +type StorageVolGetInfoArgs struct { + Vol NonnullStorageVol +} + +type StorageVolGetInfoRet struct { + Type int8 + Capacity uint64 + Allocation uint64 +} + +type StorageVolGetInfoFlagsArgs struct { + Vol NonnullStorageVol + Flags uint32 +} + +type StorageVolGetInfoFlagsRet struct { + Type int8 + Capacity uint64 + Allocation uint64 +} + +type StorageVolGetPathArgs struct { + Vol NonnullStorageVol +} + +type StorageVolGetPathRet struct { + Name string +} + +type StorageVolResizeArgs struct { + Vol NonnullStorageVol + Capacity uint64 + Flags uint32 +} + +type NodeNumOfDevicesArgs struct { + Cap string + Flags uint32 +} + +type NodeNumOfDevicesRet struct { + Num int32 +} + +type NodeListDevicesArgs struct { + Cap string + Maxnames int32 + Flags uint32 +} + +type NodeListDevicesRet struct { + Names []string +} + +type NodeDeviceLookupByNameArgs struct { + Name string +} + +type NodeDeviceLookupByNameRet struct { + Dev NonnullNodeDevice +} + +type NodeDeviceLookupScsiHostByWwnArgs struct { + Wwnn string + Wwpn string + Flags uint32 +} + +type NodeDeviceLookupScsiHostByWwnRet struct { + Dev NonnullNodeDevice +} + +type NodeDeviceGetXMLDescArgs struct { + Name string + Flags uint32 +} + +type NodeDeviceGetXMLDescRet struct { + XML string +} + +type NodeDeviceGetParentArgs struct { + Name string +} + +type NodeDeviceGetParentRet struct { + Parent string +} + +type NodeDeviceNumOfCapsArgs struct { + Name string +} + +type NodeDeviceNumOfCapsRet struct { + Num int32 +} + +type NodeDeviceListCapsArgs struct { + Name string + Maxnames int32 +} + +type NodeDeviceListCapsRet struct { + Names []string +} + +type NodeDeviceDettachArgs struct { + Name string +} + +type NodeDeviceDetachFlagsArgs struct { + Name string + DriverName string + Flags uint32 +} + +type NodeDeviceReAttachArgs struct { + Name string +} + +type NodeDeviceResetArgs struct { + Name string +} + +type NodeDeviceCreateXMLArgs struct { + XMLDesc string + Flags uint32 +} + +type NodeDeviceCreateXMLRet struct { + Dev NonnullNodeDevice +} + +type NodeDeviceDestroyArgs struct { + Name string +} + +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 string + NativeConfig string + Flags uint32 +} + +type ConnectDomainXMLFromNativeRet struct { + DomainXML string +} + +type ConnectDomainXMLToNativeArgs struct { + NativeFormat string + DomainXML string + Flags uint32 +} + +type ConnectDomainXMLToNativeRet struct { + NativeConfig string +} + +type ConnectNumOfSecretsRet struct { + Num int32 +} + +type ConnectListSecretsArgs struct { + Maxuuids int32 +} + +type ConnectListSecretsRet struct { + Uuids []string +} + +type SecretLookupByUUIDArgs struct { + UUID UUID +} + +type SecretLookupByUUIDRet struct { + Secret NonnullSecret +} + +type SecretDefineXMLArgs struct { + XML string + Flags uint32 +} + +type SecretDefineXMLRet struct { + Secret NonnullSecret +} + +type SecretGetXMLDescArgs struct { + Secret NonnullSecret + Flags uint32 +} + +type SecretGetXMLDescRet struct { + XML string +} + +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 string +} + +type SecretLookupByUsageRet struct { + Secret NonnullSecret +} + +type DomainMigratePrepareTunnelArgs struct { + Flags uint64 + Dname string + Resource uint64 + DomXML string +} + +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 string + Flags uint32 +} + +type ConnectCompareCPURet struct { + Result int32 +} + +type ConnectBaselineCPUArgs struct { + XMLCPUs []string + Flags uint32 +} + +type ConnectBaselineCPURet struct { + CPU string +} + +type DomainGetJobInfoArgs struct { + Dom NonnullDomain +} + +type DomainGetJobInfoRet struct { + Type 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 { + Type 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 string + DevAlias string + Action int32 +} + +type DomainEventCallbackIOErrorMsg struct { + CallbackID int32 + Msg DomainEventIOErrorMsg +} + +type DomainEventIOErrorReasonMsg struct { + Dom NonnullDomain + SrcPath string + DevAlias string + Action int32 + Reason string +} + +type DomainEventCallbackIOErrorReasonMsg struct { + CallbackID int32 + Msg DomainEventIOErrorReasonMsg +} + +type DomainEventGraphicsAddress struct { + Family int32 + Node string + Service string +} + +type DomainEventGraphicsIdentity struct { + Type string + Name string +} + +type DomainEventGraphicsMsg struct { + Dom NonnullDomain + Phase int32 + Local DomainEventGraphicsAddress + Remote DomainEventGraphicsAddress + AuthScheme string + Subject []DomainEventGraphicsIdentity +} + +type DomainEventCallbackGraphicsMsg struct { + CallbackID int32 + Msg DomainEventGraphicsMsg +} + +type DomainEventBlockJobMsg struct { + Dom NonnullDomain + Path string + Type int32 + Status int32 +} + +type DomainEventCallbackBlockJobMsg struct { + CallbackID int32 + Msg DomainEventBlockJobMsg +} + +type DomainEventDiskChangeMsg struct { + Dom NonnullDomain + OldSrcPath string + NewSrcPath string + DevAlias string + Reason int32 +} + +type DomainEventCallbackDiskChangeMsg struct { + CallbackID int32 + Msg DomainEventDiskChangeMsg +} + +type DomainEventTrayChangeMsg struct { + Dom NonnullDomain + DevAlias string + 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 string +} + +type DomainManagedSaveDefineXMLArgs struct { + Dom NonnullDomain + Dxml string + Flags uint32 +} + +type DomainSnapshotCreateXMLArgs struct { + Dom NonnullDomain + XMLDesc string + Flags uint32 +} + +type DomainSnapshotCreateXMLRet struct { + Snap NonnullDomainSnapshot +} + +type DomainSnapshotGetXMLDescArgs struct { + Snap NonnullDomainSnapshot + Flags uint32 +} + +type DomainSnapshotGetXMLDescRet struct { + XML string +} + +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 []string +} + +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 []string +} + +type DomainSnapshotListAllChildrenArgs struct { + Snapshot NonnullDomainSnapshot + NeedResults int32 + Flags uint32 +} + +type DomainSnapshotListAllChildrenRet struct { + Snapshots []NonnullDomainSnapshot + Ret int32 +} + +type DomainSnapshotLookupByNameArgs struct { + Dom NonnullDomain + Name string + 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 string + Flags uint32 +} + +type DomainOpenChannelArgs struct { + Dom NonnullDomain + Name string + 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 string + Flags uint64 + Dname string + Resource uint64 +} + +type DomainMigrateBegin3Ret struct { + CookieOut []byte + XML string +} + +type DomainMigratePrepare3Args struct { + CookieIn []byte + UriIn string + Flags uint64 + Dname string + Resource uint64 + DomXML string +} + +type DomainMigratePrepare3Ret struct { + CookieOut []byte + UriOut string +} + +type DomainMigratePrepareTunnel3Args struct { + CookieIn []byte + Flags uint64 + Dname string + Resource uint64 + DomXML string +} + +type DomainMigratePrepareTunnel3Ret struct { + CookieOut []byte +} + +type DomainMigratePerform3Args struct { + Dom NonnullDomain + Xmlin string + CookieIn []byte + Dconnuri string + Uri string + Flags uint64 + Dname string + Resource uint64 +} + +type DomainMigratePerform3Ret struct { + CookieOut []byte +} + +type DomainMigrateFinish3Args struct { + Dname string + CookieIn []byte + Dconnuri string + Uri string + 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 string + 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 string +} + +type DomainMigratePrepare3ParamsArgs struct { + Params []TypedParam + CookieIn []byte + Flags uint32 +} + +type DomainMigratePrepare3ParamsRet struct { + CookieOut []byte + UriOut string +} + +type DomainMigratePrepareTunnel3ParamsArgs struct { + Params []TypedParam + CookieIn []byte + Flags uint32 +} + +type DomainMigratePrepareTunnel3ParamsRet struct { + CookieOut []byte +} + +type DomainMigratePerform3ParamsArgs struct { + Dom NonnullDomain + Dconnuri string + 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 string +} + +type DomainEventCallbackDeviceRemovedMsg struct { + CallbackID int32 + Msg DomainEventDeviceRemovedMsg +} + +type DomainEventBlockJob2Msg struct { + CallbackID int32 + Dom NonnullDomain + Dst string + Type int32 + Status int32 +} + +type DomainEventBlockThresholdMsg struct { + CallbackID int32 + Dom NonnullDomain + Dev string + Path string + Threshold uint64 + Excess uint64 +} + +type DomainEventCallbackTunableMsg struct { + CallbackID int32 + Dom NonnullDomain + Params []TypedParam +} + +type DomainEventCallbackDeviceAddedMsg struct { + CallbackID int32 + Dom NonnullDomain + DevAlias string +} + +type ConnectEventConnectionClosedMsg struct { + Reason int32 +} + +type ConnectGetCPUModelNamesArgs struct { + Arch string + NeedResults int32 + Flags uint32 +} + +type ConnectGetCPUModelNamesRet struct { + Models []string + 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 []string + Flags uint32 +} + +type DomainFsfreezeRet struct { + Filesystems int32 +} + +type DomainFsthawArgs struct { + Dom NonnullDomain + Mountpoints []string + 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 string + Expirytime int64 + Type int32 + Mac string + Iaid string + Ipaddr string + Prefix uint32 + Hostname string + Clientid string +} + +type NetworkGetDhcpLeasesArgs struct { + Net NonnullNetwork + Mac string + 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 string + Name string + Fstype string + DevAliases []string +} + +type DomainGetFsinfoArgs struct { + Dom NonnullDomain + Flags uint32 +} + +type DomainGetFsinfoRet struct { + Info []DomainFsinfo + Ret uint32 +} + +type DomainIPAddr struct { + Type int32 + Addr string + Prefix uint32 +} + +type DomainInterface struct { + Name string + Hwaddr string + Addrs []DomainIPAddr +} + +type DomainInterfaceAddressesArgs struct { + Dom NonnullDomain + Source uint32 + Flags uint32 +} + +type DomainInterfaceAddressesRet struct { + Ifaces []DomainInterface +} + +type DomainSetUserPasswordArgs struct { + Dom NonnullDomain + User string + Password string + Flags uint32 +} + +type DomainRenameArgs struct { + Dom NonnullDomain + NewName string + 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 string +} + +type DomainGetGuestVcpusArgs struct { + Dom NonnullDomain + Flags uint32 +} + +type DomainGetGuestVcpusRet struct { + Params []TypedParam +} + +type DomainSetGuestVcpusArgs struct { + Dom NonnullDomain + Cpumap string + State int32 + Flags uint32 +} + +type DomainSetVcpuArgs struct { + Dom NonnullDomain + Cpumap string + State int32 + Flags uint32 +} + +type DomainEventCallbackMetadataChangeMsg struct { + CallbackID int32 + Dom NonnullDomain + Type int32 + Nsuri string +} + +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 string + Threshold uint64 + Flags uint32 +} + +type DomainSetLifecycleActionArgs struct { + Dom NonnullDomain + Type uint32 + Action uint32 + Flags uint32 +} + + +// Unions: +type TypedParamValue interface { + Get() interface{} +} + + +type TypedParamValueInt struct { + DVal uint32 + I int32 +} +func NewTypedParamValueInt(v int32) *TypedParamValueInt { return &TypedParamValueInt{DVal: 1, I: v} } +func (c *TypedParamValueInt) Get() interface{} { return c.I } + +type TypedParamValueUint struct { + DVal uint32 + Ui uint32 +} +func NewTypedParamValueUint(v uint32) *TypedParamValueUint { return &TypedParamValueUint{DVal: 2, Ui: v} } +func (c *TypedParamValueUint) Get() interface{} { return c.Ui } + +type TypedParamValueLlong struct { + DVal uint32 + L int64 +} +func NewTypedParamValueLlong(v int64) *TypedParamValueLlong { return &TypedParamValueLlong{DVal: 3, L: v} } +func (c *TypedParamValueLlong) Get() interface{} { return c.L } + +type TypedParamValueUllong struct { + DVal uint32 + Ul uint64 +} +func NewTypedParamValueUllong(v uint64) *TypedParamValueUllong { return &TypedParamValueUllong{DVal: 4, Ul: v} } +func (c *TypedParamValueUllong) Get() interface{} { return c.Ul } + +type TypedParamValueDouble struct { + DVal uint32 + D float64 +} +func NewTypedParamValueDouble(v float64) *TypedParamValueDouble { return &TypedParamValueDouble{DVal: 5, D: v} } +func (c *TypedParamValueDouble) Get() interface{} { return c.D } + +type TypedParamValueBoolean struct { + DVal uint32 + B int32 +} +func NewTypedParamValueBoolean(v int32) *TypedParamValueBoolean { return &TypedParamValueBoolean{DVal: 6, B: v} } +func (c *TypedParamValueBoolean) Get() interface{} { return c.B } + +type TypedParamValueString struct { + DVal uint32 + S string +} +func NewTypedParamValueString(v string) *TypedParamValueString { return &TypedParamValueString{DVal: 7, S: v} } +func (c *TypedParamValueString) Get() interface{} { return c.S } + + +// Procedures: + +func (l *Libvirt) ConnectOpen(Name string, Flags uint32) (err error) { + var buf bytes.Buffer + + args := ConnectOpenArgs { + Name: Name, + Flags: Flags, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(1, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + return +} + +func (l *Libvirt) ConnectClose() (err error) { + var buf bytes.Buffer + + var resp <-chan response + resp, err = l.request(2, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + return +} + +func (l *Libvirt) ConnectGetType() (rType string, err error) { + var buf bytes.Buffer + + var resp <-chan response + resp, err = l.request(3, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := ConnectGetTypeRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rType = result.Type + + return +} + +func (l *Libvirt) ConnectGetVersion() (rHvVer uint64, err error) { + var buf bytes.Buffer + + var resp <-chan response + resp, err = l.request(4, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := ConnectGetVersionRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rHvVer = result.HvVer + + return +} + +func (l *Libvirt) ConnectGetMaxVcpus(Type string) (rMaxVcpus int32, err error) { + var buf bytes.Buffer + + args := ConnectGetMaxVcpusArgs { + Type: Type, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(5, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := ConnectGetMaxVcpusRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rMaxVcpus = result.MaxVcpus + + return +} + +func (l *Libvirt) NodeGetInfo() (rModel [32]int8, rMemory uint64, rCpus int32, rMhz int32, rNodes int32, rSockets int32, rCores int32, rThreads int32, err error) { + var buf bytes.Buffer + + var resp <-chan response + resp, err = l.request(6, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := NodeGetInfoRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rModel = result.Model + rMemory = result.Memory + rCpus = result.Cpus + rMhz = result.Mhz + rNodes = result.Nodes + rSockets = result.Sockets + rCores = result.Cores + rThreads = result.Threads + + return +} + +func (l *Libvirt) ConnectGetCapabilities() (rCapabilities string, err error) { + var buf bytes.Buffer + + var resp <-chan response + resp, err = l.request(7, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := ConnectGetCapabilitiesRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rCapabilities = result.Capabilities + + return +} + +func (l *Libvirt) DomainAttachDevice(Dom NonnullDomain, XML string) (err error) { + var buf bytes.Buffer + + args := DomainAttachDeviceArgs { + Dom: Dom, + XML: XML, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(8, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + return +} + +func (l *Libvirt) DomainCreate(Dom NonnullDomain) (err error) { + var buf bytes.Buffer + + args := DomainCreateArgs { + Dom: Dom, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(9, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + return +} + +func (l *Libvirt) DomainCreateXML(XMLDesc string, Flags uint32) (rDom NonnullDomain, err error) { + var buf bytes.Buffer + + args := DomainCreateXMLArgs { + XMLDesc: XMLDesc, + Flags: Flags, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(10, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := DomainCreateXMLRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rDom = result.Dom + + return +} + +func (l *Libvirt) DomainDefineXML(XML string) (rDom NonnullDomain, err error) { + var buf bytes.Buffer + + args := DomainDefineXMLArgs { + XML: XML, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(11, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := DomainDefineXMLRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rDom = result.Dom + + return +} + +func (l *Libvirt) DomainDestroy(Dom NonnullDomain) (err error) { + var buf bytes.Buffer + + args := DomainDestroyArgs { + Dom: Dom, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(12, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + return +} + +func (l *Libvirt) DomainDetachDevice(Dom NonnullDomain, XML string) (err error) { + var buf bytes.Buffer + + args := DomainDetachDeviceArgs { + Dom: Dom, + XML: XML, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(13, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + return +} + +func (l *Libvirt) DomainGetXMLDesc(Dom NonnullDomain, Flags uint32) (rXML string, err error) { + var buf bytes.Buffer + + args := DomainGetXMLDescArgs { + Dom: Dom, + Flags: Flags, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(14, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := DomainGetXMLDescRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rXML = result.XML + + return +} + +func (l *Libvirt) DomainGetAutostart(Dom NonnullDomain) (rAutostart int32, err error) { + var buf bytes.Buffer + + args := DomainGetAutostartArgs { + Dom: Dom, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(15, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := DomainGetAutostartRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rAutostart = result.Autostart + + return +} + +func (l *Libvirt) DomainGetInfo(Dom NonnullDomain) (rState uint8, rMaxMem uint64, rMemory uint64, rNrVirtCPU uint16, rCPUTime uint64, err error) { + var buf bytes.Buffer + + args := DomainGetInfoArgs { + Dom: Dom, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(16, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := DomainGetInfoRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rState = result.State + rMaxMem = result.MaxMem + rMemory = result.Memory + rNrVirtCPU = result.NrVirtCPU + rCPUTime = result.CPUTime + + return +} + +func (l *Libvirt) DomainGetMaxMemory(Dom NonnullDomain) (rMemory uint64, err error) { + var buf bytes.Buffer + + args := DomainGetMaxMemoryArgs { + Dom: Dom, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(17, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := DomainGetMaxMemoryRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rMemory = result.Memory + + return +} + +func (l *Libvirt) DomainGetMaxVcpus(Dom NonnullDomain) (rNum int32, err error) { + var buf bytes.Buffer + + args := DomainGetMaxVcpusArgs { + Dom: Dom, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(18, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := DomainGetMaxVcpusRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rNum = result.Num + + return +} + +func (l *Libvirt) DomainGetOsType(Dom NonnullDomain) (rType string, err error) { + var buf bytes.Buffer + + args := DomainGetOsTypeArgs { + Dom: Dom, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(19, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := DomainGetOsTypeRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rType = result.Type + + return +} + +func (l *Libvirt) DomainGetVcpus(Dom NonnullDomain, Maxinfo int32, Maplen int32) (rInfo []VcpuInfo, rCpumaps []byte, err error) { + var buf bytes.Buffer + + args := DomainGetVcpusArgs { + Dom: Dom, + Maxinfo: Maxinfo, + Maplen: Maplen, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(20, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := DomainGetVcpusRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rInfo = result.Info + rCpumaps = result.Cpumaps + + return +} + +func (l *Libvirt) ConnectListDefinedDomains(Maxnames int32) (rNames []string, err error) { + var buf bytes.Buffer + + args := ConnectListDefinedDomainsArgs { + Maxnames: Maxnames, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(21, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := ConnectListDefinedDomainsRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rNames = result.Names + + return +} + +func (l *Libvirt) DomainLookupByID(ID int32) (rDom NonnullDomain, err error) { + var buf bytes.Buffer + + args := DomainLookupByIDArgs { + ID: ID, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(22, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := DomainLookupByIDRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rDom = result.Dom + + return +} + +func (l *Libvirt) DomainLookupByName(Name string) (rDom NonnullDomain, err error) { + var buf bytes.Buffer + + args := DomainLookupByNameArgs { + Name: Name, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(23, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := DomainLookupByNameRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rDom = result.Dom + + return +} + +func (l *Libvirt) DomainLookupByUUID(UUID UUID) (rDom NonnullDomain, err error) { + var buf bytes.Buffer + + args := DomainLookupByUUIDArgs { + UUID: UUID, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(24, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := DomainLookupByUUIDRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rDom = result.Dom + + return +} + +func (l *Libvirt) ConnectNumOfDefinedDomains() (rNum int32, err error) { + var buf bytes.Buffer + + var resp <-chan response + resp, err = l.request(25, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := ConnectNumOfDefinedDomainsRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rNum = result.Num + + return +} + +func (l *Libvirt) DomainPinVcpu(Dom NonnullDomain, Vcpu uint32, Cpumap []byte) (err error) { + var buf bytes.Buffer + + args := DomainPinVcpuArgs { + Dom: Dom, + Vcpu: Vcpu, + Cpumap: Cpumap, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(26, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + return +} + +func (l *Libvirt) DomainReboot(Dom NonnullDomain, Flags uint32) (err error) { + var buf bytes.Buffer + + args := DomainRebootArgs { + Dom: Dom, + Flags: Flags, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(27, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + return +} + +func (l *Libvirt) DomainResume(Dom NonnullDomain) (err error) { + var buf bytes.Buffer + + args := DomainResumeArgs { + Dom: Dom, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(28, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + return +} + +func (l *Libvirt) DomainSetAutostart(Dom NonnullDomain, Autostart int32) (err error) { + var buf bytes.Buffer + + args := DomainSetAutostartArgs { + Dom: Dom, + Autostart: Autostart, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(29, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + return +} + +func (l *Libvirt) DomainSetMaxMemory(Dom NonnullDomain, Memory uint64) (err error) { + var buf bytes.Buffer + + args := DomainSetMaxMemoryArgs { + Dom: Dom, + Memory: Memory, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(30, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + return +} + +func (l *Libvirt) DomainSetMemory(Dom NonnullDomain, Memory uint64) (err error) { + var buf bytes.Buffer + + args := DomainSetMemoryArgs { + Dom: Dom, + Memory: Memory, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(31, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + return +} + +func (l *Libvirt) DomainSetVcpus(Dom NonnullDomain, Nvcpus uint32) (err error) { + var buf bytes.Buffer + + args := DomainSetVcpusArgs { + Dom: Dom, + Nvcpus: Nvcpus, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(32, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + return +} + +func (l *Libvirt) DomainShutdown(Dom NonnullDomain) (err error) { + var buf bytes.Buffer + + args := DomainShutdownArgs { + Dom: Dom, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(33, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + return +} + +func (l *Libvirt) DomainSuspend(Dom NonnullDomain) (err error) { + var buf bytes.Buffer + + args := DomainSuspendArgs { + Dom: Dom, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(34, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + return +} + +func (l *Libvirt) DomainUndefine(Dom NonnullDomain) (err error) { + var buf bytes.Buffer + + args := DomainUndefineArgs { + Dom: Dom, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(35, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + return +} + +func (l *Libvirt) ConnectListDefinedNetworks(Maxnames int32) (rNames []string, err error) { + var buf bytes.Buffer + + args := ConnectListDefinedNetworksArgs { + Maxnames: Maxnames, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(36, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := ConnectListDefinedNetworksRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rNames = result.Names + + return +} + +func (l *Libvirt) ConnectListDomains(Maxids int32) (rIds []int32, err error) { + var buf bytes.Buffer + + args := ConnectListDomainsArgs { + Maxids: Maxids, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(37, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := ConnectListDomainsRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rIds = result.Ids + + return +} + +func (l *Libvirt) ConnectListNetworks(Maxnames int32) (rNames []string, err error) { + var buf bytes.Buffer + + args := ConnectListNetworksArgs { + Maxnames: Maxnames, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(38, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := ConnectListNetworksRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rNames = result.Names + + return +} + +func (l *Libvirt) NetworkCreate(Net NonnullNetwork) (err error) { + var buf bytes.Buffer + + args := NetworkCreateArgs { + Net: Net, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(39, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + return +} + +func (l *Libvirt) NetworkCreateXML(XML string) (rNet NonnullNetwork, err error) { + var buf bytes.Buffer + + args := NetworkCreateXMLArgs { + XML: XML, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(40, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := NetworkCreateXMLRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rNet = result.Net + + return +} + +func (l *Libvirt) NetworkDefineXML(XML string) (rNet NonnullNetwork, err error) { + var buf bytes.Buffer + + args := NetworkDefineXMLArgs { + XML: XML, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(41, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := NetworkDefineXMLRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rNet = result.Net + + return +} + +func (l *Libvirt) NetworkDestroy(Net NonnullNetwork) (err error) { + var buf bytes.Buffer + + args := NetworkDestroyArgs { + Net: Net, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(42, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + return +} + +func (l *Libvirt) NetworkGetXMLDesc(Net NonnullNetwork, Flags uint32) (rXML string, err error) { + var buf bytes.Buffer + + args := NetworkGetXMLDescArgs { + Net: Net, + Flags: Flags, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(43, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := NetworkGetXMLDescRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rXML = result.XML + + return +} + +func (l *Libvirt) NetworkGetAutostart(Net NonnullNetwork) (rAutostart int32, err error) { + var buf bytes.Buffer + + args := NetworkGetAutostartArgs { + Net: Net, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(44, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := NetworkGetAutostartRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rAutostart = result.Autostart + + return +} + +func (l *Libvirt) NetworkGetBridgeName(Net NonnullNetwork) (rName string, err error) { + var buf bytes.Buffer + + args := NetworkGetBridgeNameArgs { + Net: Net, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(45, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := NetworkGetBridgeNameRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rName = result.Name + + return +} + +func (l *Libvirt) NetworkLookupByName(Name string) (rNet NonnullNetwork, err error) { + var buf bytes.Buffer + + args := NetworkLookupByNameArgs { + Name: Name, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(46, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := NetworkLookupByNameRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rNet = result.Net + + return +} + +func (l *Libvirt) NetworkLookupByUUID(UUID UUID) (rNet NonnullNetwork, err error) { + var buf bytes.Buffer + + args := NetworkLookupByUUIDArgs { + UUID: UUID, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(47, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := NetworkLookupByUUIDRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rNet = result.Net + + return +} + +func (l *Libvirt) NetworkSetAutostart(Net NonnullNetwork, Autostart int32) (err error) { + var buf bytes.Buffer + + args := NetworkSetAutostartArgs { + Net: Net, + Autostart: Autostart, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(48, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + return +} + +func (l *Libvirt) NetworkUndefine(Net NonnullNetwork) (err error) { + var buf bytes.Buffer + + args := NetworkUndefineArgs { + Net: Net, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(49, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + return +} + +func (l *Libvirt) ConnectNumOfDefinedNetworks() (rNum int32, err error) { + var buf bytes.Buffer + + var resp <-chan response + resp, err = l.request(50, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := ConnectNumOfDefinedNetworksRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rNum = result.Num + + return +} + +func (l *Libvirt) ConnectNumOfDomains() (rNum int32, err error) { + var buf bytes.Buffer + + var resp <-chan response + resp, err = l.request(51, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := ConnectNumOfDomainsRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rNum = result.Num + + return +} + +func (l *Libvirt) ConnectNumOfNetworks() (rNum int32, err error) { + var buf bytes.Buffer + + var resp <-chan response + resp, err = l.request(52, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := ConnectNumOfNetworksRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rNum = result.Num + + return +} + +func (l *Libvirt) DomainCoreDump(Dom NonnullDomain, To string, Flags uint32) (err error) { + var buf bytes.Buffer + + args := DomainCoreDumpArgs { + Dom: Dom, + To: To, + Flags: Flags, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(53, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + return +} + +func (l *Libvirt) DomainRestore(From string) (err error) { + var buf bytes.Buffer + + args := DomainRestoreArgs { + From: From, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(54, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + return +} + +func (l *Libvirt) DomainSave(Dom NonnullDomain, To string) (err error) { + var buf bytes.Buffer + + args := DomainSaveArgs { + Dom: Dom, + To: To, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(55, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + return +} + +func (l *Libvirt) DomainGetSchedulerType(Dom NonnullDomain) (rType string, rNparams int32, err error) { + var buf bytes.Buffer + + args := DomainGetSchedulerTypeArgs { + Dom: Dom, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(56, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := DomainGetSchedulerTypeRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rType = result.Type + rNparams = result.Nparams + + return +} + +func (l *Libvirt) DomainGetSchedulerParameters(Dom NonnullDomain, Nparams int32) (rParams []TypedParam, err error) { + var buf bytes.Buffer + + args := DomainGetSchedulerParametersArgs { + Dom: Dom, + Nparams: Nparams, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(57, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := DomainGetSchedulerParametersRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rParams = result.Params + + return +} + +func (l *Libvirt) DomainSetSchedulerParameters(Dom NonnullDomain, Params []TypedParam) (err error) { + var buf bytes.Buffer + + args := DomainSetSchedulerParametersArgs { + Dom: Dom, + Params: Params, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(58, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + return +} + +func (l *Libvirt) ConnectGetHostname() (rHostname string, err error) { + var buf bytes.Buffer + + var resp <-chan response + resp, err = l.request(59, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := ConnectGetHostnameRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rHostname = result.Hostname + + return +} + +func (l *Libvirt) ConnectSupportsFeature(Feature int32) (rSupported int32, err error) { + var buf bytes.Buffer + + args := ConnectSupportsFeatureArgs { + Feature: Feature, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(60, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := ConnectSupportsFeatureRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rSupported = result.Supported + + return +} + +func (l *Libvirt) DomainMigratePrepare(UriIn string, Flags uint64, Dname string, Resource uint64) (rCookie []byte, rUriOut string, err error) { + var buf bytes.Buffer + + args := DomainMigratePrepareArgs { + UriIn: UriIn, + Flags: Flags, + Dname: Dname, + Resource: Resource, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(61, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := DomainMigratePrepareRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rCookie = result.Cookie + rUriOut = result.UriOut + + return +} + +func (l *Libvirt) DomainMigratePerform(Dom NonnullDomain, Cookie []byte, Uri string, Flags uint64, Dname string, Resource uint64) (err error) { + var buf bytes.Buffer + + args := DomainMigratePerformArgs { + Dom: Dom, + Cookie: Cookie, + Uri: Uri, + Flags: Flags, + Dname: Dname, + Resource: Resource, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(62, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + return +} + +func (l *Libvirt) DomainMigrateFinish(Dname string, Cookie []byte, Uri string, Flags uint64) (rDdom NonnullDomain, err error) { + var buf bytes.Buffer + + args := DomainMigrateFinishArgs { + Dname: Dname, + Cookie: Cookie, + Uri: Uri, + Flags: Flags, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(63, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := DomainMigrateFinishRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rDdom = result.Ddom + + return +} + +func (l *Libvirt) DomainBlockStats(Dom NonnullDomain, Path string) (rRdReq int64, rRdBytes int64, rWrReq int64, rWrBytes int64, rErrs int64, err error) { + var buf bytes.Buffer + + args := DomainBlockStatsArgs { + Dom: Dom, + Path: Path, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(64, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := DomainBlockStatsRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rRdReq = result.RdReq + rRdBytes = result.RdBytes + rWrReq = result.WrReq + rWrBytes = result.WrBytes + rErrs = result.Errs + + return +} + +func (l *Libvirt) DomainInterfaceStats(Dom NonnullDomain, Device string) (rRxBytes int64, rRxPackets int64, rRxErrs int64, rRxDrop int64, rTxBytes int64, rTxPackets int64, rTxErrs int64, rTxDrop int64, err error) { + var buf bytes.Buffer + + args := DomainInterfaceStatsArgs { + Dom: Dom, + Device: Device, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(65, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := DomainInterfaceStatsRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rRxBytes = result.RxBytes + rRxPackets = result.RxPackets + rRxErrs = result.RxErrs + rRxDrop = result.RxDrop + rTxBytes = result.TxBytes + rTxPackets = result.TxPackets + rTxErrs = result.TxErrs + rTxDrop = result.TxDrop + + return +} + +func (l *Libvirt) AuthList() (rTypes []AuthType, err error) { + var buf bytes.Buffer + + var resp <-chan response + resp, err = l.request(66, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := AuthListRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rTypes = result.Types + + return +} + +func (l *Libvirt) AuthSaslInit() (rMechlist string, err error) { + var buf bytes.Buffer + + var resp <-chan response + resp, err = l.request(67, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := AuthSaslInitRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rMechlist = result.Mechlist + + return +} + +func (l *Libvirt) AuthSaslStart(Mech string, Nil int32, Data []int8) (rComplete int32, rNil int32, rData []int8, err error) { + var buf bytes.Buffer + + args := AuthSaslStartArgs { + Mech: Mech, + Nil: Nil, + Data: Data, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(68, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := AuthSaslStartRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rComplete = result.Complete + rNil = result.Nil + rData = result.Data + + return +} + +func (l *Libvirt) AuthSaslStep(Nil int32, Data []int8) (rComplete int32, rNil int32, rData []int8, err error) { + var buf bytes.Buffer + + args := AuthSaslStepArgs { + Nil: Nil, + Data: Data, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(69, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := AuthSaslStepRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rComplete = result.Complete + rNil = result.Nil + rData = result.Data + + return +} + +func (l *Libvirt) AuthPolkit() (rComplete int32, err error) { + var buf bytes.Buffer + + var resp <-chan response + resp, err = l.request(70, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := AuthPolkitRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rComplete = result.Complete + + return +} + +func (l *Libvirt) ConnectNumOfStoragePools() (rNum int32, err error) { + var buf bytes.Buffer + + var resp <-chan response + resp, err = l.request(71, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := ConnectNumOfStoragePoolsRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rNum = result.Num + + return +} + +func (l *Libvirt) ConnectListStoragePools(Maxnames int32) (rNames []string, err error) { + var buf bytes.Buffer + + args := ConnectListStoragePoolsArgs { + Maxnames: Maxnames, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(72, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := ConnectListStoragePoolsRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rNames = result.Names + + return +} + +func (l *Libvirt) ConnectNumOfDefinedStoragePools() (rNum int32, err error) { + var buf bytes.Buffer + + var resp <-chan response + resp, err = l.request(73, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := ConnectNumOfDefinedStoragePoolsRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rNum = result.Num + + return +} + +func (l *Libvirt) ConnectListDefinedStoragePools(Maxnames int32) (rNames []string, err error) { + var buf bytes.Buffer + + args := ConnectListDefinedStoragePoolsArgs { + Maxnames: Maxnames, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(74, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := ConnectListDefinedStoragePoolsRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rNames = result.Names + + return +} + +func (l *Libvirt) ConnectFindStoragePoolSources(Type string, SrcSpec string, Flags uint32) (rXML string, err error) { + var buf bytes.Buffer + + args := ConnectFindStoragePoolSourcesArgs { + Type: Type, + SrcSpec: SrcSpec, + Flags: Flags, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(75, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := ConnectFindStoragePoolSourcesRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rXML = result.XML + + return +} + +func (l *Libvirt) StoragePoolCreateXML(XML string, Flags uint32) (rPool NonnullStoragePool, err error) { + var buf bytes.Buffer + + args := StoragePoolCreateXMLArgs { + XML: XML, + Flags: Flags, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(76, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := StoragePoolCreateXMLRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rPool = result.Pool + + return +} + +func (l *Libvirt) StoragePoolDefineXML(XML string, Flags uint32) (rPool NonnullStoragePool, err error) { + var buf bytes.Buffer + + args := StoragePoolDefineXMLArgs { + XML: XML, + Flags: Flags, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(77, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := StoragePoolDefineXMLRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rPool = result.Pool + + return +} + +func (l *Libvirt) StoragePoolCreate(Pool NonnullStoragePool, Flags uint32) (err error) { + var buf bytes.Buffer + + args := StoragePoolCreateArgs { + Pool: Pool, + Flags: Flags, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(78, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + return +} + +func (l *Libvirt) StoragePoolBuild(Pool NonnullStoragePool, Flags uint32) (err error) { + var buf bytes.Buffer + + args := StoragePoolBuildArgs { + Pool: Pool, + Flags: Flags, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(79, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + return +} + +func (l *Libvirt) StoragePoolDestroy(Pool NonnullStoragePool) (err error) { + var buf bytes.Buffer + + args := StoragePoolDestroyArgs { + Pool: Pool, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(80, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + return +} + +func (l *Libvirt) StoragePoolDelete(Pool NonnullStoragePool, Flags uint32) (err error) { + var buf bytes.Buffer + + args := StoragePoolDeleteArgs { + Pool: Pool, + Flags: Flags, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(81, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + return +} + +func (l *Libvirt) StoragePoolUndefine(Pool NonnullStoragePool) (err error) { + var buf bytes.Buffer + + args := StoragePoolUndefineArgs { + Pool: Pool, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(82, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + return +} + +func (l *Libvirt) StoragePoolRefresh(Pool NonnullStoragePool, Flags uint32) (err error) { + var buf bytes.Buffer + + args := StoragePoolRefreshArgs { + Pool: Pool, + Flags: Flags, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(83, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + return +} + +func (l *Libvirt) StoragePoolLookupByName(Name string) (rPool NonnullStoragePool, err error) { + var buf bytes.Buffer + + args := StoragePoolLookupByNameArgs { + Name: Name, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(84, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := StoragePoolLookupByNameRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rPool = result.Pool + + return +} + +func (l *Libvirt) StoragePoolLookupByUUID(UUID UUID) (rPool NonnullStoragePool, err error) { + var buf bytes.Buffer + + args := StoragePoolLookupByUUIDArgs { + UUID: UUID, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(85, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := StoragePoolLookupByUUIDRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rPool = result.Pool + + return +} + +func (l *Libvirt) StoragePoolLookupByVolume(Vol NonnullStorageVol) (rPool NonnullStoragePool, err error) { + var buf bytes.Buffer + + args := StoragePoolLookupByVolumeArgs { + Vol: Vol, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(86, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := StoragePoolLookupByVolumeRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rPool = result.Pool + + return +} + +func (l *Libvirt) StoragePoolGetInfo(Pool NonnullStoragePool) (rState uint8, rCapacity uint64, rAllocation uint64, rAvailable uint64, err error) { + var buf bytes.Buffer + + args := StoragePoolGetInfoArgs { + Pool: Pool, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(87, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := StoragePoolGetInfoRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rState = result.State + rCapacity = result.Capacity + rAllocation = result.Allocation + rAvailable = result.Available + + return +} + +func (l *Libvirt) StoragePoolGetXMLDesc(Pool NonnullStoragePool, Flags uint32) (rXML string, err error) { + var buf bytes.Buffer + + args := StoragePoolGetXMLDescArgs { + Pool: Pool, + Flags: Flags, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(88, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := StoragePoolGetXMLDescRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rXML = result.XML + + return +} + +func (l *Libvirt) StoragePoolGetAutostart(Pool NonnullStoragePool) (rAutostart int32, err error) { + var buf bytes.Buffer + + args := StoragePoolGetAutostartArgs { + Pool: Pool, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(89, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := StoragePoolGetAutostartRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rAutostart = result.Autostart + + return +} + +func (l *Libvirt) StoragePoolSetAutostart(Pool NonnullStoragePool, Autostart int32) (err error) { + var buf bytes.Buffer + + args := StoragePoolSetAutostartArgs { + Pool: Pool, + Autostart: Autostart, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(90, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + return +} + +func (l *Libvirt) StoragePoolNumOfVolumes(Pool NonnullStoragePool) (rNum int32, err error) { + var buf bytes.Buffer + + args := StoragePoolNumOfVolumesArgs { + Pool: Pool, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(91, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := StoragePoolNumOfVolumesRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rNum = result.Num + + return +} + +func (l *Libvirt) StoragePoolListVolumes(Pool NonnullStoragePool, Maxnames int32) (rNames []string, err error) { + var buf bytes.Buffer + + args := StoragePoolListVolumesArgs { + Pool: Pool, + Maxnames: Maxnames, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(92, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := StoragePoolListVolumesRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rNames = result.Names + + return +} + +func (l *Libvirt) StorageVolCreateXML(Pool NonnullStoragePool, XML string, Flags uint32) (rVol NonnullStorageVol, err error) { + var buf bytes.Buffer + + args := StorageVolCreateXMLArgs { + Pool: Pool, + XML: XML, + Flags: Flags, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(93, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := StorageVolCreateXMLRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rVol = result.Vol + + return +} + +func (l *Libvirt) StorageVolDelete(Vol NonnullStorageVol, Flags uint32) (err error) { + var buf bytes.Buffer + + args := StorageVolDeleteArgs { + Vol: Vol, + Flags: Flags, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(94, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + return +} + +func (l *Libvirt) StorageVolLookupByName(Pool NonnullStoragePool, Name string) (rVol NonnullStorageVol, err error) { + var buf bytes.Buffer + + args := StorageVolLookupByNameArgs { + Pool: Pool, + Name: Name, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(95, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := StorageVolLookupByNameRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rVol = result.Vol + + return +} + +func (l *Libvirt) StorageVolLookupByKey(Key string) (rVol NonnullStorageVol, err error) { + var buf bytes.Buffer + + args := StorageVolLookupByKeyArgs { + Key: Key, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(96, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := StorageVolLookupByKeyRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rVol = result.Vol + + return +} + +func (l *Libvirt) StorageVolLookupByPath(Path string) (rVol NonnullStorageVol, err error) { + var buf bytes.Buffer + + args := StorageVolLookupByPathArgs { + Path: Path, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(97, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := StorageVolLookupByPathRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rVol = result.Vol + + return +} + +func (l *Libvirt) StorageVolGetInfo(Vol NonnullStorageVol) (rType int8, rCapacity uint64, rAllocation uint64, err error) { + var buf bytes.Buffer + + args := StorageVolGetInfoArgs { + Vol: Vol, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(98, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := StorageVolGetInfoRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rType = result.Type + rCapacity = result.Capacity + rAllocation = result.Allocation + + return +} + +func (l *Libvirt) StorageVolGetXMLDesc(Vol NonnullStorageVol, Flags uint32) (rXML string, err error) { + var buf bytes.Buffer + + args := StorageVolGetXMLDescArgs { + Vol: Vol, + Flags: Flags, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(99, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := StorageVolGetXMLDescRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rXML = result.XML + + return +} + +func (l *Libvirt) StorageVolGetPath(Vol NonnullStorageVol) (rName string, err error) { + var buf bytes.Buffer + + args := StorageVolGetPathArgs { + Vol: Vol, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(100, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := StorageVolGetPathRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rName = result.Name + + return +} + +func (l *Libvirt) NodeGetCellsFreeMemory(StartCell int32, Maxcells int32) (rCells []uint64, err error) { + var buf bytes.Buffer + + args := NodeGetCellsFreeMemoryArgs { + StartCell: StartCell, + Maxcells: Maxcells, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(101, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := NodeGetCellsFreeMemoryRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rCells = result.Cells + + return +} + +func (l *Libvirt) NodeGetFreeMemory() (rFreeMem uint64, err error) { + var buf bytes.Buffer + + var resp <-chan response + resp, err = l.request(102, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := NodeGetFreeMemoryRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rFreeMem = result.FreeMem + + return +} + +func (l *Libvirt) DomainBlockPeek(Dom NonnullDomain, Path string, Offset uint64, Size uint32, Flags uint32) (rBuffer []byte, err error) { + var buf bytes.Buffer + + args := DomainBlockPeekArgs { + Dom: Dom, + Path: Path, + Offset: Offset, + Size: Size, + Flags: Flags, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(103, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := DomainBlockPeekRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rBuffer = result.Buffer + + return +} + +func (l *Libvirt) DomainMemoryPeek(Dom NonnullDomain, Offset uint64, Size uint32, Flags uint32) (rBuffer []byte, err error) { + var buf bytes.Buffer + + args := DomainMemoryPeekArgs { + Dom: Dom, + Offset: Offset, + Size: Size, + Flags: Flags, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(104, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := DomainMemoryPeekRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rBuffer = result.Buffer + + return +} + +func (l *Libvirt) ConnectDomainEventRegister() (rCbRegistered int32, err error) { + var buf bytes.Buffer + + var resp <-chan response + resp, err = l.request(105, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := ConnectDomainEventRegisterRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rCbRegistered = result.CbRegistered + + return +} + +func (l *Libvirt) ConnectDomainEventDeregister() (rCbRegistered int32, err error) { + var buf bytes.Buffer + + var resp <-chan response + resp, err = l.request(106, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := ConnectDomainEventDeregisterRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rCbRegistered = result.CbRegistered + + return +} + +func (l *Libvirt) DomainEventLifecycle() (err error) { + var buf bytes.Buffer + + var resp <-chan response + resp, err = l.request(107, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + return +} + +func (l *Libvirt) DomainMigratePrepare2(UriIn string, Flags uint64, Dname string, Resource uint64, DomXML string) (rCookie []byte, rUriOut string, err error) { + var buf bytes.Buffer + + args := DomainMigratePrepare2Args { + UriIn: UriIn, + Flags: Flags, + Dname: Dname, + Resource: Resource, + DomXML: DomXML, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(108, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := DomainMigratePrepare2Ret{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rCookie = result.Cookie + rUriOut = result.UriOut + + return +} + +func (l *Libvirt) DomainMigrateFinish2(Dname string, Cookie []byte, Uri string, Flags uint64, Retcode int32) (rDdom NonnullDomain, err error) { + var buf bytes.Buffer + + args := DomainMigrateFinish2Args { + Dname: Dname, + Cookie: Cookie, + Uri: Uri, + Flags: Flags, + Retcode: Retcode, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(109, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := DomainMigrateFinish2Ret{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rDdom = result.Ddom + + return +} + +func (l *Libvirt) ConnectGetUri() (rUri string, err error) { + var buf bytes.Buffer + + var resp <-chan response + resp, err = l.request(110, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := ConnectGetUriRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rUri = result.Uri + + return +} + +func (l *Libvirt) NodeNumOfDevices(Cap string, Flags uint32) (rNum int32, err error) { + var buf bytes.Buffer + + args := NodeNumOfDevicesArgs { + Cap: Cap, + Flags: Flags, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(111, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := NodeNumOfDevicesRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rNum = result.Num + + return +} + +func (l *Libvirt) NodeListDevices(Cap string, Maxnames int32, Flags uint32) (rNames []string, err error) { + var buf bytes.Buffer + + args := NodeListDevicesArgs { + Cap: Cap, + Maxnames: Maxnames, + Flags: Flags, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(112, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := NodeListDevicesRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rNames = result.Names + + return +} + +func (l *Libvirt) NodeDeviceLookupByName(Name string) (rDev NonnullNodeDevice, err error) { + var buf bytes.Buffer + + args := NodeDeviceLookupByNameArgs { + Name: Name, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(113, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := NodeDeviceLookupByNameRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rDev = result.Dev + + return +} + +func (l *Libvirt) NodeDeviceGetXMLDesc(Name string, Flags uint32) (rXML string, err error) { + var buf bytes.Buffer + + args := NodeDeviceGetXMLDescArgs { + Name: Name, + Flags: Flags, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(114, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := NodeDeviceGetXMLDescRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rXML = result.XML + + return +} + +func (l *Libvirt) NodeDeviceGetParent(Name string) (rParent string, err error) { + var buf bytes.Buffer + + args := NodeDeviceGetParentArgs { + Name: Name, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(115, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := NodeDeviceGetParentRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rParent = result.Parent + + return +} + +func (l *Libvirt) NodeDeviceNumOfCaps(Name string) (rNum int32, err error) { + var buf bytes.Buffer + + args := NodeDeviceNumOfCapsArgs { + Name: Name, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(116, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := NodeDeviceNumOfCapsRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rNum = result.Num + + return +} + +func (l *Libvirt) NodeDeviceListCaps(Name string, Maxnames int32) (rNames []string, err error) { + var buf bytes.Buffer + + args := NodeDeviceListCapsArgs { + Name: Name, + Maxnames: Maxnames, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(117, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := NodeDeviceListCapsRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rNames = result.Names + + return +} + +func (l *Libvirt) NodeDeviceDettach(Name string) (err error) { + var buf bytes.Buffer + + args := NodeDeviceDettachArgs { + Name: Name, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(118, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + return +} + +func (l *Libvirt) NodeDeviceReAttach(Name string) (err error) { + var buf bytes.Buffer + + args := NodeDeviceReAttachArgs { + Name: Name, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(119, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + return +} + +func (l *Libvirt) NodeDeviceReset(Name string) (err error) { + var buf bytes.Buffer + + args := NodeDeviceResetArgs { + Name: Name, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(120, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + return +} + +func (l *Libvirt) DomainGetSecurityLabel(Dom NonnullDomain) (rLabel []int8, rEnforcing int32, err error) { + var buf bytes.Buffer + + args := DomainGetSecurityLabelArgs { + Dom: Dom, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(121, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := DomainGetSecurityLabelRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rLabel = result.Label + rEnforcing = result.Enforcing + + return +} + +func (l *Libvirt) NodeGetSecurityModel() (rModel []int8, rDoi []int8, err error) { + var buf bytes.Buffer + + var resp <-chan response + resp, err = l.request(122, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := NodeGetSecurityModelRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rModel = result.Model + rDoi = result.Doi + + return +} + +func (l *Libvirt) NodeDeviceCreateXML(XMLDesc string, Flags uint32) (rDev NonnullNodeDevice, err error) { + var buf bytes.Buffer + + args := NodeDeviceCreateXMLArgs { + XMLDesc: XMLDesc, + Flags: Flags, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(123, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := NodeDeviceCreateXMLRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rDev = result.Dev + + return +} + +func (l *Libvirt) NodeDeviceDestroy(Name string) (err error) { + var buf bytes.Buffer + + args := NodeDeviceDestroyArgs { + Name: Name, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(124, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + return +} + +func (l *Libvirt) StorageVolCreateXMLFrom(Pool NonnullStoragePool, XML string, Clonevol NonnullStorageVol, Flags uint32) (rVol NonnullStorageVol, err error) { + var buf bytes.Buffer + + args := StorageVolCreateXMLFromArgs { + Pool: Pool, + XML: XML, + Clonevol: Clonevol, + Flags: Flags, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(125, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := StorageVolCreateXMLFromRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rVol = result.Vol + + return +} + +func (l *Libvirt) ConnectNumOfInterfaces() (rNum int32, err error) { + var buf bytes.Buffer + + var resp <-chan response + resp, err = l.request(126, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := ConnectNumOfInterfacesRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rNum = result.Num + + return +} + +func (l *Libvirt) ConnectListInterfaces(Maxnames int32) (rNames []string, err error) { + var buf bytes.Buffer + + args := ConnectListInterfacesArgs { + Maxnames: Maxnames, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(127, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := ConnectListInterfacesRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rNames = result.Names + + return +} + +func (l *Libvirt) InterfaceLookupByName(Name string) (rIface NonnullInterface, err error) { + var buf bytes.Buffer + + args := InterfaceLookupByNameArgs { + Name: Name, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(128, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := InterfaceLookupByNameRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rIface = result.Iface + + return +} + +func (l *Libvirt) InterfaceLookupByMacString(Mac string) (rIface NonnullInterface, err error) { + var buf bytes.Buffer + + args := InterfaceLookupByMacStringArgs { + Mac: Mac, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(129, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := InterfaceLookupByMacStringRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rIface = result.Iface + + return +} + +func (l *Libvirt) InterfaceGetXMLDesc(Iface NonnullInterface, Flags uint32) (rXML string, err error) { + var buf bytes.Buffer + + args := InterfaceGetXMLDescArgs { + Iface: Iface, + Flags: Flags, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(130, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := InterfaceGetXMLDescRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rXML = result.XML + + return +} + +func (l *Libvirt) InterfaceDefineXML(XML string, Flags uint32) (rIface NonnullInterface, err error) { + var buf bytes.Buffer + + args := InterfaceDefineXMLArgs { + XML: XML, + Flags: Flags, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(131, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := InterfaceDefineXMLRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rIface = result.Iface + + return +} + +func (l *Libvirt) InterfaceUndefine(Iface NonnullInterface) (err error) { + var buf bytes.Buffer + + args := InterfaceUndefineArgs { + Iface: Iface, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(132, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + return +} + +func (l *Libvirt) InterfaceCreate(Iface NonnullInterface, Flags uint32) (err error) { + var buf bytes.Buffer + + args := InterfaceCreateArgs { + Iface: Iface, + Flags: Flags, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(133, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + return +} + +func (l *Libvirt) InterfaceDestroy(Iface NonnullInterface, Flags uint32) (err error) { + var buf bytes.Buffer + + args := InterfaceDestroyArgs { + Iface: Iface, + Flags: Flags, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(134, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + return +} + +func (l *Libvirt) ConnectDomainXMLFromNative(NativeFormat string, NativeConfig string, Flags uint32) (rDomainXML string, err error) { + var buf bytes.Buffer + + args := ConnectDomainXMLFromNativeArgs { + NativeFormat: NativeFormat, + NativeConfig: NativeConfig, + Flags: Flags, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(135, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := ConnectDomainXMLFromNativeRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rDomainXML = result.DomainXML + + return +} + +func (l *Libvirt) ConnectDomainXMLToNative(NativeFormat string, DomainXML string, Flags uint32) (rNativeConfig string, err error) { + var buf bytes.Buffer + + args := ConnectDomainXMLToNativeArgs { + NativeFormat: NativeFormat, + DomainXML: DomainXML, + Flags: Flags, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(136, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := ConnectDomainXMLToNativeRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rNativeConfig = result.NativeConfig + + return +} + +func (l *Libvirt) ConnectNumOfDefinedInterfaces() (rNum int32, err error) { + var buf bytes.Buffer + + var resp <-chan response + resp, err = l.request(137, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := ConnectNumOfDefinedInterfacesRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rNum = result.Num + + return +} + +func (l *Libvirt) ConnectListDefinedInterfaces(Maxnames int32) (rNames []string, err error) { + var buf bytes.Buffer + + args := ConnectListDefinedInterfacesArgs { + Maxnames: Maxnames, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(138, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := ConnectListDefinedInterfacesRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rNames = result.Names + + return +} + +func (l *Libvirt) ConnectNumOfSecrets() (rNum int32, err error) { + var buf bytes.Buffer + + var resp <-chan response + resp, err = l.request(139, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := ConnectNumOfSecretsRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rNum = result.Num + + return +} + +func (l *Libvirt) ConnectListSecrets(Maxuuids int32) (rUuids []string, err error) { + var buf bytes.Buffer + + args := ConnectListSecretsArgs { + Maxuuids: Maxuuids, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(140, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := ConnectListSecretsRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rUuids = result.Uuids + + return +} + +func (l *Libvirt) SecretLookupByUUID(UUID UUID) (rSecret NonnullSecret, err error) { + var buf bytes.Buffer + + args := SecretLookupByUUIDArgs { + UUID: UUID, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(141, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := SecretLookupByUUIDRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rSecret = result.Secret + + return +} + +func (l *Libvirt) SecretDefineXML(XML string, Flags uint32) (rSecret NonnullSecret, err error) { + var buf bytes.Buffer + + args := SecretDefineXMLArgs { + XML: XML, + Flags: Flags, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(142, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := SecretDefineXMLRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rSecret = result.Secret + + return +} + +func (l *Libvirt) SecretGetXMLDesc(Secret NonnullSecret, Flags uint32) (rXML string, err error) { + var buf bytes.Buffer + + args := SecretGetXMLDescArgs { + Secret: Secret, + Flags: Flags, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(143, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := SecretGetXMLDescRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rXML = result.XML + + return +} + +func (l *Libvirt) SecretSetValue(Secret NonnullSecret, Value []byte, Flags uint32) (err error) { + var buf bytes.Buffer + + args := SecretSetValueArgs { + Secret: Secret, + Value: Value, + Flags: Flags, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(144, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + return +} + +func (l *Libvirt) SecretGetValue(Secret NonnullSecret, Flags uint32) (rValue []byte, err error) { + var buf bytes.Buffer + + args := SecretGetValueArgs { + Secret: Secret, + Flags: Flags, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(145, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := SecretGetValueRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rValue = result.Value + + return +} + +func (l *Libvirt) SecretUndefine(Secret NonnullSecret) (err error) { + var buf bytes.Buffer + + args := SecretUndefineArgs { + Secret: Secret, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(146, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + return +} + +func (l *Libvirt) SecretLookupByUsage(UsageType int32, UsageID string) (rSecret NonnullSecret, err error) { + var buf bytes.Buffer + + args := SecretLookupByUsageArgs { + UsageType: UsageType, + UsageID: UsageID, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(147, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := SecretLookupByUsageRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rSecret = result.Secret + + return +} + +func (l *Libvirt) DomainMigratePrepareTunnel(Flags uint64, Dname string, Resource uint64, DomXML string) (err error) { + var buf bytes.Buffer + + args := DomainMigratePrepareTunnelArgs { + Flags: Flags, + Dname: Dname, + Resource: Resource, + DomXML: DomXML, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(148, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + return +} + +func (l *Libvirt) ConnectIsSecure() (rSecure int32, err error) { + var buf bytes.Buffer + + var resp <-chan response + resp, err = l.request(149, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := ConnectIsSecureRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rSecure = result.Secure + + return +} + +func (l *Libvirt) DomainIsActive(Dom NonnullDomain) (rActive int32, err error) { + var buf bytes.Buffer + + args := DomainIsActiveArgs { + Dom: Dom, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(150, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := DomainIsActiveRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rActive = result.Active + + return +} + +func (l *Libvirt) DomainIsPersistent(Dom NonnullDomain) (rPersistent int32, err error) { + var buf bytes.Buffer + + args := DomainIsPersistentArgs { + Dom: Dom, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(151, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := DomainIsPersistentRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rPersistent = result.Persistent + + return +} + +func (l *Libvirt) NetworkIsActive(Net NonnullNetwork) (rActive int32, err error) { + var buf bytes.Buffer + + args := NetworkIsActiveArgs { + Net: Net, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(152, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := NetworkIsActiveRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rActive = result.Active + + return +} + +func (l *Libvirt) NetworkIsPersistent(Net NonnullNetwork) (rPersistent int32, err error) { + var buf bytes.Buffer + + args := NetworkIsPersistentArgs { + Net: Net, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(153, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := NetworkIsPersistentRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rPersistent = result.Persistent + + return +} + +func (l *Libvirt) StoragePoolIsActive(Pool NonnullStoragePool) (rActive int32, err error) { + var buf bytes.Buffer + + args := StoragePoolIsActiveArgs { + Pool: Pool, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(154, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := StoragePoolIsActiveRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rActive = result.Active + + return +} + +func (l *Libvirt) StoragePoolIsPersistent(Pool NonnullStoragePool) (rPersistent int32, err error) { + var buf bytes.Buffer + + args := StoragePoolIsPersistentArgs { + Pool: Pool, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(155, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := StoragePoolIsPersistentRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rPersistent = result.Persistent + + return +} + +func (l *Libvirt) InterfaceIsActive(Iface NonnullInterface) (rActive int32, err error) { + var buf bytes.Buffer + + args := InterfaceIsActiveArgs { + Iface: Iface, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(156, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := InterfaceIsActiveRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rActive = result.Active + + return +} + +func (l *Libvirt) ConnectGetLibVersion() (rLibVer uint64, err error) { + var buf bytes.Buffer + + var resp <-chan response + resp, err = l.request(157, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := ConnectGetLibVersionRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rLibVer = result.LibVer + + return +} + +func (l *Libvirt) ConnectCompareCPU(XML string, Flags uint32) (rResult int32, err error) { + var buf bytes.Buffer + + args := ConnectCompareCPUArgs { + XML: XML, + Flags: Flags, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(158, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := ConnectCompareCPURet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rResult = result.Result + + return +} + +func (l *Libvirt) DomainMemoryStats(Dom NonnullDomain, MaxStats uint32, Flags uint32) (rStats []DomainMemoryStat, err error) { + var buf bytes.Buffer + + args := DomainMemoryStatsArgs { + Dom: Dom, + MaxStats: MaxStats, + Flags: Flags, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(159, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := DomainMemoryStatsRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rStats = result.Stats + + return +} + +func (l *Libvirt) DomainAttachDeviceFlags(Dom NonnullDomain, XML string, Flags uint32) (err error) { + var buf bytes.Buffer + + args := DomainAttachDeviceFlagsArgs { + Dom: Dom, + XML: XML, + Flags: Flags, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(160, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + return +} + +func (l *Libvirt) DomainDetachDeviceFlags(Dom NonnullDomain, XML string, Flags uint32) (err error) { + var buf bytes.Buffer + + args := DomainDetachDeviceFlagsArgs { + Dom: Dom, + XML: XML, + Flags: Flags, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(161, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + return +} + +func (l *Libvirt) ConnectBaselineCPU(XMLCPUs []string, Flags uint32) (rCPU string, err error) { + var buf bytes.Buffer + + args := ConnectBaselineCPUArgs { + XMLCPUs: XMLCPUs, + Flags: Flags, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(162, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := ConnectBaselineCPURet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rCPU = result.CPU + + return +} + +func (l *Libvirt) DomainGetJobInfo(Dom NonnullDomain) (rType int32, rTimeElapsed uint64, rTimeRemaining uint64, rDataTotal uint64, rDataProcessed uint64, rDataRemaining uint64, rMemTotal uint64, rMemProcessed uint64, rMemRemaining uint64, rFileTotal uint64, rFileProcessed uint64, rFileRemaining uint64, err error) { + var buf bytes.Buffer + + args := DomainGetJobInfoArgs { + Dom: Dom, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(163, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := DomainGetJobInfoRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rType = result.Type + rTimeElapsed = result.TimeElapsed + rTimeRemaining = result.TimeRemaining + rDataTotal = result.DataTotal + rDataProcessed = result.DataProcessed + rDataRemaining = result.DataRemaining + rMemTotal = result.MemTotal + rMemProcessed = result.MemProcessed + rMemRemaining = result.MemRemaining + rFileTotal = result.FileTotal + rFileProcessed = result.FileProcessed + rFileRemaining = result.FileRemaining + + return +} + +func (l *Libvirt) DomainAbortJob(Dom NonnullDomain) (err error) { + var buf bytes.Buffer + + args := DomainAbortJobArgs { + Dom: Dom, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(164, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + return +} + +func (l *Libvirt) StorageVolWipe(Vol NonnullStorageVol, Flags uint32) (err error) { + var buf bytes.Buffer + + args := StorageVolWipeArgs { + Vol: Vol, + Flags: Flags, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(165, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + return +} + +func (l *Libvirt) DomainMigrateSetMaxDowntime(Dom NonnullDomain, Downtime uint64, Flags uint32) (err error) { + var buf bytes.Buffer + + args := DomainMigrateSetMaxDowntimeArgs { + Dom: Dom, + Downtime: Downtime, + Flags: Flags, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(166, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + return +} + +func (l *Libvirt) ConnectDomainEventRegisterAny(EventID int32) (err error) { + var buf bytes.Buffer + + args := ConnectDomainEventRegisterAnyArgs { + EventID: EventID, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(167, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + return +} + +func (l *Libvirt) ConnectDomainEventDeregisterAny(EventID int32) (err error) { + var buf bytes.Buffer + + args := ConnectDomainEventDeregisterAnyArgs { + EventID: EventID, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(168, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + return +} + +func (l *Libvirt) DomainEventReboot() (err error) { + var buf bytes.Buffer + + var resp <-chan response + resp, err = l.request(169, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + return +} + +func (l *Libvirt) DomainEventRtcChange() (err error) { + var buf bytes.Buffer + + var resp <-chan response + resp, err = l.request(170, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + return +} + +func (l *Libvirt) DomainEventWatchdog() (err error) { + var buf bytes.Buffer + + var resp <-chan response + resp, err = l.request(171, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + return +} + +func (l *Libvirt) DomainEventIOError() (err error) { + var buf bytes.Buffer + + var resp <-chan response + resp, err = l.request(172, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + return +} + +func (l *Libvirt) DomainEventGraphics() (err error) { + var buf bytes.Buffer + + var resp <-chan response + resp, err = l.request(173, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + return +} + +func (l *Libvirt) DomainUpdateDeviceFlags(Dom NonnullDomain, XML string, Flags uint32) (err error) { + var buf bytes.Buffer + + args := DomainUpdateDeviceFlagsArgs { + Dom: Dom, + XML: XML, + Flags: Flags, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(174, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + return +} + +func (l *Libvirt) NwfilterLookupByName(Name string) (rNwfilter NonnullNwfilter, err error) { + var buf bytes.Buffer + + args := NwfilterLookupByNameArgs { + Name: Name, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(175, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := NwfilterLookupByNameRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rNwfilter = result.Nwfilter + + return +} + +func (l *Libvirt) NwfilterLookupByUUID(UUID UUID) (rNwfilter NonnullNwfilter, err error) { + var buf bytes.Buffer + + args := NwfilterLookupByUUIDArgs { + UUID: UUID, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(176, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := NwfilterLookupByUUIDRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rNwfilter = result.Nwfilter + + return +} + +func (l *Libvirt) NwfilterGetXMLDesc(Nwfilter NonnullNwfilter, Flags uint32) (rXML string, err error) { + var buf bytes.Buffer + + args := NwfilterGetXMLDescArgs { + Nwfilter: Nwfilter, + Flags: Flags, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(177, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := NwfilterGetXMLDescRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rXML = result.XML + + return +} + +func (l *Libvirt) ConnectNumOfNwfilters() (rNum int32, err error) { + var buf bytes.Buffer + + var resp <-chan response + resp, err = l.request(178, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := ConnectNumOfNwfiltersRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rNum = result.Num + + return +} + +func (l *Libvirt) ConnectListNwfilters(Maxnames int32) (rNames []string, err error) { + var buf bytes.Buffer + + args := ConnectListNwfiltersArgs { + Maxnames: Maxnames, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(179, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := ConnectListNwfiltersRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rNames = result.Names + + return +} + +func (l *Libvirt) NwfilterDefineXML(XML string) (rNwfilter NonnullNwfilter, err error) { + var buf bytes.Buffer + + args := NwfilterDefineXMLArgs { + XML: XML, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(180, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := NwfilterDefineXMLRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rNwfilter = result.Nwfilter + + return +} + +func (l *Libvirt) NwfilterUndefine(Nwfilter NonnullNwfilter) (err error) { + var buf bytes.Buffer + + args := NwfilterUndefineArgs { + Nwfilter: Nwfilter, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(181, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + return +} + +func (l *Libvirt) DomainManagedSave(Dom NonnullDomain, Flags uint32) (err error) { + var buf bytes.Buffer + + args := DomainManagedSaveArgs { + Dom: Dom, + Flags: Flags, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(182, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + return +} + +func (l *Libvirt) DomainHasManagedSaveImage(Dom NonnullDomain, Flags uint32) (rResult int32, err error) { + var buf bytes.Buffer + + args := DomainHasManagedSaveImageArgs { + Dom: Dom, + Flags: Flags, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(183, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := DomainHasManagedSaveImageRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rResult = result.Result + + return +} + +func (l *Libvirt) DomainManagedSaveRemove(Dom NonnullDomain, Flags uint32) (err error) { + var buf bytes.Buffer + + args := DomainManagedSaveRemoveArgs { + Dom: Dom, + Flags: Flags, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(184, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + return +} + +func (l *Libvirt) DomainSnapshotCreateXML(Dom NonnullDomain, XMLDesc string, Flags uint32) (rSnap NonnullDomainSnapshot, err error) { + var buf bytes.Buffer + + args := DomainSnapshotCreateXMLArgs { + Dom: Dom, + XMLDesc: XMLDesc, + Flags: Flags, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(185, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := DomainSnapshotCreateXMLRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rSnap = result.Snap + + return +} + +func (l *Libvirt) DomainSnapshotGetXMLDesc(Snap NonnullDomainSnapshot, Flags uint32) (rXML string, err error) { + var buf bytes.Buffer + + args := DomainSnapshotGetXMLDescArgs { + Snap: Snap, + Flags: Flags, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(186, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := DomainSnapshotGetXMLDescRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rXML = result.XML + + return +} + +func (l *Libvirt) DomainSnapshotNum(Dom NonnullDomain, Flags uint32) (rNum int32, err error) { + var buf bytes.Buffer + + args := DomainSnapshotNumArgs { + Dom: Dom, + Flags: Flags, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(187, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := DomainSnapshotNumRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rNum = result.Num + + return +} + +func (l *Libvirt) DomainSnapshotListNames(Dom NonnullDomain, Maxnames int32, Flags uint32) (rNames []string, err error) { + var buf bytes.Buffer + + args := DomainSnapshotListNamesArgs { + Dom: Dom, + Maxnames: Maxnames, + Flags: Flags, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(188, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := DomainSnapshotListNamesRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rNames = result.Names + + return +} + +func (l *Libvirt) DomainSnapshotLookupByName(Dom NonnullDomain, Name string, Flags uint32) (rSnap NonnullDomainSnapshot, err error) { + var buf bytes.Buffer + + args := DomainSnapshotLookupByNameArgs { + Dom: Dom, + Name: Name, + Flags: Flags, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(189, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := DomainSnapshotLookupByNameRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rSnap = result.Snap + + return +} + +func (l *Libvirt) DomainHasCurrentSnapshot(Dom NonnullDomain, Flags uint32) (rResult int32, err error) { + var buf bytes.Buffer + + args := DomainHasCurrentSnapshotArgs { + Dom: Dom, + Flags: Flags, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(190, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := DomainHasCurrentSnapshotRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rResult = result.Result + + return +} + +func (l *Libvirt) DomainSnapshotCurrent(Dom NonnullDomain, Flags uint32) (rSnap NonnullDomainSnapshot, err error) { + var buf bytes.Buffer + + args := DomainSnapshotCurrentArgs { + Dom: Dom, + Flags: Flags, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(191, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := DomainSnapshotCurrentRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rSnap = result.Snap + + return +} + +func (l *Libvirt) DomainRevertToSnapshot(Snap NonnullDomainSnapshot, Flags uint32) (err error) { + var buf bytes.Buffer + + args := DomainRevertToSnapshotArgs { + Snap: Snap, + Flags: Flags, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(192, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + return +} + +func (l *Libvirt) DomainSnapshotDelete(Snap NonnullDomainSnapshot, Flags uint32) (err error) { + var buf bytes.Buffer + + args := DomainSnapshotDeleteArgs { + Snap: Snap, + Flags: Flags, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(193, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + return +} + +func (l *Libvirt) DomainGetBlockInfo(Dom NonnullDomain, Path string, Flags uint32) (rAllocation uint64, rCapacity uint64, rPhysical uint64, err error) { + var buf bytes.Buffer + + args := DomainGetBlockInfoArgs { + Dom: Dom, + Path: Path, + Flags: Flags, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(194, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := DomainGetBlockInfoRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rAllocation = result.Allocation + rCapacity = result.Capacity + rPhysical = result.Physical + + return +} + +func (l *Libvirt) DomainEventIOErrorReason() (err error) { + var buf bytes.Buffer + + var resp <-chan response + resp, err = l.request(195, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + return +} + +func (l *Libvirt) DomainCreateWithFlags(Dom NonnullDomain, Flags uint32) (rDom NonnullDomain, err error) { + var buf bytes.Buffer + + args := DomainCreateWithFlagsArgs { + Dom: Dom, + Flags: Flags, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(196, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := DomainCreateWithFlagsRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rDom = result.Dom + + return +} + +func (l *Libvirt) DomainSetMemoryParameters(Dom NonnullDomain, Params []TypedParam, Flags uint32) (err error) { + var buf bytes.Buffer + + args := DomainSetMemoryParametersArgs { + Dom: Dom, + Params: Params, + Flags: Flags, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(197, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + return +} + +func (l *Libvirt) DomainGetMemoryParameters(Dom NonnullDomain, Nparams int32, Flags uint32) (rParams []TypedParam, rNparams int32, err error) { + var buf bytes.Buffer + + args := DomainGetMemoryParametersArgs { + Dom: Dom, + Nparams: Nparams, + Flags: Flags, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(198, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := DomainGetMemoryParametersRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rParams = result.Params + rNparams = result.Nparams + + return +} + +func (l *Libvirt) DomainSetVcpusFlags(Dom NonnullDomain, Nvcpus uint32, Flags uint32) (err error) { + var buf bytes.Buffer + + args := DomainSetVcpusFlagsArgs { + Dom: Dom, + Nvcpus: Nvcpus, + Flags: Flags, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(199, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + return +} + +func (l *Libvirt) DomainGetVcpusFlags(Dom NonnullDomain, Flags uint32) (rNum int32, err error) { + var buf bytes.Buffer + + args := DomainGetVcpusFlagsArgs { + Dom: Dom, + Flags: Flags, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(200, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := DomainGetVcpusFlagsRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rNum = result.Num + + return +} + +func (l *Libvirt) DomainOpenConsole(Dom NonnullDomain, DevName string, Flags uint32) (err error) { + var buf bytes.Buffer + + args := DomainOpenConsoleArgs { + Dom: Dom, + DevName: DevName, + Flags: Flags, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(201, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + return +} + +func (l *Libvirt) DomainIsUpdated(Dom NonnullDomain) (rUpdated int32, err error) { + var buf bytes.Buffer + + args := DomainIsUpdatedArgs { + Dom: Dom, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(202, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := DomainIsUpdatedRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rUpdated = result.Updated + + return +} + +func (l *Libvirt) ConnectGetSysinfo(Flags uint32) (rSysinfo string, err error) { + var buf bytes.Buffer + + args := ConnectGetSysinfoArgs { + Flags: Flags, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(203, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := ConnectGetSysinfoRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rSysinfo = result.Sysinfo + + return +} + +func (l *Libvirt) DomainSetMemoryFlags(Dom NonnullDomain, Memory uint64, Flags uint32) (err error) { + var buf bytes.Buffer + + args := DomainSetMemoryFlagsArgs { + Dom: Dom, + Memory: Memory, + Flags: Flags, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(204, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + return +} + +func (l *Libvirt) DomainSetBlkioParameters(Dom NonnullDomain, Params []TypedParam, Flags uint32) (err error) { + var buf bytes.Buffer + + args := DomainSetBlkioParametersArgs { + Dom: Dom, + Params: Params, + Flags: Flags, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(205, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + return +} + +func (l *Libvirt) DomainGetBlkioParameters(Dom NonnullDomain, Nparams int32, Flags uint32) (rParams []TypedParam, rNparams int32, err error) { + var buf bytes.Buffer + + args := DomainGetBlkioParametersArgs { + Dom: Dom, + Nparams: Nparams, + Flags: Flags, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(206, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := DomainGetBlkioParametersRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rParams = result.Params + rNparams = result.Nparams + + return +} + +func (l *Libvirt) DomainMigrateSetMaxSpeed(Dom NonnullDomain, Bandwidth uint64, Flags uint32) (err error) { + var buf bytes.Buffer + + args := DomainMigrateSetMaxSpeedArgs { + Dom: Dom, + Bandwidth: Bandwidth, + Flags: Flags, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(207, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + return +} + +func (l *Libvirt) StorageVolUpload(Vol NonnullStorageVol, Offset uint64, Length uint64, Flags uint32) (err error) { + var buf bytes.Buffer + + args := StorageVolUploadArgs { + Vol: Vol, + Offset: Offset, + Length: Length, + Flags: Flags, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(208, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + return +} + +func (l *Libvirt) StorageVolDownload(Vol NonnullStorageVol, Offset uint64, Length uint64, Flags uint32) (err error) { + var buf bytes.Buffer + + args := StorageVolDownloadArgs { + Vol: Vol, + Offset: Offset, + Length: Length, + Flags: Flags, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(209, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + return +} + +func (l *Libvirt) DomainInjectNmi(Dom NonnullDomain, Flags uint32) (err error) { + var buf bytes.Buffer + + args := DomainInjectNmiArgs { + Dom: Dom, + Flags: Flags, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(210, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + return +} + +func (l *Libvirt) DomainScreenshot(Dom NonnullDomain, Screen uint32, Flags uint32) (rMime string, err error) { + var buf bytes.Buffer + + args := DomainScreenshotArgs { + Dom: Dom, + Screen: Screen, + Flags: Flags, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(211, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := DomainScreenshotRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rMime = result.Mime + + return +} + +func (l *Libvirt) DomainGetState(Dom NonnullDomain, Flags uint32) (rState int32, rReason int32, err error) { + var buf bytes.Buffer + + args := DomainGetStateArgs { + Dom: Dom, + Flags: Flags, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(212, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := DomainGetStateRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rState = result.State + rReason = result.Reason + + return +} + +func (l *Libvirt) DomainMigrateBegin3(Dom NonnullDomain, Xmlin string, Flags uint64, Dname string, Resource uint64) (rCookieOut []byte, rXML string, err error) { + var buf bytes.Buffer + + args := DomainMigrateBegin3Args { + Dom: Dom, + Xmlin: Xmlin, + Flags: Flags, + Dname: Dname, + Resource: Resource, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(213, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := DomainMigrateBegin3Ret{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rCookieOut = result.CookieOut + rXML = result.XML + + return +} + +func (l *Libvirt) DomainMigratePrepare3(CookieIn []byte, UriIn string, Flags uint64, Dname string, Resource uint64, DomXML string) (rCookieOut []byte, rUriOut string, err error) { + var buf bytes.Buffer + + args := DomainMigratePrepare3Args { + CookieIn: CookieIn, + UriIn: UriIn, + Flags: Flags, + Dname: Dname, + Resource: Resource, + DomXML: DomXML, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(214, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := DomainMigratePrepare3Ret{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rCookieOut = result.CookieOut + rUriOut = result.UriOut + + return +} + +func (l *Libvirt) DomainMigratePrepareTunnel3(CookieIn []byte, Flags uint64, Dname string, Resource uint64, DomXML string) (rCookieOut []byte, err error) { + var buf bytes.Buffer + + args := DomainMigratePrepareTunnel3Args { + CookieIn: CookieIn, + Flags: Flags, + Dname: Dname, + Resource: Resource, + DomXML: DomXML, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(215, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := DomainMigratePrepareTunnel3Ret{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rCookieOut = result.CookieOut + + return +} + +func (l *Libvirt) DomainMigratePerform3(Dom NonnullDomain, Xmlin string, CookieIn []byte, Dconnuri string, Uri string, Flags uint64, Dname string, Resource uint64) (rCookieOut []byte, err error) { + var buf bytes.Buffer + + args := DomainMigratePerform3Args { + Dom: Dom, + Xmlin: Xmlin, + CookieIn: CookieIn, + Dconnuri: Dconnuri, + Uri: Uri, + Flags: Flags, + Dname: Dname, + Resource: Resource, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(216, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := DomainMigratePerform3Ret{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rCookieOut = result.CookieOut + + return +} + +func (l *Libvirt) DomainMigrateFinish3(Dname string, CookieIn []byte, Dconnuri string, Uri string, Flags uint64, Cancelled int32) (rDom NonnullDomain, rCookieOut []byte, err error) { + var buf bytes.Buffer + + args := DomainMigrateFinish3Args { + Dname: Dname, + CookieIn: CookieIn, + Dconnuri: Dconnuri, + Uri: Uri, + Flags: Flags, + Cancelled: Cancelled, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(217, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := DomainMigrateFinish3Ret{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rDom = result.Dom + rCookieOut = result.CookieOut + + return +} + +func (l *Libvirt) DomainMigrateConfirm3(Dom NonnullDomain, CookieIn []byte, Flags uint64, Cancelled int32) (err error) { + var buf bytes.Buffer + + args := DomainMigrateConfirm3Args { + Dom: Dom, + CookieIn: CookieIn, + Flags: Flags, + Cancelled: Cancelled, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(218, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + return +} + +func (l *Libvirt) DomainSetSchedulerParametersFlags(Dom NonnullDomain, Params []TypedParam, Flags uint32) (err error) { + var buf bytes.Buffer + + args := DomainSetSchedulerParametersFlagsArgs { + Dom: Dom, + Params: Params, + Flags: Flags, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(219, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + return +} + +func (l *Libvirt) InterfaceChangeBegin(Flags uint32) (err error) { + var buf bytes.Buffer + + args := InterfaceChangeBeginArgs { + Flags: Flags, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(220, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + return +} + +func (l *Libvirt) InterfaceChangeCommit(Flags uint32) (err error) { + var buf bytes.Buffer + + args := InterfaceChangeCommitArgs { + Flags: Flags, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(221, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + return +} + +func (l *Libvirt) InterfaceChangeRollback(Flags uint32) (err error) { + var buf bytes.Buffer + + args := InterfaceChangeRollbackArgs { + Flags: Flags, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(222, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + return +} + +func (l *Libvirt) DomainGetSchedulerParametersFlags(Dom NonnullDomain, Nparams int32, Flags uint32) (rParams []TypedParam, err error) { + var buf bytes.Buffer + + args := DomainGetSchedulerParametersFlagsArgs { + Dom: Dom, + Nparams: Nparams, + Flags: Flags, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(223, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := DomainGetSchedulerParametersFlagsRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rParams = result.Params + + return +} + +func (l *Libvirt) DomainEventControlError() (err error) { + var buf bytes.Buffer + + var resp <-chan response + resp, err = l.request(224, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + return +} + +func (l *Libvirt) DomainPinVcpuFlags(Dom NonnullDomain, Vcpu uint32, Cpumap []byte, Flags uint32) (err error) { + var buf bytes.Buffer + + args := DomainPinVcpuFlagsArgs { + Dom: Dom, + Vcpu: Vcpu, + Cpumap: Cpumap, + Flags: Flags, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(225, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + return +} + +func (l *Libvirt) DomainSendKey(Dom NonnullDomain, Codeset uint32, Holdtime uint32, Keycodes []uint32, Flags uint32) (err error) { + var buf bytes.Buffer + + args := DomainSendKeyArgs { + Dom: Dom, + Codeset: Codeset, + Holdtime: Holdtime, + Keycodes: Keycodes, + Flags: Flags, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(226, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + return +} + +func (l *Libvirt) NodeGetCPUStats(CPUNum int32, Nparams int32, Flags uint32) (rParams []NodeGetCPUStats, rNparams int32, err error) { + var buf bytes.Buffer + + args := NodeGetCPUStatsArgs { + CPUNum: CPUNum, + Nparams: Nparams, + Flags: Flags, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(227, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := NodeGetCPUStatsRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rParams = result.Params + rNparams = result.Nparams + + return +} + +func (l *Libvirt) NodeGetMemoryStats(Nparams int32, CellNum int32, Flags uint32) (rParams []NodeGetMemoryStats, rNparams int32, err error) { + var buf bytes.Buffer + + args := NodeGetMemoryStatsArgs { + Nparams: Nparams, + CellNum: CellNum, + Flags: Flags, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(228, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := NodeGetMemoryStatsRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rParams = result.Params + rNparams = result.Nparams + + return +} + +func (l *Libvirt) DomainGetControlInfo(Dom NonnullDomain, Flags uint32) (rState uint32, rDetails uint32, rStateTime uint64, err error) { + var buf bytes.Buffer + + args := DomainGetControlInfoArgs { + Dom: Dom, + Flags: Flags, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(229, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := DomainGetControlInfoRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rState = result.State + rDetails = result.Details + rStateTime = result.StateTime + + return +} + +func (l *Libvirt) DomainGetVcpuPinInfo(Dom NonnullDomain, Ncpumaps int32, Maplen int32, Flags uint32) (rCpumaps []byte, rNum int32, err error) { + var buf bytes.Buffer + + args := DomainGetVcpuPinInfoArgs { + Dom: Dom, + Ncpumaps: Ncpumaps, + Maplen: Maplen, + Flags: Flags, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(230, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := DomainGetVcpuPinInfoRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rCpumaps = result.Cpumaps + rNum = result.Num + + return +} + +func (l *Libvirt) DomainUndefineFlags(Dom NonnullDomain, Flags uint32) (err error) { + var buf bytes.Buffer + + args := DomainUndefineFlagsArgs { + Dom: Dom, + Flags: Flags, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(231, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + return +} + +func (l *Libvirt) DomainSaveFlags(Dom NonnullDomain, To string, Dxml string, Flags uint32) (err error) { + var buf bytes.Buffer + + args := DomainSaveFlagsArgs { + Dom: Dom, + To: To, + Dxml: Dxml, + Flags: Flags, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(232, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + return +} + +func (l *Libvirt) DomainRestoreFlags(From string, Dxml string, Flags uint32) (err error) { + var buf bytes.Buffer + + args := DomainRestoreFlagsArgs { + From: From, + Dxml: Dxml, + Flags: Flags, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(233, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + return +} + +func (l *Libvirt) DomainDestroyFlags(Dom NonnullDomain, Flags uint32) (err error) { + var buf bytes.Buffer + + args := DomainDestroyFlagsArgs { + Dom: Dom, + Flags: Flags, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(234, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + return +} + +func (l *Libvirt) DomainSaveImageGetXMLDesc(File string, Flags uint32) (rXML string, err error) { + var buf bytes.Buffer + + args := DomainSaveImageGetXMLDescArgs { + File: File, + Flags: Flags, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(235, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := DomainSaveImageGetXMLDescRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rXML = result.XML + + return +} + +func (l *Libvirt) DomainSaveImageDefineXML(File string, Dxml string, Flags uint32) (err error) { + var buf bytes.Buffer + + args := DomainSaveImageDefineXMLArgs { + File: File, + Dxml: Dxml, + Flags: Flags, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(236, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + return +} + +func (l *Libvirt) DomainBlockJobAbort(Dom NonnullDomain, Path string, Flags uint32) (err error) { + var buf bytes.Buffer + + args := DomainBlockJobAbortArgs { + Dom: Dom, + Path: Path, + Flags: Flags, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(237, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + return +} + +func (l *Libvirt) DomainGetBlockJobInfo(Dom NonnullDomain, Path string, Flags uint32) (rFound int32, rType int32, rBandwidth uint64, rCur uint64, rEnd uint64, err error) { + var buf bytes.Buffer + + args := DomainGetBlockJobInfoArgs { + Dom: Dom, + Path: Path, + Flags: Flags, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(238, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := DomainGetBlockJobInfoRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rFound = result.Found + rType = result.Type + rBandwidth = result.Bandwidth + rCur = result.Cur + rEnd = result.End + + return +} + +func (l *Libvirt) DomainBlockJobSetSpeed(Dom NonnullDomain, Path string, Bandwidth uint64, Flags uint32) (err error) { + var buf bytes.Buffer + + args := DomainBlockJobSetSpeedArgs { + Dom: Dom, + Path: Path, + Bandwidth: Bandwidth, + Flags: Flags, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(239, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + return +} + +func (l *Libvirt) DomainBlockPull(Dom NonnullDomain, Path string, Bandwidth uint64, Flags uint32) (err error) { + var buf bytes.Buffer + + args := DomainBlockPullArgs { + Dom: Dom, + Path: Path, + Bandwidth: Bandwidth, + Flags: Flags, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(240, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + return +} + +func (l *Libvirt) DomainEventBlockJob() (err error) { + var buf bytes.Buffer + + var resp <-chan response + resp, err = l.request(241, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + return +} + +func (l *Libvirt) DomainMigrateGetMaxSpeed(Dom NonnullDomain, Flags uint32) (rBandwidth uint64, err error) { + var buf bytes.Buffer + + args := DomainMigrateGetMaxSpeedArgs { + Dom: Dom, + Flags: Flags, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(242, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := DomainMigrateGetMaxSpeedRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rBandwidth = result.Bandwidth + + return +} + +func (l *Libvirt) DomainBlockStatsFlags(Dom NonnullDomain, Path string, Nparams int32, Flags uint32) (rParams []TypedParam, rNparams int32, err error) { + var buf bytes.Buffer + + args := DomainBlockStatsFlagsArgs { + Dom: Dom, + Path: Path, + Nparams: Nparams, + Flags: Flags, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(243, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := DomainBlockStatsFlagsRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rParams = result.Params + rNparams = result.Nparams + + return +} + +func (l *Libvirt) DomainSnapshotGetParent(Snap NonnullDomainSnapshot, Flags uint32) (rSnap NonnullDomainSnapshot, err error) { + var buf bytes.Buffer + + args := DomainSnapshotGetParentArgs { + Snap: Snap, + Flags: Flags, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(244, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := DomainSnapshotGetParentRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rSnap = result.Snap + + return +} + +func (l *Libvirt) DomainReset(Dom NonnullDomain, Flags uint32) (err error) { + var buf bytes.Buffer + + args := DomainResetArgs { + Dom: Dom, + Flags: Flags, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(245, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + return +} + +func (l *Libvirt) DomainSnapshotNumChildren(Snap NonnullDomainSnapshot, Flags uint32) (rNum int32, err error) { + var buf bytes.Buffer + + args := DomainSnapshotNumChildrenArgs { + Snap: Snap, + Flags: Flags, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(246, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := DomainSnapshotNumChildrenRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rNum = result.Num + + return +} + +func (l *Libvirt) DomainSnapshotListChildrenNames(Snap NonnullDomainSnapshot, Maxnames int32, Flags uint32) (rNames []string, err error) { + var buf bytes.Buffer + + args := DomainSnapshotListChildrenNamesArgs { + Snap: Snap, + Maxnames: Maxnames, + Flags: Flags, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(247, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := DomainSnapshotListChildrenNamesRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rNames = result.Names + + return +} + +func (l *Libvirt) DomainEventDiskChange() (err error) { + var buf bytes.Buffer + + var resp <-chan response + resp, err = l.request(248, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + return +} + +func (l *Libvirt) DomainOpenGraphics(Dom NonnullDomain, Idx uint32, Flags uint32) (err error) { + var buf bytes.Buffer + + args := DomainOpenGraphicsArgs { + Dom: Dom, + Idx: Idx, + Flags: Flags, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(249, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + return +} + +func (l *Libvirt) NodeSuspendForDuration(Target uint32, Duration uint64, Flags uint32) (err error) { + var buf bytes.Buffer + + args := NodeSuspendForDurationArgs { + Target: Target, + Duration: Duration, + Flags: Flags, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(250, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + return +} + +func (l *Libvirt) DomainBlockResize(Dom NonnullDomain, Disk string, Size uint64, Flags uint32) (err error) { + var buf bytes.Buffer + + args := DomainBlockResizeArgs { + Dom: Dom, + Disk: Disk, + Size: Size, + Flags: Flags, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(251, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + return +} + +func (l *Libvirt) DomainSetBlockIOTune(Dom NonnullDomain, Disk string, Params []TypedParam, Flags uint32) (err error) { + var buf bytes.Buffer + + args := DomainSetBlockIOTuneArgs { + Dom: Dom, + Disk: Disk, + Params: Params, + Flags: Flags, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(252, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + return +} + +func (l *Libvirt) DomainGetBlockIOTune(Dom NonnullDomain, Disk string, Nparams int32, Flags uint32) (rParams []TypedParam, rNparams int32, err error) { + var buf bytes.Buffer + + args := DomainGetBlockIOTuneArgs { + Dom: Dom, + Disk: Disk, + Nparams: Nparams, + Flags: Flags, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(253, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := DomainGetBlockIOTuneRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rParams = result.Params + rNparams = result.Nparams + + return +} + +func (l *Libvirt) DomainSetNumaParameters(Dom NonnullDomain, Params []TypedParam, Flags uint32) (err error) { + var buf bytes.Buffer + + args := DomainSetNumaParametersArgs { + Dom: Dom, + Params: Params, + Flags: Flags, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(254, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + return +} + +func (l *Libvirt) DomainGetNumaParameters(Dom NonnullDomain, Nparams int32, Flags uint32) (rParams []TypedParam, rNparams int32, err error) { + var buf bytes.Buffer + + args := DomainGetNumaParametersArgs { + Dom: Dom, + Nparams: Nparams, + Flags: Flags, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(255, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := DomainGetNumaParametersRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rParams = result.Params + rNparams = result.Nparams + + return +} + +func (l *Libvirt) DomainSetInterfaceParameters(Dom NonnullDomain, Device string, Params []TypedParam, Flags uint32) (err error) { + var buf bytes.Buffer + + args := DomainSetInterfaceParametersArgs { + Dom: Dom, + Device: Device, + Params: Params, + Flags: Flags, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(256, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + return +} + +func (l *Libvirt) DomainGetInterfaceParameters(Dom NonnullDomain, Device string, Nparams int32, Flags uint32) (rParams []TypedParam, rNparams int32, err error) { + var buf bytes.Buffer + + args := DomainGetInterfaceParametersArgs { + Dom: Dom, + Device: Device, + Nparams: Nparams, + Flags: Flags, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(257, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := DomainGetInterfaceParametersRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rParams = result.Params + rNparams = result.Nparams + + return +} + +func (l *Libvirt) DomainShutdownFlags(Dom NonnullDomain, Flags uint32) (err error) { + var buf bytes.Buffer + + args := DomainShutdownFlagsArgs { + Dom: Dom, + Flags: Flags, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(258, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + return +} + +func (l *Libvirt) StorageVolWipePattern(Vol NonnullStorageVol, Algorithm uint32, Flags uint32) (err error) { + var buf bytes.Buffer + + args := StorageVolWipePatternArgs { + Vol: Vol, + Algorithm: Algorithm, + Flags: Flags, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(259, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + return +} + +func (l *Libvirt) StorageVolResize(Vol NonnullStorageVol, Capacity uint64, Flags uint32) (err error) { + var buf bytes.Buffer + + args := StorageVolResizeArgs { + Vol: Vol, + Capacity: Capacity, + Flags: Flags, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(260, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + return +} + +func (l *Libvirt) DomainPmSuspendForDuration(Dom NonnullDomain, Target uint32, Duration uint64, Flags uint32) (err error) { + var buf bytes.Buffer + + args := DomainPmSuspendForDurationArgs { + Dom: Dom, + Target: Target, + Duration: Duration, + Flags: Flags, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(261, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + return +} + +func (l *Libvirt) DomainGetCPUStats(Dom NonnullDomain, Nparams uint32, StartCPU int32, Ncpus uint32, Flags uint32) (rParams []TypedParam, rNparams int32, err error) { + var buf bytes.Buffer + + args := DomainGetCPUStatsArgs { + Dom: Dom, + Nparams: Nparams, + StartCPU: StartCPU, + Ncpus: Ncpus, + Flags: Flags, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(262, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := DomainGetCPUStatsRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rParams = result.Params + rNparams = result.Nparams + + return +} + +func (l *Libvirt) DomainGetDiskErrors(Dom NonnullDomain, Maxerrors uint32, Flags uint32) (rErrors []DomainDiskError, rNerrors int32, err error) { + var buf bytes.Buffer + + args := DomainGetDiskErrorsArgs { + Dom: Dom, + Maxerrors: Maxerrors, + Flags: Flags, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(263, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := DomainGetDiskErrorsRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rErrors = result.Errors + rNerrors = result.Nerrors + + return +} + +func (l *Libvirt) DomainSetMetadata(Dom NonnullDomain, Type int32, Metadata string, Key string, Uri string, Flags uint32) (err error) { + var buf bytes.Buffer + + args := DomainSetMetadataArgs { + Dom: Dom, + Type: Type, + Metadata: Metadata, + Key: Key, + Uri: Uri, + Flags: Flags, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(264, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + return +} + +func (l *Libvirt) DomainGetMetadata(Dom NonnullDomain, Type int32, Uri string, Flags uint32) (rMetadata string, err error) { + var buf bytes.Buffer + + args := DomainGetMetadataArgs { + Dom: Dom, + Type: Type, + Uri: Uri, + Flags: Flags, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(265, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := DomainGetMetadataRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rMetadata = result.Metadata + + return +} + +func (l *Libvirt) DomainBlockRebase(Dom NonnullDomain, Path string, Base string, Bandwidth uint64, Flags uint32) (err error) { + var buf bytes.Buffer + + args := DomainBlockRebaseArgs { + Dom: Dom, + Path: Path, + Base: Base, + Bandwidth: Bandwidth, + Flags: Flags, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(266, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + return +} + +func (l *Libvirt) DomainPmWakeup(Dom NonnullDomain, Flags uint32) (err error) { + var buf bytes.Buffer + + args := DomainPmWakeupArgs { + Dom: Dom, + Flags: Flags, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(267, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + return +} + +func (l *Libvirt) DomainEventTrayChange() (err error) { + var buf bytes.Buffer + + var resp <-chan response + resp, err = l.request(268, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + return +} + +func (l *Libvirt) DomainEventPmwakeup() (err error) { + var buf bytes.Buffer + + var resp <-chan response + resp, err = l.request(269, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + return +} + +func (l *Libvirt) DomainEventPmsuspend() (err error) { + var buf bytes.Buffer + + var resp <-chan response + resp, err = l.request(270, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + return +} + +func (l *Libvirt) DomainSnapshotIsCurrent(Snap NonnullDomainSnapshot, Flags uint32) (rCurrent int32, err error) { + var buf bytes.Buffer + + args := DomainSnapshotIsCurrentArgs { + Snap: Snap, + Flags: Flags, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(271, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := DomainSnapshotIsCurrentRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rCurrent = result.Current + + return +} + +func (l *Libvirt) DomainSnapshotHasMetadata(Snap NonnullDomainSnapshot, Flags uint32) (rMetadata int32, err error) { + var buf bytes.Buffer + + args := DomainSnapshotHasMetadataArgs { + Snap: Snap, + Flags: Flags, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(272, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := DomainSnapshotHasMetadataRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rMetadata = result.Metadata + + return +} + +func (l *Libvirt) ConnectListAllDomains(NeedResults int32, Flags uint32) (rDomains []NonnullDomain, rRet uint32, err error) { + var buf bytes.Buffer + + args := ConnectListAllDomainsArgs { + NeedResults: NeedResults, + Flags: Flags, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(273, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := ConnectListAllDomainsRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rDomains = result.Domains + rRet = result.Ret + + return +} + +func (l *Libvirt) DomainListAllSnapshots(Dom NonnullDomain, NeedResults int32, Flags uint32) (rSnapshots []NonnullDomainSnapshot, rRet int32, err error) { + var buf bytes.Buffer + + args := DomainListAllSnapshotsArgs { + Dom: Dom, + NeedResults: NeedResults, + Flags: Flags, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(274, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := DomainListAllSnapshotsRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rSnapshots = result.Snapshots + rRet = result.Ret + + return +} + +func (l *Libvirt) DomainSnapshotListAllChildren(Snapshot NonnullDomainSnapshot, NeedResults int32, Flags uint32) (rSnapshots []NonnullDomainSnapshot, rRet int32, err error) { + var buf bytes.Buffer + + args := DomainSnapshotListAllChildrenArgs { + Snapshot: Snapshot, + NeedResults: NeedResults, + Flags: Flags, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(275, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := DomainSnapshotListAllChildrenRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rSnapshots = result.Snapshots + rRet = result.Ret + + return +} + +func (l *Libvirt) DomainEventBalloonChange() (err error) { + var buf bytes.Buffer + + var resp <-chan response + resp, err = l.request(276, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + return +} + +func (l *Libvirt) DomainGetHostname(Dom NonnullDomain, Flags uint32) (rHostname string, err error) { + var buf bytes.Buffer + + args := DomainGetHostnameArgs { + Dom: Dom, + Flags: Flags, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(277, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := DomainGetHostnameRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rHostname = result.Hostname + + return +} + +func (l *Libvirt) DomainGetSecurityLabelList(Dom NonnullDomain) (rLabels []DomainGetSecurityLabelRet, rRet int32, err error) { + var buf bytes.Buffer + + args := DomainGetSecurityLabelListArgs { + Dom: Dom, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(278, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := DomainGetSecurityLabelListRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rLabels = result.Labels + rRet = result.Ret + + return +} + +func (l *Libvirt) DomainPinEmulator(Dom NonnullDomain, Cpumap []byte, Flags uint32) (err error) { + var buf bytes.Buffer + + args := DomainPinEmulatorArgs { + Dom: Dom, + Cpumap: Cpumap, + Flags: Flags, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(279, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + return +} + +func (l *Libvirt) DomainGetEmulatorPinInfo(Dom NonnullDomain, Maplen int32, Flags uint32) (rCpumaps []byte, rRet int32, err error) { + var buf bytes.Buffer + + args := DomainGetEmulatorPinInfoArgs { + Dom: Dom, + Maplen: Maplen, + Flags: Flags, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(280, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := DomainGetEmulatorPinInfoRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rCpumaps = result.Cpumaps + rRet = result.Ret + + return +} + +func (l *Libvirt) ConnectListAllStoragePools(NeedResults int32, Flags uint32) (rPools []NonnullStoragePool, rRet uint32, err error) { + var buf bytes.Buffer + + args := ConnectListAllStoragePoolsArgs { + NeedResults: NeedResults, + Flags: Flags, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(281, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := ConnectListAllStoragePoolsRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rPools = result.Pools + rRet = result.Ret + + return +} + +func (l *Libvirt) StoragePoolListAllVolumes(Pool NonnullStoragePool, NeedResults int32, Flags uint32) (rVols []NonnullStorageVol, rRet uint32, err error) { + var buf bytes.Buffer + + args := StoragePoolListAllVolumesArgs { + Pool: Pool, + NeedResults: NeedResults, + Flags: Flags, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(282, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := StoragePoolListAllVolumesRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rVols = result.Vols + rRet = result.Ret + + return +} + +func (l *Libvirt) ConnectListAllNetworks(NeedResults int32, Flags uint32) (rNets []NonnullNetwork, rRet uint32, err error) { + var buf bytes.Buffer + + args := ConnectListAllNetworksArgs { + NeedResults: NeedResults, + Flags: Flags, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(283, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := ConnectListAllNetworksRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rNets = result.Nets + rRet = result.Ret + + return +} + +func (l *Libvirt) ConnectListAllInterfaces(NeedResults int32, Flags uint32) (rIfaces []NonnullInterface, rRet uint32, err error) { + var buf bytes.Buffer + + args := ConnectListAllInterfacesArgs { + NeedResults: NeedResults, + Flags: Flags, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(284, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := ConnectListAllInterfacesRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rIfaces = result.Ifaces + rRet = result.Ret + + return +} + +func (l *Libvirt) ConnectListAllNodeDevices(NeedResults int32, Flags uint32) (rDevices []NonnullNodeDevice, rRet uint32, err error) { + var buf bytes.Buffer + + args := ConnectListAllNodeDevicesArgs { + NeedResults: NeedResults, + Flags: Flags, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(285, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := ConnectListAllNodeDevicesRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rDevices = result.Devices + rRet = result.Ret + + return +} + +func (l *Libvirt) ConnectListAllNwfilters(NeedResults int32, Flags uint32) (rFilters []NonnullNwfilter, rRet uint32, err error) { + var buf bytes.Buffer + + args := ConnectListAllNwfiltersArgs { + NeedResults: NeedResults, + Flags: Flags, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(286, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := ConnectListAllNwfiltersRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rFilters = result.Filters + rRet = result.Ret + + return +} + +func (l *Libvirt) ConnectListAllSecrets(NeedResults int32, Flags uint32) (rSecrets []NonnullSecret, rRet uint32, err error) { + var buf bytes.Buffer + + args := ConnectListAllSecretsArgs { + NeedResults: NeedResults, + Flags: Flags, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(287, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := ConnectListAllSecretsRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rSecrets = result.Secrets + rRet = result.Ret + + return +} + +func (l *Libvirt) NodeSetMemoryParameters(Params []TypedParam, Flags uint32) (err error) { + var buf bytes.Buffer + + args := NodeSetMemoryParametersArgs { + Params: Params, + Flags: Flags, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(288, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + return +} + +func (l *Libvirt) NodeGetMemoryParameters(Nparams int32, Flags uint32) (rParams []TypedParam, rNparams int32, err error) { + var buf bytes.Buffer + + args := NodeGetMemoryParametersArgs { + Nparams: Nparams, + Flags: Flags, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(289, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := NodeGetMemoryParametersRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rParams = result.Params + rNparams = result.Nparams + + return +} + +func (l *Libvirt) DomainBlockCommit(Dom NonnullDomain, Disk string, Base string, Top string, Bandwidth uint64, Flags uint32) (err error) { + var buf bytes.Buffer + + args := DomainBlockCommitArgs { + Dom: Dom, + Disk: Disk, + Base: Base, + Top: Top, + Bandwidth: Bandwidth, + Flags: Flags, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(290, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + return +} + +func (l *Libvirt) NetworkUpdate(Net NonnullNetwork, Command uint32, Section uint32, ParentIndex int32, XML string, Flags uint32) (err error) { + var buf bytes.Buffer + + args := NetworkUpdateArgs { + Net: Net, + Command: Command, + Section: Section, + ParentIndex: ParentIndex, + XML: XML, + Flags: Flags, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(291, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + return +} + +func (l *Libvirt) DomainEventPmsuspendDisk() (err error) { + var buf bytes.Buffer + + var resp <-chan response + resp, err = l.request(292, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + return +} + +func (l *Libvirt) NodeGetCPUMap(NeedMap int32, NeedOnline int32, Flags uint32) (rCpumap []byte, rOnline uint32, rRet int32, err error) { + var buf bytes.Buffer + + args := NodeGetCPUMapArgs { + NeedMap: NeedMap, + NeedOnline: NeedOnline, + Flags: Flags, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(293, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := NodeGetCPUMapRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rCpumap = result.Cpumap + rOnline = result.Online + rRet = result.Ret + + return +} + +func (l *Libvirt) DomainFstrim(Dom NonnullDomain, MountPoint string, Minimum uint64, Flags uint32) (err error) { + var buf bytes.Buffer + + args := DomainFstrimArgs { + Dom: Dom, + MountPoint: MountPoint, + Minimum: Minimum, + Flags: Flags, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(294, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + return +} + +func (l *Libvirt) DomainSendProcessSignal(Dom NonnullDomain, PidValue int64, Signum uint32, Flags uint32) (err error) { + var buf bytes.Buffer + + args := DomainSendProcessSignalArgs { + Dom: Dom, + PidValue: PidValue, + Signum: Signum, + Flags: Flags, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(295, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + return +} + +func (l *Libvirt) DomainOpenChannel(Dom NonnullDomain, Name string, Flags uint32) (err error) { + var buf bytes.Buffer + + args := DomainOpenChannelArgs { + Dom: Dom, + Name: Name, + Flags: Flags, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(296, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + return +} + +func (l *Libvirt) NodeDeviceLookupScsiHostByWwn(Wwnn string, Wwpn string, Flags uint32) (rDev NonnullNodeDevice, err error) { + var buf bytes.Buffer + + args := NodeDeviceLookupScsiHostByWwnArgs { + Wwnn: Wwnn, + Wwpn: Wwpn, + Flags: Flags, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(297, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := NodeDeviceLookupScsiHostByWwnRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rDev = result.Dev + + return +} + +func (l *Libvirt) DomainGetJobStats(Dom NonnullDomain, Flags uint32) (rType int32, rParams []TypedParam, err error) { + var buf bytes.Buffer + + args := DomainGetJobStatsArgs { + Dom: Dom, + Flags: Flags, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(298, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := DomainGetJobStatsRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rType = result.Type + rParams = result.Params + + return +} + +func (l *Libvirt) DomainMigrateGetCompressionCache(Dom NonnullDomain, Flags uint32) (rCacheSize uint64, err error) { + var buf bytes.Buffer + + args := DomainMigrateGetCompressionCacheArgs { + Dom: Dom, + Flags: Flags, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(299, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := DomainMigrateGetCompressionCacheRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rCacheSize = result.CacheSize + + return +} + +func (l *Libvirt) DomainMigrateSetCompressionCache(Dom NonnullDomain, CacheSize uint64, Flags uint32) (err error) { + var buf bytes.Buffer + + args := DomainMigrateSetCompressionCacheArgs { + Dom: Dom, + CacheSize: CacheSize, + Flags: Flags, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(300, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + return +} + +func (l *Libvirt) NodeDeviceDetachFlags(Name string, DriverName string, Flags uint32) (err error) { + var buf bytes.Buffer + + args := NodeDeviceDetachFlagsArgs { + Name: Name, + DriverName: DriverName, + Flags: Flags, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(301, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + return +} + +func (l *Libvirt) DomainMigrateBegin3Params(Dom NonnullDomain, Params []TypedParam, Flags uint32) (rCookieOut []byte, rXML string, err error) { + var buf bytes.Buffer + + args := DomainMigrateBegin3ParamsArgs { + Dom: Dom, + Params: Params, + Flags: Flags, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(302, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := DomainMigrateBegin3ParamsRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rCookieOut = result.CookieOut + rXML = result.XML + + return +} + +func (l *Libvirt) DomainMigratePrepare3Params(Params []TypedParam, CookieIn []byte, Flags uint32) (rCookieOut []byte, rUriOut string, err error) { + var buf bytes.Buffer + + args := DomainMigratePrepare3ParamsArgs { + Params: Params, + CookieIn: CookieIn, + Flags: Flags, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(303, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := DomainMigratePrepare3ParamsRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rCookieOut = result.CookieOut + rUriOut = result.UriOut + + return +} + +func (l *Libvirt) DomainMigratePrepareTunnel3Params(Params []TypedParam, CookieIn []byte, Flags uint32) (rCookieOut []byte, err error) { + var buf bytes.Buffer + + args := DomainMigratePrepareTunnel3ParamsArgs { + Params: Params, + CookieIn: CookieIn, + Flags: Flags, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(304, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := DomainMigratePrepareTunnel3ParamsRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rCookieOut = result.CookieOut + + return +} + +func (l *Libvirt) DomainMigratePerform3Params(Dom NonnullDomain, Dconnuri string, Params []TypedParam, CookieIn []byte, Flags uint32) (rCookieOut []byte, err error) { + var buf bytes.Buffer + + args := DomainMigratePerform3ParamsArgs { + Dom: Dom, + Dconnuri: Dconnuri, + Params: Params, + CookieIn: CookieIn, + Flags: Flags, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(305, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := DomainMigratePerform3ParamsRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rCookieOut = result.CookieOut + + return +} + +func (l *Libvirt) DomainMigrateFinish3Params(Params []TypedParam, CookieIn []byte, Flags uint32, Cancelled int32) (rDom NonnullDomain, rCookieOut []byte, err error) { + var buf bytes.Buffer + + args := DomainMigrateFinish3ParamsArgs { + Params: Params, + CookieIn: CookieIn, + Flags: Flags, + Cancelled: Cancelled, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(306, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := DomainMigrateFinish3ParamsRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rDom = result.Dom + rCookieOut = result.CookieOut + + return +} + +func (l *Libvirt) DomainMigrateConfirm3Params(Dom NonnullDomain, Params []TypedParam, CookieIn []byte, Flags uint32, Cancelled int32) (err error) { + var buf bytes.Buffer + + args := DomainMigrateConfirm3ParamsArgs { + Dom: Dom, + Params: Params, + CookieIn: CookieIn, + Flags: Flags, + Cancelled: Cancelled, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(307, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + return +} + +func (l *Libvirt) DomainSetMemoryStatsPeriod(Dom NonnullDomain, Period int32, Flags uint32) (err error) { + var buf bytes.Buffer + + args := DomainSetMemoryStatsPeriodArgs { + Dom: Dom, + Period: Period, + Flags: Flags, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(308, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + return +} + +func (l *Libvirt) DomainCreateXMLWithFiles(XMLDesc string, Flags uint32) (rDom NonnullDomain, err error) { + var buf bytes.Buffer + + args := DomainCreateXMLWithFilesArgs { + XMLDesc: XMLDesc, + Flags: Flags, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(309, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := DomainCreateXMLWithFilesRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rDom = result.Dom + + return +} + +func (l *Libvirt) DomainCreateWithFiles(Dom NonnullDomain, Flags uint32) (rDom NonnullDomain, err error) { + var buf bytes.Buffer + + args := DomainCreateWithFilesArgs { + Dom: Dom, + Flags: Flags, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(310, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := DomainCreateWithFilesRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rDom = result.Dom + + return +} + +func (l *Libvirt) DomainEventDeviceRemoved() (err error) { + var buf bytes.Buffer + + var resp <-chan response + resp, err = l.request(311, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + return +} + +func (l *Libvirt) ConnectGetCPUModelNames(Arch string, NeedResults int32, Flags uint32) (rModels []string, rRet int32, err error) { + var buf bytes.Buffer + + args := ConnectGetCPUModelNamesArgs { + Arch: Arch, + NeedResults: NeedResults, + Flags: Flags, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(312, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := ConnectGetCPUModelNamesRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rModels = result.Models + rRet = result.Ret + + return +} + +func (l *Libvirt) ConnectNetworkEventRegisterAny(EventID int32, Net Network) (rCallbackID int32, err error) { + var buf bytes.Buffer + + args := ConnectNetworkEventRegisterAnyArgs { + EventID: EventID, + Net: Net, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(313, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := ConnectNetworkEventRegisterAnyRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rCallbackID = result.CallbackID + + return +} + +func (l *Libvirt) ConnectNetworkEventDeregisterAny(CallbackID int32) (err error) { + var buf bytes.Buffer + + args := ConnectNetworkEventDeregisterAnyArgs { + CallbackID: CallbackID, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(314, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + return +} + +func (l *Libvirt) NetworkEventLifecycle() (err error) { + var buf bytes.Buffer + + var resp <-chan response + resp, err = l.request(315, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + return +} + +func (l *Libvirt) ConnectDomainEventCallbackRegisterAny(EventID int32, Dom Domain) (rCallbackID int32, err error) { + var buf bytes.Buffer + + args := ConnectDomainEventCallbackRegisterAnyArgs { + EventID: EventID, + Dom: Dom, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(316, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := ConnectDomainEventCallbackRegisterAnyRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rCallbackID = result.CallbackID + + return +} + +func (l *Libvirt) ConnectDomainEventCallbackDeregisterAny(CallbackID int32) (err error) { + var buf bytes.Buffer + + args := ConnectDomainEventCallbackDeregisterAnyArgs { + CallbackID: CallbackID, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(317, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + return +} + +func (l *Libvirt) DomainEventCallbackLifecycle() (err error) { + var buf bytes.Buffer + + var resp <-chan response + resp, err = l.request(318, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + return +} + +func (l *Libvirt) DomainEventCallbackReboot() (err error) { + var buf bytes.Buffer + + var resp <-chan response + resp, err = l.request(319, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + return +} + +func (l *Libvirt) DomainEventCallbackRtcChange() (err error) { + var buf bytes.Buffer + + var resp <-chan response + resp, err = l.request(320, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + return +} + +func (l *Libvirt) DomainEventCallbackWatchdog() (err error) { + var buf bytes.Buffer + + var resp <-chan response + resp, err = l.request(321, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + return +} + +func (l *Libvirt) DomainEventCallbackIOError() (err error) { + var buf bytes.Buffer + + var resp <-chan response + resp, err = l.request(322, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + return +} + +func (l *Libvirt) DomainEventCallbackGraphics() (err error) { + var buf bytes.Buffer + + var resp <-chan response + resp, err = l.request(323, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + return +} + +func (l *Libvirt) DomainEventCallbackIOErrorReason() (err error) { + var buf bytes.Buffer + + var resp <-chan response + resp, err = l.request(324, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + return +} + +func (l *Libvirt) DomainEventCallbackControlError() (err error) { + var buf bytes.Buffer + + var resp <-chan response + resp, err = l.request(325, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + return +} + +func (l *Libvirt) DomainEventCallbackBlockJob() (err error) { + var buf bytes.Buffer + + var resp <-chan response + resp, err = l.request(326, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + return +} + +func (l *Libvirt) DomainEventCallbackDiskChange() (err error) { + var buf bytes.Buffer + + var resp <-chan response + resp, err = l.request(327, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + return +} + +func (l *Libvirt) DomainEventCallbackTrayChange() (err error) { + var buf bytes.Buffer + + var resp <-chan response + resp, err = l.request(328, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + return +} + +func (l *Libvirt) DomainEventCallbackPmwakeup() (err error) { + var buf bytes.Buffer + + var resp <-chan response + resp, err = l.request(329, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + return +} + +func (l *Libvirt) DomainEventCallbackPmsuspend() (err error) { + var buf bytes.Buffer + + var resp <-chan response + resp, err = l.request(330, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + return +} + +func (l *Libvirt) DomainEventCallbackBalloonChange() (err error) { + var buf bytes.Buffer + + var resp <-chan response + resp, err = l.request(331, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + return +} + +func (l *Libvirt) DomainEventCallbackPmsuspendDisk() (err error) { + var buf bytes.Buffer + + var resp <-chan response + resp, err = l.request(332, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + return +} + +func (l *Libvirt) DomainEventCallbackDeviceRemoved() (err error) { + var buf bytes.Buffer + + var resp <-chan response + resp, err = l.request(333, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + return +} + +func (l *Libvirt) DomainCoreDumpWithFormat(Dom NonnullDomain, To string, Dumpformat uint32, Flags uint32) (err error) { + var buf bytes.Buffer + + args := DomainCoreDumpWithFormatArgs { + Dom: Dom, + To: To, + Dumpformat: Dumpformat, + Flags: Flags, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(334, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + return +} + +func (l *Libvirt) DomainFsfreeze(Dom NonnullDomain, Mountpoints []string, Flags uint32) (rFilesystems int32, err error) { + var buf bytes.Buffer + + args := DomainFsfreezeArgs { + Dom: Dom, + Mountpoints: Mountpoints, + Flags: Flags, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(335, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := DomainFsfreezeRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rFilesystems = result.Filesystems + + return +} + +func (l *Libvirt) DomainFsthaw(Dom NonnullDomain, Mountpoints []string, Flags uint32) (rFilesystems int32, err error) { + var buf bytes.Buffer + + args := DomainFsthawArgs { + Dom: Dom, + Mountpoints: Mountpoints, + Flags: Flags, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(336, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := DomainFsthawRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rFilesystems = result.Filesystems + + return +} + +func (l *Libvirt) DomainGetTime(Dom NonnullDomain, Flags uint32) (rSeconds int64, rNseconds uint32, err error) { + var buf bytes.Buffer + + args := DomainGetTimeArgs { + Dom: Dom, + Flags: Flags, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(337, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := DomainGetTimeRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rSeconds = result.Seconds + rNseconds = result.Nseconds + + return +} + +func (l *Libvirt) DomainSetTime(Dom NonnullDomain, Seconds int64, Nseconds uint32, Flags uint32) (err error) { + var buf bytes.Buffer + + args := DomainSetTimeArgs { + Dom: Dom, + Seconds: Seconds, + Nseconds: Nseconds, + Flags: Flags, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(338, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + return +} + +func (l *Libvirt) DomainEventBlockJob2() (err error) { + var buf bytes.Buffer + + var resp <-chan response + resp, err = l.request(339, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + return +} + +func (l *Libvirt) NodeGetFreePages(Pages []uint32, StartCell int32, CellCount uint32, Flags uint32) (rCounts []uint64, err error) { + var buf bytes.Buffer + + args := NodeGetFreePagesArgs { + Pages: Pages, + StartCell: StartCell, + CellCount: CellCount, + Flags: Flags, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(340, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := NodeGetFreePagesRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rCounts = result.Counts + + return +} + +func (l *Libvirt) NetworkGetDhcpLeases(Net NonnullNetwork, Mac string, NeedResults int32, Flags uint32) (rLeases []NetworkDhcpLease, rRet uint32, err error) { + var buf bytes.Buffer + + args := NetworkGetDhcpLeasesArgs { + Net: Net, + Mac: Mac, + NeedResults: NeedResults, + Flags: Flags, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(341, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := NetworkGetDhcpLeasesRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rLeases = result.Leases + rRet = result.Ret + + return +} + +func (l *Libvirt) ConnectGetDomainCapabilities(Emulatorbin string, Arch string, Machine string, Virttype string, Flags uint32) (rCapabilities string, err error) { + var buf bytes.Buffer + + args := ConnectGetDomainCapabilitiesArgs { + Emulatorbin: Emulatorbin, + Arch: Arch, + Machine: Machine, + Virttype: Virttype, + Flags: Flags, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(342, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := ConnectGetDomainCapabilitiesRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rCapabilities = result.Capabilities + + return +} + +func (l *Libvirt) DomainOpenGraphicsFd(Dom NonnullDomain, Idx uint32, Flags uint32) (err error) { + var buf bytes.Buffer + + args := DomainOpenGraphicsFdArgs { + Dom: Dom, + Idx: Idx, + Flags: Flags, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(343, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + return +} + +func (l *Libvirt) ConnectGetAllDomainStats(Doms []NonnullDomain, Stats uint32, Flags uint32) (rRetStats []DomainStatsRecord, err error) { + var buf bytes.Buffer + + args := ConnectGetAllDomainStatsArgs { + Doms: Doms, + Stats: Stats, + Flags: Flags, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(344, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := ConnectGetAllDomainStatsRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rRetStats = result.RetStats + + return +} + +func (l *Libvirt) DomainBlockCopy(Dom NonnullDomain, Path string, Destxml string, Params []TypedParam, Flags uint32) (err error) { + var buf bytes.Buffer + + args := DomainBlockCopyArgs { + Dom: Dom, + Path: Path, + Destxml: Destxml, + Params: Params, + Flags: Flags, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(345, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + return +} + +func (l *Libvirt) DomainEventCallbackTunable() (err error) { + var buf bytes.Buffer + + var resp <-chan response + resp, err = l.request(346, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + return +} + +func (l *Libvirt) NodeAllocPages(PageSizes []uint32, PageCounts []uint64, StartCell int32, CellCount uint32, Flags uint32) (rRet int32, err error) { + var buf bytes.Buffer + + args := NodeAllocPagesArgs { + PageSizes: PageSizes, + PageCounts: PageCounts, + StartCell: StartCell, + CellCount: CellCount, + Flags: Flags, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(347, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := NodeAllocPagesRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rRet = result.Ret + + return +} + +func (l *Libvirt) DomainEventCallbackAgentLifecycle() (err error) { + var buf bytes.Buffer + + var resp <-chan response + resp, err = l.request(348, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + return +} + +func (l *Libvirt) DomainGetFsinfo(Dom NonnullDomain, Flags uint32) (rInfo []DomainFsinfo, rRet uint32, err error) { + var buf bytes.Buffer + + args := DomainGetFsinfoArgs { + Dom: Dom, + Flags: Flags, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(349, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := DomainGetFsinfoRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rInfo = result.Info + rRet = result.Ret + + return +} + +func (l *Libvirt) DomainDefineXMLFlags(XML string, Flags uint32) (rDom NonnullDomain, err error) { + var buf bytes.Buffer + + args := DomainDefineXMLFlagsArgs { + XML: XML, + Flags: Flags, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(350, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := DomainDefineXMLFlagsRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rDom = result.Dom + + return +} + +func (l *Libvirt) DomainGetIothreadInfo(Dom NonnullDomain, Flags uint32) (rInfo []DomainIothreadInfo, rRet uint32, err error) { + var buf bytes.Buffer + + args := DomainGetIothreadInfoArgs { + Dom: Dom, + Flags: Flags, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(351, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := DomainGetIothreadInfoRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rInfo = result.Info + rRet = result.Ret + + return +} + +func (l *Libvirt) DomainPinIothread(Dom NonnullDomain, IothreadsID uint32, Cpumap []byte, Flags uint32) (err error) { + var buf bytes.Buffer + + args := DomainPinIothreadArgs { + Dom: Dom, + IothreadsID: IothreadsID, + Cpumap: Cpumap, + Flags: Flags, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(352, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + return +} + +func (l *Libvirt) DomainInterfaceAddresses(Dom NonnullDomain, Source uint32, Flags uint32) (rIfaces []DomainInterface, err error) { + var buf bytes.Buffer + + args := DomainInterfaceAddressesArgs { + Dom: Dom, + Source: Source, + Flags: Flags, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(353, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := DomainInterfaceAddressesRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rIfaces = result.Ifaces + + return +} + +func (l *Libvirt) DomainEventCallbackDeviceAdded() (err error) { + var buf bytes.Buffer + + var resp <-chan response + resp, err = l.request(354, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + return +} + +func (l *Libvirt) DomainAddIothread(Dom NonnullDomain, IothreadID uint32, Flags uint32) (err error) { + var buf bytes.Buffer + + args := DomainAddIothreadArgs { + Dom: Dom, + IothreadID: IothreadID, + Flags: Flags, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(355, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + return +} + +func (l *Libvirt) DomainDelIothread(Dom NonnullDomain, IothreadID uint32, Flags uint32) (err error) { + var buf bytes.Buffer + + args := DomainDelIothreadArgs { + Dom: Dom, + IothreadID: IothreadID, + Flags: Flags, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(356, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + return +} + +func (l *Libvirt) DomainSetUserPassword(Dom NonnullDomain, User string, Password string, Flags uint32) (err error) { + var buf bytes.Buffer + + args := DomainSetUserPasswordArgs { + Dom: Dom, + User: User, + Password: Password, + Flags: Flags, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(357, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + return +} + +func (l *Libvirt) DomainRename(Dom NonnullDomain, NewName string, Flags uint32) (rRetcode int32, err error) { + var buf bytes.Buffer + + args := DomainRenameArgs { + Dom: Dom, + NewName: NewName, + Flags: Flags, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(358, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := DomainRenameRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rRetcode = result.Retcode + + return +} + +func (l *Libvirt) DomainEventCallbackMigrationIteration() (err error) { + var buf bytes.Buffer + + var resp <-chan response + resp, err = l.request(359, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + return +} + +func (l *Libvirt) ConnectRegisterCloseCallback() (err error) { + var buf bytes.Buffer + + var resp <-chan response + resp, err = l.request(360, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + return +} + +func (l *Libvirt) ConnectUnregisterCloseCallback() (err error) { + var buf bytes.Buffer + + var resp <-chan response + resp, err = l.request(361, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + return +} + +func (l *Libvirt) ConnectEventConnectionClosed() (err error) { + var buf bytes.Buffer + + var resp <-chan response + resp, err = l.request(362, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + return +} + +func (l *Libvirt) DomainEventCallbackJobCompleted() (err error) { + var buf bytes.Buffer + + var resp <-chan response + resp, err = l.request(363, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + return +} + +func (l *Libvirt) DomainMigrateStartPostCopy(Dom NonnullDomain, Flags uint32) (err error) { + var buf bytes.Buffer + + args := DomainMigrateStartPostCopyArgs { + Dom: Dom, + Flags: Flags, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(364, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + return +} + +func (l *Libvirt) DomainGetPerfEvents(Dom NonnullDomain, Flags uint32) (rParams []TypedParam, err error) { + var buf bytes.Buffer + + args := DomainGetPerfEventsArgs { + Dom: Dom, + Flags: Flags, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(365, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := DomainGetPerfEventsRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rParams = result.Params + + return +} + +func (l *Libvirt) DomainSetPerfEvents(Dom NonnullDomain, Params []TypedParam, Flags uint32) (err error) { + var buf bytes.Buffer + + args := DomainSetPerfEventsArgs { + Dom: Dom, + Params: Params, + Flags: Flags, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(366, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + return +} + +func (l *Libvirt) DomainEventCallbackDeviceRemovalFailed() (err error) { + var buf bytes.Buffer + + var resp <-chan response + resp, err = l.request(367, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + return +} + +func (l *Libvirt) ConnectStoragePoolEventRegisterAny(EventID int32, Pool StoragePool) (rCallbackID int32, err error) { + var buf bytes.Buffer + + args := ConnectStoragePoolEventRegisterAnyArgs { + EventID: EventID, + Pool: Pool, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(368, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := ConnectStoragePoolEventRegisterAnyRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rCallbackID = result.CallbackID + + return +} + +func (l *Libvirt) ConnectStoragePoolEventDeregisterAny(CallbackID int32) (err error) { + var buf bytes.Buffer + + args := ConnectStoragePoolEventDeregisterAnyArgs { + CallbackID: CallbackID, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(369, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + return +} + +func (l *Libvirt) StoragePoolEventLifecycle() (err error) { + var buf bytes.Buffer + + var resp <-chan response + resp, err = l.request(370, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + return +} + +func (l *Libvirt) DomainGetGuestVcpus(Dom NonnullDomain, Flags uint32) (rParams []TypedParam, err error) { + var buf bytes.Buffer + + args := DomainGetGuestVcpusArgs { + Dom: Dom, + Flags: Flags, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(371, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := DomainGetGuestVcpusRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rParams = result.Params + + return +} + +func (l *Libvirt) DomainSetGuestVcpus(Dom NonnullDomain, Cpumap string, State int32, Flags uint32) (err error) { + var buf bytes.Buffer + + args := DomainSetGuestVcpusArgs { + Dom: Dom, + Cpumap: Cpumap, + State: State, + Flags: Flags, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(372, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + return +} + +func (l *Libvirt) StoragePoolEventRefresh() (err error) { + var buf bytes.Buffer + + var resp <-chan response + resp, err = l.request(373, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + return +} + +func (l *Libvirt) ConnectNodeDeviceEventRegisterAny(EventID int32, Dev NodeDevice) (rCallbackID int32, err error) { + var buf bytes.Buffer + + args := ConnectNodeDeviceEventRegisterAnyArgs { + EventID: EventID, + Dev: Dev, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(374, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := ConnectNodeDeviceEventRegisterAnyRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rCallbackID = result.CallbackID + + return +} + +func (l *Libvirt) ConnectNodeDeviceEventDeregisterAny(CallbackID int32) (err error) { + var buf bytes.Buffer + + args := ConnectNodeDeviceEventDeregisterAnyArgs { + CallbackID: CallbackID, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(375, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + return +} + +func (l *Libvirt) NodeDeviceEventLifecycle() (err error) { + var buf bytes.Buffer + + var resp <-chan response + resp, err = l.request(376, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + return +} + +func (l *Libvirt) NodeDeviceEventUpdate() (err error) { + var buf bytes.Buffer + + var resp <-chan response + resp, err = l.request(377, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + return +} + +func (l *Libvirt) StorageVolGetInfoFlags(Vol NonnullStorageVol, Flags uint32) (rType int8, rCapacity uint64, rAllocation uint64, err error) { + var buf bytes.Buffer + + args := StorageVolGetInfoFlagsArgs { + Vol: Vol, + Flags: Flags, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(378, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := StorageVolGetInfoFlagsRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rType = result.Type + rCapacity = result.Capacity + rAllocation = result.Allocation + + return +} + +func (l *Libvirt) DomainEventCallbackMetadataChange() (err error) { + var buf bytes.Buffer + + var resp <-chan response + resp, err = l.request(379, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + return +} + +func (l *Libvirt) ConnectSecretEventRegisterAny(EventID int32, Secret Secret) (rCallbackID int32, err error) { + var buf bytes.Buffer + + args := ConnectSecretEventRegisterAnyArgs { + EventID: EventID, + Secret: Secret, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(380, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := ConnectSecretEventRegisterAnyRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rCallbackID = result.CallbackID + + return +} + +func (l *Libvirt) ConnectSecretEventDeregisterAny(CallbackID int32) (err error) { + var buf bytes.Buffer + + args := ConnectSecretEventDeregisterAnyArgs { + CallbackID: CallbackID, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(381, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + return +} + +func (l *Libvirt) SecretEventLifecycle() (err error) { + var buf bytes.Buffer + + var resp <-chan response + resp, err = l.request(382, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + return +} + +func (l *Libvirt) SecretEventValueChanged() (err error) { + var buf bytes.Buffer + + var resp <-chan response + resp, err = l.request(383, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + return +} + +func (l *Libvirt) DomainSetVcpu(Dom NonnullDomain, Cpumap string, State int32, Flags uint32) (err error) { + var buf bytes.Buffer + + args := DomainSetVcpuArgs { + Dom: Dom, + Cpumap: Cpumap, + State: State, + Flags: Flags, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(384, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + return +} + +func (l *Libvirt) DomainEventBlockThreshold() (err error) { + var buf bytes.Buffer + + var resp <-chan response + resp, err = l.request(385, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + return +} + +func (l *Libvirt) DomainSetBlockThreshold(Dom NonnullDomain, Dev string, Threshold uint64, Flags uint32) (err error) { + var buf bytes.Buffer + + args := DomainSetBlockThresholdArgs { + Dom: Dom, + Dev: Dev, + Threshold: Threshold, + Flags: Flags, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(386, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + return +} + +func (l *Libvirt) DomainMigrateGetMaxDowntime(Dom NonnullDomain, Flags uint32) (rDowntime uint64, err error) { + var buf bytes.Buffer + + args := DomainMigrateGetMaxDowntimeArgs { + Dom: Dom, + Flags: Flags, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(387, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := DomainMigrateGetMaxDowntimeRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rDowntime = result.Downtime + + return +} + +func (l *Libvirt) DomainManagedSaveGetXMLDesc(Dom NonnullDomain, Flags uint32) (rXML string, err error) { + var buf bytes.Buffer + + args := DomainManagedSaveGetXMLDescArgs { + Dom: Dom, + Flags: Flags, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(388, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + result := DomainManagedSaveGetXMLDescRet{} + rdr := bytes.NewReader(r.Payload) + dec := xdr.NewDecoder(rdr) + _, err = dec.Decode(&result) + if err != nil { + return + } + + rXML = result.XML + + return +} + +func (l *Libvirt) DomainManagedSaveDefineXML(Dom NonnullDomain, Dxml string, Flags uint32) (err error) { + var buf bytes.Buffer + + args := DomainManagedSaveDefineXMLArgs { + Dom: Dom, + Dxml: Dxml, + Flags: Flags, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(389, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + return +} + +func (l *Libvirt) DomainSetLifecycleAction(Dom NonnullDomain, Type uint32, Action uint32, Flags uint32) (err error) { + var buf bytes.Buffer + + args := DomainSetLifecycleActionArgs { + Dom: Dom, + Type: Type, + Action: Action, + Flags: Flags, + } + + buf, err = encode(&args) + if err != nil { + return + } + + var resp <-chan response + resp, err = l.request(390, constants.Program, &buf) + if err != nil { + return + } + + r := <-resp + if r.Status != StatusOK { + err = decodeError(r.Payload) + return + } + + return +} + diff --git a/libvirt.go b/libvirt.go index 94ed3d2..bd7701d 100644 --- a/libvirt.go +++ b/libvirt.go @@ -53,11 +53,11 @@ type Libvirt struct { } // Domain represents a domain as seen by libvirt. -type Domain struct { - Name string - UUID [constants.UUIDSize]byte - ID int -} +// type Domain struct { +// Name string +// UUID [constants.UUIDSize]byte +// ID int +// } // DomainEvent represents a libvirt domain event. type DomainEvent struct { @@ -71,17 +71,17 @@ type DomainEvent struct { } // Secret represents a secret managed by the libvirt daemon. -type Secret struct { - UUID [constants.UUIDSize]byte - UsageType SecretUsageType - UsageID string -} +// type Secret struct { +// UUID [constants.UUIDSize]byte +// UsageType SecretUsageType +// UsageID string +// } // StoragePool represents a storage pool as seen by libvirt. -type StoragePool struct { - Name string - UUID [constants.UUIDSize]byte -} +// type StoragePool struct { +// Name string +// UUID [constants.UUIDSize]byte +// } // qemuError represents a QEMU process error. type qemuError struct { @@ -140,42 +140,42 @@ const ( // TypedParam represents libvirt's virTypedParameter, which is used to pass // typed parameters to libvirt functions. This is defined as an interface, and // implemented by TypedParam... concrete types. -type TypedParam interface { - Field() string - Value() interface{} -} +// type TypedParam interface { +// Field() string +// Value() interface{} +// } // TypedParamInt contains a 32-bit signed integer. -type TypedParamInt struct { - Fld string - PType int32 - Padding [4]byte - Val int32 -} +// type TypedParamInt struct { +// Fld string +// PType int32 +// Padding [4]byte +// Val int32 +// } // Field returns the field name, a string name for the parameter. -func (tp *TypedParamInt) Field() string { - return tp.Fld -} +// func (tp *TypedParamInt) Field() string { +// return tp.Fld +// } // Value returns the value for the typed parameter, as an empty interface. -func (tp *TypedParamInt) Value() interface{} { - return tp.Val -} +// func (tp *TypedParamInt) Value() interface{} { +// return tp.Val +// } // NewTypedParamInt returns a TypedParam encoding for an int. -func NewTypedParamInt(name string, v int32) *TypedParamInt { - // Truncate the field name if it's longer than the limit. - if len(name) > constants.TypedParamFieldLength { - name = name[:constants.TypedParamFieldLength] - } - tp := TypedParamInt{ - Fld: name, - PType: TypeParamInt, - Val: v, - } - return &tp -} +// func NewTypedParamInt(name string, v int32) *TypedParamInt { +// // Truncate the field name if it's longer than the limit. +// if len(name) > constants.TypedParamFieldLength { +// name = name[:constants.TypedParamFieldLength] +// } +// tp := TypedParamInt{ +// Fld: name, +// PType: TypeParamInt, +// Val: v, +// } +// return &tp +// } // TypedParamULongLong contains a 64-bit unsigned integer. type TypedParamULongLong struct { @@ -226,17 +226,17 @@ func (tp *TypedParamString) Value() interface{} { } // NewTypedParamString returns a typed parameter containing the passed string. -func NewTypedParamString(name string, v string) TypedParam { - if len(name) > constants.TypedParamFieldLength { - name = name[:constants.TypedParamFieldLength] - } - tp := TypedParamString{ - Fld: name, - PType: TypeParamString, - Val: v, - } - return &tp -} +// func NewTypedParamString(name string, v string) TypedParam { +// if len(name) > constants.TypedParamFieldLength { +// name = name[:constants.TypedParamFieldLength] +// } +// tp := TypedParamString{ +// Fld: name, +// PType: TypeParamString, +// Val: v, +// } +// return &tp +// } const ( // DomainXMLFlagSecure dumps XML with sensitive information included. @@ -507,10 +507,10 @@ const ( ) // DomainMemoryStat specifies memory stats of the domain -type DomainMemoryStat struct { - Tag DomainMemoryStatTag - Val uint64 -} +// type DomainMemoryStat struct { +// Tag DomainMemoryStatTag +// Val uint64 +// } // Capabilities returns an XML document describing the host's capabilties. func (l *Libvirt) Capabilities() ([]byte, error) { @@ -596,76 +596,76 @@ func (l *Libvirt) Domains() ([]Domain, error) { } // DomainCreateWithFlags starts specified domain with flags -func (l *Libvirt) DomainCreateWithFlags(dom string, flags DomainCreateFlags) error { - d, err := l.lookup(dom) - if err != nil { - return err - } - req := struct { - Domain Domain - Flags DomainCreateFlags - }{ - Domain: *d, - Flags: flags, - } - - buf, err := encode(&req) - if err != nil { - return err - } - resp, err := l.request(constants.ProcDomainCreateWithFlags, constants.Program, &buf) - if err != nil { - return err - } - r := <-resp - if r.Status != StatusOK { - return decodeError(r.Payload) - } - return nil -} +// func (l *Libvirt) DomainCreateWithFlags(dom string, flags DomainCreateFlags) error { +// d, err := l.lookup(dom) +// if err != nil { +// return err +// } +// req := struct { +// Domain Domain +// Flags DomainCreateFlags +// }{ +// Domain: *d, +// Flags: flags, +// } +// +// buf, err := encode(&req) +// if err != nil { +// return err +// } +// resp, err := l.request(constants.ProcDomainCreateWithFlags, constants.Program, &buf) +// if err != nil { +// return err +// } +// r := <-resp +// if r.Status != StatusOK { +// return decodeError(r.Payload) +// } +// return nil +// } // DomainMemoryStats returns memory stats of the domain managed by libvirt. -func (l *Libvirt) DomainMemoryStats(dom string) ([]DomainMemoryStat, error) { - - d, err := l.lookup(dom) - if err != nil { - return nil, err - } - - req := struct { - Domain Domain - MaxStats uint32 - Flags uint32 - }{ - Domain: *d, - MaxStats: 8, - Flags: 0, - } - - buf, err := encode(&req) - if err != nil { - return nil, err - } - - resp, err := l.request(constants.ProcDomainMemoryStats, constants.Program, &buf) - if err != nil { - return nil, err - } - - r := <-resp - - result := struct { - DomainMemoryStats []DomainMemoryStat - }{} - - dec := xdr.NewDecoder(bytes.NewReader(r.Payload)) - _, err = dec.Decode(&result) - if err != nil { - return nil, err - } - - return result.DomainMemoryStats, nil -} +// func (l *Libvirt) DomainMemoryStats(dom string) ([]DomainMemoryStat, error) { +// +// d, err := l.lookup(dom) +// if err != nil { +// return nil, err +// } +// +// req := struct { +// Domain Domain +// MaxStats uint32 +// Flags uint32 +// }{ +// Domain: *d, +// MaxStats: 8, +// Flags: 0, +// } +// +// buf, err := encode(&req) +// if err != nil { +// return nil, err +// } +// +// resp, err := l.request(constants.ProcDomainMemoryStats, constants.Program, &buf) +// if err != nil { +// return nil, err +// } +// +// r := <-resp +// +// result := struct { +// DomainMemoryStats []DomainMemoryStat +// }{} +// +// dec := xdr.NewDecoder(bytes.NewReader(r.Payload)) +// _, err = dec.Decode(&result) +// if err != nil { +// return nil, err +// } +// +// return result.DomainMemoryStats, nil +// } // DomainState returns state of the domain managed by libvirt. func (l *Libvirt) DomainState(dom string) (DomainState, error) { @@ -678,7 +678,7 @@ func (l *Libvirt) DomainState(dom string) (DomainState, error) { Domain Domain Flags uint32 }{ - Domain: *d, + Domain: d, Flags: 0, } @@ -728,7 +728,7 @@ func (l *Libvirt) Events(dom string) (<-chan DomainEvent, error) { Flags [2]byte }{ Padding: [4]byte{0x0, 0x0, 0x1, 0x0}, - Domain: *d, + Domain: d, Event: [2]byte{0x0, 0x0}, Flags: [2]byte{0x0, 0x0}, } @@ -801,7 +801,7 @@ func (l *Libvirt) Migrate(dom string, dest string, flags MigrateFlags) error { CookieIn uint32 Flags MigrateFlags }{ - Domain: *d, + Domain: d, Padding: [4]byte{0x0, 0x0, 0x0, 0x1}, DestinationURI: dest, RemoteParameters: 0, @@ -844,7 +844,7 @@ func (l *Libvirt) MigrateSetMaxSpeed(dom string, speed int64) error { Flags uint32 }{ Padding: [4]byte{0x0, 0x0, 0x1, 0x0}, - Domain: *d, + Domain: d, Bandwidth: speed, } @@ -880,7 +880,7 @@ func (l *Libvirt) Run(dom string, cmd []byte) ([]byte, error) { Command []byte Flags uint32 }{ - Domain: *d, + Domain: d, Command: cmd, Flags: 0, } @@ -959,7 +959,7 @@ func (l *Libvirt) Secrets() ([]Secret, error) { // StoragePool returns the storage pool associated with the provided name. // An error is returned if the requested storage pool is not found. -func (l *Libvirt) StoragePool(name string) (*StoragePool, error) { +func (l *Libvirt) StoragePool(name string) (StoragePool, error) { req := struct { Name string }{ @@ -991,41 +991,41 @@ func (l *Libvirt) StoragePool(name string) (*StoragePool, error) { return nil, err } - return &result.Pool, nil + return result.Pool, nil } // StoragePoolRefresh refreshes the storage pool specified by name. -func (l *Libvirt) StoragePoolRefresh(name string) error { - pool, err := l.StoragePool(name) - if err != nil { - return err - } - - req := struct { - Pool StoragePool - Flags uint32 - }{ - Pool: *pool, - Flags: 0, // unused per libvirt source, callers should pass 0 - } - - buf, err := encode(&req) - if err != nil { - return err - } - - resp, err := l.request(constants.ProcStoragePoolRefresh, constants.Program, &buf) - if err != nil { - return err - } - - r := <-resp - if r.Status != StatusOK { - return decodeError(r.Payload) - } - - return nil -} +// func (l *Libvirt) StoragePoolRefresh(name string) error { +// pool, err := l.StoragePool(name) +// if err != nil { +// return err +// } +// +// req := struct { +// Pool StoragePool +// Flags uint32 +// }{ +// Pool: *pool, +// Flags: 0, // unused per libvirt source, callers should pass 0 +// } +// +// buf, err := encode(&req) +// if err != nil { +// return err +// } +// +// resp, err := l.request(constants.ProcStoragePoolRefresh, constants.Program, &buf) +// if err != nil { +// return err +// } +// +// r := <-resp +// if r.Status != StatusOK { +// return decodeError(r.Payload) +// } +// +// return nil +// } // StoragePools returns a list of defined storage pools. Pools are filtered by // the provided flags. See StoragePools*. @@ -1081,7 +1081,7 @@ func (l *Libvirt) Undefine(dom string, flags UndefineFlags) error { Domain Domain Flags UndefineFlags }{ - Domain: *d, + Domain: d, Flags: flags, } @@ -1117,7 +1117,7 @@ func (l *Libvirt) Destroy(dom string, flags DestroyFlags) error { Domain Domain Flags DestroyFlags }{ - Domain: *d, + Domain: d, Flags: flags, } @@ -1151,7 +1151,7 @@ func (l *Libvirt) XML(dom string, flags DomainXMLFlags) ([]byte, error) { Domain Domain Flags DomainXMLFlags }{ - Domain: *d, + Domain: d, Flags: flags, } @@ -1255,7 +1255,7 @@ func (l *Libvirt) Shutdown(dom string, flags ShutdownFlags) error { Domain Domain Flags ShutdownFlags }{ - Domain: *d, + Domain: d, Flags: flags, } @@ -1289,7 +1289,7 @@ func (l *Libvirt) Reboot(dom string, flags RebootFlags) error { Domain Domain Flags RebootFlags }{ - Domain: *d, + Domain: d, Flags: flags, } @@ -1322,7 +1322,7 @@ func (l *Libvirt) Reset(dom string) error { Domain Domain Flags uint32 }{ - Domain: *d, + Domain: d, Flags: 0, } @@ -1405,14 +1405,15 @@ func (l *Libvirt) SetBlockIOTune(dom string, disk string, limits ...BlockLimit) Params []TypedParam Flags DomainAffectFlags }{ - Domain: *d, + Domain: d, Disk: disk, Flags: FlagDomainAffectLive, } for _, limit := range limits { - tp := NewTypedParamULongLong(limit.Name, limit.Value) - payload.Params = append(payload.Params, tp) + tpval := NewTypedParamValueUllong(limit.Value) + tp := &TypedParam{Field: limit.Name, Value: tpval} + payload.Params = append(payload.Params, *tp) } buf, err := encode(&payload) @@ -1446,7 +1447,7 @@ func (l *Libvirt) GetBlockIOTune(dom string, disk string) ([]BlockLimit, error) ParamCount uint32 Flags DomainAffectFlags }{ - Domain: *d, + Domain: d, Disk: []string{disk}, ParamCount: 32, Flags: FlagTypedParamStringOkay, @@ -1516,7 +1517,7 @@ func (l *Libvirt) GetBlockIOTune(dom string, disk string) ([]BlockLimit, error) } // lookup returns a domain as seen by libvirt. -func (l *Libvirt) lookup(name string) (*Domain, error) { +func (l *Libvirt) lookup(name string) (Domain, error) { payload := struct { Name string }{name} @@ -1538,7 +1539,8 @@ func (l *Libvirt) lookup(name string) (*Domain, error) { dec := xdr.NewDecoder(bytes.NewReader(r.Payload)) - var d Domain + // var d Domain + var d NonnullDomain _, err = dec.Decode(&d) if err != nil { return nil, err diff --git a/libvirt_test.go b/libvirt_test.go index ccf0017..af01f7f 100644 --- a/libvirt_test.go +++ b/libvirt_test.go @@ -107,7 +107,7 @@ func TestDomains(t *testing.T) { for i, d := range domains { wantID := i + 1 - if d.ID != wantID { + if d.ID != int32(wantID) { t.Errorf("expected domain ID %q, got %q", wantID, d.ID) } @@ -148,17 +148,27 @@ func TestDomainMemoryStats(t *testing.T) { }, } - gotDomainMemoryStats, err := l.DomainMemoryStats("test") + d, err := l.lookup("test") if err != nil { t.Error(err) } + gotDomainMemoryStats, err := l.DomainMemoryStats(*d, 8, 0) + if err != nil { + t.Error(err) + } + + t.Log(gotDomainMemoryStats) + + if len(gotDomainMemoryStats) == 0 { + t.Error("No memory stats returned!") + } + for i := range wantDomainMemoryStats { if wantDomainMemoryStats[i] != gotDomainMemoryStats[i] { t.Errorf("expected domain memory stat %v, got %v", wantDomainMemoryStats[i], gotDomainMemoryStats[i]) } } - } func TestEvents(t *testing.T) { @@ -265,7 +275,7 @@ func TestSecrets(t *testing.T) { } s := secrets[0] - wantType := SecretUsageTypeVolume + wantType := int32(SecretUsageTypeVolume) if s.UsageType != wantType { t.Errorf("expected usage type %d, got %d", wantType, s.UsageType) } @@ -347,7 +357,11 @@ func TestStoragePoolRefresh(t *testing.T) { conn := libvirttest.New() l := New(conn) - err := l.StoragePoolRefresh("default") + pool, err := l.StoragePool("default") + if err != nil { + t.Error(err) + } + err = l.StoragePoolRefresh(*pool, 0) if err != nil { t.Error(err) } @@ -403,8 +417,12 @@ func TestDomainCreateWithFlags(t *testing.T) { conn := libvirttest.New() l := New(conn) - var flags DomainCreateFlags - if err := l.DomainCreateWithFlags("test", flags); err != nil { + d, err := l.lookup("test") + if err != nil { + t.Fatalf("failed to lookup domain: %v", err) + } + var flags uint32 + if _, err := l.DomainCreateWithFlags(*d, flags); err != nil { t.Fatalf("unexpected create error: %v", err) } } diff --git a/rpc_test.go b/rpc_test.go index 9b8aef5..1ce79a0 100644 --- a/rpc_test.go +++ b/rpc_test.go @@ -106,7 +106,7 @@ var ( 0x00, 0x00, 0x00, 0x02, } - testDomain = Domain{ + testDomain = &NonnullDomain{ Name: "test-domain", UUID: testUUID, ID: 1, @@ -177,7 +177,7 @@ func TestDecodeEvent(t *testing.T) { t.Errorf("expected uuid:\t%x, got\n\t\t\t%x", expUUID, e.Domain.UUID) } - expID := 14 + expID := int32(14) if e.Domain.ID != expID { t.Errorf("expected id %d, got %d", expID, e.Domain.ID) } From a3bd42a5b1d1b53102b9583813ddea1333cfd8bb Mon Sep 17 00:00:00 2001 From: Geoff Hickey Date: Tue, 14 Nov 2017 18:59:55 -0500 Subject: [PATCH 06/20] Cleanup, and fix decoding of TypedParams. --- internal/lvgen/gen/main.go | 7 +- internal/lvgen/generate.go | 86 +- internal/lvgen/lv-gen.go | 12 + internal/lvgen/lvlexer.go | 25 + internal/lvgen/procedures.tmpl | 68 +- libvirt.gen.go | 1982 ++++++++++++++++++++------------ libvirt.go | 166 ++- 7 files changed, 1459 insertions(+), 887 deletions(-) diff --git a/internal/lvgen/gen/main.go b/internal/lvgen/gen/main.go index 640c767..7e13f8c 100644 --- a/internal/lvgen/gen/main.go +++ b/internal/lvgen/gen/main.go @@ -23,11 +23,14 @@ import ( ) // TODO: make these an argument -const lvPath = "../../../libvirt" const protoPath = "src/remote/remote_protocol.x" func main() { - fmt.Println("Generating golang bindings for libvirt") + lvPath := os.Getenv("LIBVIRT_SOURCE") + if lvPath == "" { + fmt.Println("set $LIBVIRT_SOURCE to point to the root of the libvirt sources and retry") + os.Exit(1) + } lvFile := path.Join(lvPath, protoPath) rdr, err := os.Open(lvFile) if err != nil { diff --git a/internal/lvgen/generate.go b/internal/lvgen/generate.go index eef98d1..e534893 100644 --- a/internal/lvgen/generate.go +++ b/internal/lvgen/generate.go @@ -14,10 +14,6 @@ package lvgen -// The libvirt API is divided into several categories. (Gallia est omnis divisa -// in partes tres.) The generator will output code for each category in a -// package underneath the go-libvirt directory. - import ( "fmt" "io" @@ -29,30 +25,6 @@ import ( "unicode/utf8" ) -var keywords = map[string]int{ - "hyper": HYPER, - "int": INT, - "short": SHORT, - "char": CHAR, - "bool": BOOL, - "case": CASE, - "const": CONST, - "default": DEFAULT, - "double": DOUBLE, - "enum": ENUM, - "float": FLOAT, - "opaque": OPAQUE, - "string": STRING, - "struct": STRUCT, - "switch": SWITCH, - "typedef": TYPEDEF, - "union": UNION, - "unsigned": UNSIGNED, - "void": VOID, - "program": PROGRAM, - "version": VERSION, -} - // ConstItem stores an const's symbol and value from the parser. This struct is // also used for enums. type ConstItem struct { @@ -77,6 +49,8 @@ type Generator struct { Typedefs []Typedef // Unions holds all the discriminated unions. Unions []Union + // UnionMap is a map of the unions we find for quick searching. + UnionMap map[string]int // Procs holds all the discovered libvirt procedures. Procs []Proc } @@ -104,6 +78,9 @@ var goEquivTypes = map[string]string{ // requires us to ditch the typedef that would otherwise be generated. "NonnullString": "string", + // TODO: Get rid of these. They're only needed because we lose information + // that the parser has (the parser knows it has emitted a go type), and then + // we capitalize types to make them public. "String": "string", "Int": "int", "Uint": "uint", @@ -122,7 +99,8 @@ var goEquivTypes = map[string]string{ } // These defines are from libvirt-common.h. They should be fetched from there, -// but for now they're hardcoded here. +// but for now they're hardcoded here. (These are the discriminant values for +// TypedParams.) var lvTypedParams = map[string]uint32{ "VIR_TYPED_PARAM_INT": 1, "VIR_TYPED_PARAM_UINT": 2, @@ -222,6 +200,7 @@ var CurrentCase *Case // generation. func Generate(proto io.Reader) error { Gen.StructMap = make(map[string]int) + Gen.UnionMap = make(map[string]int) lexer, err := NewLexer(proto) if err != nil { return err @@ -257,6 +236,8 @@ func Generate(proto io.Reader) error { return err } +// genGo is called when the parsing is done; it generates the golang output +// files using templates. func genGo(constFile, procFile io.Writer) error { t, err := template.ParseFiles("constants.tmpl") if err != nil { @@ -273,18 +254,6 @@ func genGo(constFile, procFile io.Writer) error { 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 } @@ -297,7 +266,7 @@ func constNameTransform(name string) string { decamelize := strings.ContainsRune(name, '_') nn := strings.TrimPrefix(name, "REMOTE_") if decamelize { - nn = fromSnakeToCamel(nn, true) + nn = fromSnakeToCamel(nn) } nn = fixAbbrevs(nn) return nn @@ -307,7 +276,7 @@ func identifierTransform(name string) string { decamelize := strings.ContainsRune(name, '_') nn := strings.TrimPrefix(name, "remote_") if decamelize { - nn = fromSnakeToCamel(nn, true) + nn = fromSnakeToCamel(nn) } else { nn = publicize(nn) } @@ -337,10 +306,10 @@ func publicize(name string) string { // are omitted. // // ex: "PROC_DOMAIN_GET_METADATA" -> "ProcDomainGetMetadata" -func fromSnakeToCamel(s string, public bool) string { +func fromSnakeToCamel(s string) string { buf := make([]rune, 0, len(s)) - // Start rune may be either upper or lower case. - hump := public + // Start rune will be upper case - we generate all public symbols. + hump := true for _, r := range s { if r == '_' { @@ -496,8 +465,8 @@ func StartStruct(name string) { // the now-complete struct definition to the generator's list. func AddStruct() { st := *CurrentStruct.pop() + Gen.StructMap[st.Name] = len(Gen.Structs) Gen.Structs = append(Gen.Structs, st) - Gen.StructMap[st.Name] = len(Gen.Structs) - 1 } // StartTypedef is called when the parser finds a typedef. @@ -516,6 +485,7 @@ func StartUnion(name string) { // pointer. We handle unions by declaring an interface for the union type, and // adding methods to each of the cases so that they satisfy the interface. func AddUnion() { + Gen.UnionMap[CurrentUnion.Name] = len(Gen.Unions) Gen.Unions = append(Gen.Unions, *CurrentUnion) CurrentUnion = nil } @@ -532,7 +502,7 @@ func StartCase(dvalue string) { if ix := strings.LastIndexByte(caseName, '_'); ix != -1 { caseName = caseName[ix+1:] } - caseName = fromSnakeToCamel(caseName, true) + caseName = fromSnakeToCamel(caseName) dv, ok := lvTypedParams[dvalue] if ok { dvalue = strconv.FormatUint(uint64(dv), 10) @@ -587,11 +557,11 @@ func AddFixedArray(identifier, itype, len string) { // Variable-length arrays are prefixed with a 32-bit unsigned length, and may // also have a maximum length specified. func AddVariableArray(identifier, itype, len string) { - // FIXME: This ignores the length restriction, so as of now we can't check - // to make sure that we're not exceeding that restriction when we fill in - // message buffers. That may not matter, if libvirt's checking is careful - // enough. This could be handled with a map, however. - atype := fmt.Sprintf("[]%v", itype) + // This code ignores the length restriction (array), so as of now we + // can't check to make sure that we're not exceeding that restriction when + // we fill in message buffers. That may not matter, if libvirt's checking is + // careful enough. + atype := "[]" + itype // Handle strings specially. In the rpcgen definition a string is specified // as a variable-length array, either with or without a max length. We want // these to be go strings, so we'll just remove the array specifier. @@ -608,3 +578,13 @@ func checkIdentifier(i string) string { } return i } + +// GetUnion returns the type information for a union. If the provided type name +// isn't a union, the second return value will be false. +func (decl *Decl) GetUnion() Union { + ix, ok := Gen.UnionMap[decl.Type] + if ok { + return Gen.Unions[ix] + } + return Union{} +} diff --git a/internal/lvgen/lv-gen.go b/internal/lvgen/lv-gen.go index 3dec8b1..c622f74 100644 --- a/internal/lvgen/lv-gen.go +++ b/internal/lvgen/lv-gen.go @@ -1,4 +1,16 @@ package lvgen +// This file contains the instructions for regenerating the libvirt bindings. +// We do this by parsing the remote_protocol.x file included in the libvirt +// sources. Bindings will be generated if you run `go generate` in this +// directory. + +// Before running `go generate`: +// 1) Make sure goyacc is installed from golang.org/x/tools (you can use this +// command: `go get golang.org/x/tools/...`) +// 2) Set the environment variable LIBVIRT_SOURCE to point to the top level +// directory containing the version of libvirt for which you want to generate +// bindings. + //go:generate goyacc sunrpc.y //go:generate go run gen/main.go diff --git a/internal/lvgen/lvlexer.go b/internal/lvgen/lvlexer.go index 28aa718..06341a2 100644 --- a/internal/lvgen/lvlexer.go +++ b/internal/lvgen/lvlexer.go @@ -31,6 +31,31 @@ const eof = -1 // runes. var oneRuneTokens = `{}[]<>(),=;:*` +var keywords = map[string]int{ + "hyper": HYPER, + "int": INT, + "short": SHORT, + "char": CHAR, + "bool": BOOL, + "case": CASE, + "const": CONST, + "default": DEFAULT, + "double": DOUBLE, + "enum": ENUM, + "float": FLOAT, + "opaque": OPAQUE, + "string": STRING, + "struct": STRUCT, + "switch": SWITCH, + "typedef": TYPEDEF, + "union": UNION, + "unsigned": UNSIGNED, + "void": VOID, + "program": PROGRAM, + "version": VERSION, +} + +// item is a lexeme, or what the lexer returns to the parser. type item struct { typ int val string diff --git a/internal/lvgen/procedures.tmpl b/internal/lvgen/procedures.tmpl index ec7058a..f3266a8 100644 --- a/internal/lvgen/procedures.tmpl +++ b/internal/lvgen/procedures.tmpl @@ -8,6 +8,7 @@ package libvirt import ( "bytes" + "fmt" "github.com/davecgh/go-xdr/xdr2" "github.com/digitalocean/go-libvirt/internal/constants" @@ -42,10 +43,64 @@ type {{$casetype}} struct { {{.Name}} {{.Type}} } func New{{$casetype}}(v {{.Type}}) *{{$casetype}} { return &{{$casetype}}{DVal: {{.DiscriminantVal}}, {{.Name}}: v} } +func Decode{{$casetype}}(dec *xdr.Decoder) (*{{$casetype}}, error) { + var v {{.Type}} + _, err := dec.Decode(&v) + if err != nil { + return nil, err + } + return New{{$casetype}}(v), nil +} func (c *{{$casetype}}) Get() interface{} { return c.{{.Name}} } {{end}} {{- end}} +// TODO: Generate this. +func decodeTypedParams(dec *xdr.Decoder) ([]TypedParam, error) { + count, _, err := dec.DecodeInt() + params := make([]TypedParam, count) + if err != nil { + return nil, err + } + for ix := int32(0); ix < count; ix++ { + name, _, err := dec.DecodeString() + if err != nil { + return nil, err + } + ptype, _, err := dec.DecodeInt() + if err != nil { + return nil, err + } + var tpv TypedParamValue + switch ptype { + case 1: // TypedParamValueInt + tpv, err = DecodeTypedParamValueInt(dec) + case 2: // TypedParamValueUint + tpv, err = DecodeTypedParamValueUint(dec) + case 3: // TypedParamValueLlong + tpv, err = DecodeTypedParamValueLlong(dec) + case 4: // TypedParamValueUllong + tpv, err = DecodeTypedParamValueUllong(dec) + case 5: // TypedParamValueDouble + tpv, err = DecodeTypedParamValueDouble(dec) + case 6: // TypedParamValueBoolean + tpv, err = DecodeTypedParamValueBoolean(dec) + case 7: // TypedParamValueString + tpv, err = DecodeTypedParamValueString(dec) + default: + err = fmt.Errorf("invalid parameter type %v", ptype) + } + + if err != nil { + return nil, err + } + + params[ix] = TypedParam{name, tpv} + } + + return params, nil +} + // Procedures: {{range .Procs}} func (l *Libvirt) {{.Name}}({{range $ix, $arg := .Args}}{{if $ix}}, {{end}}{{.Name}} {{.Type}}{{end}}) ({{range .Ret}}r{{.Name}} {{.Type}}, {{end}}err error) { @@ -72,16 +127,21 @@ func (l *Libvirt) {{.Name}}({{range $ix, $arg := .Args}}{{if $ix}}, {{end}}{{.Na return } {{if .RetStruct}} - result := {{.RetStruct}}{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) +{{range .Ret}} // {{.Name}}: {{.Type}} +{{if eq .Type "[]TypedParam"}} // {{.Name}} + r{{.Name}}, err = decodeTypedParams(dec) + if err != nil { + return + } +{{else}} _, err = dec.Decode(&r{{.Name}}) if err != nil { return } - -{{range .Ret}} r{{.Name}} = result.{{.Name}} {{end}}{{end}} +{{end}} return } {{end}} diff --git a/libvirt.gen.go b/libvirt.gen.go index b6318a4..2c0475c 100644 --- a/libvirt.gen.go +++ b/libvirt.gen.go @@ -8,6 +8,7 @@ package libvirt import ( "bytes" + "fmt" "github.com/davecgh/go-xdr/xdr2" "github.com/digitalocean/go-libvirt/internal/constants" @@ -3106,6 +3107,14 @@ type TypedParamValueInt struct { I int32 } func NewTypedParamValueInt(v int32) *TypedParamValueInt { return &TypedParamValueInt{DVal: 1, I: v} } +func DecodeTypedParamValueInt(dec *xdr.Decoder) (*TypedParamValueInt, error) { + var v int32 + _, err := dec.Decode(&v) + if err != nil { + return nil, err + } + return NewTypedParamValueInt(v), nil +} func (c *TypedParamValueInt) Get() interface{} { return c.I } type TypedParamValueUint struct { @@ -3113,6 +3122,14 @@ type TypedParamValueUint struct { Ui uint32 } func NewTypedParamValueUint(v uint32) *TypedParamValueUint { return &TypedParamValueUint{DVal: 2, Ui: v} } +func DecodeTypedParamValueUint(dec *xdr.Decoder) (*TypedParamValueUint, error) { + var v uint32 + _, err := dec.Decode(&v) + if err != nil { + return nil, err + } + return NewTypedParamValueUint(v), nil +} func (c *TypedParamValueUint) Get() interface{} { return c.Ui } type TypedParamValueLlong struct { @@ -3120,6 +3137,14 @@ type TypedParamValueLlong struct { L int64 } func NewTypedParamValueLlong(v int64) *TypedParamValueLlong { return &TypedParamValueLlong{DVal: 3, L: v} } +func DecodeTypedParamValueLlong(dec *xdr.Decoder) (*TypedParamValueLlong, error) { + var v int64 + _, err := dec.Decode(&v) + if err != nil { + return nil, err + } + return NewTypedParamValueLlong(v), nil +} func (c *TypedParamValueLlong) Get() interface{} { return c.L } type TypedParamValueUllong struct { @@ -3127,6 +3152,14 @@ type TypedParamValueUllong struct { Ul uint64 } func NewTypedParamValueUllong(v uint64) *TypedParamValueUllong { return &TypedParamValueUllong{DVal: 4, Ul: v} } +func DecodeTypedParamValueUllong(dec *xdr.Decoder) (*TypedParamValueUllong, error) { + var v uint64 + _, err := dec.Decode(&v) + if err != nil { + return nil, err + } + return NewTypedParamValueUllong(v), nil +} func (c *TypedParamValueUllong) Get() interface{} { return c.Ul } type TypedParamValueDouble struct { @@ -3134,6 +3167,14 @@ type TypedParamValueDouble struct { D float64 } func NewTypedParamValueDouble(v float64) *TypedParamValueDouble { return &TypedParamValueDouble{DVal: 5, D: v} } +func DecodeTypedParamValueDouble(dec *xdr.Decoder) (*TypedParamValueDouble, error) { + var v float64 + _, err := dec.Decode(&v) + if err != nil { + return nil, err + } + return NewTypedParamValueDouble(v), nil +} func (c *TypedParamValueDouble) Get() interface{} { return c.D } type TypedParamValueBoolean struct { @@ -3141,6 +3182,14 @@ type TypedParamValueBoolean struct { B int32 } func NewTypedParamValueBoolean(v int32) *TypedParamValueBoolean { return &TypedParamValueBoolean{DVal: 6, B: v} } +func DecodeTypedParamValueBoolean(dec *xdr.Decoder) (*TypedParamValueBoolean, error) { + var v int32 + _, err := dec.Decode(&v) + if err != nil { + return nil, err + } + return NewTypedParamValueBoolean(v), nil +} func (c *TypedParamValueBoolean) Get() interface{} { return c.B } type TypedParamValueString struct { @@ -3148,9 +3197,63 @@ type TypedParamValueString struct { S string } func NewTypedParamValueString(v string) *TypedParamValueString { return &TypedParamValueString{DVal: 7, S: v} } +func DecodeTypedParamValueString(dec *xdr.Decoder) (*TypedParamValueString, error) { + var v string + _, err := dec.Decode(&v) + if err != nil { + return nil, err + } + return NewTypedParamValueString(v), nil +} func (c *TypedParamValueString) Get() interface{} { return c.S } +// TODO: Generate this. +func decodeTypedParams(dec *xdr.Decoder) ([]TypedParam, error) { + count, _, err := dec.DecodeInt() + params := make([]TypedParam, count) + if err != nil { + return nil, err + } + for ix := int32(0); ix < count; ix++ { + name, _, err := dec.DecodeString() + if err != nil { + return nil, err + } + ptype, _, err := dec.DecodeInt() + if err != nil { + return nil, err + } + var tpv TypedParamValue + switch ptype { + case 1: // TypedParamValueInt + tpv, err = DecodeTypedParamValueInt(dec) + case 2: // TypedParamValueUint + tpv, err = DecodeTypedParamValueUint(dec) + case 3: // TypedParamValueLlong + tpv, err = DecodeTypedParamValueLlong(dec) + case 4: // TypedParamValueUllong + tpv, err = DecodeTypedParamValueUllong(dec) + case 5: // TypedParamValueDouble + tpv, err = DecodeTypedParamValueDouble(dec) + case 6: // TypedParamValueBoolean + tpv, err = DecodeTypedParamValueBoolean(dec) + case 7: // TypedParamValueString + tpv, err = DecodeTypedParamValueString(dec) + default: + err = fmt.Errorf("invalid parameter type %v", ptype) + } + + if err != nil { + return nil, err + } + + params[ix] = TypedParam{name, tpv} + } + + return params, nil +} + // Procedures: func (l *Libvirt) ConnectOpen(Name string, Flags uint32) (err error) { @@ -3214,15 +3317,15 @@ func (l *Libvirt) ConnectGetType() (rType string, err error) { return } - result := ConnectGetTypeRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // Type: string + _, err = dec.Decode(&rType) if err != nil { return } - rType = result.Type return } @@ -3242,15 +3345,15 @@ func (l *Libvirt) ConnectGetVersion() (rHvVer uint64, err error) { return } - result := ConnectGetVersionRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // HvVer: uint64 + _, err = dec.Decode(&rHvVer) if err != nil { return } - rHvVer = result.HvVer return } @@ -3279,15 +3382,15 @@ func (l *Libvirt) ConnectGetMaxVcpus(Type string) (rMaxVcpus int32, err error) { return } - result := ConnectGetMaxVcpusRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // MaxVcpus: int32 + _, err = dec.Decode(&rMaxVcpus) if err != nil { return } - rMaxVcpus = result.MaxVcpus return } @@ -3307,22 +3410,50 @@ func (l *Libvirt) NodeGetInfo() (rModel [32]int8, rMemory uint64, rCpus int32, r return } - result := NodeGetInfoRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // Model: [32]int8 + _, err = dec.Decode(&rModel) + if err != nil { + return + } + // Memory: uint64 + _, err = dec.Decode(&rMemory) + if err != nil { + return + } + // Cpus: int32 + _, err = dec.Decode(&rCpus) + if err != nil { + return + } + // Mhz: int32 + _, err = dec.Decode(&rMhz) + if err != nil { + return + } + // Nodes: int32 + _, err = dec.Decode(&rNodes) + if err != nil { + return + } + // Sockets: int32 + _, err = dec.Decode(&rSockets) + if err != nil { + return + } + // Cores: int32 + _, err = dec.Decode(&rCores) + if err != nil { + return + } + // Threads: int32 + _, err = dec.Decode(&rThreads) if err != nil { return } - rModel = result.Model - rMemory = result.Memory - rCpus = result.Cpus - rMhz = result.Mhz - rNodes = result.Nodes - rSockets = result.Sockets - rCores = result.Cores - rThreads = result.Threads return } @@ -3342,15 +3473,15 @@ func (l *Libvirt) ConnectGetCapabilities() (rCapabilities string, err error) { return } - result := ConnectGetCapabilitiesRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // Capabilities: string + _, err = dec.Decode(&rCapabilities) if err != nil { return } - rCapabilities = result.Capabilities return } @@ -3435,15 +3566,15 @@ func (l *Libvirt) DomainCreateXML(XMLDesc string, Flags uint32) (rDom NonnullDom return } - result := DomainCreateXMLRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // Dom: NonnullDomain + _, err = dec.Decode(&rDom) if err != nil { return } - rDom = result.Dom return } @@ -3472,15 +3603,15 @@ func (l *Libvirt) DomainDefineXML(XML string) (rDom NonnullDomain, err error) { return } - result := DomainDefineXMLRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // Dom: NonnullDomain + _, err = dec.Decode(&rDom) if err != nil { return } - rDom = result.Dom return } @@ -3565,15 +3696,15 @@ func (l *Libvirt) DomainGetXMLDesc(Dom NonnullDomain, Flags uint32) (rXML string return } - result := DomainGetXMLDescRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // XML: string + _, err = dec.Decode(&rXML) if err != nil { return } - rXML = result.XML return } @@ -3602,15 +3733,15 @@ func (l *Libvirt) DomainGetAutostart(Dom NonnullDomain) (rAutostart int32, err e return } - result := DomainGetAutostartRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // Autostart: int32 + _, err = dec.Decode(&rAutostart) if err != nil { return } - rAutostart = result.Autostart return } @@ -3639,19 +3770,35 @@ func (l *Libvirt) DomainGetInfo(Dom NonnullDomain) (rState uint8, rMaxMem uint64 return } - result := DomainGetInfoRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // State: uint8 + _, err = dec.Decode(&rState) + if err != nil { + return + } + // MaxMem: uint64 + _, err = dec.Decode(&rMaxMem) + if err != nil { + return + } + // Memory: uint64 + _, err = dec.Decode(&rMemory) + if err != nil { + return + } + // NrVirtCPU: uint16 + _, err = dec.Decode(&rNrVirtCPU) + if err != nil { + return + } + // CPUTime: uint64 + _, err = dec.Decode(&rCPUTime) if err != nil { return } - rState = result.State - rMaxMem = result.MaxMem - rMemory = result.Memory - rNrVirtCPU = result.NrVirtCPU - rCPUTime = result.CPUTime return } @@ -3680,15 +3827,15 @@ func (l *Libvirt) DomainGetMaxMemory(Dom NonnullDomain) (rMemory uint64, err err return } - result := DomainGetMaxMemoryRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // Memory: uint64 + _, err = dec.Decode(&rMemory) if err != nil { return } - rMemory = result.Memory return } @@ -3717,15 +3864,15 @@ func (l *Libvirt) DomainGetMaxVcpus(Dom NonnullDomain) (rNum int32, err error) { return } - result := DomainGetMaxVcpusRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // Num: int32 + _, err = dec.Decode(&rNum) if err != nil { return } - rNum = result.Num return } @@ -3754,15 +3901,15 @@ func (l *Libvirt) DomainGetOsType(Dom NonnullDomain) (rType string, err error) { return } - result := DomainGetOsTypeRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // Type: string + _, err = dec.Decode(&rType) if err != nil { return } - rType = result.Type return } @@ -3793,16 +3940,20 @@ func (l *Libvirt) DomainGetVcpus(Dom NonnullDomain, Maxinfo int32, Maplen int32) return } - result := DomainGetVcpusRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // Info: []VcpuInfo + _, err = dec.Decode(&rInfo) + if err != nil { + return + } + // Cpumaps: []byte + _, err = dec.Decode(&rCpumaps) if err != nil { return } - rInfo = result.Info - rCpumaps = result.Cpumaps return } @@ -3831,15 +3982,15 @@ func (l *Libvirt) ConnectListDefinedDomains(Maxnames int32) (rNames []string, er return } - result := ConnectListDefinedDomainsRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // Names: []string + _, err = dec.Decode(&rNames) if err != nil { return } - rNames = result.Names return } @@ -3868,15 +4019,15 @@ func (l *Libvirt) DomainLookupByID(ID int32) (rDom NonnullDomain, err error) { return } - result := DomainLookupByIDRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // Dom: NonnullDomain + _, err = dec.Decode(&rDom) if err != nil { return } - rDom = result.Dom return } @@ -3905,15 +4056,15 @@ func (l *Libvirt) DomainLookupByName(Name string) (rDom NonnullDomain, err error return } - result := DomainLookupByNameRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // Dom: NonnullDomain + _, err = dec.Decode(&rDom) if err != nil { return } - rDom = result.Dom return } @@ -3942,15 +4093,15 @@ func (l *Libvirt) DomainLookupByUUID(UUID UUID) (rDom NonnullDomain, err error) return } - result := DomainLookupByUUIDRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // Dom: NonnullDomain + _, err = dec.Decode(&rDom) if err != nil { return } - rDom = result.Dom return } @@ -3970,15 +4121,15 @@ func (l *Libvirt) ConnectNumOfDefinedDomains() (rNum int32, err error) { return } - result := ConnectNumOfDefinedDomainsRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // Num: int32 + _, err = dec.Decode(&rNum) if err != nil { return } - rNum = result.Num return } @@ -4284,15 +4435,15 @@ func (l *Libvirt) ConnectListDefinedNetworks(Maxnames int32) (rNames []string, e return } - result := ConnectListDefinedNetworksRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // Names: []string + _, err = dec.Decode(&rNames) if err != nil { return } - rNames = result.Names return } @@ -4321,15 +4472,15 @@ func (l *Libvirt) ConnectListDomains(Maxids int32) (rIds []int32, err error) { return } - result := ConnectListDomainsRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // Ids: []int32 + _, err = dec.Decode(&rIds) if err != nil { return } - rIds = result.Ids return } @@ -4358,15 +4509,15 @@ func (l *Libvirt) ConnectListNetworks(Maxnames int32) (rNames []string, err erro return } - result := ConnectListNetworksRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // Names: []string + _, err = dec.Decode(&rNames) if err != nil { return } - rNames = result.Names return } @@ -4422,15 +4573,15 @@ func (l *Libvirt) NetworkCreateXML(XML string) (rNet NonnullNetwork, err error) return } - result := NetworkCreateXMLRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // Net: NonnullNetwork + _, err = dec.Decode(&rNet) if err != nil { return } - rNet = result.Net return } @@ -4459,15 +4610,15 @@ func (l *Libvirt) NetworkDefineXML(XML string) (rNet NonnullNetwork, err error) return } - result := NetworkDefineXMLRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // Net: NonnullNetwork + _, err = dec.Decode(&rNet) if err != nil { return } - rNet = result.Net return } @@ -4524,15 +4675,15 @@ func (l *Libvirt) NetworkGetXMLDesc(Net NonnullNetwork, Flags uint32) (rXML stri return } - result := NetworkGetXMLDescRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // XML: string + _, err = dec.Decode(&rXML) if err != nil { return } - rXML = result.XML return } @@ -4561,15 +4712,15 @@ func (l *Libvirt) NetworkGetAutostart(Net NonnullNetwork) (rAutostart int32, err return } - result := NetworkGetAutostartRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // Autostart: int32 + _, err = dec.Decode(&rAutostart) if err != nil { return } - rAutostart = result.Autostart return } @@ -4598,15 +4749,15 @@ func (l *Libvirt) NetworkGetBridgeName(Net NonnullNetwork) (rName string, err er return } - result := NetworkGetBridgeNameRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // Name: string + _, err = dec.Decode(&rName) if err != nil { return } - rName = result.Name return } @@ -4635,15 +4786,15 @@ func (l *Libvirt) NetworkLookupByName(Name string) (rNet NonnullNetwork, err err return } - result := NetworkLookupByNameRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // Net: NonnullNetwork + _, err = dec.Decode(&rNet) if err != nil { return } - rNet = result.Net return } @@ -4672,15 +4823,15 @@ func (l *Libvirt) NetworkLookupByUUID(UUID UUID) (rNet NonnullNetwork, err error return } - result := NetworkLookupByUUIDRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // Net: NonnullNetwork + _, err = dec.Decode(&rNet) if err != nil { return } - rNet = result.Net return } @@ -4755,15 +4906,15 @@ func (l *Libvirt) ConnectNumOfDefinedNetworks() (rNum int32, err error) { return } - result := ConnectNumOfDefinedNetworksRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // Num: int32 + _, err = dec.Decode(&rNum) if err != nil { return } - rNum = result.Num return } @@ -4783,15 +4934,15 @@ func (l *Libvirt) ConnectNumOfDomains() (rNum int32, err error) { return } - result := ConnectNumOfDomainsRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // Num: int32 + _, err = dec.Decode(&rNum) if err != nil { return } - rNum = result.Num return } @@ -4811,15 +4962,15 @@ func (l *Libvirt) ConnectNumOfNetworks() (rNum int32, err error) { return } - result := ConnectNumOfNetworksRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // Num: int32 + _, err = dec.Decode(&rNum) if err != nil { return } - rNum = result.Num return } @@ -4932,16 +5083,20 @@ func (l *Libvirt) DomainGetSchedulerType(Dom NonnullDomain) (rType string, rNpar return } - result := DomainGetSchedulerTypeRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // Type: string + _, err = dec.Decode(&rType) + if err != nil { + return + } + // Nparams: int32 + _, err = dec.Decode(&rNparams) if err != nil { return } - rType = result.Type - rNparams = result.Nparams return } @@ -4971,15 +5126,16 @@ func (l *Libvirt) DomainGetSchedulerParameters(Dom NonnullDomain, Nparams int32) return } - result := DomainGetSchedulerParametersRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // Params: []TypedParam + // Params + rParams, err = decodeTypedParams(dec) if err != nil { return } - rParams = result.Params return } @@ -5027,15 +5183,15 @@ func (l *Libvirt) ConnectGetHostname() (rHostname string, err error) { return } - result := ConnectGetHostnameRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // Hostname: string + _, err = dec.Decode(&rHostname) if err != nil { return } - rHostname = result.Hostname return } @@ -5064,15 +5220,15 @@ func (l *Libvirt) ConnectSupportsFeature(Feature int32) (rSupported int32, err e return } - result := ConnectSupportsFeatureRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // Supported: int32 + _, err = dec.Decode(&rSupported) if err != nil { return } - rSupported = result.Supported return } @@ -5104,16 +5260,20 @@ func (l *Libvirt) DomainMigratePrepare(UriIn string, Flags uint64, Dname string, return } - result := DomainMigratePrepareRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // Cookie: []byte + _, err = dec.Decode(&rCookie) + if err != nil { + return + } + // UriOut: string + _, err = dec.Decode(&rUriOut) if err != nil { return } - rCookie = result.Cookie - rUriOut = result.UriOut return } @@ -5177,15 +5337,15 @@ func (l *Libvirt) DomainMigrateFinish(Dname string, Cookie []byte, Uri string, F return } - result := DomainMigrateFinishRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // Ddom: NonnullDomain + _, err = dec.Decode(&rDdom) if err != nil { return } - rDdom = result.Ddom return } @@ -5215,19 +5375,35 @@ func (l *Libvirt) DomainBlockStats(Dom NonnullDomain, Path string) (rRdReq int64 return } - result := DomainBlockStatsRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // RdReq: int64 + _, err = dec.Decode(&rRdReq) + if err != nil { + return + } + // RdBytes: int64 + _, err = dec.Decode(&rRdBytes) + if err != nil { + return + } + // WrReq: int64 + _, err = dec.Decode(&rWrReq) + if err != nil { + return + } + // WrBytes: int64 + _, err = dec.Decode(&rWrBytes) + if err != nil { + return + } + // Errs: int64 + _, err = dec.Decode(&rErrs) if err != nil { return } - rRdReq = result.RdReq - rRdBytes = result.RdBytes - rWrReq = result.WrReq - rWrBytes = result.WrBytes - rErrs = result.Errs return } @@ -5257,22 +5433,50 @@ func (l *Libvirt) DomainInterfaceStats(Dom NonnullDomain, Device string) (rRxByt return } - result := DomainInterfaceStatsRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // RxBytes: int64 + _, err = dec.Decode(&rRxBytes) + if err != nil { + return + } + // RxPackets: int64 + _, err = dec.Decode(&rRxPackets) + if err != nil { + return + } + // RxErrs: int64 + _, err = dec.Decode(&rRxErrs) + if err != nil { + return + } + // RxDrop: int64 + _, err = dec.Decode(&rRxDrop) + if err != nil { + return + } + // TxBytes: int64 + _, err = dec.Decode(&rTxBytes) + if err != nil { + return + } + // TxPackets: int64 + _, err = dec.Decode(&rTxPackets) + if err != nil { + return + } + // TxErrs: int64 + _, err = dec.Decode(&rTxErrs) + if err != nil { + return + } + // TxDrop: int64 + _, err = dec.Decode(&rTxDrop) if err != nil { return } - rRxBytes = result.RxBytes - rRxPackets = result.RxPackets - rRxErrs = result.RxErrs - rRxDrop = result.RxDrop - rTxBytes = result.TxBytes - rTxPackets = result.TxPackets - rTxErrs = result.TxErrs - rTxDrop = result.TxDrop return } @@ -5292,15 +5496,15 @@ func (l *Libvirt) AuthList() (rTypes []AuthType, err error) { return } - result := AuthListRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // Types: []AuthType + _, err = dec.Decode(&rTypes) if err != nil { return } - rTypes = result.Types return } @@ -5320,15 +5524,15 @@ func (l *Libvirt) AuthSaslInit() (rMechlist string, err error) { return } - result := AuthSaslInitRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // Mechlist: string + _, err = dec.Decode(&rMechlist) if err != nil { return } - rMechlist = result.Mechlist return } @@ -5359,17 +5563,25 @@ func (l *Libvirt) AuthSaslStart(Mech string, Nil int32, Data []int8) (rComplete return } - result := AuthSaslStartRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // Complete: int32 + _, err = dec.Decode(&rComplete) + if err != nil { + return + } + // Nil: int32 + _, err = dec.Decode(&rNil) + if err != nil { + return + } + // Data: []int8 + _, err = dec.Decode(&rData) if err != nil { return } - rComplete = result.Complete - rNil = result.Nil - rData = result.Data return } @@ -5399,17 +5611,25 @@ func (l *Libvirt) AuthSaslStep(Nil int32, Data []int8) (rComplete int32, rNil in return } - result := AuthSaslStepRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // Complete: int32 + _, err = dec.Decode(&rComplete) + if err != nil { + return + } + // Nil: int32 + _, err = dec.Decode(&rNil) + if err != nil { + return + } + // Data: []int8 + _, err = dec.Decode(&rData) if err != nil { return } - rComplete = result.Complete - rNil = result.Nil - rData = result.Data return } @@ -5429,15 +5649,15 @@ func (l *Libvirt) AuthPolkit() (rComplete int32, err error) { return } - result := AuthPolkitRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // Complete: int32 + _, err = dec.Decode(&rComplete) if err != nil { return } - rComplete = result.Complete return } @@ -5457,15 +5677,15 @@ func (l *Libvirt) ConnectNumOfStoragePools() (rNum int32, err error) { return } - result := ConnectNumOfStoragePoolsRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // Num: int32 + _, err = dec.Decode(&rNum) if err != nil { return } - rNum = result.Num return } @@ -5494,15 +5714,15 @@ func (l *Libvirt) ConnectListStoragePools(Maxnames int32) (rNames []string, err return } - result := ConnectListStoragePoolsRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // Names: []string + _, err = dec.Decode(&rNames) if err != nil { return } - rNames = result.Names return } @@ -5522,15 +5742,15 @@ func (l *Libvirt) ConnectNumOfDefinedStoragePools() (rNum int32, err error) { return } - result := ConnectNumOfDefinedStoragePoolsRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // Num: int32 + _, err = dec.Decode(&rNum) if err != nil { return } - rNum = result.Num return } @@ -5559,15 +5779,15 @@ func (l *Libvirt) ConnectListDefinedStoragePools(Maxnames int32) (rNames []strin return } - result := ConnectListDefinedStoragePoolsRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // Names: []string + _, err = dec.Decode(&rNames) if err != nil { return } - rNames = result.Names return } @@ -5598,15 +5818,15 @@ func (l *Libvirt) ConnectFindStoragePoolSources(Type string, SrcSpec string, Fla return } - result := ConnectFindStoragePoolSourcesRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // XML: string + _, err = dec.Decode(&rXML) if err != nil { return } - rXML = result.XML return } @@ -5636,15 +5856,15 @@ func (l *Libvirt) StoragePoolCreateXML(XML string, Flags uint32) (rPool NonnullS return } - result := StoragePoolCreateXMLRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // Pool: NonnullStoragePool + _, err = dec.Decode(&rPool) if err != nil { return } - rPool = result.Pool return } @@ -5674,15 +5894,15 @@ func (l *Libvirt) StoragePoolDefineXML(XML string, Flags uint32) (rPool NonnullS return } - result := StoragePoolDefineXMLRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // Pool: NonnullStoragePool + _, err = dec.Decode(&rPool) if err != nil { return } - rPool = result.Pool return } @@ -5877,15 +6097,15 @@ func (l *Libvirt) StoragePoolLookupByName(Name string) (rPool NonnullStoragePool return } - result := StoragePoolLookupByNameRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // Pool: NonnullStoragePool + _, err = dec.Decode(&rPool) if err != nil { return } - rPool = result.Pool return } @@ -5914,15 +6134,15 @@ func (l *Libvirt) StoragePoolLookupByUUID(UUID UUID) (rPool NonnullStoragePool, return } - result := StoragePoolLookupByUUIDRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // Pool: NonnullStoragePool + _, err = dec.Decode(&rPool) if err != nil { return } - rPool = result.Pool return } @@ -5951,15 +6171,15 @@ func (l *Libvirt) StoragePoolLookupByVolume(Vol NonnullStorageVol) (rPool Nonnul return } - result := StoragePoolLookupByVolumeRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // Pool: NonnullStoragePool + _, err = dec.Decode(&rPool) if err != nil { return } - rPool = result.Pool return } @@ -5988,18 +6208,30 @@ func (l *Libvirt) StoragePoolGetInfo(Pool NonnullStoragePool) (rState uint8, rCa return } - result := StoragePoolGetInfoRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // State: uint8 + _, err = dec.Decode(&rState) + if err != nil { + return + } + // Capacity: uint64 + _, err = dec.Decode(&rCapacity) + if err != nil { + return + } + // Allocation: uint64 + _, err = dec.Decode(&rAllocation) + if err != nil { + return + } + // Available: uint64 + _, err = dec.Decode(&rAvailable) if err != nil { return } - rState = result.State - rCapacity = result.Capacity - rAllocation = result.Allocation - rAvailable = result.Available return } @@ -6029,15 +6261,15 @@ func (l *Libvirt) StoragePoolGetXMLDesc(Pool NonnullStoragePool, Flags uint32) ( return } - result := StoragePoolGetXMLDescRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // XML: string + _, err = dec.Decode(&rXML) if err != nil { return } - rXML = result.XML return } @@ -6066,15 +6298,15 @@ func (l *Libvirt) StoragePoolGetAutostart(Pool NonnullStoragePool) (rAutostart i return } - result := StoragePoolGetAutostartRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // Autostart: int32 + _, err = dec.Decode(&rAutostart) if err != nil { return } - rAutostart = result.Autostart return } @@ -6131,15 +6363,15 @@ func (l *Libvirt) StoragePoolNumOfVolumes(Pool NonnullStoragePool) (rNum int32, return } - result := StoragePoolNumOfVolumesRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // Num: int32 + _, err = dec.Decode(&rNum) if err != nil { return } - rNum = result.Num return } @@ -6169,15 +6401,15 @@ func (l *Libvirt) StoragePoolListVolumes(Pool NonnullStoragePool, Maxnames int32 return } - result := StoragePoolListVolumesRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // Names: []string + _, err = dec.Decode(&rNames) if err != nil { return } - rNames = result.Names return } @@ -6208,15 +6440,15 @@ func (l *Libvirt) StorageVolCreateXML(Pool NonnullStoragePool, XML string, Flags return } - result := StorageVolCreateXMLRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // Vol: NonnullStorageVol + _, err = dec.Decode(&rVol) if err != nil { return } - rVol = result.Vol return } @@ -6274,15 +6506,15 @@ func (l *Libvirt) StorageVolLookupByName(Pool NonnullStoragePool, Name string) ( return } - result := StorageVolLookupByNameRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // Vol: NonnullStorageVol + _, err = dec.Decode(&rVol) if err != nil { return } - rVol = result.Vol return } @@ -6311,15 +6543,15 @@ func (l *Libvirt) StorageVolLookupByKey(Key string) (rVol NonnullStorageVol, err return } - result := StorageVolLookupByKeyRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // Vol: NonnullStorageVol + _, err = dec.Decode(&rVol) if err != nil { return } - rVol = result.Vol return } @@ -6348,15 +6580,15 @@ func (l *Libvirt) StorageVolLookupByPath(Path string) (rVol NonnullStorageVol, e return } - result := StorageVolLookupByPathRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // Vol: NonnullStorageVol + _, err = dec.Decode(&rVol) if err != nil { return } - rVol = result.Vol return } @@ -6385,17 +6617,25 @@ func (l *Libvirt) StorageVolGetInfo(Vol NonnullStorageVol) (rType int8, rCapacit return } - result := StorageVolGetInfoRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // Type: int8 + _, err = dec.Decode(&rType) + if err != nil { + return + } + // Capacity: uint64 + _, err = dec.Decode(&rCapacity) + if err != nil { + return + } + // Allocation: uint64 + _, err = dec.Decode(&rAllocation) if err != nil { return } - rType = result.Type - rCapacity = result.Capacity - rAllocation = result.Allocation return } @@ -6425,15 +6665,15 @@ func (l *Libvirt) StorageVolGetXMLDesc(Vol NonnullStorageVol, Flags uint32) (rXM return } - result := StorageVolGetXMLDescRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // XML: string + _, err = dec.Decode(&rXML) if err != nil { return } - rXML = result.XML return } @@ -6462,15 +6702,15 @@ func (l *Libvirt) StorageVolGetPath(Vol NonnullStorageVol) (rName string, err er return } - result := StorageVolGetPathRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // Name: string + _, err = dec.Decode(&rName) if err != nil { return } - rName = result.Name return } @@ -6500,15 +6740,15 @@ func (l *Libvirt) NodeGetCellsFreeMemory(StartCell int32, Maxcells int32) (rCell return } - result := NodeGetCellsFreeMemoryRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // Cells: []uint64 + _, err = dec.Decode(&rCells) if err != nil { return } - rCells = result.Cells return } @@ -6528,15 +6768,15 @@ func (l *Libvirt) NodeGetFreeMemory() (rFreeMem uint64, err error) { return } - result := NodeGetFreeMemoryRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // FreeMem: uint64 + _, err = dec.Decode(&rFreeMem) if err != nil { return } - rFreeMem = result.FreeMem return } @@ -6569,15 +6809,15 @@ func (l *Libvirt) DomainBlockPeek(Dom NonnullDomain, Path string, Offset uint64, return } - result := DomainBlockPeekRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // Buffer: []byte + _, err = dec.Decode(&rBuffer) if err != nil { return } - rBuffer = result.Buffer return } @@ -6609,15 +6849,15 @@ func (l *Libvirt) DomainMemoryPeek(Dom NonnullDomain, Offset uint64, Size uint32 return } - result := DomainMemoryPeekRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // Buffer: []byte + _, err = dec.Decode(&rBuffer) if err != nil { return } - rBuffer = result.Buffer return } @@ -6637,15 +6877,15 @@ func (l *Libvirt) ConnectDomainEventRegister() (rCbRegistered int32, err error) return } - result := ConnectDomainEventRegisterRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // CbRegistered: int32 + _, err = dec.Decode(&rCbRegistered) if err != nil { return } - rCbRegistered = result.CbRegistered return } @@ -6665,15 +6905,15 @@ func (l *Libvirt) ConnectDomainEventDeregister() (rCbRegistered int32, err error return } - result := ConnectDomainEventDeregisterRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // CbRegistered: int32 + _, err = dec.Decode(&rCbRegistered) if err != nil { return } - rCbRegistered = result.CbRegistered return } @@ -6724,16 +6964,20 @@ func (l *Libvirt) DomainMigratePrepare2(UriIn string, Flags uint64, Dname string return } - result := DomainMigratePrepare2Ret{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // Cookie: []byte + _, err = dec.Decode(&rCookie) + if err != nil { + return + } + // UriOut: string + _, err = dec.Decode(&rUriOut) if err != nil { return } - rCookie = result.Cookie - rUriOut = result.UriOut return } @@ -6766,15 +7010,15 @@ func (l *Libvirt) DomainMigrateFinish2(Dname string, Cookie []byte, Uri string, return } - result := DomainMigrateFinish2Ret{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // Ddom: NonnullDomain + _, err = dec.Decode(&rDdom) if err != nil { return } - rDdom = result.Ddom return } @@ -6794,15 +7038,15 @@ func (l *Libvirt) ConnectGetUri() (rUri string, err error) { return } - result := ConnectGetUriRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // Uri: string + _, err = dec.Decode(&rUri) if err != nil { return } - rUri = result.Uri return } @@ -6832,15 +7076,15 @@ func (l *Libvirt) NodeNumOfDevices(Cap string, Flags uint32) (rNum int32, err er return } - result := NodeNumOfDevicesRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // Num: int32 + _, err = dec.Decode(&rNum) if err != nil { return } - rNum = result.Num return } @@ -6871,15 +7115,15 @@ func (l *Libvirt) NodeListDevices(Cap string, Maxnames int32, Flags uint32) (rNa return } - result := NodeListDevicesRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // Names: []string + _, err = dec.Decode(&rNames) if err != nil { return } - rNames = result.Names return } @@ -6908,15 +7152,15 @@ func (l *Libvirt) NodeDeviceLookupByName(Name string) (rDev NonnullNodeDevice, e return } - result := NodeDeviceLookupByNameRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // Dev: NonnullNodeDevice + _, err = dec.Decode(&rDev) if err != nil { return } - rDev = result.Dev return } @@ -6946,15 +7190,15 @@ func (l *Libvirt) NodeDeviceGetXMLDesc(Name string, Flags uint32) (rXML string, return } - result := NodeDeviceGetXMLDescRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // XML: string + _, err = dec.Decode(&rXML) if err != nil { return } - rXML = result.XML return } @@ -6983,15 +7227,15 @@ func (l *Libvirt) NodeDeviceGetParent(Name string) (rParent string, err error) { return } - result := NodeDeviceGetParentRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // Parent: string + _, err = dec.Decode(&rParent) if err != nil { return } - rParent = result.Parent return } @@ -7020,15 +7264,15 @@ func (l *Libvirt) NodeDeviceNumOfCaps(Name string) (rNum int32, err error) { return } - result := NodeDeviceNumOfCapsRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // Num: int32 + _, err = dec.Decode(&rNum) if err != nil { return } - rNum = result.Num return } @@ -7058,15 +7302,15 @@ func (l *Libvirt) NodeDeviceListCaps(Name string, Maxnames int32) (rNames []stri return } - result := NodeDeviceListCapsRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // Names: []string + _, err = dec.Decode(&rNames) if err != nil { return } - rNames = result.Names return } @@ -7176,16 +7420,20 @@ func (l *Libvirt) DomainGetSecurityLabel(Dom NonnullDomain) (rLabel []int8, rEnf return } - result := DomainGetSecurityLabelRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // Label: []int8 + _, err = dec.Decode(&rLabel) + if err != nil { + return + } + // Enforcing: int32 + _, err = dec.Decode(&rEnforcing) if err != nil { return } - rLabel = result.Label - rEnforcing = result.Enforcing return } @@ -7205,16 +7453,20 @@ func (l *Libvirt) NodeGetSecurityModel() (rModel []int8, rDoi []int8, err error) return } - result := NodeGetSecurityModelRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // Model: []int8 + _, err = dec.Decode(&rModel) + if err != nil { + return + } + // Doi: []int8 + _, err = dec.Decode(&rDoi) if err != nil { return } - rModel = result.Model - rDoi = result.Doi return } @@ -7244,15 +7496,15 @@ func (l *Libvirt) NodeDeviceCreateXML(XMLDesc string, Flags uint32) (rDev Nonnul return } - result := NodeDeviceCreateXMLRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // Dev: NonnullNodeDevice + _, err = dec.Decode(&rDev) if err != nil { return } - rDev = result.Dev return } @@ -7311,15 +7563,15 @@ func (l *Libvirt) StorageVolCreateXMLFrom(Pool NonnullStoragePool, XML string, C return } - result := StorageVolCreateXMLFromRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // Vol: NonnullStorageVol + _, err = dec.Decode(&rVol) if err != nil { return } - rVol = result.Vol return } @@ -7339,15 +7591,15 @@ func (l *Libvirt) ConnectNumOfInterfaces() (rNum int32, err error) { return } - result := ConnectNumOfInterfacesRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // Num: int32 + _, err = dec.Decode(&rNum) if err != nil { return } - rNum = result.Num return } @@ -7376,15 +7628,15 @@ func (l *Libvirt) ConnectListInterfaces(Maxnames int32) (rNames []string, err er return } - result := ConnectListInterfacesRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // Names: []string + _, err = dec.Decode(&rNames) if err != nil { return } - rNames = result.Names return } @@ -7413,15 +7665,15 @@ func (l *Libvirt) InterfaceLookupByName(Name string) (rIface NonnullInterface, e return } - result := InterfaceLookupByNameRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // Iface: NonnullInterface + _, err = dec.Decode(&rIface) if err != nil { return } - rIface = result.Iface return } @@ -7450,15 +7702,15 @@ func (l *Libvirt) InterfaceLookupByMacString(Mac string) (rIface NonnullInterfac return } - result := InterfaceLookupByMacStringRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // Iface: NonnullInterface + _, err = dec.Decode(&rIface) if err != nil { return } - rIface = result.Iface return } @@ -7488,15 +7740,15 @@ func (l *Libvirt) InterfaceGetXMLDesc(Iface NonnullInterface, Flags uint32) (rXM return } - result := InterfaceGetXMLDescRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // XML: string + _, err = dec.Decode(&rXML) if err != nil { return } - rXML = result.XML return } @@ -7526,15 +7778,15 @@ func (l *Libvirt) InterfaceDefineXML(XML string, Flags uint32) (rIface NonnullIn return } - result := InterfaceDefineXMLRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // Iface: NonnullInterface + _, err = dec.Decode(&rIface) if err != nil { return } - rIface = result.Iface return } @@ -7648,15 +7900,15 @@ func (l *Libvirt) ConnectDomainXMLFromNative(NativeFormat string, NativeConfig s return } - result := ConnectDomainXMLFromNativeRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // DomainXML: string + _, err = dec.Decode(&rDomainXML) if err != nil { return } - rDomainXML = result.DomainXML return } @@ -7687,15 +7939,15 @@ func (l *Libvirt) ConnectDomainXMLToNative(NativeFormat string, DomainXML string return } - result := ConnectDomainXMLToNativeRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // NativeConfig: string + _, err = dec.Decode(&rNativeConfig) if err != nil { return } - rNativeConfig = result.NativeConfig return } @@ -7715,15 +7967,15 @@ func (l *Libvirt) ConnectNumOfDefinedInterfaces() (rNum int32, err error) { return } - result := ConnectNumOfDefinedInterfacesRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // Num: int32 + _, err = dec.Decode(&rNum) if err != nil { return } - rNum = result.Num return } @@ -7752,15 +8004,15 @@ func (l *Libvirt) ConnectListDefinedInterfaces(Maxnames int32) (rNames []string, return } - result := ConnectListDefinedInterfacesRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // Names: []string + _, err = dec.Decode(&rNames) if err != nil { return } - rNames = result.Names return } @@ -7780,15 +8032,15 @@ func (l *Libvirt) ConnectNumOfSecrets() (rNum int32, err error) { return } - result := ConnectNumOfSecretsRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // Num: int32 + _, err = dec.Decode(&rNum) if err != nil { return } - rNum = result.Num return } @@ -7817,15 +8069,15 @@ func (l *Libvirt) ConnectListSecrets(Maxuuids int32) (rUuids []string, err error return } - result := ConnectListSecretsRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // Uuids: []string + _, err = dec.Decode(&rUuids) if err != nil { return } - rUuids = result.Uuids return } @@ -7854,15 +8106,15 @@ func (l *Libvirt) SecretLookupByUUID(UUID UUID) (rSecret NonnullSecret, err erro return } - result := SecretLookupByUUIDRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // Secret: NonnullSecret + _, err = dec.Decode(&rSecret) if err != nil { return } - rSecret = result.Secret return } @@ -7892,15 +8144,15 @@ func (l *Libvirt) SecretDefineXML(XML string, Flags uint32) (rSecret NonnullSecr return } - result := SecretDefineXMLRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // Secret: NonnullSecret + _, err = dec.Decode(&rSecret) if err != nil { return } - rSecret = result.Secret return } @@ -7930,15 +8182,15 @@ func (l *Libvirt) SecretGetXMLDesc(Secret NonnullSecret, Flags uint32) (rXML str return } - result := SecretGetXMLDescRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // XML: string + _, err = dec.Decode(&rXML) if err != nil { return } - rXML = result.XML return } @@ -7997,15 +8249,15 @@ func (l *Libvirt) SecretGetValue(Secret NonnullSecret, Flags uint32) (rValue []b return } - result := SecretGetValueRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // Value: []byte + _, err = dec.Decode(&rValue) if err != nil { return } - rValue = result.Value return } @@ -8062,15 +8314,15 @@ func (l *Libvirt) SecretLookupByUsage(UsageType int32, UsageID string) (rSecret return } - result := SecretLookupByUsageRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // Secret: NonnullSecret + _, err = dec.Decode(&rSecret) if err != nil { return } - rSecret = result.Secret return } @@ -8120,15 +8372,15 @@ func (l *Libvirt) ConnectIsSecure() (rSecure int32, err error) { return } - result := ConnectIsSecureRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // Secure: int32 + _, err = dec.Decode(&rSecure) if err != nil { return } - rSecure = result.Secure return } @@ -8157,15 +8409,15 @@ func (l *Libvirt) DomainIsActive(Dom NonnullDomain) (rActive int32, err error) { return } - result := DomainIsActiveRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // Active: int32 + _, err = dec.Decode(&rActive) if err != nil { return } - rActive = result.Active return } @@ -8194,15 +8446,15 @@ func (l *Libvirt) DomainIsPersistent(Dom NonnullDomain) (rPersistent int32, err return } - result := DomainIsPersistentRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // Persistent: int32 + _, err = dec.Decode(&rPersistent) if err != nil { return } - rPersistent = result.Persistent return } @@ -8231,15 +8483,15 @@ func (l *Libvirt) NetworkIsActive(Net NonnullNetwork) (rActive int32, err error) return } - result := NetworkIsActiveRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // Active: int32 + _, err = dec.Decode(&rActive) if err != nil { return } - rActive = result.Active return } @@ -8268,15 +8520,15 @@ func (l *Libvirt) NetworkIsPersistent(Net NonnullNetwork) (rPersistent int32, er return } - result := NetworkIsPersistentRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // Persistent: int32 + _, err = dec.Decode(&rPersistent) if err != nil { return } - rPersistent = result.Persistent return } @@ -8305,15 +8557,15 @@ func (l *Libvirt) StoragePoolIsActive(Pool NonnullStoragePool) (rActive int32, e return } - result := StoragePoolIsActiveRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // Active: int32 + _, err = dec.Decode(&rActive) if err != nil { return } - rActive = result.Active return } @@ -8342,15 +8594,15 @@ func (l *Libvirt) StoragePoolIsPersistent(Pool NonnullStoragePool) (rPersistent return } - result := StoragePoolIsPersistentRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // Persistent: int32 + _, err = dec.Decode(&rPersistent) if err != nil { return } - rPersistent = result.Persistent return } @@ -8379,15 +8631,15 @@ func (l *Libvirt) InterfaceIsActive(Iface NonnullInterface) (rActive int32, err return } - result := InterfaceIsActiveRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // Active: int32 + _, err = dec.Decode(&rActive) if err != nil { return } - rActive = result.Active return } @@ -8407,15 +8659,15 @@ func (l *Libvirt) ConnectGetLibVersion() (rLibVer uint64, err error) { return } - result := ConnectGetLibVersionRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // LibVer: uint64 + _, err = dec.Decode(&rLibVer) if err != nil { return } - rLibVer = result.LibVer return } @@ -8445,15 +8697,15 @@ func (l *Libvirt) ConnectCompareCPU(XML string, Flags uint32) (rResult int32, er return } - result := ConnectCompareCPURet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // Result: int32 + _, err = dec.Decode(&rResult) if err != nil { return } - rResult = result.Result return } @@ -8484,15 +8736,15 @@ func (l *Libvirt) DomainMemoryStats(Dom NonnullDomain, MaxStats uint32, Flags ui return } - result := DomainMemoryStatsRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // Stats: []DomainMemoryStat + _, err = dec.Decode(&rStats) if err != nil { return } - rStats = result.Stats return } @@ -8580,15 +8832,15 @@ func (l *Libvirt) ConnectBaselineCPU(XMLCPUs []string, Flags uint32) (rCPU strin return } - result := ConnectBaselineCPURet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // CPU: string + _, err = dec.Decode(&rCPU) if err != nil { return } - rCPU = result.CPU return } @@ -8617,26 +8869,70 @@ func (l *Libvirt) DomainGetJobInfo(Dom NonnullDomain) (rType int32, rTimeElapsed return } - result := DomainGetJobInfoRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // Type: int32 + _, err = dec.Decode(&rType) + if err != nil { + return + } + // TimeElapsed: uint64 + _, err = dec.Decode(&rTimeElapsed) + if err != nil { + return + } + // TimeRemaining: uint64 + _, err = dec.Decode(&rTimeRemaining) + if err != nil { + return + } + // DataTotal: uint64 + _, err = dec.Decode(&rDataTotal) + if err != nil { + return + } + // DataProcessed: uint64 + _, err = dec.Decode(&rDataProcessed) + if err != nil { + return + } + // DataRemaining: uint64 + _, err = dec.Decode(&rDataRemaining) + if err != nil { + return + } + // MemTotal: uint64 + _, err = dec.Decode(&rMemTotal) + if err != nil { + return + } + // MemProcessed: uint64 + _, err = dec.Decode(&rMemProcessed) + if err != nil { + return + } + // MemRemaining: uint64 + _, err = dec.Decode(&rMemRemaining) + if err != nil { + return + } + // FileTotal: uint64 + _, err = dec.Decode(&rFileTotal) + if err != nil { + return + } + // FileProcessed: uint64 + _, err = dec.Decode(&rFileProcessed) + if err != nil { + return + } + // FileRemaining: uint64 + _, err = dec.Decode(&rFileRemaining) if err != nil { return } - rType = result.Type - rTimeElapsed = result.TimeElapsed - rTimeRemaining = result.TimeRemaining - rDataTotal = result.DataTotal - rDataProcessed = result.DataProcessed - rDataRemaining = result.DataRemaining - rMemTotal = result.MemTotal - rMemProcessed = result.MemProcessed - rMemRemaining = result.MemRemaining - rFileTotal = result.FileTotal - rFileProcessed = result.FileProcessed - rFileRemaining = result.FileRemaining return } @@ -8922,15 +9218,15 @@ func (l *Libvirt) NwfilterLookupByName(Name string) (rNwfilter NonnullNwfilter, return } - result := NwfilterLookupByNameRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // Nwfilter: NonnullNwfilter + _, err = dec.Decode(&rNwfilter) if err != nil { return } - rNwfilter = result.Nwfilter return } @@ -8959,15 +9255,15 @@ func (l *Libvirt) NwfilterLookupByUUID(UUID UUID) (rNwfilter NonnullNwfilter, er return } - result := NwfilterLookupByUUIDRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // Nwfilter: NonnullNwfilter + _, err = dec.Decode(&rNwfilter) if err != nil { return } - rNwfilter = result.Nwfilter return } @@ -8997,15 +9293,15 @@ func (l *Libvirt) NwfilterGetXMLDesc(Nwfilter NonnullNwfilter, Flags uint32) (rX return } - result := NwfilterGetXMLDescRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // XML: string + _, err = dec.Decode(&rXML) if err != nil { return } - rXML = result.XML return } @@ -9025,15 +9321,15 @@ func (l *Libvirt) ConnectNumOfNwfilters() (rNum int32, err error) { return } - result := ConnectNumOfNwfiltersRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // Num: int32 + _, err = dec.Decode(&rNum) if err != nil { return } - rNum = result.Num return } @@ -9062,15 +9358,15 @@ func (l *Libvirt) ConnectListNwfilters(Maxnames int32) (rNames []string, err err return } - result := ConnectListNwfiltersRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // Names: []string + _, err = dec.Decode(&rNames) if err != nil { return } - rNames = result.Names return } @@ -9099,15 +9395,15 @@ func (l *Libvirt) NwfilterDefineXML(XML string) (rNwfilter NonnullNwfilter, err return } - result := NwfilterDefineXMLRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // Nwfilter: NonnullNwfilter + _, err = dec.Decode(&rNwfilter) if err != nil { return } - rNwfilter = result.Nwfilter return } @@ -9192,15 +9488,15 @@ func (l *Libvirt) DomainHasManagedSaveImage(Dom NonnullDomain, Flags uint32) (rR return } - result := DomainHasManagedSaveImageRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // Result: int32 + _, err = dec.Decode(&rResult) if err != nil { return } - rResult = result.Result return } @@ -9259,15 +9555,15 @@ func (l *Libvirt) DomainSnapshotCreateXML(Dom NonnullDomain, XMLDesc string, Fla return } - result := DomainSnapshotCreateXMLRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // Snap: NonnullDomainSnapshot + _, err = dec.Decode(&rSnap) if err != nil { return } - rSnap = result.Snap return } @@ -9297,15 +9593,15 @@ func (l *Libvirt) DomainSnapshotGetXMLDesc(Snap NonnullDomainSnapshot, Flags uin return } - result := DomainSnapshotGetXMLDescRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // XML: string + _, err = dec.Decode(&rXML) if err != nil { return } - rXML = result.XML return } @@ -9335,15 +9631,15 @@ func (l *Libvirt) DomainSnapshotNum(Dom NonnullDomain, Flags uint32) (rNum int32 return } - result := DomainSnapshotNumRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // Num: int32 + _, err = dec.Decode(&rNum) if err != nil { return } - rNum = result.Num return } @@ -9374,15 +9670,15 @@ func (l *Libvirt) DomainSnapshotListNames(Dom NonnullDomain, Maxnames int32, Fla return } - result := DomainSnapshotListNamesRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // Names: []string + _, err = dec.Decode(&rNames) if err != nil { return } - rNames = result.Names return } @@ -9413,15 +9709,15 @@ func (l *Libvirt) DomainSnapshotLookupByName(Dom NonnullDomain, Name string, Fla return } - result := DomainSnapshotLookupByNameRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // Snap: NonnullDomainSnapshot + _, err = dec.Decode(&rSnap) if err != nil { return } - rSnap = result.Snap return } @@ -9451,15 +9747,15 @@ func (l *Libvirt) DomainHasCurrentSnapshot(Dom NonnullDomain, Flags uint32) (rRe return } - result := DomainHasCurrentSnapshotRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // Result: int32 + _, err = dec.Decode(&rResult) if err != nil { return } - rResult = result.Result return } @@ -9489,15 +9785,15 @@ func (l *Libvirt) DomainSnapshotCurrent(Dom NonnullDomain, Flags uint32) (rSnap return } - result := DomainSnapshotCurrentRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // Snap: NonnullDomainSnapshot + _, err = dec.Decode(&rSnap) if err != nil { return } - rSnap = result.Snap return } @@ -9584,17 +9880,25 @@ func (l *Libvirt) DomainGetBlockInfo(Dom NonnullDomain, Path string, Flags uint3 return } - result := DomainGetBlockInfoRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // Allocation: uint64 + _, err = dec.Decode(&rAllocation) + if err != nil { + return + } + // Capacity: uint64 + _, err = dec.Decode(&rCapacity) + if err != nil { + return + } + // Physical: uint64 + _, err = dec.Decode(&rPhysical) if err != nil { return } - rAllocation = result.Allocation - rCapacity = result.Capacity - rPhysical = result.Physical return } @@ -9642,15 +9946,15 @@ func (l *Libvirt) DomainCreateWithFlags(Dom NonnullDomain, Flags uint32) (rDom N return } - result := DomainCreateWithFlagsRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // Dom: NonnullDomain + _, err = dec.Decode(&rDom) if err != nil { return } - rDom = result.Dom return } @@ -9710,16 +10014,21 @@ func (l *Libvirt) DomainGetMemoryParameters(Dom NonnullDomain, Nparams int32, Fl return } - result := DomainGetMemoryParametersRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // Params: []TypedParam + // Params + rParams, err = decodeTypedParams(dec) + if err != nil { + return + } + // Nparams: int32 + _, err = dec.Decode(&rNparams) if err != nil { return } - rParams = result.Params - rNparams = result.Nparams return } @@ -9778,15 +10087,15 @@ func (l *Libvirt) DomainGetVcpusFlags(Dom NonnullDomain, Flags uint32) (rNum int return } - result := DomainGetVcpusFlagsRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // Num: int32 + _, err = dec.Decode(&rNum) if err != nil { return } - rNum = result.Num return } @@ -9844,15 +10153,15 @@ func (l *Libvirt) DomainIsUpdated(Dom NonnullDomain) (rUpdated int32, err error) return } - result := DomainIsUpdatedRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // Updated: int32 + _, err = dec.Decode(&rUpdated) if err != nil { return } - rUpdated = result.Updated return } @@ -9881,15 +10190,15 @@ func (l *Libvirt) ConnectGetSysinfo(Flags uint32) (rSysinfo string, err error) { return } - result := ConnectGetSysinfoRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // Sysinfo: string + _, err = dec.Decode(&rSysinfo) if err != nil { return } - rSysinfo = result.Sysinfo return } @@ -9978,16 +10287,21 @@ func (l *Libvirt) DomainGetBlkioParameters(Dom NonnullDomain, Nparams int32, Fla return } - result := DomainGetBlkioParametersRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // Params: []TypedParam + // Params + rParams, err = decodeTypedParams(dec) + if err != nil { + return + } + // Nparams: int32 + _, err = dec.Decode(&rNparams) if err != nil { return } - rParams = result.Params - rNparams = result.Nparams return } @@ -10135,15 +10449,15 @@ func (l *Libvirt) DomainScreenshot(Dom NonnullDomain, Screen uint32, Flags uint3 return } - result := DomainScreenshotRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // Mime: string + _, err = dec.Decode(&rMime) if err != nil { return } - rMime = result.Mime return } @@ -10173,16 +10487,20 @@ func (l *Libvirt) DomainGetState(Dom NonnullDomain, Flags uint32) (rState int32, return } - result := DomainGetStateRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // State: int32 + _, err = dec.Decode(&rState) + if err != nil { + return + } + // Reason: int32 + _, err = dec.Decode(&rReason) if err != nil { return } - rState = result.State - rReason = result.Reason return } @@ -10215,16 +10533,20 @@ func (l *Libvirt) DomainMigrateBegin3(Dom NonnullDomain, Xmlin string, Flags uin return } - result := DomainMigrateBegin3Ret{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // CookieOut: []byte + _, err = dec.Decode(&rCookieOut) + if err != nil { + return + } + // XML: string + _, err = dec.Decode(&rXML) if err != nil { return } - rCookieOut = result.CookieOut - rXML = result.XML return } @@ -10258,16 +10580,20 @@ func (l *Libvirt) DomainMigratePrepare3(CookieIn []byte, UriIn string, Flags uin return } - result := DomainMigratePrepare3Ret{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // CookieOut: []byte + _, err = dec.Decode(&rCookieOut) + if err != nil { + return + } + // UriOut: string + _, err = dec.Decode(&rUriOut) if err != nil { return } - rCookieOut = result.CookieOut - rUriOut = result.UriOut return } @@ -10300,15 +10626,15 @@ func (l *Libvirt) DomainMigratePrepareTunnel3(CookieIn []byte, Flags uint64, Dna return } - result := DomainMigratePrepareTunnel3Ret{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // CookieOut: []byte + _, err = dec.Decode(&rCookieOut) if err != nil { return } - rCookieOut = result.CookieOut return } @@ -10344,15 +10670,15 @@ func (l *Libvirt) DomainMigratePerform3(Dom NonnullDomain, Xmlin string, CookieI return } - result := DomainMigratePerform3Ret{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // CookieOut: []byte + _, err = dec.Decode(&rCookieOut) if err != nil { return } - rCookieOut = result.CookieOut return } @@ -10386,16 +10712,20 @@ func (l *Libvirt) DomainMigrateFinish3(Dname string, CookieIn []byte, Dconnuri s return } - result := DomainMigrateFinish3Ret{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // Dom: NonnullDomain + _, err = dec.Decode(&rDom) + if err != nil { + return + } + // CookieOut: []byte + _, err = dec.Decode(&rCookieOut) if err != nil { return } - rDom = result.Dom - rCookieOut = result.CookieOut return } @@ -10566,15 +10896,16 @@ func (l *Libvirt) DomainGetSchedulerParametersFlags(Dom NonnullDomain, Nparams i return } - result := DomainGetSchedulerParametersFlagsRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // Params: []TypedParam + // Params + rParams, err = decodeTypedParams(dec) if err != nil { return } - rParams = result.Params return } @@ -10684,16 +11015,20 @@ func (l *Libvirt) NodeGetCPUStats(CPUNum int32, Nparams int32, Flags uint32) (rP return } - result := NodeGetCPUStatsRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // Params: []NodeGetCPUStats + _, err = dec.Decode(&rParams) + if err != nil { + return + } + // Nparams: int32 + _, err = dec.Decode(&rNparams) if err != nil { return } - rParams = result.Params - rNparams = result.Nparams return } @@ -10724,16 +11059,20 @@ func (l *Libvirt) NodeGetMemoryStats(Nparams int32, CellNum int32, Flags uint32) return } - result := NodeGetMemoryStatsRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // Params: []NodeGetMemoryStats + _, err = dec.Decode(&rParams) + if err != nil { + return + } + // Nparams: int32 + _, err = dec.Decode(&rNparams) if err != nil { return } - rParams = result.Params - rNparams = result.Nparams return } @@ -10763,17 +11102,25 @@ func (l *Libvirt) DomainGetControlInfo(Dom NonnullDomain, Flags uint32) (rState return } - result := DomainGetControlInfoRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // State: uint32 + _, err = dec.Decode(&rState) + if err != nil { + return + } + // Details: uint32 + _, err = dec.Decode(&rDetails) + if err != nil { + return + } + // StateTime: uint64 + _, err = dec.Decode(&rStateTime) if err != nil { return } - rState = result.State - rDetails = result.Details - rStateTime = result.StateTime return } @@ -10805,16 +11152,20 @@ func (l *Libvirt) DomainGetVcpuPinInfo(Dom NonnullDomain, Ncpumaps int32, Maplen return } - result := DomainGetVcpuPinInfoRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // Cpumaps: []byte + _, err = dec.Decode(&rCpumaps) + if err != nil { + return + } + // Num: int32 + _, err = dec.Decode(&rNum) if err != nil { return } - rCpumaps = result.Cpumaps - rNum = result.Num return } @@ -10959,15 +11310,15 @@ func (l *Libvirt) DomainSaveImageGetXMLDesc(File string, Flags uint32) (rXML str return } - result := DomainSaveImageGetXMLDescRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // XML: string + _, err = dec.Decode(&rXML) if err != nil { return } - rXML = result.XML return } @@ -11056,19 +11407,35 @@ func (l *Libvirt) DomainGetBlockJobInfo(Dom NonnullDomain, Path string, Flags ui return } - result := DomainGetBlockJobInfoRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // Found: int32 + _, err = dec.Decode(&rFound) + if err != nil { + return + } + // Type: int32 + _, err = dec.Decode(&rType) + if err != nil { + return + } + // Bandwidth: uint64 + _, err = dec.Decode(&rBandwidth) + if err != nil { + return + } + // Cur: uint64 + _, err = dec.Decode(&rCur) + if err != nil { + return + } + // End: uint64 + _, err = dec.Decode(&rEnd) if err != nil { return } - rFound = result.Found - rType = result.Type - rBandwidth = result.Bandwidth - rCur = result.Cur - rEnd = result.End return } @@ -11176,15 +11543,15 @@ func (l *Libvirt) DomainMigrateGetMaxSpeed(Dom NonnullDomain, Flags uint32) (rBa return } - result := DomainMigrateGetMaxSpeedRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // Bandwidth: uint64 + _, err = dec.Decode(&rBandwidth) if err != nil { return } - rBandwidth = result.Bandwidth return } @@ -11216,16 +11583,21 @@ func (l *Libvirt) DomainBlockStatsFlags(Dom NonnullDomain, Path string, Nparams return } - result := DomainBlockStatsFlagsRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // Params: []TypedParam + // Params + rParams, err = decodeTypedParams(dec) + if err != nil { + return + } + // Nparams: int32 + _, err = dec.Decode(&rNparams) if err != nil { return } - rParams = result.Params - rNparams = result.Nparams return } @@ -11255,15 +11627,15 @@ func (l *Libvirt) DomainSnapshotGetParent(Snap NonnullDomainSnapshot, Flags uint return } - result := DomainSnapshotGetParentRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // Snap: NonnullDomainSnapshot + _, err = dec.Decode(&rSnap) if err != nil { return } - rSnap = result.Snap return } @@ -11321,15 +11693,15 @@ func (l *Libvirt) DomainSnapshotNumChildren(Snap NonnullDomainSnapshot, Flags ui return } - result := DomainSnapshotNumChildrenRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // Num: int32 + _, err = dec.Decode(&rNum) if err != nil { return } - rNum = result.Num return } @@ -11360,15 +11732,15 @@ func (l *Libvirt) DomainSnapshotListChildrenNames(Snap NonnullDomainSnapshot, Ma return } - result := DomainSnapshotListChildrenNamesRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // Names: []string + _, err = dec.Decode(&rNames) if err != nil { return } - rNames = result.Names return } @@ -11536,16 +11908,21 @@ func (l *Libvirt) DomainGetBlockIOTune(Dom NonnullDomain, Disk string, Nparams i return } - result := DomainGetBlockIOTuneRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // Params: []TypedParam + // Params + rParams, err = decodeTypedParams(dec) + if err != nil { + return + } + // Nparams: int32 + _, err = dec.Decode(&rNparams) if err != nil { return } - rParams = result.Params - rNparams = result.Nparams return } @@ -11605,16 +11982,21 @@ func (l *Libvirt) DomainGetNumaParameters(Dom NonnullDomain, Nparams int32, Flag return } - result := DomainGetNumaParametersRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // Params: []TypedParam + // Params + rParams, err = decodeTypedParams(dec) + if err != nil { + return + } + // Nparams: int32 + _, err = dec.Decode(&rNparams) if err != nil { return } - rParams = result.Params - rNparams = result.Nparams return } @@ -11676,16 +12058,21 @@ func (l *Libvirt) DomainGetInterfaceParameters(Dom NonnullDomain, Device string, return } - result := DomainGetInterfaceParametersRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // Params: []TypedParam + // Params + rParams, err = decodeTypedParams(dec) + if err != nil { + return + } + // Nparams: int32 + _, err = dec.Decode(&rNparams) if err != nil { return } - rParams = result.Params - rNparams = result.Nparams return } @@ -11834,16 +12221,21 @@ func (l *Libvirt) DomainGetCPUStats(Dom NonnullDomain, Nparams uint32, StartCPU return } - result := DomainGetCPUStatsRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // Params: []TypedParam + // Params + rParams, err = decodeTypedParams(dec) + if err != nil { + return + } + // Nparams: int32 + _, err = dec.Decode(&rNparams) if err != nil { return } - rParams = result.Params - rNparams = result.Nparams return } @@ -11874,16 +12266,20 @@ func (l *Libvirt) DomainGetDiskErrors(Dom NonnullDomain, Maxerrors uint32, Flags return } - result := DomainGetDiskErrorsRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // Errors: []DomainDiskError + _, err = dec.Decode(&rErrors) + if err != nil { + return + } + // Nerrors: int32 + _, err = dec.Decode(&rNerrors) if err != nil { return } - rErrors = result.Errors - rNerrors = result.Nerrors return } @@ -11947,15 +12343,15 @@ func (l *Libvirt) DomainGetMetadata(Dom NonnullDomain, Type int32, Uri string, F return } - result := DomainGetMetadataRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // Metadata: string + _, err = dec.Decode(&rMetadata) if err != nil { return } - rMetadata = result.Metadata return } @@ -12098,15 +12494,15 @@ func (l *Libvirt) DomainSnapshotIsCurrent(Snap NonnullDomainSnapshot, Flags uint return } - result := DomainSnapshotIsCurrentRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // Current: int32 + _, err = dec.Decode(&rCurrent) if err != nil { return } - rCurrent = result.Current return } @@ -12136,15 +12532,15 @@ func (l *Libvirt) DomainSnapshotHasMetadata(Snap NonnullDomainSnapshot, Flags ui return } - result := DomainSnapshotHasMetadataRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // Metadata: int32 + _, err = dec.Decode(&rMetadata) if err != nil { return } - rMetadata = result.Metadata return } @@ -12174,16 +12570,20 @@ func (l *Libvirt) ConnectListAllDomains(NeedResults int32, Flags uint32) (rDomai return } - result := ConnectListAllDomainsRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // Domains: []NonnullDomain + _, err = dec.Decode(&rDomains) + if err != nil { + return + } + // Ret: uint32 + _, err = dec.Decode(&rRet) if err != nil { return } - rDomains = result.Domains - rRet = result.Ret return } @@ -12214,16 +12614,20 @@ func (l *Libvirt) DomainListAllSnapshots(Dom NonnullDomain, NeedResults int32, F return } - result := DomainListAllSnapshotsRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // Snapshots: []NonnullDomainSnapshot + _, err = dec.Decode(&rSnapshots) + if err != nil { + return + } + // Ret: int32 + _, err = dec.Decode(&rRet) if err != nil { return } - rSnapshots = result.Snapshots - rRet = result.Ret return } @@ -12254,16 +12658,20 @@ func (l *Libvirt) DomainSnapshotListAllChildren(Snapshot NonnullDomainSnapshot, return } - result := DomainSnapshotListAllChildrenRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // Snapshots: []NonnullDomainSnapshot + _, err = dec.Decode(&rSnapshots) + if err != nil { + return + } + // Ret: int32 + _, err = dec.Decode(&rRet) if err != nil { return } - rSnapshots = result.Snapshots - rRet = result.Ret return } @@ -12311,15 +12719,15 @@ func (l *Libvirt) DomainGetHostname(Dom NonnullDomain, Flags uint32) (rHostname return } - result := DomainGetHostnameRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // Hostname: string + _, err = dec.Decode(&rHostname) if err != nil { return } - rHostname = result.Hostname return } @@ -12348,16 +12756,20 @@ func (l *Libvirt) DomainGetSecurityLabelList(Dom NonnullDomain) (rLabels []Domai return } - result := DomainGetSecurityLabelListRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // Labels: []DomainGetSecurityLabelRet + _, err = dec.Decode(&rLabels) + if err != nil { + return + } + // Ret: int32 + _, err = dec.Decode(&rRet) if err != nil { return } - rLabels = result.Labels - rRet = result.Ret return } @@ -12417,16 +12829,20 @@ func (l *Libvirt) DomainGetEmulatorPinInfo(Dom NonnullDomain, Maplen int32, Flag return } - result := DomainGetEmulatorPinInfoRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // Cpumaps: []byte + _, err = dec.Decode(&rCpumaps) + if err != nil { + return + } + // Ret: int32 + _, err = dec.Decode(&rRet) if err != nil { return } - rCpumaps = result.Cpumaps - rRet = result.Ret return } @@ -12456,16 +12872,20 @@ func (l *Libvirt) ConnectListAllStoragePools(NeedResults int32, Flags uint32) (r return } - result := ConnectListAllStoragePoolsRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // Pools: []NonnullStoragePool + _, err = dec.Decode(&rPools) + if err != nil { + return + } + // Ret: uint32 + _, err = dec.Decode(&rRet) if err != nil { return } - rPools = result.Pools - rRet = result.Ret return } @@ -12496,16 +12916,20 @@ func (l *Libvirt) StoragePoolListAllVolumes(Pool NonnullStoragePool, NeedResults return } - result := StoragePoolListAllVolumesRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // Vols: []NonnullStorageVol + _, err = dec.Decode(&rVols) + if err != nil { + return + } + // Ret: uint32 + _, err = dec.Decode(&rRet) if err != nil { return } - rVols = result.Vols - rRet = result.Ret return } @@ -12535,16 +12959,20 @@ func (l *Libvirt) ConnectListAllNetworks(NeedResults int32, Flags uint32) (rNets return } - result := ConnectListAllNetworksRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // Nets: []NonnullNetwork + _, err = dec.Decode(&rNets) + if err != nil { + return + } + // Ret: uint32 + _, err = dec.Decode(&rRet) if err != nil { return } - rNets = result.Nets - rRet = result.Ret return } @@ -12574,16 +13002,20 @@ func (l *Libvirt) ConnectListAllInterfaces(NeedResults int32, Flags uint32) (rIf return } - result := ConnectListAllInterfacesRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // Ifaces: []NonnullInterface + _, err = dec.Decode(&rIfaces) + if err != nil { + return + } + // Ret: uint32 + _, err = dec.Decode(&rRet) if err != nil { return } - rIfaces = result.Ifaces - rRet = result.Ret return } @@ -12613,16 +13045,20 @@ func (l *Libvirt) ConnectListAllNodeDevices(NeedResults int32, Flags uint32) (rD return } - result := ConnectListAllNodeDevicesRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // Devices: []NonnullNodeDevice + _, err = dec.Decode(&rDevices) + if err != nil { + return + } + // Ret: uint32 + _, err = dec.Decode(&rRet) if err != nil { return } - rDevices = result.Devices - rRet = result.Ret return } @@ -12652,16 +13088,20 @@ func (l *Libvirt) ConnectListAllNwfilters(NeedResults int32, Flags uint32) (rFil return } - result := ConnectListAllNwfiltersRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // Filters: []NonnullNwfilter + _, err = dec.Decode(&rFilters) + if err != nil { + return + } + // Ret: uint32 + _, err = dec.Decode(&rRet) if err != nil { return } - rFilters = result.Filters - rRet = result.Ret return } @@ -12691,16 +13131,20 @@ func (l *Libvirt) ConnectListAllSecrets(NeedResults int32, Flags uint32) (rSecre return } - result := ConnectListAllSecretsRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // Secrets: []NonnullSecret + _, err = dec.Decode(&rSecrets) + if err != nil { + return + } + // Ret: uint32 + _, err = dec.Decode(&rRet) if err != nil { return } - rSecrets = result.Secrets - rRet = result.Ret return } @@ -12758,16 +13202,21 @@ func (l *Libvirt) NodeGetMemoryParameters(Nparams int32, Flags uint32) (rParams return } - result := NodeGetMemoryParametersRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // Params: []TypedParam + // Params + rParams, err = decodeTypedParams(dec) + if err != nil { + return + } + // Nparams: int32 + _, err = dec.Decode(&rNparams) if err != nil { return } - rParams = result.Params - rNparams = result.Nparams return } @@ -12880,17 +13329,25 @@ func (l *Libvirt) NodeGetCPUMap(NeedMap int32, NeedOnline int32, Flags uint32) ( return } - result := NodeGetCPUMapRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // Cpumap: []byte + _, err = dec.Decode(&rCpumap) + if err != nil { + return + } + // Online: uint32 + _, err = dec.Decode(&rOnline) + if err != nil { + return + } + // Ret: int32 + _, err = dec.Decode(&rRet) if err != nil { return } - rCpumap = result.Cpumap - rOnline = result.Online - rRet = result.Ret return } @@ -13010,15 +13467,15 @@ func (l *Libvirt) NodeDeviceLookupScsiHostByWwn(Wwnn string, Wwpn string, Flags return } - result := NodeDeviceLookupScsiHostByWwnRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // Dev: NonnullNodeDevice + _, err = dec.Decode(&rDev) if err != nil { return } - rDev = result.Dev return } @@ -13048,16 +13505,21 @@ func (l *Libvirt) DomainGetJobStats(Dom NonnullDomain, Flags uint32) (rType int3 return } - result := DomainGetJobStatsRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // Type: int32 + _, err = dec.Decode(&rType) + if err != nil { + return + } + // Params: []TypedParam + // Params + rParams, err = decodeTypedParams(dec) if err != nil { return } - rType = result.Type - rParams = result.Params return } @@ -13087,15 +13549,15 @@ func (l *Libvirt) DomainMigrateGetCompressionCache(Dom NonnullDomain, Flags uint return } - result := DomainMigrateGetCompressionCacheRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // CacheSize: uint64 + _, err = dec.Decode(&rCacheSize) if err != nil { return } - rCacheSize = result.CacheSize return } @@ -13184,16 +13646,20 @@ func (l *Libvirt) DomainMigrateBegin3Params(Dom NonnullDomain, Params []TypedPar return } - result := DomainMigrateBegin3ParamsRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // CookieOut: []byte + _, err = dec.Decode(&rCookieOut) + if err != nil { + return + } + // XML: string + _, err = dec.Decode(&rXML) if err != nil { return } - rCookieOut = result.CookieOut - rXML = result.XML return } @@ -13224,16 +13690,20 @@ func (l *Libvirt) DomainMigratePrepare3Params(Params []TypedParam, CookieIn []by return } - result := DomainMigratePrepare3ParamsRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // CookieOut: []byte + _, err = dec.Decode(&rCookieOut) + if err != nil { + return + } + // UriOut: string + _, err = dec.Decode(&rUriOut) if err != nil { return } - rCookieOut = result.CookieOut - rUriOut = result.UriOut return } @@ -13264,15 +13734,15 @@ func (l *Libvirt) DomainMigratePrepareTunnel3Params(Params []TypedParam, CookieI return } - result := DomainMigratePrepareTunnel3ParamsRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // CookieOut: []byte + _, err = dec.Decode(&rCookieOut) if err != nil { return } - rCookieOut = result.CookieOut return } @@ -13305,15 +13775,15 @@ func (l *Libvirt) DomainMigratePerform3Params(Dom NonnullDomain, Dconnuri string return } - result := DomainMigratePerform3ParamsRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // CookieOut: []byte + _, err = dec.Decode(&rCookieOut) if err != nil { return } - rCookieOut = result.CookieOut return } @@ -13345,16 +13815,20 @@ func (l *Libvirt) DomainMigrateFinish3Params(Params []TypedParam, CookieIn []byt return } - result := DomainMigrateFinish3ParamsRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // Dom: NonnullDomain + _, err = dec.Decode(&rDom) + if err != nil { + return + } + // CookieOut: []byte + _, err = dec.Decode(&rCookieOut) if err != nil { return } - rDom = result.Dom - rCookieOut = result.CookieOut return } @@ -13444,15 +13918,15 @@ func (l *Libvirt) DomainCreateXMLWithFiles(XMLDesc string, Flags uint32) (rDom N return } - result := DomainCreateXMLWithFilesRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // Dom: NonnullDomain + _, err = dec.Decode(&rDom) if err != nil { return } - rDom = result.Dom return } @@ -13482,15 +13956,15 @@ func (l *Libvirt) DomainCreateWithFiles(Dom NonnullDomain, Flags uint32) (rDom N return } - result := DomainCreateWithFilesRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // Dom: NonnullDomain + _, err = dec.Decode(&rDom) if err != nil { return } - rDom = result.Dom return } @@ -13539,16 +14013,20 @@ func (l *Libvirt) ConnectGetCPUModelNames(Arch string, NeedResults int32, Flags return } - result := ConnectGetCPUModelNamesRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // Models: []string + _, err = dec.Decode(&rModels) + if err != nil { + return + } + // Ret: int32 + _, err = dec.Decode(&rRet) if err != nil { return } - rModels = result.Models - rRet = result.Ret return } @@ -13578,15 +14056,15 @@ func (l *Libvirt) ConnectNetworkEventRegisterAny(EventID int32, Net Network) (rC return } - result := ConnectNetworkEventRegisterAnyRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // CallbackID: int32 + _, err = dec.Decode(&rCallbackID) if err != nil { return } - rCallbackID = result.CallbackID return } @@ -13661,15 +14139,15 @@ func (l *Libvirt) ConnectDomainEventCallbackRegisterAny(EventID int32, Dom Domai return } - result := ConnectDomainEventCallbackRegisterAnyRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // CallbackID: int32 + _, err = dec.Decode(&rCallbackID) if err != nil { return } - rCallbackID = result.CallbackID return } @@ -14045,15 +14523,15 @@ func (l *Libvirt) DomainFsfreeze(Dom NonnullDomain, Mountpoints []string, Flags return } - result := DomainFsfreezeRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // Filesystems: int32 + _, err = dec.Decode(&rFilesystems) if err != nil { return } - rFilesystems = result.Filesystems return } @@ -14084,15 +14562,15 @@ func (l *Libvirt) DomainFsthaw(Dom NonnullDomain, Mountpoints []string, Flags ui return } - result := DomainFsthawRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // Filesystems: int32 + _, err = dec.Decode(&rFilesystems) if err != nil { return } - rFilesystems = result.Filesystems return } @@ -14122,16 +14600,20 @@ func (l *Libvirt) DomainGetTime(Dom NonnullDomain, Flags uint32) (rSeconds int64 return } - result := DomainGetTimeRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // Seconds: int64 + _, err = dec.Decode(&rSeconds) + if err != nil { + return + } + // Nseconds: uint32 + _, err = dec.Decode(&rNseconds) if err != nil { return } - rSeconds = result.Seconds - rNseconds = result.Nseconds return } @@ -14211,15 +14693,15 @@ func (l *Libvirt) NodeGetFreePages(Pages []uint32, StartCell int32, CellCount ui return } - result := NodeGetFreePagesRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // Counts: []uint64 + _, err = dec.Decode(&rCounts) if err != nil { return } - rCounts = result.Counts return } @@ -14251,16 +14733,20 @@ func (l *Libvirt) NetworkGetDhcpLeases(Net NonnullNetwork, Mac string, NeedResul return } - result := NetworkGetDhcpLeasesRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // Leases: []NetworkDhcpLease + _, err = dec.Decode(&rLeases) + if err != nil { + return + } + // Ret: uint32 + _, err = dec.Decode(&rRet) if err != nil { return } - rLeases = result.Leases - rRet = result.Ret return } @@ -14293,15 +14779,15 @@ func (l *Libvirt) ConnectGetDomainCapabilities(Emulatorbin string, Arch string, return } - result := ConnectGetDomainCapabilitiesRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // Capabilities: string + _, err = dec.Decode(&rCapabilities) if err != nil { return } - rCapabilities = result.Capabilities return } @@ -14361,15 +14847,15 @@ func (l *Libvirt) ConnectGetAllDomainStats(Doms []NonnullDomain, Stats uint32, F return } - result := ConnectGetAllDomainStatsRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // RetStats: []DomainStatsRecord + _, err = dec.Decode(&rRetStats) if err != nil { return } - rRetStats = result.RetStats return } @@ -14451,15 +14937,15 @@ func (l *Libvirt) NodeAllocPages(PageSizes []uint32, PageCounts []uint64, StartC return } - result := NodeAllocPagesRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // Ret: int32 + _, err = dec.Decode(&rRet) if err != nil { return } - rRet = result.Ret return } @@ -14507,16 +14993,20 @@ func (l *Libvirt) DomainGetFsinfo(Dom NonnullDomain, Flags uint32) (rInfo []Doma return } - result := DomainGetFsinfoRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // Info: []DomainFsinfo + _, err = dec.Decode(&rInfo) + if err != nil { + return + } + // Ret: uint32 + _, err = dec.Decode(&rRet) if err != nil { return } - rInfo = result.Info - rRet = result.Ret return } @@ -14546,15 +15036,15 @@ func (l *Libvirt) DomainDefineXMLFlags(XML string, Flags uint32) (rDom NonnullDo return } - result := DomainDefineXMLFlagsRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // Dom: NonnullDomain + _, err = dec.Decode(&rDom) if err != nil { return } - rDom = result.Dom return } @@ -14584,16 +15074,20 @@ func (l *Libvirt) DomainGetIothreadInfo(Dom NonnullDomain, Flags uint32) (rInfo return } - result := DomainGetIothreadInfoRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // Info: []DomainIothreadInfo + _, err = dec.Decode(&rInfo) + if err != nil { + return + } + // Ret: uint32 + _, err = dec.Decode(&rRet) if err != nil { return } - rInfo = result.Info - rRet = result.Ret return } @@ -14654,15 +15148,15 @@ func (l *Libvirt) DomainInterfaceAddresses(Dom NonnullDomain, Source uint32, Fla return } - result := DomainInterfaceAddressesRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // Ifaces: []DomainInterface + _, err = dec.Decode(&rIfaces) if err != nil { return } - rIfaces = result.Ifaces return } @@ -14799,15 +15293,15 @@ func (l *Libvirt) DomainRename(Dom NonnullDomain, NewName string, Flags uint32) return } - result := DomainRenameRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // Retcode: int32 + _, err = dec.Decode(&rRetcode) if err != nil { return } - rRetcode = result.Retcode return } @@ -14955,15 +15449,16 @@ func (l *Libvirt) DomainGetPerfEvents(Dom NonnullDomain, Flags uint32) (rParams return } - result := DomainGetPerfEventsRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // Params: []TypedParam + // Params + rParams, err = decodeTypedParams(dec) if err != nil { return } - rParams = result.Params return } @@ -15040,15 +15535,15 @@ func (l *Libvirt) ConnectStoragePoolEventRegisterAny(EventID int32, Pool Storage return } - result := ConnectStoragePoolEventRegisterAnyRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // CallbackID: int32 + _, err = dec.Decode(&rCallbackID) if err != nil { return } - rCallbackID = result.CallbackID return } @@ -15123,15 +15618,16 @@ func (l *Libvirt) DomainGetGuestVcpus(Dom NonnullDomain, Flags uint32) (rParams return } - result := DomainGetGuestVcpusRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // Params: []TypedParam + // Params + rParams, err = decodeTypedParams(dec) if err != nil { return } - rParams = result.Params return } @@ -15209,15 +15705,15 @@ func (l *Libvirt) ConnectNodeDeviceEventRegisterAny(EventID int32, Dev NodeDevic return } - result := ConnectNodeDeviceEventRegisterAnyRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // CallbackID: int32 + _, err = dec.Decode(&rCallbackID) if err != nil { return } - rCallbackID = result.CallbackID return } @@ -15310,17 +15806,25 @@ func (l *Libvirt) StorageVolGetInfoFlags(Vol NonnullStorageVol, Flags uint32) (r return } - result := StorageVolGetInfoFlagsRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // Type: int8 + _, err = dec.Decode(&rType) + if err != nil { + return + } + // Capacity: uint64 + _, err = dec.Decode(&rCapacity) + if err != nil { + return + } + // Allocation: uint64 + _, err = dec.Decode(&rAllocation) if err != nil { return } - rType = result.Type - rCapacity = result.Capacity - rAllocation = result.Allocation return } @@ -15368,15 +15872,15 @@ func (l *Libvirt) ConnectSecretEventRegisterAny(EventID int32, Secret Secret) (r return } - result := ConnectSecretEventRegisterAnyRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // CallbackID: int32 + _, err = dec.Decode(&rCallbackID) if err != nil { return } - rCallbackID = result.CallbackID return } @@ -15547,15 +16051,15 @@ func (l *Libvirt) DomainMigrateGetMaxDowntime(Dom NonnullDomain, Flags uint32) ( return } - result := DomainMigrateGetMaxDowntimeRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // Downtime: uint64 + _, err = dec.Decode(&rDowntime) if err != nil { return } - rDowntime = result.Downtime return } @@ -15585,15 +16089,15 @@ func (l *Libvirt) DomainManagedSaveGetXMLDesc(Dom NonnullDomain, Flags uint32) ( return } - result := DomainManagedSaveGetXMLDescRet{} + // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - _, err = dec.Decode(&result) + // XML: string + _, err = dec.Decode(&rXML) if err != nil { return } - rXML = result.XML return } diff --git a/libvirt.go b/libvirt.go index bd7701d..975c377 100644 --- a/libvirt.go +++ b/libvirt.go @@ -1398,39 +1398,13 @@ func (l *Libvirt) SetBlockIOTune(dom string, disk string, limits ...BlockLimit) return err } - // https://libvirt.org/html/libvirt-libvirt-domain.html#virDomainSetBlockIoTune - payload := struct { - Domain Domain - Disk string - Params []TypedParam - Flags DomainAffectFlags - }{ - Domain: d, - Disk: disk, - Flags: FlagDomainAffectLive, - } - - for _, limit := range limits { + params := make([]TypedParam, len(limits)) + for ix, limit := range limits { tpval := NewTypedParamValueUllong(limit.Value) - tp := &TypedParam{Field: limit.Name, Value: tpval} - payload.Params = append(payload.Params, *tp) + params[ix] = TypedParam{Field: limit.Name, Value: tpval} } - buf, err := encode(&payload) - if err != nil { - return err - } - resp, err := l.request(constants.ProcDomainSetBlockIOTune, constants.Program, &buf) - if err != nil { - return err - } - - r := <-resp - if r.Status != StatusOK { - return decodeError(r.Payload) - } - - return nil + return l.DomainSetBlockIOTune(*d, disk, params, FlagDomainAffectLive) } // GetBlockIOTune returns a slice containing the current block I/O tunables for @@ -1441,78 +1415,92 @@ func (l *Libvirt) GetBlockIOTune(dom string, disk string) ([]BlockLimit, error) return nil, err } - payload := struct { - Domain Domain - Disk []string - ParamCount uint32 - Flags DomainAffectFlags - }{ - Domain: d, - Disk: []string{disk}, - ParamCount: 32, - Flags: FlagTypedParamStringOkay, - } - - buf, err := encode(&payload) + lims, _, err := l.DomainGetBlockIOTune(*d, disk, 32, FlagTypedParamStringOkay) if err != nil { return nil, err } - - resp, err := l.request(constants.ProcDomainGetBlockIOTune, constants.Program, &buf) - if err != nil { - return nil, err - } - - r := <-resp - if r.Status != StatusOK { - return nil, decodeError(r.Payload) - } + // payload := struct { + // Domain Domain + // Disk []string + // ParamCount uint32 + // Flags DomainAffectFlags + // }{ + // Domain: d, + // Disk: []string{disk}, + // ParamCount: 32, + // Flags: FlagTypedParamStringOkay, + // } + // + // buf, err := encode(&payload) + // if err != nil { + // return nil, err + // } + // + // resp, err := l.request(constants.ProcDomainGetBlockIOTune, constants.Program, &buf) + // if err != nil { + // return nil, err + // } + // + // r := <-resp + // if r.Status != StatusOK { + // return nil, decodeError(r.Payload) + // } var limits []BlockLimit - rdr := bytes.NewReader(r.Payload) - dec := xdr.NewDecoder(rdr) + // rdr := bytes.NewReader(r.Payload) + // dec := xdr.NewDecoder(rdr) // find out how many params were returned - paramCount, _, err := dec.DecodeInt() - if err != nil { - return nil, err - } + // paramCount, _, err := dec.DecodeInt() + // if err != nil { + // return nil, err + // } // now decode each of the returned TypedParams. To do this we read the field // name and type, then use the type information to decode the value. - for param := int32(0); param < paramCount; param++ { - // Get the field name - name, _, err := dec.DecodeString() - if err != nil { - return nil, err - } - // ...and the type - ptype, _, err := dec.DecodeInt() - if err != nil { - return nil, err - } - - // Now we can read the actual value. - switch ptype { - case TypeParamULLong: - var val uint64 - _, err = dec.Decode(&val) - if err != nil { - return nil, err - } - lim := BlockLimit{name, val} - limits = append(limits, lim) - case TypeParamString: - var val string - _, err = dec.Decode(&val) - if err != nil { - return nil, err - } - // This routine doesn't currently return strings. As of libvirt 3+, - // there's one string here, `group_name`. + for _, lim := range lims { + var l BlockLimit + name := lim.Field + switch lim.Value.Get().(type) { + case uint64: + l = BlockLimit{Name: name, Value: lim.Value.Get().(uint64)} } + limits = append(limits, l) } + // for param := int32(0); param < paramCount; param++ { + // // Get the field name + // name, _, err := dec.DecodeString() + // if err != nil { + // return nil, err + // } + // // ...and the type + // ptype, _, err := dec.DecodeInt() + // if err != nil { + // return nil, err + // } + // + // // Now we can read the actual value. + // switch ptype { + // case TypeParamULLong: + // var val uint64 + // _, err = dec.Decode(&val) + // if err != nil { + // return nil, err + // } + // lim := BlockLimit{name, val} + // limits = append(limits, lim) + // case TypeParamString: + // var val string + // _, err = dec.Decode(&val) + // if err != nil { + // return nil, err + // } + // // This routine doesn't currently return strings. As of libvirt 3+, + // // there's one string here, `group_name`. + // } + // } + return limits, nil } From b59e9d42f41f915d17d8084615fae51c181ed45e Mon Sep 17 00:00:00 2001 From: Geoff Hickey Date: Thu, 16 Nov 2017 14:17:46 -0500 Subject: [PATCH 07/20] 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) --- internal/lvgen/generate.go | 7 +- internal/lvgen/procedures.tmpl | 82 ++-- internal/lvgen/sunrpc.y | 6 +- libvirt.gen.go | 586 +++++++++------------------ libvirt.go | 707 +++------------------------------ libvirt_test.go | 6 +- rpc_test.go | 4 - 7 files changed, 297 insertions(+), 1101 deletions(-) diff --git a/internal/lvgen/generate.go b/internal/lvgen/generate.go index e534893..38627dd 100644 --- a/internal/lvgen/generate.go +++ b/internal/lvgen/generate.go @@ -25,6 +25,10 @@ import ( "unicode/utf8" ) +// If you're making changes to the generator, or troubleshooting the generated +// code, the docs for sunrpc and xdr (the line encoding) are helpful: +// https://docs.oracle.com/cd/E26502_01/html/E35597/ + // ConstItem stores an const's symbol and value from the parser. This struct is // also used for enums. type ConstItem struct { @@ -81,7 +85,6 @@ var goEquivTypes = map[string]string{ // TODO: Get rid of these. They're only needed because we lose information // that the parser has (the parser knows it has emitted a go type), and then // we capitalize types to make them public. - "String": "string", "Int": "int", "Uint": "uint", "Int8": "int8", @@ -580,7 +583,7 @@ func checkIdentifier(i string) string { } // GetUnion returns the type information for a union. If the provided type name -// isn't a union, the second return value will be false. +// isn't a union, this will return a zero-value Union type. func (decl *Decl) GetUnion() Union { ix, ok := Gen.UnionMap[decl.Type] if ok { diff --git a/internal/lvgen/procedures.tmpl b/internal/lvgen/procedures.tmpl index f3266a8..6e72c8f 100644 --- a/internal/lvgen/procedures.tmpl +++ b/internal/lvgen/procedures.tmpl @@ -42,8 +42,10 @@ type {{$casetype}} struct { DVal uint32 {{.Name}} {{.Type}} } -func New{{$casetype}}(v {{.Type}}) *{{$casetype}} { return &{{$casetype}}{DVal: {{.DiscriminantVal}}, {{.Name}}: v} } -func Decode{{$casetype}}(dec *xdr.Decoder) (*{{$casetype}}, error) { +func New{{$casetype}}(v {{.Type}}) *{{$casetype}} { + return &{{$casetype}}{DVal: {{.DiscriminantVal}}, {{.Name}}: v} +} +func decode{{$casetype}}(dec *xdr.Decoder) (*{{$casetype}}, error) { var v {{.Type}} _, err := dec.Decode(&v) if err != nil { @@ -53,49 +55,46 @@ func Decode{{$casetype}}(dec *xdr.Decoder) (*{{$casetype}}, error) { } func (c *{{$casetype}}) Get() interface{} { return c.{{.Name}} } {{end}} -{{- end}} - -// TODO: Generate this. -func decodeTypedParams(dec *xdr.Decoder) ([]TypedParam, error) { - count, _, err := dec.DecodeInt() - params := make([]TypedParam, count) +func decode{{.Name}}(dec *xdr.Decoder) ({{.Name}}, error) { + discriminant, _, err := dec.DecodeInt() if err != nil { return nil, err } + var caseval {{.Name}} + switch discriminant { +{{range .Cases}}{{$casetype := printf "%v%v" $uname .CaseName}} case {{.DiscriminantVal}}: + caseval, err = decode{{$casetype}}(dec) +{{end}} + default: + err = fmt.Errorf("invalid parameter type %v", discriminant) + } + + return caseval, err +} +{{- end}} + +// TODO: Generate these. +func decodeTypedParam(dec *xdr.Decoder) (*TypedParam, error) { + name, _, err := dec.DecodeString() + if err != nil { + return nil, err + } + val, err := decodeTypedParamValue(dec) + return &TypedParam{name, val}, nil +} + +func decodeTypedParams(dec *xdr.Decoder) ([]TypedParam, error) { + count, _, err := dec.DecodeInt() + if err != nil { + return nil, err + } + params := make([]TypedParam, count) for ix := int32(0); ix < count; ix++ { - name, _, err := dec.DecodeString() + p, err := decodeTypedParam(dec) if err != nil { return nil, err } - ptype, _, err := dec.DecodeInt() - if err != nil { - return nil, err - } - var tpv TypedParamValue - switch ptype { - case 1: // TypedParamValueInt - tpv, err = DecodeTypedParamValueInt(dec) - case 2: // TypedParamValueUint - tpv, err = DecodeTypedParamValueUint(dec) - case 3: // TypedParamValueLlong - tpv, err = DecodeTypedParamValueLlong(dec) - case 4: // TypedParamValueUllong - tpv, err = DecodeTypedParamValueUllong(dec) - case 5: // TypedParamValueDouble - tpv, err = DecodeTypedParamValueDouble(dec) - case 6: // TypedParamValueBoolean - tpv, err = DecodeTypedParamValueBoolean(dec) - case 7: // TypedParamValueString - tpv, err = DecodeTypedParamValueString(dec) - default: - err = fmt.Errorf("invalid parameter type %v", ptype) - } - - if err != nil { - return nil, err - } - - params[ix] = TypedParam{name, tpv} + params[ix] = *p } return params, nil @@ -131,17 +130,16 @@ func (l *Libvirt) {{.Name}}({{range $ix, $arg := .Args}}{{if $ix}}, {{end}}{{.Na rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) {{range .Ret}} // {{.Name}}: {{.Type}} -{{if eq .Type "[]TypedParam"}} // {{.Name}} - r{{.Name}}, err = decodeTypedParams(dec) +{{if eq .Type "[]TypedParam"}} r{{.Name}}, err = decodeTypedParams(dec) if err != nil { + fmt.Println("error decoding typedparams") return } {{else}} _, err = dec.Decode(&r{{.Name}}) if err != nil { return } -{{end}}{{end}} -{{end}} +{{end}}{{end}}{{end}} return } {{end}} diff --git a/internal/lvgen/sunrpc.y b/internal/lvgen/sunrpc.y index a72586c..2deea0d 100644 --- a/internal/lvgen/sunrpc.y +++ b/internal/lvgen/sunrpc.y @@ -146,8 +146,12 @@ variable_array_declaration | type_specifier variable_ident '<' '>' { AddVariableArray($2.val, $1.val, "") } ; +// while pointer_declarations may look like their familiar c-equivalents, in the +// XDR language they actually declare "Optional-data". The simplest +// representation to use for these is a variable-length array with a size of 1. +// See the XDR spec for a more complete explanation of this. pointer_declaration - : type_specifier '*' variable_ident { AddDeclaration($3.val, "*"+$1.val) } + : type_specifier '*' variable_ident { AddVariableArray($3.val, $1.val, "1") } ; struct_definition diff --git a/libvirt.gen.go b/libvirt.gen.go index 2c0475c..aad7ac3 100644 --- a/libvirt.gen.go +++ b/libvirt.gen.go @@ -19,14 +19,15 @@ const ( ) // Typedefs: +type String []string type UUID [VirUUIDBuflen]byte -type Domain *NonnullDomain -type Network *NonnullNetwork -type Nwfilter *NonnullNwfilter -type StoragePool *NonnullStoragePool -type StorageVol *NonnullStorageVol -type NodeDevice *NonnullNodeDevice -type Secret *NonnullSecret +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 @@ -83,12 +84,12 @@ type NonnullDomainSnapshot struct { type Error struct { Code int32 Domain int32 - Message string + Message String Level int32 Dom Domain - Str1 string - Str2 string - Str3 string + Str1 String + Str2 String + Str3 String Int1 int32 Int2 int32 Net Network @@ -122,7 +123,7 @@ type DomainDiskError struct { } type ConnectOpenArgs struct { - Name string + Name String Flags uint32 } @@ -163,7 +164,7 @@ type ConnectGetUriRet struct { } type ConnectGetMaxVcpusArgs struct { - Type string + Type String } type ConnectGetMaxVcpusRet struct { @@ -186,10 +187,10 @@ type ConnectGetCapabilitiesRet struct { } type ConnectGetDomainCapabilitiesArgs struct { - Emulatorbin string - Arch string - Machine string - Virttype string + Emulatorbin String + Arch String + Machine String + Virttype String Flags uint32 } @@ -609,7 +610,7 @@ type DomainSaveArgs struct { type DomainSaveFlagsArgs struct { Dom NonnullDomain To string - Dxml string + Dxml String Flags uint32 } @@ -619,7 +620,7 @@ type DomainRestoreArgs struct { type DomainRestoreFlagsArgs struct { From string - Dxml string + Dxml String Flags uint32 } @@ -658,7 +659,7 @@ type DomainScreenshotArgs struct { } type DomainScreenshotRet struct { - Mime string + Mime String } type DomainGetXMLDescArgs struct { @@ -671,15 +672,15 @@ type DomainGetXMLDescRet struct { } type DomainMigratePrepareArgs struct { - UriIn string + UriIn String Flags uint64 - Dname string + Dname String Resource uint64 } type DomainMigratePrepareRet struct { Cookie []byte - UriOut string + UriOut String } type DomainMigratePerformArgs struct { @@ -687,7 +688,7 @@ type DomainMigratePerformArgs struct { Cookie []byte Uri string Flags uint64 - Dname string + Dname String Resource uint64 } @@ -703,16 +704,16 @@ type DomainMigrateFinishRet struct { } type DomainMigratePrepare2Args struct { - UriIn string + UriIn String Flags uint64 - Dname string + Dname String Resource uint64 DomXML string } type DomainMigratePrepare2Ret struct { Cookie []byte - UriOut string + UriOut String } type DomainMigrateFinish2Args struct { @@ -989,16 +990,16 @@ type DomainSetAutostartArgs struct { type DomainSetMetadataArgs struct { Dom NonnullDomain Type int32 - Metadata string - Key string - Uri string + Metadata String + Key String + Uri String Flags uint32 } type DomainGetMetadataArgs struct { Dom NonnullDomain Type int32 - Uri string + Uri String Flags uint32 } @@ -1043,7 +1044,7 @@ type DomainBlockPullArgs struct { type DomainBlockRebaseArgs struct { Dom NonnullDomain Path string - Base string + Base String Bandwidth uint64 Flags uint32 } @@ -1059,8 +1060,8 @@ type DomainBlockCopyArgs struct { type DomainBlockCommitArgs struct { Dom NonnullDomain Disk string - Base string - Top string + Base String + Top String Bandwidth uint64 Flags uint32 } @@ -1074,7 +1075,7 @@ type DomainSetBlockIOTuneArgs struct { type DomainGetBlockIOTuneArgs struct { Dom NonnullDomain - Disk string + Disk String Nparams int32 Flags uint32 } @@ -1407,7 +1408,7 @@ type ConnectListDefinedStoragePoolsRet struct { type ConnectFindStoragePoolSourcesArgs struct { Type string - SrcSpec string + SrcSpec String Flags uint32 } @@ -1642,7 +1643,7 @@ type StorageVolResizeArgs struct { } type NodeNumOfDevicesArgs struct { - Cap string + Cap String Flags uint32 } @@ -1651,7 +1652,7 @@ type NodeNumOfDevicesRet struct { } type NodeListDevicesArgs struct { - Cap string + Cap String Maxnames int32 Flags uint32 } @@ -1692,7 +1693,7 @@ type NodeDeviceGetParentArgs struct { } type NodeDeviceGetParentRet struct { - Parent string + Parent String } type NodeDeviceNumOfCapsArgs struct { @@ -1718,7 +1719,7 @@ type NodeDeviceDettachArgs struct { type NodeDeviceDetachFlagsArgs struct { Name string - DriverName string + DriverName String Flags uint32 } @@ -1850,7 +1851,7 @@ type SecretLookupByUsageRet struct { type DomainMigratePrepareTunnelArgs struct { Flags uint64 - Dname string + Dname String Resource uint64 DomXML string } @@ -2133,8 +2134,8 @@ type DomainEventCallbackBlockJobMsg struct { type DomainEventDiskChangeMsg struct { Dom NonnullDomain - OldSrcPath string - NewSrcPath string + OldSrcPath String + NewSrcPath String DevAlias string Reason int32 } @@ -2225,7 +2226,7 @@ type DomainManagedSaveGetXMLDescRet struct { type DomainManagedSaveDefineXMLArgs struct { Dom NonnullDomain - Dxml string + Dxml String Flags uint32 } @@ -2375,13 +2376,13 @@ type DomainSnapshotDeleteArgs struct { type DomainOpenConsoleArgs struct { Dom NonnullDomain - DevName string + DevName String Flags uint32 } type DomainOpenChannelArgs struct { Dom NonnullDomain - Name string + Name String Flags uint32 } @@ -2411,9 +2412,9 @@ type DomainGetStateRet struct { type DomainMigrateBegin3Args struct { Dom NonnullDomain - Xmlin string + Xmlin String Flags uint64 - Dname string + Dname String Resource uint64 } @@ -2424,22 +2425,22 @@ type DomainMigrateBegin3Ret struct { type DomainMigratePrepare3Args struct { CookieIn []byte - UriIn string + UriIn String Flags uint64 - Dname string + Dname String Resource uint64 DomXML string } type DomainMigratePrepare3Ret struct { CookieOut []byte - UriOut string + UriOut String } type DomainMigratePrepareTunnel3Args struct { CookieIn []byte Flags uint64 - Dname string + Dname String Resource uint64 DomXML string } @@ -2450,12 +2451,12 @@ type DomainMigratePrepareTunnel3Ret struct { type DomainMigratePerform3Args struct { Dom NonnullDomain - Xmlin string + Xmlin String CookieIn []byte - Dconnuri string - Uri string + Dconnuri String + Uri String Flags uint64 - Dname string + Dname String Resource uint64 } @@ -2466,8 +2467,8 @@ type DomainMigratePerform3Ret struct { type DomainMigrateFinish3Args struct { Dname string CookieIn []byte - Dconnuri string - Uri string + Dconnuri String + Uri String Flags uint64 Cancelled int32 } @@ -2648,7 +2649,7 @@ type NodeGetCPUMapRet struct { type DomainFstrimArgs struct { Dom NonnullDomain - MountPoint string + MountPoint String Minimum uint64 Flags uint32 } @@ -2689,7 +2690,7 @@ type DomainMigratePrepare3ParamsArgs struct { type DomainMigratePrepare3ParamsRet struct { CookieOut []byte - UriOut string + UriOut String } type DomainMigratePrepareTunnel3ParamsArgs struct { @@ -2704,7 +2705,7 @@ type DomainMigratePrepareTunnel3ParamsRet struct { type DomainMigratePerform3ParamsArgs struct { Dom NonnullDomain - Dconnuri string + Dconnuri String Params []TypedParam CookieIn []byte Flags uint32 @@ -2756,7 +2757,7 @@ type DomainEventBlockThresholdMsg struct { CallbackID int32 Dom NonnullDomain Dev string - Path string + Path String Threshold uint64 Excess uint64 } @@ -2905,17 +2906,17 @@ type NetworkDhcpLease struct { Iface string Expirytime int64 Type int32 - Mac string - Iaid string + Mac String + Iaid String Ipaddr string Prefix uint32 - Hostname string - Clientid string + Hostname String + Clientid String } type NetworkGetDhcpLeasesArgs struct { Net NonnullNetwork - Mac string + Mac String NeedResults int32 Flags uint32 } @@ -2972,7 +2973,7 @@ type DomainIPAddr struct { type DomainInterface struct { Name string - Hwaddr string + Hwaddr String Addrs []DomainIPAddr } @@ -2988,14 +2989,14 @@ type DomainInterfaceAddressesRet struct { type DomainSetUserPasswordArgs struct { Dom NonnullDomain - User string - Password string + User String + Password String Flags uint32 } type DomainRenameArgs struct { Dom NonnullDomain - NewName string + NewName String Flags uint32 } @@ -3053,7 +3054,7 @@ type DomainEventCallbackMetadataChangeMsg struct { CallbackID int32 Dom NonnullDomain Type int32 - Nsuri string + Nsuri String } type ConnectSecretEventRegisterAnyArgs struct { @@ -3106,8 +3107,10 @@ type TypedParamValueInt struct { DVal uint32 I int32 } -func NewTypedParamValueInt(v int32) *TypedParamValueInt { return &TypedParamValueInt{DVal: 1, I: v} } -func DecodeTypedParamValueInt(dec *xdr.Decoder) (*TypedParamValueInt, error) { +func NewTypedParamValueInt(v int32) *TypedParamValueInt { + return &TypedParamValueInt{DVal: 1, I: v} +} +func decodeTypedParamValueInt(dec *xdr.Decoder) (*TypedParamValueInt, error) { var v int32 _, err := dec.Decode(&v) if err != nil { @@ -3121,8 +3124,10 @@ type TypedParamValueUint struct { DVal uint32 Ui uint32 } -func NewTypedParamValueUint(v uint32) *TypedParamValueUint { return &TypedParamValueUint{DVal: 2, Ui: v} } -func DecodeTypedParamValueUint(dec *xdr.Decoder) (*TypedParamValueUint, error) { +func NewTypedParamValueUint(v uint32) *TypedParamValueUint { + return &TypedParamValueUint{DVal: 2, Ui: v} +} +func decodeTypedParamValueUint(dec *xdr.Decoder) (*TypedParamValueUint, error) { var v uint32 _, err := dec.Decode(&v) if err != nil { @@ -3136,8 +3141,10 @@ type TypedParamValueLlong struct { DVal uint32 L int64 } -func NewTypedParamValueLlong(v int64) *TypedParamValueLlong { return &TypedParamValueLlong{DVal: 3, L: v} } -func DecodeTypedParamValueLlong(dec *xdr.Decoder) (*TypedParamValueLlong, error) { +func NewTypedParamValueLlong(v int64) *TypedParamValueLlong { + return &TypedParamValueLlong{DVal: 3, L: v} +} +func decodeTypedParamValueLlong(dec *xdr.Decoder) (*TypedParamValueLlong, error) { var v int64 _, err := dec.Decode(&v) if err != nil { @@ -3151,8 +3158,10 @@ type TypedParamValueUllong struct { DVal uint32 Ul uint64 } -func NewTypedParamValueUllong(v uint64) *TypedParamValueUllong { return &TypedParamValueUllong{DVal: 4, Ul: v} } -func DecodeTypedParamValueUllong(dec *xdr.Decoder) (*TypedParamValueUllong, error) { +func NewTypedParamValueUllong(v uint64) *TypedParamValueUllong { + return &TypedParamValueUllong{DVal: 4, Ul: v} +} +func decodeTypedParamValueUllong(dec *xdr.Decoder) (*TypedParamValueUllong, error) { var v uint64 _, err := dec.Decode(&v) if err != nil { @@ -3166,8 +3175,10 @@ type TypedParamValueDouble struct { DVal uint32 D float64 } -func NewTypedParamValueDouble(v float64) *TypedParamValueDouble { return &TypedParamValueDouble{DVal: 5, D: v} } -func DecodeTypedParamValueDouble(dec *xdr.Decoder) (*TypedParamValueDouble, error) { +func NewTypedParamValueDouble(v float64) *TypedParamValueDouble { + return &TypedParamValueDouble{DVal: 5, D: v} +} +func decodeTypedParamValueDouble(dec *xdr.Decoder) (*TypedParamValueDouble, error) { var v float64 _, err := dec.Decode(&v) if err != nil { @@ -3181,8 +3192,10 @@ type TypedParamValueBoolean struct { DVal uint32 B int32 } -func NewTypedParamValueBoolean(v int32) *TypedParamValueBoolean { return &TypedParamValueBoolean{DVal: 6, B: v} } -func DecodeTypedParamValueBoolean(dec *xdr.Decoder) (*TypedParamValueBoolean, error) { +func NewTypedParamValueBoolean(v int32) *TypedParamValueBoolean { + return &TypedParamValueBoolean{DVal: 6, B: v} +} +func decodeTypedParamValueBoolean(dec *xdr.Decoder) (*TypedParamValueBoolean, error) { var v int32 _, err := dec.Decode(&v) if err != nil { @@ -3196,8 +3209,10 @@ type TypedParamValueString struct { DVal uint32 S string } -func NewTypedParamValueString(v string) *TypedParamValueString { return &TypedParamValueString{DVal: 7, S: v} } -func DecodeTypedParamValueString(dec *xdr.Decoder) (*TypedParamValueString, error) { +func NewTypedParamValueString(v string) *TypedParamValueString { + return &TypedParamValueString{DVal: 7, S: v} +} +func decodeTypedParamValueString(dec *xdr.Decoder) (*TypedParamValueString, error) { var v string _, err := dec.Decode(&v) if err != nil { @@ -3207,48 +3222,57 @@ func DecodeTypedParamValueString(dec *xdr.Decoder) (*TypedParamValueString, erro } func (c *TypedParamValueString) Get() interface{} { return c.S } - -// TODO: Generate this. -func decodeTypedParams(dec *xdr.Decoder) ([]TypedParam, error) { - count, _, err := dec.DecodeInt() - params := make([]TypedParam, count) +func decodeTypedParamValue(dec *xdr.Decoder) (TypedParamValue, error) { + discriminant, _, err := dec.DecodeInt() if err != nil { return nil, err } + var caseval TypedParamValue + switch discriminant { + case 1: + caseval, err = decodeTypedParamValueInt(dec) + case 2: + caseval, err = decodeTypedParamValueUint(dec) + case 3: + caseval, err = decodeTypedParamValueLlong(dec) + case 4: + caseval, err = decodeTypedParamValueUllong(dec) + case 5: + caseval, err = decodeTypedParamValueDouble(dec) + case 6: + caseval, err = decodeTypedParamValueBoolean(dec) + case 7: + caseval, err = decodeTypedParamValueString(dec) + + default: + err = fmt.Errorf("invalid parameter type %v", discriminant) + } + + return caseval, err +} + +// TODO: Generate these. +func decodeTypedParam(dec *xdr.Decoder) (*TypedParam, error) { + name, _, err := dec.DecodeString() + if err != nil { + return nil, err + } + val, err := decodeTypedParamValue(dec) + return &TypedParam{name, val}, nil +} + +func decodeTypedParams(dec *xdr.Decoder) ([]TypedParam, error) { + count, _, err := dec.DecodeInt() + if err != nil { + return nil, err + } + params := make([]TypedParam, count) for ix := int32(0); ix < count; ix++ { - name, _, err := dec.DecodeString() + p, err := decodeTypedParam(dec) if err != nil { return nil, err } - ptype, _, err := dec.DecodeInt() - if err != nil { - return nil, err - } - var tpv TypedParamValue - switch ptype { - case 1: // TypedParamValueInt - tpv, err = DecodeTypedParamValueInt(dec) - case 2: // TypedParamValueUint - tpv, err = DecodeTypedParamValueUint(dec) - case 3: // TypedParamValueLlong - tpv, err = DecodeTypedParamValueLlong(dec) - case 4: // TypedParamValueUllong - tpv, err = DecodeTypedParamValueUllong(dec) - case 5: // TypedParamValueDouble - tpv, err = DecodeTypedParamValueDouble(dec) - case 6: // TypedParamValueBoolean - tpv, err = DecodeTypedParamValueBoolean(dec) - case 7: // TypedParamValueString - tpv, err = DecodeTypedParamValueString(dec) - default: - err = fmt.Errorf("invalid parameter type %v", ptype) - } - - if err != nil { - return nil, err - } - - params[ix] = TypedParam{name, tpv} + params[ix] = *p } return params, nil @@ -3256,7 +3280,7 @@ func decodeTypedParams(dec *xdr.Decoder) ([]TypedParam, error) { // Procedures: -func (l *Libvirt) ConnectOpen(Name string, Flags uint32) (err error) { +func (l *Libvirt) ConnectOpen(Name String, Flags uint32) (err error) { var buf bytes.Buffer args := ConnectOpenArgs { @@ -3326,7 +3350,6 @@ func (l *Libvirt) ConnectGetType() (rType string, err error) { return } - return } @@ -3354,11 +3377,10 @@ func (l *Libvirt) ConnectGetVersion() (rHvVer uint64, err error) { return } - return } -func (l *Libvirt) ConnectGetMaxVcpus(Type string) (rMaxVcpus int32, err error) { +func (l *Libvirt) ConnectGetMaxVcpus(Type String) (rMaxVcpus int32, err error) { var buf bytes.Buffer args := ConnectGetMaxVcpusArgs { @@ -3391,7 +3413,6 @@ func (l *Libvirt) ConnectGetMaxVcpus(Type string) (rMaxVcpus int32, err error) { return } - return } @@ -3454,7 +3475,6 @@ func (l *Libvirt) NodeGetInfo() (rModel [32]int8, rMemory uint64, rCpus int32, r return } - return } @@ -3482,7 +3502,6 @@ func (l *Libvirt) ConnectGetCapabilities() (rCapabilities string, err error) { return } - return } @@ -3575,7 +3594,6 @@ func (l *Libvirt) DomainCreateXML(XMLDesc string, Flags uint32) (rDom NonnullDom return } - return } @@ -3612,7 +3630,6 @@ func (l *Libvirt) DomainDefineXML(XML string) (rDom NonnullDomain, err error) { return } - return } @@ -3705,7 +3722,6 @@ func (l *Libvirt) DomainGetXMLDesc(Dom NonnullDomain, Flags uint32) (rXML string return } - return } @@ -3742,7 +3758,6 @@ func (l *Libvirt) DomainGetAutostart(Dom NonnullDomain) (rAutostart int32, err e return } - return } @@ -3799,7 +3814,6 @@ func (l *Libvirt) DomainGetInfo(Dom NonnullDomain) (rState uint8, rMaxMem uint64 return } - return } @@ -3836,7 +3850,6 @@ func (l *Libvirt) DomainGetMaxMemory(Dom NonnullDomain) (rMemory uint64, err err return } - return } @@ -3873,7 +3886,6 @@ func (l *Libvirt) DomainGetMaxVcpus(Dom NonnullDomain) (rNum int32, err error) { return } - return } @@ -3910,7 +3922,6 @@ func (l *Libvirt) DomainGetOsType(Dom NonnullDomain) (rType string, err error) { return } - return } @@ -3954,7 +3965,6 @@ func (l *Libvirt) DomainGetVcpus(Dom NonnullDomain, Maxinfo int32, Maplen int32) return } - return } @@ -3991,7 +4001,6 @@ func (l *Libvirt) ConnectListDefinedDomains(Maxnames int32) (rNames []string, er return } - return } @@ -4028,7 +4037,6 @@ func (l *Libvirt) DomainLookupByID(ID int32) (rDom NonnullDomain, err error) { return } - return } @@ -4065,7 +4073,6 @@ func (l *Libvirt) DomainLookupByName(Name string) (rDom NonnullDomain, err error return } - return } @@ -4102,7 +4109,6 @@ func (l *Libvirt) DomainLookupByUUID(UUID UUID) (rDom NonnullDomain, err error) return } - return } @@ -4130,7 +4136,6 @@ func (l *Libvirt) ConnectNumOfDefinedDomains() (rNum int32, err error) { return } - return } @@ -4444,7 +4449,6 @@ func (l *Libvirt) ConnectListDefinedNetworks(Maxnames int32) (rNames []string, e return } - return } @@ -4481,7 +4485,6 @@ func (l *Libvirt) ConnectListDomains(Maxids int32) (rIds []int32, err error) { return } - return } @@ -4518,7 +4521,6 @@ func (l *Libvirt) ConnectListNetworks(Maxnames int32) (rNames []string, err erro return } - return } @@ -4582,7 +4584,6 @@ func (l *Libvirt) NetworkCreateXML(XML string) (rNet NonnullNetwork, err error) return } - return } @@ -4619,7 +4620,6 @@ func (l *Libvirt) NetworkDefineXML(XML string) (rNet NonnullNetwork, err error) return } - return } @@ -4684,7 +4684,6 @@ func (l *Libvirt) NetworkGetXMLDesc(Net NonnullNetwork, Flags uint32) (rXML stri return } - return } @@ -4721,7 +4720,6 @@ func (l *Libvirt) NetworkGetAutostart(Net NonnullNetwork) (rAutostart int32, err return } - return } @@ -4758,7 +4756,6 @@ func (l *Libvirt) NetworkGetBridgeName(Net NonnullNetwork) (rName string, err er return } - return } @@ -4795,7 +4792,6 @@ func (l *Libvirt) NetworkLookupByName(Name string) (rNet NonnullNetwork, err err return } - return } @@ -4832,7 +4828,6 @@ func (l *Libvirt) NetworkLookupByUUID(UUID UUID) (rNet NonnullNetwork, err error return } - return } @@ -4915,7 +4910,6 @@ func (l *Libvirt) ConnectNumOfDefinedNetworks() (rNum int32, err error) { return } - return } @@ -4943,7 +4937,6 @@ func (l *Libvirt) ConnectNumOfDomains() (rNum int32, err error) { return } - return } @@ -4971,7 +4964,6 @@ func (l *Libvirt) ConnectNumOfNetworks() (rNum int32, err error) { return } - return } @@ -5097,7 +5089,6 @@ func (l *Libvirt) DomainGetSchedulerType(Dom NonnullDomain) (rType string, rNpar return } - return } @@ -5130,13 +5121,12 @@ func (l *Libvirt) DomainGetSchedulerParameters(Dom NonnullDomain, Nparams int32) rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) // Params: []TypedParam - // Params rParams, err = decodeTypedParams(dec) if err != nil { + fmt.Println("error decoding typedparams") return } - return } @@ -5192,7 +5182,6 @@ func (l *Libvirt) ConnectGetHostname() (rHostname string, err error) { return } - return } @@ -5229,11 +5218,10 @@ func (l *Libvirt) ConnectSupportsFeature(Feature int32) (rSupported int32, err e return } - return } -func (l *Libvirt) DomainMigratePrepare(UriIn string, Flags uint64, Dname string, Resource uint64) (rCookie []byte, rUriOut string, err error) { +func (l *Libvirt) DomainMigratePrepare(UriIn String, Flags uint64, Dname String, Resource uint64) (rCookie []byte, rUriOut String, err error) { var buf bytes.Buffer args := DomainMigratePrepareArgs { @@ -5268,17 +5256,16 @@ func (l *Libvirt) DomainMigratePrepare(UriIn string, Flags uint64, Dname string, if err != nil { return } - // UriOut: string + // UriOut: String _, err = dec.Decode(&rUriOut) if err != nil { return } - return } -func (l *Libvirt) DomainMigratePerform(Dom NonnullDomain, Cookie []byte, Uri string, Flags uint64, Dname string, Resource uint64) (err error) { +func (l *Libvirt) DomainMigratePerform(Dom NonnullDomain, Cookie []byte, Uri string, Flags uint64, Dname String, Resource uint64) (err error) { var buf bytes.Buffer args := DomainMigratePerformArgs { @@ -5346,7 +5333,6 @@ func (l *Libvirt) DomainMigrateFinish(Dname string, Cookie []byte, Uri string, F return } - return } @@ -5404,7 +5390,6 @@ func (l *Libvirt) DomainBlockStats(Dom NonnullDomain, Path string) (rRdReq int64 return } - return } @@ -5477,7 +5462,6 @@ func (l *Libvirt) DomainInterfaceStats(Dom NonnullDomain, Device string) (rRxByt return } - return } @@ -5505,7 +5489,6 @@ func (l *Libvirt) AuthList() (rTypes []AuthType, err error) { return } - return } @@ -5533,7 +5516,6 @@ func (l *Libvirt) AuthSaslInit() (rMechlist string, err error) { return } - return } @@ -5582,7 +5564,6 @@ func (l *Libvirt) AuthSaslStart(Mech string, Nil int32, Data []int8) (rComplete return } - return } @@ -5630,7 +5611,6 @@ func (l *Libvirt) AuthSaslStep(Nil int32, Data []int8) (rComplete int32, rNil in return } - return } @@ -5658,7 +5638,6 @@ func (l *Libvirt) AuthPolkit() (rComplete int32, err error) { return } - return } @@ -5686,7 +5665,6 @@ func (l *Libvirt) ConnectNumOfStoragePools() (rNum int32, err error) { return } - return } @@ -5723,7 +5701,6 @@ func (l *Libvirt) ConnectListStoragePools(Maxnames int32) (rNames []string, err return } - return } @@ -5751,7 +5728,6 @@ func (l *Libvirt) ConnectNumOfDefinedStoragePools() (rNum int32, err error) { return } - return } @@ -5788,11 +5764,10 @@ func (l *Libvirt) ConnectListDefinedStoragePools(Maxnames int32) (rNames []strin return } - return } -func (l *Libvirt) ConnectFindStoragePoolSources(Type string, SrcSpec string, Flags uint32) (rXML string, err error) { +func (l *Libvirt) ConnectFindStoragePoolSources(Type string, SrcSpec String, Flags uint32) (rXML string, err error) { var buf bytes.Buffer args := ConnectFindStoragePoolSourcesArgs { @@ -5827,7 +5802,6 @@ func (l *Libvirt) ConnectFindStoragePoolSources(Type string, SrcSpec string, Fla return } - return } @@ -5865,7 +5839,6 @@ func (l *Libvirt) StoragePoolCreateXML(XML string, Flags uint32) (rPool NonnullS return } - return } @@ -5903,7 +5876,6 @@ func (l *Libvirt) StoragePoolDefineXML(XML string, Flags uint32) (rPool NonnullS return } - return } @@ -6106,7 +6078,6 @@ func (l *Libvirt) StoragePoolLookupByName(Name string) (rPool NonnullStoragePool return } - return } @@ -6143,7 +6114,6 @@ func (l *Libvirt) StoragePoolLookupByUUID(UUID UUID) (rPool NonnullStoragePool, return } - return } @@ -6180,7 +6150,6 @@ func (l *Libvirt) StoragePoolLookupByVolume(Vol NonnullStorageVol) (rPool Nonnul return } - return } @@ -6232,7 +6201,6 @@ func (l *Libvirt) StoragePoolGetInfo(Pool NonnullStoragePool) (rState uint8, rCa return } - return } @@ -6270,7 +6238,6 @@ func (l *Libvirt) StoragePoolGetXMLDesc(Pool NonnullStoragePool, Flags uint32) ( return } - return } @@ -6307,7 +6274,6 @@ func (l *Libvirt) StoragePoolGetAutostart(Pool NonnullStoragePool) (rAutostart i return } - return } @@ -6372,7 +6338,6 @@ func (l *Libvirt) StoragePoolNumOfVolumes(Pool NonnullStoragePool) (rNum int32, return } - return } @@ -6410,7 +6375,6 @@ func (l *Libvirt) StoragePoolListVolumes(Pool NonnullStoragePool, Maxnames int32 return } - return } @@ -6449,7 +6413,6 @@ func (l *Libvirt) StorageVolCreateXML(Pool NonnullStoragePool, XML string, Flags return } - return } @@ -6515,7 +6478,6 @@ func (l *Libvirt) StorageVolLookupByName(Pool NonnullStoragePool, Name string) ( return } - return } @@ -6552,7 +6514,6 @@ func (l *Libvirt) StorageVolLookupByKey(Key string) (rVol NonnullStorageVol, err return } - return } @@ -6589,7 +6550,6 @@ func (l *Libvirt) StorageVolLookupByPath(Path string) (rVol NonnullStorageVol, e return } - return } @@ -6636,7 +6596,6 @@ func (l *Libvirt) StorageVolGetInfo(Vol NonnullStorageVol) (rType int8, rCapacit return } - return } @@ -6674,7 +6633,6 @@ func (l *Libvirt) StorageVolGetXMLDesc(Vol NonnullStorageVol, Flags uint32) (rXM return } - return } @@ -6711,7 +6669,6 @@ func (l *Libvirt) StorageVolGetPath(Vol NonnullStorageVol) (rName string, err er return } - return } @@ -6749,7 +6706,6 @@ func (l *Libvirt) NodeGetCellsFreeMemory(StartCell int32, Maxcells int32) (rCell return } - return } @@ -6777,7 +6733,6 @@ func (l *Libvirt) NodeGetFreeMemory() (rFreeMem uint64, err error) { return } - return } @@ -6818,7 +6773,6 @@ func (l *Libvirt) DomainBlockPeek(Dom NonnullDomain, Path string, Offset uint64, return } - return } @@ -6858,7 +6812,6 @@ func (l *Libvirt) DomainMemoryPeek(Dom NonnullDomain, Offset uint64, Size uint32 return } - return } @@ -6886,7 +6839,6 @@ func (l *Libvirt) ConnectDomainEventRegister() (rCbRegistered int32, err error) return } - return } @@ -6914,7 +6866,6 @@ func (l *Libvirt) ConnectDomainEventDeregister() (rCbRegistered int32, err error return } - return } @@ -6936,7 +6887,7 @@ func (l *Libvirt) DomainEventLifecycle() (err error) { return } -func (l *Libvirt) DomainMigratePrepare2(UriIn string, Flags uint64, Dname string, Resource uint64, DomXML string) (rCookie []byte, rUriOut string, err error) { +func (l *Libvirt) DomainMigratePrepare2(UriIn String, Flags uint64, Dname String, Resource uint64, DomXML string) (rCookie []byte, rUriOut String, err error) { var buf bytes.Buffer args := DomainMigratePrepare2Args { @@ -6972,13 +6923,12 @@ func (l *Libvirt) DomainMigratePrepare2(UriIn string, Flags uint64, Dname string if err != nil { return } - // UriOut: string + // UriOut: String _, err = dec.Decode(&rUriOut) if err != nil { return } - return } @@ -7019,7 +6969,6 @@ func (l *Libvirt) DomainMigrateFinish2(Dname string, Cookie []byte, Uri string, return } - return } @@ -7047,11 +6996,10 @@ func (l *Libvirt) ConnectGetUri() (rUri string, err error) { return } - return } -func (l *Libvirt) NodeNumOfDevices(Cap string, Flags uint32) (rNum int32, err error) { +func (l *Libvirt) NodeNumOfDevices(Cap String, Flags uint32) (rNum int32, err error) { var buf bytes.Buffer args := NodeNumOfDevicesArgs { @@ -7085,11 +7033,10 @@ func (l *Libvirt) NodeNumOfDevices(Cap string, Flags uint32) (rNum int32, err er return } - return } -func (l *Libvirt) NodeListDevices(Cap string, Maxnames int32, Flags uint32) (rNames []string, err error) { +func (l *Libvirt) NodeListDevices(Cap String, Maxnames int32, Flags uint32) (rNames []string, err error) { var buf bytes.Buffer args := NodeListDevicesArgs { @@ -7124,7 +7071,6 @@ func (l *Libvirt) NodeListDevices(Cap string, Maxnames int32, Flags uint32) (rNa return } - return } @@ -7161,7 +7107,6 @@ func (l *Libvirt) NodeDeviceLookupByName(Name string) (rDev NonnullNodeDevice, e return } - return } @@ -7199,11 +7144,10 @@ func (l *Libvirt) NodeDeviceGetXMLDesc(Name string, Flags uint32) (rXML string, return } - return } -func (l *Libvirt) NodeDeviceGetParent(Name string) (rParent string, err error) { +func (l *Libvirt) NodeDeviceGetParent(Name string) (rParent String, err error) { var buf bytes.Buffer args := NodeDeviceGetParentArgs { @@ -7230,13 +7174,12 @@ func (l *Libvirt) NodeDeviceGetParent(Name string) (rParent string, err error) { // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - // Parent: string + // Parent: String _, err = dec.Decode(&rParent) if err != nil { return } - return } @@ -7273,7 +7216,6 @@ func (l *Libvirt) NodeDeviceNumOfCaps(Name string) (rNum int32, err error) { return } - return } @@ -7311,7 +7253,6 @@ func (l *Libvirt) NodeDeviceListCaps(Name string, Maxnames int32) (rNames []stri return } - return } @@ -7434,7 +7375,6 @@ func (l *Libvirt) DomainGetSecurityLabel(Dom NonnullDomain) (rLabel []int8, rEnf return } - return } @@ -7467,7 +7407,6 @@ func (l *Libvirt) NodeGetSecurityModel() (rModel []int8, rDoi []int8, err error) return } - return } @@ -7505,7 +7444,6 @@ func (l *Libvirt) NodeDeviceCreateXML(XMLDesc string, Flags uint32) (rDev Nonnul return } - return } @@ -7572,7 +7510,6 @@ func (l *Libvirt) StorageVolCreateXMLFrom(Pool NonnullStoragePool, XML string, C return } - return } @@ -7600,7 +7537,6 @@ func (l *Libvirt) ConnectNumOfInterfaces() (rNum int32, err error) { return } - return } @@ -7637,7 +7573,6 @@ func (l *Libvirt) ConnectListInterfaces(Maxnames int32) (rNames []string, err er return } - return } @@ -7674,7 +7609,6 @@ func (l *Libvirt) InterfaceLookupByName(Name string) (rIface NonnullInterface, e return } - return } @@ -7711,7 +7645,6 @@ func (l *Libvirt) InterfaceLookupByMacString(Mac string) (rIface NonnullInterfac return } - return } @@ -7749,7 +7682,6 @@ func (l *Libvirt) InterfaceGetXMLDesc(Iface NonnullInterface, Flags uint32) (rXM return } - return } @@ -7787,7 +7719,6 @@ func (l *Libvirt) InterfaceDefineXML(XML string, Flags uint32) (rIface NonnullIn return } - return } @@ -7909,7 +7840,6 @@ func (l *Libvirt) ConnectDomainXMLFromNative(NativeFormat string, NativeConfig s return } - return } @@ -7948,7 +7878,6 @@ func (l *Libvirt) ConnectDomainXMLToNative(NativeFormat string, DomainXML string return } - return } @@ -7976,7 +7905,6 @@ func (l *Libvirt) ConnectNumOfDefinedInterfaces() (rNum int32, err error) { return } - return } @@ -8013,7 +7941,6 @@ func (l *Libvirt) ConnectListDefinedInterfaces(Maxnames int32) (rNames []string, return } - return } @@ -8041,7 +7968,6 @@ func (l *Libvirt) ConnectNumOfSecrets() (rNum int32, err error) { return } - return } @@ -8078,7 +8004,6 @@ func (l *Libvirt) ConnectListSecrets(Maxuuids int32) (rUuids []string, err error return } - return } @@ -8115,7 +8040,6 @@ func (l *Libvirt) SecretLookupByUUID(UUID UUID) (rSecret NonnullSecret, err erro return } - return } @@ -8153,7 +8077,6 @@ func (l *Libvirt) SecretDefineXML(XML string, Flags uint32) (rSecret NonnullSecr return } - return } @@ -8191,7 +8114,6 @@ func (l *Libvirt) SecretGetXMLDesc(Secret NonnullSecret, Flags uint32) (rXML str return } - return } @@ -8258,7 +8180,6 @@ func (l *Libvirt) SecretGetValue(Secret NonnullSecret, Flags uint32) (rValue []b return } - return } @@ -8323,11 +8244,10 @@ func (l *Libvirt) SecretLookupByUsage(UsageType int32, UsageID string) (rSecret return } - return } -func (l *Libvirt) DomainMigratePrepareTunnel(Flags uint64, Dname string, Resource uint64, DomXML string) (err error) { +func (l *Libvirt) DomainMigratePrepareTunnel(Flags uint64, Dname String, Resource uint64, DomXML string) (err error) { var buf bytes.Buffer args := DomainMigratePrepareTunnelArgs { @@ -8381,7 +8301,6 @@ func (l *Libvirt) ConnectIsSecure() (rSecure int32, err error) { return } - return } @@ -8418,7 +8337,6 @@ func (l *Libvirt) DomainIsActive(Dom NonnullDomain) (rActive int32, err error) { return } - return } @@ -8455,7 +8373,6 @@ func (l *Libvirt) DomainIsPersistent(Dom NonnullDomain) (rPersistent int32, err return } - return } @@ -8492,7 +8409,6 @@ func (l *Libvirt) NetworkIsActive(Net NonnullNetwork) (rActive int32, err error) return } - return } @@ -8529,7 +8445,6 @@ func (l *Libvirt) NetworkIsPersistent(Net NonnullNetwork) (rPersistent int32, er return } - return } @@ -8566,7 +8481,6 @@ func (l *Libvirt) StoragePoolIsActive(Pool NonnullStoragePool) (rActive int32, e return } - return } @@ -8603,7 +8517,6 @@ func (l *Libvirt) StoragePoolIsPersistent(Pool NonnullStoragePool) (rPersistent return } - return } @@ -8640,7 +8553,6 @@ func (l *Libvirt) InterfaceIsActive(Iface NonnullInterface) (rActive int32, err return } - return } @@ -8668,7 +8580,6 @@ func (l *Libvirt) ConnectGetLibVersion() (rLibVer uint64, err error) { return } - return } @@ -8706,7 +8617,6 @@ func (l *Libvirt) ConnectCompareCPU(XML string, Flags uint32) (rResult int32, er return } - return } @@ -8745,7 +8655,6 @@ func (l *Libvirt) DomainMemoryStats(Dom NonnullDomain, MaxStats uint32, Flags ui return } - return } @@ -8841,7 +8750,6 @@ func (l *Libvirt) ConnectBaselineCPU(XMLCPUs []string, Flags uint32) (rCPU strin return } - return } @@ -8933,7 +8841,6 @@ func (l *Libvirt) DomainGetJobInfo(Dom NonnullDomain) (rType int32, rTimeElapsed return } - return } @@ -9227,7 +9134,6 @@ func (l *Libvirt) NwfilterLookupByName(Name string) (rNwfilter NonnullNwfilter, return } - return } @@ -9264,7 +9170,6 @@ func (l *Libvirt) NwfilterLookupByUUID(UUID UUID) (rNwfilter NonnullNwfilter, er return } - return } @@ -9302,7 +9207,6 @@ func (l *Libvirt) NwfilterGetXMLDesc(Nwfilter NonnullNwfilter, Flags uint32) (rX return } - return } @@ -9330,7 +9234,6 @@ func (l *Libvirt) ConnectNumOfNwfilters() (rNum int32, err error) { return } - return } @@ -9367,7 +9270,6 @@ func (l *Libvirt) ConnectListNwfilters(Maxnames int32) (rNames []string, err err return } - return } @@ -9404,7 +9306,6 @@ func (l *Libvirt) NwfilterDefineXML(XML string) (rNwfilter NonnullNwfilter, err return } - return } @@ -9497,7 +9398,6 @@ func (l *Libvirt) DomainHasManagedSaveImage(Dom NonnullDomain, Flags uint32) (rR return } - return } @@ -9564,7 +9464,6 @@ func (l *Libvirt) DomainSnapshotCreateXML(Dom NonnullDomain, XMLDesc string, Fla return } - return } @@ -9602,7 +9501,6 @@ func (l *Libvirt) DomainSnapshotGetXMLDesc(Snap NonnullDomainSnapshot, Flags uin return } - return } @@ -9640,7 +9538,6 @@ func (l *Libvirt) DomainSnapshotNum(Dom NonnullDomain, Flags uint32) (rNum int32 return } - return } @@ -9679,7 +9576,6 @@ func (l *Libvirt) DomainSnapshotListNames(Dom NonnullDomain, Maxnames int32, Fla return } - return } @@ -9718,7 +9614,6 @@ func (l *Libvirt) DomainSnapshotLookupByName(Dom NonnullDomain, Name string, Fla return } - return } @@ -9756,7 +9651,6 @@ func (l *Libvirt) DomainHasCurrentSnapshot(Dom NonnullDomain, Flags uint32) (rRe return } - return } @@ -9794,7 +9688,6 @@ func (l *Libvirt) DomainSnapshotCurrent(Dom NonnullDomain, Flags uint32) (rSnap return } - return } @@ -9899,7 +9792,6 @@ func (l *Libvirt) DomainGetBlockInfo(Dom NonnullDomain, Path string, Flags uint3 return } - return } @@ -9955,7 +9847,6 @@ func (l *Libvirt) DomainCreateWithFlags(Dom NonnullDomain, Flags uint32) (rDom N return } - return } @@ -10018,9 +9909,9 @@ func (l *Libvirt) DomainGetMemoryParameters(Dom NonnullDomain, Nparams int32, Fl rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) // Params: []TypedParam - // Params rParams, err = decodeTypedParams(dec) if err != nil { + fmt.Println("error decoding typedparams") return } // Nparams: int32 @@ -10029,7 +9920,6 @@ func (l *Libvirt) DomainGetMemoryParameters(Dom NonnullDomain, Nparams int32, Fl return } - return } @@ -10096,11 +9986,10 @@ func (l *Libvirt) DomainGetVcpusFlags(Dom NonnullDomain, Flags uint32) (rNum int return } - return } -func (l *Libvirt) DomainOpenConsole(Dom NonnullDomain, DevName string, Flags uint32) (err error) { +func (l *Libvirt) DomainOpenConsole(Dom NonnullDomain, DevName String, Flags uint32) (err error) { var buf bytes.Buffer args := DomainOpenConsoleArgs { @@ -10162,7 +10051,6 @@ func (l *Libvirt) DomainIsUpdated(Dom NonnullDomain) (rUpdated int32, err error) return } - return } @@ -10199,7 +10087,6 @@ func (l *Libvirt) ConnectGetSysinfo(Flags uint32) (rSysinfo string, err error) { return } - return } @@ -10291,9 +10178,9 @@ func (l *Libvirt) DomainGetBlkioParameters(Dom NonnullDomain, Nparams int32, Fla rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) // Params: []TypedParam - // Params rParams, err = decodeTypedParams(dec) if err != nil { + fmt.Println("error decoding typedparams") return } // Nparams: int32 @@ -10302,7 +10189,6 @@ func (l *Libvirt) DomainGetBlkioParameters(Dom NonnullDomain, Nparams int32, Fla return } - return } @@ -10423,7 +10309,7 @@ func (l *Libvirt) DomainInjectNmi(Dom NonnullDomain, Flags uint32) (err error) { return } -func (l *Libvirt) DomainScreenshot(Dom NonnullDomain, Screen uint32, Flags uint32) (rMime string, err error) { +func (l *Libvirt) DomainScreenshot(Dom NonnullDomain, Screen uint32, Flags uint32) (rMime String, err error) { var buf bytes.Buffer args := DomainScreenshotArgs { @@ -10452,13 +10338,12 @@ func (l *Libvirt) DomainScreenshot(Dom NonnullDomain, Screen uint32, Flags uint3 // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - // Mime: string + // Mime: String _, err = dec.Decode(&rMime) if err != nil { return } - return } @@ -10501,11 +10386,10 @@ func (l *Libvirt) DomainGetState(Dom NonnullDomain, Flags uint32) (rState int32, return } - return } -func (l *Libvirt) DomainMigrateBegin3(Dom NonnullDomain, Xmlin string, Flags uint64, Dname string, Resource uint64) (rCookieOut []byte, rXML string, err error) { +func (l *Libvirt) DomainMigrateBegin3(Dom NonnullDomain, Xmlin String, Flags uint64, Dname String, Resource uint64) (rCookieOut []byte, rXML string, err error) { var buf bytes.Buffer args := DomainMigrateBegin3Args { @@ -10547,11 +10431,10 @@ func (l *Libvirt) DomainMigrateBegin3(Dom NonnullDomain, Xmlin string, Flags uin return } - return } -func (l *Libvirt) DomainMigratePrepare3(CookieIn []byte, UriIn string, Flags uint64, Dname string, Resource uint64, DomXML string) (rCookieOut []byte, rUriOut string, err error) { +func (l *Libvirt) DomainMigratePrepare3(CookieIn []byte, UriIn String, Flags uint64, Dname String, Resource uint64, DomXML string) (rCookieOut []byte, rUriOut String, err error) { var buf bytes.Buffer args := DomainMigratePrepare3Args { @@ -10588,17 +10471,16 @@ func (l *Libvirt) DomainMigratePrepare3(CookieIn []byte, UriIn string, Flags uin if err != nil { return } - // UriOut: string + // UriOut: String _, err = dec.Decode(&rUriOut) if err != nil { return } - return } -func (l *Libvirt) DomainMigratePrepareTunnel3(CookieIn []byte, Flags uint64, Dname string, Resource uint64, DomXML string) (rCookieOut []byte, err error) { +func (l *Libvirt) DomainMigratePrepareTunnel3(CookieIn []byte, Flags uint64, Dname String, Resource uint64, DomXML string) (rCookieOut []byte, err error) { var buf bytes.Buffer args := DomainMigratePrepareTunnel3Args { @@ -10635,11 +10517,10 @@ func (l *Libvirt) DomainMigratePrepareTunnel3(CookieIn []byte, Flags uint64, Dna return } - return } -func (l *Libvirt) DomainMigratePerform3(Dom NonnullDomain, Xmlin string, CookieIn []byte, Dconnuri string, Uri string, Flags uint64, Dname string, Resource uint64) (rCookieOut []byte, err error) { +func (l *Libvirt) DomainMigratePerform3(Dom NonnullDomain, Xmlin String, CookieIn []byte, Dconnuri String, Uri String, Flags uint64, Dname String, Resource uint64) (rCookieOut []byte, err error) { var buf bytes.Buffer args := DomainMigratePerform3Args { @@ -10679,11 +10560,10 @@ func (l *Libvirt) DomainMigratePerform3(Dom NonnullDomain, Xmlin string, CookieI return } - return } -func (l *Libvirt) DomainMigrateFinish3(Dname string, CookieIn []byte, Dconnuri string, Uri string, Flags uint64, Cancelled int32) (rDom NonnullDomain, rCookieOut []byte, err error) { +func (l *Libvirt) DomainMigrateFinish3(Dname string, CookieIn []byte, Dconnuri String, Uri String, Flags uint64, Cancelled int32) (rDom NonnullDomain, rCookieOut []byte, err error) { var buf bytes.Buffer args := DomainMigrateFinish3Args { @@ -10726,7 +10606,6 @@ func (l *Libvirt) DomainMigrateFinish3(Dname string, CookieIn []byte, Dconnuri s return } - return } @@ -10900,13 +10779,12 @@ func (l *Libvirt) DomainGetSchedulerParametersFlags(Dom NonnullDomain, Nparams i rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) // Params: []TypedParam - // Params rParams, err = decodeTypedParams(dec) if err != nil { + fmt.Println("error decoding typedparams") return } - return } @@ -11029,7 +10907,6 @@ func (l *Libvirt) NodeGetCPUStats(CPUNum int32, Nparams int32, Flags uint32) (rP return } - return } @@ -11073,7 +10950,6 @@ func (l *Libvirt) NodeGetMemoryStats(Nparams int32, CellNum int32, Flags uint32) return } - return } @@ -11121,7 +10997,6 @@ func (l *Libvirt) DomainGetControlInfo(Dom NonnullDomain, Flags uint32) (rState return } - return } @@ -11166,7 +11041,6 @@ func (l *Libvirt) DomainGetVcpuPinInfo(Dom NonnullDomain, Ncpumaps int32, Maplen return } - return } @@ -11198,7 +11072,7 @@ func (l *Libvirt) DomainUndefineFlags(Dom NonnullDomain, Flags uint32) (err erro return } -func (l *Libvirt) DomainSaveFlags(Dom NonnullDomain, To string, Dxml string, Flags uint32) (err error) { +func (l *Libvirt) DomainSaveFlags(Dom NonnullDomain, To string, Dxml String, Flags uint32) (err error) { var buf bytes.Buffer args := DomainSaveFlagsArgs { @@ -11228,7 +11102,7 @@ func (l *Libvirt) DomainSaveFlags(Dom NonnullDomain, To string, Dxml string, Fla return } -func (l *Libvirt) DomainRestoreFlags(From string, Dxml string, Flags uint32) (err error) { +func (l *Libvirt) DomainRestoreFlags(From string, Dxml String, Flags uint32) (err error) { var buf bytes.Buffer args := DomainRestoreFlagsArgs { @@ -11319,7 +11193,6 @@ func (l *Libvirt) DomainSaveImageGetXMLDesc(File string, Flags uint32) (rXML str return } - return } @@ -11436,7 +11309,6 @@ func (l *Libvirt) DomainGetBlockJobInfo(Dom NonnullDomain, Path string, Flags ui return } - return } @@ -11552,7 +11424,6 @@ func (l *Libvirt) DomainMigrateGetMaxSpeed(Dom NonnullDomain, Flags uint32) (rBa return } - return } @@ -11587,9 +11458,9 @@ func (l *Libvirt) DomainBlockStatsFlags(Dom NonnullDomain, Path string, Nparams rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) // Params: []TypedParam - // Params rParams, err = decodeTypedParams(dec) if err != nil { + fmt.Println("error decoding typedparams") return } // Nparams: int32 @@ -11598,7 +11469,6 @@ func (l *Libvirt) DomainBlockStatsFlags(Dom NonnullDomain, Path string, Nparams return } - return } @@ -11636,7 +11506,6 @@ func (l *Libvirt) DomainSnapshotGetParent(Snap NonnullDomainSnapshot, Flags uint return } - return } @@ -11702,7 +11571,6 @@ func (l *Libvirt) DomainSnapshotNumChildren(Snap NonnullDomainSnapshot, Flags ui return } - return } @@ -11741,7 +11609,6 @@ func (l *Libvirt) DomainSnapshotListChildrenNames(Snap NonnullDomainSnapshot, Ma return } - return } @@ -11881,7 +11748,7 @@ func (l *Libvirt) DomainSetBlockIOTune(Dom NonnullDomain, Disk string, Params [] return } -func (l *Libvirt) DomainGetBlockIOTune(Dom NonnullDomain, Disk string, Nparams int32, Flags uint32) (rParams []TypedParam, rNparams int32, err error) { +func (l *Libvirt) DomainGetBlockIOTune(Dom NonnullDomain, Disk String, Nparams int32, Flags uint32) (rParams []TypedParam, rNparams int32, err error) { var buf bytes.Buffer args := DomainGetBlockIOTuneArgs { @@ -11912,9 +11779,9 @@ func (l *Libvirt) DomainGetBlockIOTune(Dom NonnullDomain, Disk string, Nparams i rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) // Params: []TypedParam - // Params rParams, err = decodeTypedParams(dec) if err != nil { + fmt.Println("error decoding typedparams") return } // Nparams: int32 @@ -11923,7 +11790,6 @@ func (l *Libvirt) DomainGetBlockIOTune(Dom NonnullDomain, Disk string, Nparams i return } - return } @@ -11986,9 +11852,9 @@ func (l *Libvirt) DomainGetNumaParameters(Dom NonnullDomain, Nparams int32, Flag rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) // Params: []TypedParam - // Params rParams, err = decodeTypedParams(dec) if err != nil { + fmt.Println("error decoding typedparams") return } // Nparams: int32 @@ -11997,7 +11863,6 @@ func (l *Libvirt) DomainGetNumaParameters(Dom NonnullDomain, Nparams int32, Flag return } - return } @@ -12062,9 +11927,9 @@ func (l *Libvirt) DomainGetInterfaceParameters(Dom NonnullDomain, Device string, rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) // Params: []TypedParam - // Params rParams, err = decodeTypedParams(dec) if err != nil { + fmt.Println("error decoding typedparams") return } // Nparams: int32 @@ -12073,7 +11938,6 @@ func (l *Libvirt) DomainGetInterfaceParameters(Dom NonnullDomain, Device string, return } - return } @@ -12225,9 +12089,9 @@ func (l *Libvirt) DomainGetCPUStats(Dom NonnullDomain, Nparams uint32, StartCPU rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) // Params: []TypedParam - // Params rParams, err = decodeTypedParams(dec) if err != nil { + fmt.Println("error decoding typedparams") return } // Nparams: int32 @@ -12236,7 +12100,6 @@ func (l *Libvirt) DomainGetCPUStats(Dom NonnullDomain, Nparams uint32, StartCPU return } - return } @@ -12280,11 +12143,10 @@ func (l *Libvirt) DomainGetDiskErrors(Dom NonnullDomain, Maxerrors uint32, Flags return } - return } -func (l *Libvirt) DomainSetMetadata(Dom NonnullDomain, Type int32, Metadata string, Key string, Uri string, Flags uint32) (err error) { +func (l *Libvirt) DomainSetMetadata(Dom NonnullDomain, Type int32, Metadata String, Key String, Uri String, Flags uint32) (err error) { var buf bytes.Buffer args := DomainSetMetadataArgs { @@ -12316,7 +12178,7 @@ func (l *Libvirt) DomainSetMetadata(Dom NonnullDomain, Type int32, Metadata stri return } -func (l *Libvirt) DomainGetMetadata(Dom NonnullDomain, Type int32, Uri string, Flags uint32) (rMetadata string, err error) { +func (l *Libvirt) DomainGetMetadata(Dom NonnullDomain, Type int32, Uri String, Flags uint32) (rMetadata string, err error) { var buf bytes.Buffer args := DomainGetMetadataArgs { @@ -12352,11 +12214,10 @@ func (l *Libvirt) DomainGetMetadata(Dom NonnullDomain, Type int32, Uri string, F return } - return } -func (l *Libvirt) DomainBlockRebase(Dom NonnullDomain, Path string, Base string, Bandwidth uint64, Flags uint32) (err error) { +func (l *Libvirt) DomainBlockRebase(Dom NonnullDomain, Path string, Base String, Bandwidth uint64, Flags uint32) (err error) { var buf bytes.Buffer args := DomainBlockRebaseArgs { @@ -12503,7 +12364,6 @@ func (l *Libvirt) DomainSnapshotIsCurrent(Snap NonnullDomainSnapshot, Flags uint return } - return } @@ -12541,7 +12401,6 @@ func (l *Libvirt) DomainSnapshotHasMetadata(Snap NonnullDomainSnapshot, Flags ui return } - return } @@ -12584,7 +12443,6 @@ func (l *Libvirt) ConnectListAllDomains(NeedResults int32, Flags uint32) (rDomai return } - return } @@ -12628,7 +12486,6 @@ func (l *Libvirt) DomainListAllSnapshots(Dom NonnullDomain, NeedResults int32, F return } - return } @@ -12672,7 +12529,6 @@ func (l *Libvirt) DomainSnapshotListAllChildren(Snapshot NonnullDomainSnapshot, return } - return } @@ -12728,7 +12584,6 @@ func (l *Libvirt) DomainGetHostname(Dom NonnullDomain, Flags uint32) (rHostname return } - return } @@ -12770,7 +12625,6 @@ func (l *Libvirt) DomainGetSecurityLabelList(Dom NonnullDomain) (rLabels []Domai return } - return } @@ -12843,7 +12697,6 @@ func (l *Libvirt) DomainGetEmulatorPinInfo(Dom NonnullDomain, Maplen int32, Flag return } - return } @@ -12886,7 +12739,6 @@ func (l *Libvirt) ConnectListAllStoragePools(NeedResults int32, Flags uint32) (r return } - return } @@ -12930,7 +12782,6 @@ func (l *Libvirt) StoragePoolListAllVolumes(Pool NonnullStoragePool, NeedResults return } - return } @@ -12973,7 +12824,6 @@ func (l *Libvirt) ConnectListAllNetworks(NeedResults int32, Flags uint32) (rNets return } - return } @@ -13016,7 +12866,6 @@ func (l *Libvirt) ConnectListAllInterfaces(NeedResults int32, Flags uint32) (rIf return } - return } @@ -13059,7 +12908,6 @@ func (l *Libvirt) ConnectListAllNodeDevices(NeedResults int32, Flags uint32) (rD return } - return } @@ -13102,7 +12950,6 @@ func (l *Libvirt) ConnectListAllNwfilters(NeedResults int32, Flags uint32) (rFil return } - return } @@ -13145,7 +12992,6 @@ func (l *Libvirt) ConnectListAllSecrets(NeedResults int32, Flags uint32) (rSecre return } - return } @@ -13206,9 +13052,9 @@ func (l *Libvirt) NodeGetMemoryParameters(Nparams int32, Flags uint32) (rParams rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) // Params: []TypedParam - // Params rParams, err = decodeTypedParams(dec) if err != nil { + fmt.Println("error decoding typedparams") return } // Nparams: int32 @@ -13217,11 +13063,10 @@ func (l *Libvirt) NodeGetMemoryParameters(Nparams int32, Flags uint32) (rParams return } - return } -func (l *Libvirt) DomainBlockCommit(Dom NonnullDomain, Disk string, Base string, Top string, Bandwidth uint64, Flags uint32) (err error) { +func (l *Libvirt) DomainBlockCommit(Dom NonnullDomain, Disk string, Base String, Top String, Bandwidth uint64, Flags uint32) (err error) { var buf bytes.Buffer args := DomainBlockCommitArgs { @@ -13348,11 +13193,10 @@ func (l *Libvirt) NodeGetCPUMap(NeedMap int32, NeedOnline int32, Flags uint32) ( return } - return } -func (l *Libvirt) DomainFstrim(Dom NonnullDomain, MountPoint string, Minimum uint64, Flags uint32) (err error) { +func (l *Libvirt) DomainFstrim(Dom NonnullDomain, MountPoint String, Minimum uint64, Flags uint32) (err error) { var buf bytes.Buffer args := DomainFstrimArgs { @@ -13412,7 +13256,7 @@ func (l *Libvirt) DomainSendProcessSignal(Dom NonnullDomain, PidValue int64, Sig return } -func (l *Libvirt) DomainOpenChannel(Dom NonnullDomain, Name string, Flags uint32) (err error) { +func (l *Libvirt) DomainOpenChannel(Dom NonnullDomain, Name String, Flags uint32) (err error) { var buf bytes.Buffer args := DomainOpenChannelArgs { @@ -13476,7 +13320,6 @@ func (l *Libvirt) NodeDeviceLookupScsiHostByWwn(Wwnn string, Wwpn string, Flags return } - return } @@ -13514,13 +13357,12 @@ func (l *Libvirt) DomainGetJobStats(Dom NonnullDomain, Flags uint32) (rType int3 return } // Params: []TypedParam - // Params rParams, err = decodeTypedParams(dec) if err != nil { + fmt.Println("error decoding typedparams") return } - return } @@ -13558,7 +13400,6 @@ func (l *Libvirt) DomainMigrateGetCompressionCache(Dom NonnullDomain, Flags uint return } - return } @@ -13591,7 +13432,7 @@ func (l *Libvirt) DomainMigrateSetCompressionCache(Dom NonnullDomain, CacheSize return } -func (l *Libvirt) NodeDeviceDetachFlags(Name string, DriverName string, Flags uint32) (err error) { +func (l *Libvirt) NodeDeviceDetachFlags(Name string, DriverName String, Flags uint32) (err error) { var buf bytes.Buffer args := NodeDeviceDetachFlagsArgs { @@ -13660,11 +13501,10 @@ func (l *Libvirt) DomainMigrateBegin3Params(Dom NonnullDomain, Params []TypedPar return } - return } -func (l *Libvirt) DomainMigratePrepare3Params(Params []TypedParam, CookieIn []byte, Flags uint32) (rCookieOut []byte, rUriOut string, err error) { +func (l *Libvirt) DomainMigratePrepare3Params(Params []TypedParam, CookieIn []byte, Flags uint32) (rCookieOut []byte, rUriOut String, err error) { var buf bytes.Buffer args := DomainMigratePrepare3ParamsArgs { @@ -13698,13 +13538,12 @@ func (l *Libvirt) DomainMigratePrepare3Params(Params []TypedParam, CookieIn []by if err != nil { return } - // UriOut: string + // UriOut: String _, err = dec.Decode(&rUriOut) if err != nil { return } - return } @@ -13743,11 +13582,10 @@ func (l *Libvirt) DomainMigratePrepareTunnel3Params(Params []TypedParam, CookieI return } - return } -func (l *Libvirt) DomainMigratePerform3Params(Dom NonnullDomain, Dconnuri string, Params []TypedParam, CookieIn []byte, Flags uint32) (rCookieOut []byte, err error) { +func (l *Libvirt) DomainMigratePerform3Params(Dom NonnullDomain, Dconnuri String, Params []TypedParam, CookieIn []byte, Flags uint32) (rCookieOut []byte, err error) { var buf bytes.Buffer args := DomainMigratePerform3ParamsArgs { @@ -13784,7 +13622,6 @@ func (l *Libvirt) DomainMigratePerform3Params(Dom NonnullDomain, Dconnuri string return } - return } @@ -13829,7 +13666,6 @@ func (l *Libvirt) DomainMigrateFinish3Params(Params []TypedParam, CookieIn []byt return } - return } @@ -13927,7 +13763,6 @@ func (l *Libvirt) DomainCreateXMLWithFiles(XMLDesc string, Flags uint32) (rDom N return } - return } @@ -13965,7 +13800,6 @@ func (l *Libvirt) DomainCreateWithFiles(Dom NonnullDomain, Flags uint32) (rDom N return } - return } @@ -14027,7 +13861,6 @@ func (l *Libvirt) ConnectGetCPUModelNames(Arch string, NeedResults int32, Flags return } - return } @@ -14065,7 +13898,6 @@ func (l *Libvirt) ConnectNetworkEventRegisterAny(EventID int32, Net Network) (rC return } - return } @@ -14148,7 +13980,6 @@ func (l *Libvirt) ConnectDomainEventCallbackRegisterAny(EventID int32, Dom Domai return } - return } @@ -14532,7 +14363,6 @@ func (l *Libvirt) DomainFsfreeze(Dom NonnullDomain, Mountpoints []string, Flags return } - return } @@ -14571,7 +14401,6 @@ func (l *Libvirt) DomainFsthaw(Dom NonnullDomain, Mountpoints []string, Flags ui return } - return } @@ -14614,7 +14443,6 @@ func (l *Libvirt) DomainGetTime(Dom NonnullDomain, Flags uint32) (rSeconds int64 return } - return } @@ -14702,11 +14530,10 @@ func (l *Libvirt) NodeGetFreePages(Pages []uint32, StartCell int32, CellCount ui return } - return } -func (l *Libvirt) NetworkGetDhcpLeases(Net NonnullNetwork, Mac string, NeedResults int32, Flags uint32) (rLeases []NetworkDhcpLease, rRet uint32, err error) { +func (l *Libvirt) NetworkGetDhcpLeases(Net NonnullNetwork, Mac String, NeedResults int32, Flags uint32) (rLeases []NetworkDhcpLease, rRet uint32, err error) { var buf bytes.Buffer args := NetworkGetDhcpLeasesArgs { @@ -14747,11 +14574,10 @@ func (l *Libvirt) NetworkGetDhcpLeases(Net NonnullNetwork, Mac string, NeedResul return } - return } -func (l *Libvirt) ConnectGetDomainCapabilities(Emulatorbin string, Arch string, Machine string, Virttype string, Flags uint32) (rCapabilities string, err error) { +func (l *Libvirt) ConnectGetDomainCapabilities(Emulatorbin String, Arch String, Machine String, Virttype String, Flags uint32) (rCapabilities string, err error) { var buf bytes.Buffer args := ConnectGetDomainCapabilitiesArgs { @@ -14788,7 +14614,6 @@ func (l *Libvirt) ConnectGetDomainCapabilities(Emulatorbin string, Arch string, return } - return } @@ -14856,7 +14681,6 @@ func (l *Libvirt) ConnectGetAllDomainStats(Doms []NonnullDomain, Stats uint32, F return } - return } @@ -14946,7 +14770,6 @@ func (l *Libvirt) NodeAllocPages(PageSizes []uint32, PageCounts []uint64, StartC return } - return } @@ -15007,7 +14830,6 @@ func (l *Libvirt) DomainGetFsinfo(Dom NonnullDomain, Flags uint32) (rInfo []Doma return } - return } @@ -15045,7 +14867,6 @@ func (l *Libvirt) DomainDefineXMLFlags(XML string, Flags uint32) (rDom NonnullDo return } - return } @@ -15088,7 +14909,6 @@ func (l *Libvirt) DomainGetIothreadInfo(Dom NonnullDomain, Flags uint32) (rInfo return } - return } @@ -15157,7 +14977,6 @@ func (l *Libvirt) DomainInterfaceAddresses(Dom NonnullDomain, Source uint32, Fla return } - return } @@ -15237,7 +15056,7 @@ func (l *Libvirt) DomainDelIothread(Dom NonnullDomain, IothreadID uint32, Flags return } -func (l *Libvirt) DomainSetUserPassword(Dom NonnullDomain, User string, Password string, Flags uint32) (err error) { +func (l *Libvirt) DomainSetUserPassword(Dom NonnullDomain, User String, Password String, Flags uint32) (err error) { var buf bytes.Buffer args := DomainSetUserPasswordArgs { @@ -15267,7 +15086,7 @@ func (l *Libvirt) DomainSetUserPassword(Dom NonnullDomain, User string, Password return } -func (l *Libvirt) DomainRename(Dom NonnullDomain, NewName string, Flags uint32) (rRetcode int32, err error) { +func (l *Libvirt) DomainRename(Dom NonnullDomain, NewName String, Flags uint32) (rRetcode int32, err error) { var buf bytes.Buffer args := DomainRenameArgs { @@ -15302,7 +15121,6 @@ func (l *Libvirt) DomainRename(Dom NonnullDomain, NewName string, Flags uint32) return } - return } @@ -15453,13 +15271,12 @@ func (l *Libvirt) DomainGetPerfEvents(Dom NonnullDomain, Flags uint32) (rParams rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) // Params: []TypedParam - // Params rParams, err = decodeTypedParams(dec) if err != nil { + fmt.Println("error decoding typedparams") return } - return } @@ -15544,7 +15361,6 @@ func (l *Libvirt) ConnectStoragePoolEventRegisterAny(EventID int32, Pool Storage return } - return } @@ -15622,13 +15438,12 @@ func (l *Libvirt) DomainGetGuestVcpus(Dom NonnullDomain, Flags uint32) (rParams rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) // Params: []TypedParam - // Params rParams, err = decodeTypedParams(dec) if err != nil { + fmt.Println("error decoding typedparams") return } - return } @@ -15714,7 +15529,6 @@ func (l *Libvirt) ConnectNodeDeviceEventRegisterAny(EventID int32, Dev NodeDevic return } - return } @@ -15825,7 +15639,6 @@ func (l *Libvirt) StorageVolGetInfoFlags(Vol NonnullStorageVol, Flags uint32) (r return } - return } @@ -15881,7 +15694,6 @@ func (l *Libvirt) ConnectSecretEventRegisterAny(EventID int32, Secret Secret) (r return } - return } @@ -16060,7 +15872,6 @@ func (l *Libvirt) DomainMigrateGetMaxDowntime(Dom NonnullDomain, Flags uint32) ( return } - return } @@ -16098,11 +15909,10 @@ func (l *Libvirt) DomainManagedSaveGetXMLDesc(Dom NonnullDomain, Flags uint32) ( return } - return } -func (l *Libvirt) DomainManagedSaveDefineXML(Dom NonnullDomain, Dxml string, Flags uint32) (err error) { +func (l *Libvirt) DomainManagedSaveDefineXML(Dom NonnullDomain, Dxml String, Flags uint32) (err error) { var buf bytes.Buffer args := DomainManagedSaveDefineXMLArgs { diff --git a/libvirt.go b/libvirt.go index 975c377..280a2a7 100644 --- a/libvirt.go +++ b/libvirt.go @@ -52,17 +52,10 @@ type Libvirt struct { s uint32 } -// Domain represents a domain as seen by libvirt. -// type Domain struct { -// Name string -// UUID [constants.UUIDSize]byte -// ID int -// } - // DomainEvent represents a libvirt domain event. type DomainEvent struct { CallbackID uint32 - Domain Domain + Domain NonnullDomain Event string Seconds uint64 Microseconds uint32 @@ -70,19 +63,6 @@ type DomainEvent struct { Details []byte } -// Secret represents a secret managed by the libvirt daemon. -// type Secret struct { -// UUID [constants.UUIDSize]byte -// UsageType SecretUsageType -// UsageID string -// } - -// StoragePool represents a storage pool as seen by libvirt. -// type StoragePool struct { -// Name string -// UUID [constants.UUIDSize]byte -// } - // qemuError represents a QEMU process error. type qemuError struct { Error struct { @@ -137,46 +117,6 @@ const ( TypeParamLast ) -// TypedParam represents libvirt's virTypedParameter, which is used to pass -// typed parameters to libvirt functions. This is defined as an interface, and -// implemented by TypedParam... concrete types. -// type TypedParam interface { -// Field() string -// Value() interface{} -// } - -// TypedParamInt contains a 32-bit signed integer. -// type TypedParamInt struct { -// Fld string -// PType int32 -// Padding [4]byte -// Val int32 -// } - -// Field returns the field name, a string name for the parameter. -// func (tp *TypedParamInt) Field() string { -// return tp.Fld -// } - -// Value returns the value for the typed parameter, as an empty interface. -// func (tp *TypedParamInt) Value() interface{} { -// return tp.Val -// } - -// NewTypedParamInt returns a TypedParam encoding for an int. -// func NewTypedParamInt(name string, v int32) *TypedParamInt { -// // Truncate the field name if it's longer than the limit. -// if len(name) > constants.TypedParamFieldLength { -// name = name[:constants.TypedParamFieldLength] -// } -// tp := TypedParamInt{ -// Fld: name, -// PType: TypeParamInt, -// Val: v, -// } -// return &tp -// } - // TypedParamULongLong contains a 64-bit unsigned integer. type TypedParamULongLong struct { Fld string @@ -506,27 +446,9 @@ const ( DomainMemoryStatTagNr ) -// DomainMemoryStat specifies memory stats of the domain -// type DomainMemoryStat struct { -// Tag DomainMemoryStatTag -// Val uint64 -// } - // Capabilities returns an XML document describing the host's capabilties. func (l *Libvirt) Capabilities() ([]byte, error) { - resp, err := l.request(constants.ProcConnectGetCapabilities, constants.Program, nil) - if err != nil { - return nil, err - } - - r := <-resp - if r.Status != StatusOK { - return nil, decodeError(r.Payload) - } - - dec := xdr.NewDecoder(bytes.NewReader(r.Payload)) - caps, _, err := dec.DecodeString() - + caps, err := l.ConnectGetCapabilities() return []byte(caps), err } @@ -555,118 +477,13 @@ func (l *Libvirt) Disconnect() error { } // Domains returns a list of all domains managed by libvirt. -func (l *Libvirt) Domains() ([]Domain, error) { +func (l *Libvirt) Domains() ([]NonnullDomain, error) { // these are the flags as passed by `virsh`, defined in: // src/remote/remote_protocol.x # remote_connect_list_all_domains_args - req := struct { - NeedResults uint32 - Flags uint32 - }{ - NeedResults: 1, - Flags: 3, - } - - buf, err := encode(&req) - if err != nil { - return nil, err - } - - resp, err := l.request(constants.ProcConnectListAllDomains, constants.Program, &buf) - if err != nil { - return nil, err - } - - r := <-resp - if r.Status != StatusOK { - return nil, decodeError(r.Payload) - } - - result := struct { - Domains []Domain - Count uint32 - }{} - - dec := xdr.NewDecoder(bytes.NewReader(r.Payload)) - _, err = dec.Decode(&result) - if err != nil { - return nil, err - } - - return result.Domains, nil + domains, _, err := l.ConnectListAllDomains(1, 3) + return domains, err } -// DomainCreateWithFlags starts specified domain with flags -// func (l *Libvirt) DomainCreateWithFlags(dom string, flags DomainCreateFlags) error { -// d, err := l.lookup(dom) -// if err != nil { -// return err -// } -// req := struct { -// Domain Domain -// Flags DomainCreateFlags -// }{ -// Domain: *d, -// Flags: flags, -// } -// -// buf, err := encode(&req) -// if err != nil { -// return err -// } -// resp, err := l.request(constants.ProcDomainCreateWithFlags, constants.Program, &buf) -// if err != nil { -// return err -// } -// r := <-resp -// if r.Status != StatusOK { -// return decodeError(r.Payload) -// } -// return nil -// } - -// DomainMemoryStats returns memory stats of the domain managed by libvirt. -// func (l *Libvirt) DomainMemoryStats(dom string) ([]DomainMemoryStat, error) { -// -// d, err := l.lookup(dom) -// if err != nil { -// return nil, err -// } -// -// req := struct { -// Domain Domain -// MaxStats uint32 -// Flags uint32 -// }{ -// Domain: *d, -// MaxStats: 8, -// Flags: 0, -// } -// -// buf, err := encode(&req) -// if err != nil { -// return nil, err -// } -// -// resp, err := l.request(constants.ProcDomainMemoryStats, constants.Program, &buf) -// if err != nil { -// return nil, err -// } -// -// r := <-resp -// -// result := struct { -// DomainMemoryStats []DomainMemoryStat -// }{} -// -// dec := xdr.NewDecoder(bytes.NewReader(r.Payload)) -// _, err = dec.Decode(&result) -// if err != nil { -// return nil, err -// } -// -// return result.DomainMemoryStats, nil -// } - // DomainState returns state of the domain managed by libvirt. func (l *Libvirt) DomainState(dom string) (DomainState, error) { d, err := l.lookup(dom) @@ -674,41 +491,8 @@ func (l *Libvirt) DomainState(dom string) (DomainState, error) { return DomainStateNoState, err } - req := struct { - Domain Domain - Flags uint32 - }{ - Domain: d, - Flags: 0, - } - - buf, err := encode(&req) - if err != nil { - return DomainStateNoState, err - } - - resp, err := l.request(constants.ProcDomainGetState, constants.Program, &buf) - if err != nil { - return DomainStateNoState, err - } - - r := <-resp - if r.Status != StatusOK { - return DomainStateNoState, decodeError(r.Payload) - } - - result := struct { - State uint32 - Reason uint32 - }{} - - dec := xdr.NewDecoder(bytes.NewReader(r.Payload)) - _, err = dec.Decode(&result) - if err != nil { - return DomainStateNoState, err - } - - return DomainState(result.State), nil + state, _, err := l.DomainGetState(d, 0) + return DomainState(state), err } // Events streams domain events. @@ -723,7 +507,7 @@ func (l *Libvirt) Events(dom string) (<-chan DomainEvent, error) { payload := struct { Padding [4]byte - Domain Domain + Domain NonnullDomain Event [2]byte Flags [2]byte }{ @@ -793,39 +577,11 @@ func (l *Libvirt) Migrate(dom string, dest string, flags MigrateFlags) error { // and CookieIn. In testing both values are always set to 0 by virsh // and the source does not provide clear definitions of their purpose. // For now, using the same zero'd values as done by virsh will be Good Enough. - payload := struct { - Domain Domain - Padding [4]byte - DestinationURI string - RemoteParameters uint32 - CookieIn uint32 - Flags MigrateFlags - }{ - Domain: d, - Padding: [4]byte{0x0, 0x0, 0x0, 0x1}, - DestinationURI: dest, - RemoteParameters: 0, - CookieIn: 0, - Flags: flags, - } - - buf, err := encode(&payload) - if err != nil { - return err - } - - resp, err := l.request(constants.ProcDomainMigratePerform3Params, - constants.Program, &buf) - if err != nil { - return err - } - - r := <-resp - if r.Status != StatusOK { - return decodeError(r.Payload) - } - - return nil + destURI := []string{dest} + remoteParams := []TypedParam{} + cookieIn := []byte{} + _, err = l.DomainMigratePerform3Params(d, destURI, remoteParams, cookieIn, uint32(flags)) + return err } // MigrateSetMaxSpeed set the maximum migration bandwidth (in MiB/s) for a @@ -837,33 +593,7 @@ func (l *Libvirt) MigrateSetMaxSpeed(dom string, speed int64) error { return err } - payload := struct { - Padding [4]byte - Domain Domain - Bandwidth int64 - Flags uint32 - }{ - Padding: [4]byte{0x0, 0x0, 0x1, 0x0}, - Domain: d, - Bandwidth: speed, - } - - buf, err := encode(&payload) - if err != nil { - return err - } - - resp, err := l.request(constants.ProcDomainMigrateSetMaxSpeed, constants.Program, &buf) - if err != nil { - return err - } - - r := <-resp - if r.Status != StatusOK { - return decodeError(r.Payload) - } - - return nil + return l.DomainMigrateSetMaxSpeed(d, uint64(speed), 0) } // Run executes the given QAPI command against a domain's QEMU instance. @@ -876,7 +606,7 @@ func (l *Libvirt) Run(dom string, cmd []byte) ([]byte, error) { } payload := struct { - Domain Domain + Domain NonnullDomain Command []byte Flags uint32 }{ @@ -919,7 +649,7 @@ func (l *Libvirt) Run(dom string, cmd []byte) ([]byte, error) { } // Secrets returns all secrets managed by the libvirt daemon. -func (l *Libvirt) Secrets() ([]Secret, error) { +func (l *Libvirt) Secrets() ([]NonnullSecret, error) { req := struct { NeedResults uint32 Flags uint32 @@ -944,7 +674,7 @@ func (l *Libvirt) Secrets() ([]Secret, error) { } result := struct { - Secrets []Secret + Secrets []NonnullSecret Count uint32 }{} @@ -959,112 +689,15 @@ func (l *Libvirt) Secrets() ([]Secret, error) { // StoragePool returns the storage pool associated with the provided name. // An error is returned if the requested storage pool is not found. -func (l *Libvirt) StoragePool(name string) (StoragePool, error) { - req := struct { - Name string - }{ - Name: name, - } - - buf, err := encode(&req) - if err != nil { - return nil, err - } - - resp, err := l.request(constants.ProcStoragePoolLookupByName, constants.Program, &buf) - if err != nil { - return nil, err - } - - r := <-resp - if r.Status != StatusOK { - return nil, decodeError(r.Payload) - } - - result := struct { - Pool StoragePool - }{} - - dec := xdr.NewDecoder(bytes.NewReader(r.Payload)) - _, err = dec.Decode(&result) - if err != nil { - return nil, err - } - - return result.Pool, nil +func (l *Libvirt) StoragePool(name string) (NonnullStoragePool, error) { + return l.StoragePoolLookupByName(name) } -// StoragePoolRefresh refreshes the storage pool specified by name. -// func (l *Libvirt) StoragePoolRefresh(name string) error { -// pool, err := l.StoragePool(name) -// if err != nil { -// return err -// } -// -// req := struct { -// Pool StoragePool -// Flags uint32 -// }{ -// Pool: *pool, -// Flags: 0, // unused per libvirt source, callers should pass 0 -// } -// -// buf, err := encode(&req) -// if err != nil { -// return err -// } -// -// resp, err := l.request(constants.ProcStoragePoolRefresh, constants.Program, &buf) -// if err != nil { -// return err -// } -// -// r := <-resp -// if r.Status != StatusOK { -// return decodeError(r.Payload) -// } -// -// return nil -// } - // StoragePools returns a list of defined storage pools. Pools are filtered by // the provided flags. See StoragePools*. -func (l *Libvirt) StoragePools(flags StoragePoolsFlags) ([]StoragePool, error) { - req := struct { - NeedResults uint32 - Flags StoragePoolsFlags - }{ - NeedResults: 1, - Flags: flags, - } - - buf, err := encode(&req) - if err != nil { - return nil, err - } - - resp, err := l.request(constants.ProcConnectListAllStoragePools, constants.Program, &buf) - if err != nil { - return nil, err - } - - r := <-resp - if r.Status != StatusOK { - return nil, decodeError(r.Payload) - } - - result := struct { - Pools []StoragePool - Count uint32 - }{} - - dec := xdr.NewDecoder(bytes.NewReader(r.Payload)) - _, err = dec.Decode(&result) - if err != nil { - return nil, err - } - - return result.Pools, nil +func (l *Libvirt) StoragePools(flags StoragePoolsFlags) ([]NonnullStoragePool, error) { + pools, _, err := l.ConnectListAllStoragePools(1, uint32(flags)) + return pools, err } // Undefine undefines the domain specified by dom, e.g., 'prod-lb-01'. @@ -1077,30 +710,7 @@ func (l *Libvirt) Undefine(dom string, flags UndefineFlags) error { return err } - payload := struct { - Domain Domain - Flags UndefineFlags - }{ - Domain: d, - Flags: flags, - } - - buf, err := encode(&payload) - if err != nil { - return err - } - - resp, err := l.request(constants.ProcDomainUndefineFlags, constants.Program, &buf) - if err != nil { - return err - } - - r := <-resp - if r.Status != StatusOK { - return decodeError(r.Payload) - } - - return nil + return l.DomainUndefineFlags(d, uint32(flags)) } // Destroy destroys the domain specified by dom, e.g., 'prod-lb-01'. @@ -1113,30 +723,7 @@ func (l *Libvirt) Destroy(dom string, flags DestroyFlags) error { return err } - payload := struct { - Domain Domain - Flags DestroyFlags - }{ - Domain: d, - Flags: flags, - } - - buf, err := encode(&payload) - if err != nil { - return err - } - - resp, err := l.request(constants.ProcDomainDestroyFlags, constants.Program, &buf) - if err != nil { - return err - } - - r := <-resp - if r.Status != StatusOK { - return decodeError(r.Payload) - } - - return nil + return l.DomainDestroyFlags(d, uint32(flags)) } // XML returns a domain's raw XML definition, akin to `virsh dumpxml `. @@ -1147,85 +734,19 @@ func (l *Libvirt) XML(dom string, flags DomainXMLFlags) ([]byte, error) { return nil, err } - payload := struct { - Domain Domain - Flags DomainXMLFlags - }{ - Domain: d, - Flags: flags, - } - - buf, err := encode(&payload) - if err != nil { - return nil, err - } - - resp, err := l.request(constants.ProcDomainGetXMLDesc, constants.Program, &buf) - if err != nil { - return nil, err - } - - r := <-resp - if r.Status != StatusOK { - return nil, decodeError(r.Payload) - } - - pl := bytes.NewReader(r.Payload) - dec := xdr.NewDecoder(pl) - s, _, err := dec.DecodeString() - if err != nil { - return nil, err - } - - return []byte(s), nil + xml, err := l.DomainGetXMLDesc(d, uint32(flags)) + return []byte(xml), err } // DefineXML defines a domain, but does not start it. func (l *Libvirt) DefineXML(x []byte, flags DomainDefineXMLFlags) error { - payload := struct { - Domain []byte - Flags DomainDefineXMLFlags - }{ - Domain: x, - Flags: flags, - } - - buf, err := encode(&payload) - if err != nil { - return err - } - - resp, err := l.request(constants.ProcDomainDefineXMLFlags, constants.Program, &buf) - if err != nil { - return err - } - - r := <-resp - if r.Status != StatusOK { - return decodeError(r.Payload) - } - - return nil + _, err := l.DomainDefineXMLFlags(string(x), uint32(flags)) + return err } // Version returns the version of the libvirt daemon. func (l *Libvirt) Version() (string, error) { - resp, err := l.request(constants.ProcConnectGetLibVersion, constants.Program, nil) - if err != nil { - return "", err - } - - r := <-resp - if r.Status != StatusOK { - return "", decodeError(r.Payload) - } - - result := struct { - Version uint64 - }{} - - dec := xdr.NewDecoder(bytes.NewReader(r.Payload)) - _, err = dec.Decode(&result) + ver, err := l.ConnectGetLibVersion() if err != nil { return "", err } @@ -1233,11 +754,11 @@ func (l *Libvirt) Version() (string, error) { // The version is provided as an int following this formula: // version * 1,000,000 + minor * 1000 + micro // See src/libvirt-host.c # virConnectGetLibVersion - major := result.Version / 1000000 - result.Version %= 1000000 - minor := result.Version / 1000 - result.Version %= 1000 - micro := result.Version + major := ver / 1000000 + ver %= 1000000 + minor := ver / 1000 + ver %= 1000 + micro := ver versionString := fmt.Sprintf("%d.%d.%d", major, minor, micro) return versionString, nil @@ -1251,30 +772,7 @@ func (l *Libvirt) Shutdown(dom string, flags ShutdownFlags) error { return err } - payload := struct { - Domain Domain - Flags ShutdownFlags - }{ - Domain: d, - Flags: flags, - } - - buf, err := encode(&payload) - if err != nil { - return err - } - - resp, err := l.request(constants.ProcDomainShutdownFlags, constants.Program, &buf) - if err != nil { - return err - } - - r := <-resp - if r.Status != StatusOK { - return decodeError(r.Payload) - } - - return nil + return l.DomainShutdownFlags(d, uint32(flags)) } // Reboot reboots the domain. Note that the guest OS may ignore the request. @@ -1285,30 +783,7 @@ func (l *Libvirt) Reboot(dom string, flags RebootFlags) error { return err } - payload := struct { - Domain Domain - Flags RebootFlags - }{ - Domain: d, - Flags: flags, - } - - buf, err := encode(&payload) - if err != nil { - return err - } - - resp, err := l.request(constants.ProcDomainReboot, constants.Program, &buf) - if err != nil { - return err - } - - r := <-resp - if r.Status != StatusOK { - return decodeError(r.Payload) - } - - return nil + return l.DomainReboot(d, uint32(flags)) } // Reset resets domain immediately without any guest OS shutdown @@ -1318,30 +793,7 @@ func (l *Libvirt) Reset(dom string) error { return err } - payload := struct { - Domain Domain - Flags uint32 - }{ - Domain: d, - Flags: 0, - } - - buf, err := encode(&payload) - if err != nil { - return err - } - - resp, err := l.request(constants.ProcDomainReset, constants.Program, &buf) - if err != nil { - return err - } - - r := <-resp - if r.Status != StatusOK { - return decodeError(r.Payload) - } - - return nil + return l.DomainReset(d, 0) } // BlockLimit contains a name and value pair for a Get/SetBlockIOTune limit. The @@ -1404,7 +856,7 @@ func (l *Libvirt) SetBlockIOTune(dom string, disk string, limits ...BlockLimit) params[ix] = TypedParam{Field: limit.Name, Value: tpval} } - return l.DomainSetBlockIOTune(*d, disk, params, FlagDomainAffectLive) + return l.DomainSetBlockIOTune(d, disk, params, FlagDomainAffectLive) } // GetBlockIOTune returns a slice containing the current block I/O tunables for @@ -1415,46 +867,12 @@ func (l *Libvirt) GetBlockIOTune(dom string, disk string) ([]BlockLimit, error) return nil, err } - lims, _, err := l.DomainGetBlockIOTune(*d, disk, 32, FlagTypedParamStringOkay) + lims, _, err := l.DomainGetBlockIOTune(d, []string{disk}, 32, FlagTypedParamStringOkay) if err != nil { return nil, err } - // payload := struct { - // Domain Domain - // Disk []string - // ParamCount uint32 - // Flags DomainAffectFlags - // }{ - // Domain: d, - // Disk: []string{disk}, - // ParamCount: 32, - // Flags: FlagTypedParamStringOkay, - // } - // - // buf, err := encode(&payload) - // if err != nil { - // return nil, err - // } - // - // resp, err := l.request(constants.ProcDomainGetBlockIOTune, constants.Program, &buf) - // if err != nil { - // return nil, err - // } - // - // r := <-resp - // if r.Status != StatusOK { - // return nil, decodeError(r.Payload) - // } var limits []BlockLimit - // rdr := bytes.NewReader(r.Payload) - // dec := xdr.NewDecoder(rdr) - - // find out how many params were returned - // paramCount, _, err := dec.DecodeInt() - // if err != nil { - // return nil, err - // } // now decode each of the returned TypedParams. To do this we read the field // name and type, then use the type information to decode the value. @@ -1468,73 +886,40 @@ func (l *Libvirt) GetBlockIOTune(dom string, disk string) ([]BlockLimit, error) limits = append(limits, l) } - // for param := int32(0); param < paramCount; param++ { - // // Get the field name - // name, _, err := dec.DecodeString() - // if err != nil { - // return nil, err - // } - // // ...and the type - // ptype, _, err := dec.DecodeInt() - // if err != nil { - // return nil, err - // } - // - // // Now we can read the actual value. - // switch ptype { - // case TypeParamULLong: - // var val uint64 - // _, err = dec.Decode(&val) - // if err != nil { - // return nil, err - // } - // lim := BlockLimit{name, val} - // limits = append(limits, lim) - // case TypeParamString: - // var val string - // _, err = dec.Decode(&val) - // if err != nil { - // return nil, err - // } - // // This routine doesn't currently return strings. As of libvirt 3+, - // // there's one string here, `group_name`. - // } - // } - return limits, nil } // lookup returns a domain as seen by libvirt. -func (l *Libvirt) lookup(name string) (Domain, error) { +func (l *Libvirt) lookup(name string) (NonnullDomain, error) { + var d NonnullDomain payload := struct { Name string }{name} buf, err := encode(&payload) if err != nil { - return nil, err + return d, err } resp, err := l.request(constants.ProcDomainLookupByName, constants.Program, &buf) if err != nil { - return nil, err + return d, err } r := <-resp if r.Status != StatusOK { - return nil, decodeError(r.Payload) + return d, decodeError(r.Payload) } dec := xdr.NewDecoder(bytes.NewReader(r.Payload)) // var d Domain - var d NonnullDomain _, err = dec.Decode(&d) if err != nil { - return nil, err + return d, err } - return &d, nil + return d, nil } // getQEMUError checks the provided response for QEMU process errors. diff --git a/libvirt_test.go b/libvirt_test.go index af01f7f..1f1f522 100644 --- a/libvirt_test.go +++ b/libvirt_test.go @@ -153,7 +153,7 @@ func TestDomainMemoryStats(t *testing.T) { t.Error(err) } - gotDomainMemoryStats, err := l.DomainMemoryStats(*d, 8, 0) + gotDomainMemoryStats, err := l.DomainMemoryStats(d, 8, 0) if err != nil { t.Error(err) } @@ -361,7 +361,7 @@ func TestStoragePoolRefresh(t *testing.T) { if err != nil { t.Error(err) } - err = l.StoragePoolRefresh(*pool, 0) + err = l.StoragePoolRefresh(pool, 0) if err != nil { t.Error(err) } @@ -422,7 +422,7 @@ func TestDomainCreateWithFlags(t *testing.T) { t.Fatalf("failed to lookup domain: %v", err) } var flags uint32 - if _, err := l.DomainCreateWithFlags(*d, flags); err != nil { + if _, err := l.DomainCreateWithFlags(d, flags); err != nil { t.Fatalf("unexpected create error: %v", err) } } diff --git a/rpc_test.go b/rpc_test.go index 1ce79a0..bd1de49 100644 --- a/rpc_test.go +++ b/rpc_test.go @@ -340,10 +340,6 @@ func TestLookup(t *testing.T) { t.Error(err) } - if d == nil { - t.Error("nil domain returned") - } - if d.Name != name { t.Errorf("expected domain %s, got %s", name, d.Name) } From 96763e53169dbfa6c6b96c13cded3b2d522fabc5 Mon Sep 17 00:00:00 2001 From: Geoff Hickey Date: Thu, 16 Nov 2017 14:36:31 -0500 Subject: [PATCH 08/20] Rename "String" type to "OptString" --- internal/lvgen/gen/main.go | 1 - internal/lvgen/generate.go | 4 + libvirt.gen.go | 212 ++++++++++++++++++------------------- 3 files changed, 110 insertions(+), 107 deletions(-) diff --git a/internal/lvgen/gen/main.go b/internal/lvgen/gen/main.go index 7e13f8c..c36a6d4 100644 --- a/internal/lvgen/gen/main.go +++ b/internal/lvgen/gen/main.go @@ -22,7 +22,6 @@ import ( "github.com/digitalocean/go-libvirt/internal/lvgen" ) -// TODO: make these an argument const protoPath = "src/remote/remote_protocol.x" func main() { diff --git a/internal/lvgen/generate.go b/internal/lvgen/generate.go index 38627dd..681002a 100644 --- a/internal/lvgen/generate.go +++ b/internal/lvgen/generate.go @@ -82,6 +82,10 @@ var goEquivTypes = map[string]string{ // requires us to ditch the typedef that would otherwise be generated. "NonnullString": "string", + // remote_string gets renamed "String" by the generator, so here we'll + // rename that to OptString - these are optional strings, and can be "null". + "String": "OptString", + // TODO: Get rid of these. They're only needed because we lose information // that the parser has (the parser knows it has emitted a go type), and then // we capitalize types to make them public. diff --git a/libvirt.gen.go b/libvirt.gen.go index aad7ac3..2ea52ef 100644 --- a/libvirt.gen.go +++ b/libvirt.gen.go @@ -19,7 +19,7 @@ const ( ) // Typedefs: -type String []string +type OptString []string type UUID [VirUUIDBuflen]byte type Domain []NonnullDomain type Network []NonnullNetwork @@ -84,12 +84,12 @@ type NonnullDomainSnapshot struct { type Error struct { Code int32 Domain int32 - Message String + Message OptString Level int32 Dom Domain - Str1 String - Str2 String - Str3 String + Str1 OptString + Str2 OptString + Str3 OptString Int1 int32 Int2 int32 Net Network @@ -123,7 +123,7 @@ type DomainDiskError struct { } type ConnectOpenArgs struct { - Name String + Name OptString Flags uint32 } @@ -164,7 +164,7 @@ type ConnectGetUriRet struct { } type ConnectGetMaxVcpusArgs struct { - Type String + Type OptString } type ConnectGetMaxVcpusRet struct { @@ -187,10 +187,10 @@ type ConnectGetCapabilitiesRet struct { } type ConnectGetDomainCapabilitiesArgs struct { - Emulatorbin String - Arch String - Machine String - Virttype String + Emulatorbin OptString + Arch OptString + Machine OptString + Virttype OptString Flags uint32 } @@ -610,7 +610,7 @@ type DomainSaveArgs struct { type DomainSaveFlagsArgs struct { Dom NonnullDomain To string - Dxml String + Dxml OptString Flags uint32 } @@ -620,7 +620,7 @@ type DomainRestoreArgs struct { type DomainRestoreFlagsArgs struct { From string - Dxml String + Dxml OptString Flags uint32 } @@ -659,7 +659,7 @@ type DomainScreenshotArgs struct { } type DomainScreenshotRet struct { - Mime String + Mime OptString } type DomainGetXMLDescArgs struct { @@ -672,15 +672,15 @@ type DomainGetXMLDescRet struct { } type DomainMigratePrepareArgs struct { - UriIn String + UriIn OptString Flags uint64 - Dname String + Dname OptString Resource uint64 } type DomainMigratePrepareRet struct { Cookie []byte - UriOut String + UriOut OptString } type DomainMigratePerformArgs struct { @@ -688,7 +688,7 @@ type DomainMigratePerformArgs struct { Cookie []byte Uri string Flags uint64 - Dname String + Dname OptString Resource uint64 } @@ -704,16 +704,16 @@ type DomainMigrateFinishRet struct { } type DomainMigratePrepare2Args struct { - UriIn String + UriIn OptString Flags uint64 - Dname String + Dname OptString Resource uint64 DomXML string } type DomainMigratePrepare2Ret struct { Cookie []byte - UriOut String + UriOut OptString } type DomainMigrateFinish2Args struct { @@ -990,16 +990,16 @@ type DomainSetAutostartArgs struct { type DomainSetMetadataArgs struct { Dom NonnullDomain Type int32 - Metadata String - Key String - Uri String + Metadata OptString + Key OptString + Uri OptString Flags uint32 } type DomainGetMetadataArgs struct { Dom NonnullDomain Type int32 - Uri String + Uri OptString Flags uint32 } @@ -1044,7 +1044,7 @@ type DomainBlockPullArgs struct { type DomainBlockRebaseArgs struct { Dom NonnullDomain Path string - Base String + Base OptString Bandwidth uint64 Flags uint32 } @@ -1060,8 +1060,8 @@ type DomainBlockCopyArgs struct { type DomainBlockCommitArgs struct { Dom NonnullDomain Disk string - Base String - Top String + Base OptString + Top OptString Bandwidth uint64 Flags uint32 } @@ -1075,7 +1075,7 @@ type DomainSetBlockIOTuneArgs struct { type DomainGetBlockIOTuneArgs struct { Dom NonnullDomain - Disk String + Disk OptString Nparams int32 Flags uint32 } @@ -1408,7 +1408,7 @@ type ConnectListDefinedStoragePoolsRet struct { type ConnectFindStoragePoolSourcesArgs struct { Type string - SrcSpec String + SrcSpec OptString Flags uint32 } @@ -1643,7 +1643,7 @@ type StorageVolResizeArgs struct { } type NodeNumOfDevicesArgs struct { - Cap String + Cap OptString Flags uint32 } @@ -1652,7 +1652,7 @@ type NodeNumOfDevicesRet struct { } type NodeListDevicesArgs struct { - Cap String + Cap OptString Maxnames int32 Flags uint32 } @@ -1693,7 +1693,7 @@ type NodeDeviceGetParentArgs struct { } type NodeDeviceGetParentRet struct { - Parent String + Parent OptString } type NodeDeviceNumOfCapsArgs struct { @@ -1719,7 +1719,7 @@ type NodeDeviceDettachArgs struct { type NodeDeviceDetachFlagsArgs struct { Name string - DriverName String + DriverName OptString Flags uint32 } @@ -1851,7 +1851,7 @@ type SecretLookupByUsageRet struct { type DomainMigratePrepareTunnelArgs struct { Flags uint64 - Dname String + Dname OptString Resource uint64 DomXML string } @@ -2134,8 +2134,8 @@ type DomainEventCallbackBlockJobMsg struct { type DomainEventDiskChangeMsg struct { Dom NonnullDomain - OldSrcPath String - NewSrcPath String + OldSrcPath OptString + NewSrcPath OptString DevAlias string Reason int32 } @@ -2226,7 +2226,7 @@ type DomainManagedSaveGetXMLDescRet struct { type DomainManagedSaveDefineXMLArgs struct { Dom NonnullDomain - Dxml String + Dxml OptString Flags uint32 } @@ -2376,13 +2376,13 @@ type DomainSnapshotDeleteArgs struct { type DomainOpenConsoleArgs struct { Dom NonnullDomain - DevName String + DevName OptString Flags uint32 } type DomainOpenChannelArgs struct { Dom NonnullDomain - Name String + Name OptString Flags uint32 } @@ -2412,9 +2412,9 @@ type DomainGetStateRet struct { type DomainMigrateBegin3Args struct { Dom NonnullDomain - Xmlin String + Xmlin OptString Flags uint64 - Dname String + Dname OptString Resource uint64 } @@ -2425,22 +2425,22 @@ type DomainMigrateBegin3Ret struct { type DomainMigratePrepare3Args struct { CookieIn []byte - UriIn String + UriIn OptString Flags uint64 - Dname String + Dname OptString Resource uint64 DomXML string } type DomainMigratePrepare3Ret struct { CookieOut []byte - UriOut String + UriOut OptString } type DomainMigratePrepareTunnel3Args struct { CookieIn []byte Flags uint64 - Dname String + Dname OptString Resource uint64 DomXML string } @@ -2451,12 +2451,12 @@ type DomainMigratePrepareTunnel3Ret struct { type DomainMigratePerform3Args struct { Dom NonnullDomain - Xmlin String + Xmlin OptString CookieIn []byte - Dconnuri String - Uri String + Dconnuri OptString + Uri OptString Flags uint64 - Dname String + Dname OptString Resource uint64 } @@ -2467,8 +2467,8 @@ type DomainMigratePerform3Ret struct { type DomainMigrateFinish3Args struct { Dname string CookieIn []byte - Dconnuri String - Uri String + Dconnuri OptString + Uri OptString Flags uint64 Cancelled int32 } @@ -2649,7 +2649,7 @@ type NodeGetCPUMapRet struct { type DomainFstrimArgs struct { Dom NonnullDomain - MountPoint String + MountPoint OptString Minimum uint64 Flags uint32 } @@ -2690,7 +2690,7 @@ type DomainMigratePrepare3ParamsArgs struct { type DomainMigratePrepare3ParamsRet struct { CookieOut []byte - UriOut String + UriOut OptString } type DomainMigratePrepareTunnel3ParamsArgs struct { @@ -2705,7 +2705,7 @@ type DomainMigratePrepareTunnel3ParamsRet struct { type DomainMigratePerform3ParamsArgs struct { Dom NonnullDomain - Dconnuri String + Dconnuri OptString Params []TypedParam CookieIn []byte Flags uint32 @@ -2757,7 +2757,7 @@ type DomainEventBlockThresholdMsg struct { CallbackID int32 Dom NonnullDomain Dev string - Path String + Path OptString Threshold uint64 Excess uint64 } @@ -2906,17 +2906,17 @@ type NetworkDhcpLease struct { Iface string Expirytime int64 Type int32 - Mac String - Iaid String + Mac OptString + Iaid OptString Ipaddr string Prefix uint32 - Hostname String - Clientid String + Hostname OptString + Clientid OptString } type NetworkGetDhcpLeasesArgs struct { Net NonnullNetwork - Mac String + Mac OptString NeedResults int32 Flags uint32 } @@ -2973,7 +2973,7 @@ type DomainIPAddr struct { type DomainInterface struct { Name string - Hwaddr String + Hwaddr OptString Addrs []DomainIPAddr } @@ -2989,14 +2989,14 @@ type DomainInterfaceAddressesRet struct { type DomainSetUserPasswordArgs struct { Dom NonnullDomain - User String - Password String + User OptString + Password OptString Flags uint32 } type DomainRenameArgs struct { Dom NonnullDomain - NewName String + NewName OptString Flags uint32 } @@ -3054,7 +3054,7 @@ type DomainEventCallbackMetadataChangeMsg struct { CallbackID int32 Dom NonnullDomain Type int32 - Nsuri String + Nsuri OptString } type ConnectSecretEventRegisterAnyArgs struct { @@ -3280,7 +3280,7 @@ func decodeTypedParams(dec *xdr.Decoder) ([]TypedParam, error) { // Procedures: -func (l *Libvirt) ConnectOpen(Name String, Flags uint32) (err error) { +func (l *Libvirt) ConnectOpen(Name OptString, Flags uint32) (err error) { var buf bytes.Buffer args := ConnectOpenArgs { @@ -3380,7 +3380,7 @@ func (l *Libvirt) ConnectGetVersion() (rHvVer uint64, err error) { return } -func (l *Libvirt) ConnectGetMaxVcpus(Type String) (rMaxVcpus int32, err error) { +func (l *Libvirt) ConnectGetMaxVcpus(Type OptString) (rMaxVcpus int32, err error) { var buf bytes.Buffer args := ConnectGetMaxVcpusArgs { @@ -5221,7 +5221,7 @@ func (l *Libvirt) ConnectSupportsFeature(Feature int32) (rSupported int32, err e return } -func (l *Libvirt) DomainMigratePrepare(UriIn String, Flags uint64, Dname String, Resource uint64) (rCookie []byte, rUriOut String, err error) { +func (l *Libvirt) DomainMigratePrepare(UriIn OptString, Flags uint64, Dname OptString, Resource uint64) (rCookie []byte, rUriOut OptString, err error) { var buf bytes.Buffer args := DomainMigratePrepareArgs { @@ -5256,7 +5256,7 @@ func (l *Libvirt) DomainMigratePrepare(UriIn String, Flags uint64, Dname String, if err != nil { return } - // UriOut: String + // UriOut: OptString _, err = dec.Decode(&rUriOut) if err != nil { return @@ -5265,7 +5265,7 @@ func (l *Libvirt) DomainMigratePrepare(UriIn String, Flags uint64, Dname String, return } -func (l *Libvirt) DomainMigratePerform(Dom NonnullDomain, Cookie []byte, Uri string, Flags uint64, Dname String, Resource uint64) (err error) { +func (l *Libvirt) DomainMigratePerform(Dom NonnullDomain, Cookie []byte, Uri string, Flags uint64, Dname OptString, Resource uint64) (err error) { var buf bytes.Buffer args := DomainMigratePerformArgs { @@ -5767,7 +5767,7 @@ func (l *Libvirt) ConnectListDefinedStoragePools(Maxnames int32) (rNames []strin return } -func (l *Libvirt) ConnectFindStoragePoolSources(Type string, SrcSpec String, Flags uint32) (rXML string, err error) { +func (l *Libvirt) ConnectFindStoragePoolSources(Type string, SrcSpec OptString, Flags uint32) (rXML string, err error) { var buf bytes.Buffer args := ConnectFindStoragePoolSourcesArgs { @@ -6887,7 +6887,7 @@ func (l *Libvirt) DomainEventLifecycle() (err error) { return } -func (l *Libvirt) DomainMigratePrepare2(UriIn String, Flags uint64, Dname String, Resource uint64, DomXML string) (rCookie []byte, rUriOut String, err error) { +func (l *Libvirt) DomainMigratePrepare2(UriIn OptString, Flags uint64, Dname OptString, Resource uint64, DomXML string) (rCookie []byte, rUriOut OptString, err error) { var buf bytes.Buffer args := DomainMigratePrepare2Args { @@ -6923,7 +6923,7 @@ func (l *Libvirt) DomainMigratePrepare2(UriIn String, Flags uint64, Dname String if err != nil { return } - // UriOut: String + // UriOut: OptString _, err = dec.Decode(&rUriOut) if err != nil { return @@ -6999,7 +6999,7 @@ func (l *Libvirt) ConnectGetUri() (rUri string, err error) { return } -func (l *Libvirt) NodeNumOfDevices(Cap String, Flags uint32) (rNum int32, err error) { +func (l *Libvirt) NodeNumOfDevices(Cap OptString, Flags uint32) (rNum int32, err error) { var buf bytes.Buffer args := NodeNumOfDevicesArgs { @@ -7036,7 +7036,7 @@ func (l *Libvirt) NodeNumOfDevices(Cap String, Flags uint32) (rNum int32, err er return } -func (l *Libvirt) NodeListDevices(Cap String, Maxnames int32, Flags uint32) (rNames []string, err error) { +func (l *Libvirt) NodeListDevices(Cap OptString, Maxnames int32, Flags uint32) (rNames []string, err error) { var buf bytes.Buffer args := NodeListDevicesArgs { @@ -7147,7 +7147,7 @@ func (l *Libvirt) NodeDeviceGetXMLDesc(Name string, Flags uint32) (rXML string, return } -func (l *Libvirt) NodeDeviceGetParent(Name string) (rParent String, err error) { +func (l *Libvirt) NodeDeviceGetParent(Name string) (rParent OptString, err error) { var buf bytes.Buffer args := NodeDeviceGetParentArgs { @@ -7174,7 +7174,7 @@ func (l *Libvirt) NodeDeviceGetParent(Name string) (rParent String, err error) { // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - // Parent: String + // Parent: OptString _, err = dec.Decode(&rParent) if err != nil { return @@ -8247,7 +8247,7 @@ func (l *Libvirt) SecretLookupByUsage(UsageType int32, UsageID string) (rSecret return } -func (l *Libvirt) DomainMigratePrepareTunnel(Flags uint64, Dname String, Resource uint64, DomXML string) (err error) { +func (l *Libvirt) DomainMigratePrepareTunnel(Flags uint64, Dname OptString, Resource uint64, DomXML string) (err error) { var buf bytes.Buffer args := DomainMigratePrepareTunnelArgs { @@ -9989,7 +9989,7 @@ func (l *Libvirt) DomainGetVcpusFlags(Dom NonnullDomain, Flags uint32) (rNum int return } -func (l *Libvirt) DomainOpenConsole(Dom NonnullDomain, DevName String, Flags uint32) (err error) { +func (l *Libvirt) DomainOpenConsole(Dom NonnullDomain, DevName OptString, Flags uint32) (err error) { var buf bytes.Buffer args := DomainOpenConsoleArgs { @@ -10309,7 +10309,7 @@ func (l *Libvirt) DomainInjectNmi(Dom NonnullDomain, Flags uint32) (err error) { return } -func (l *Libvirt) DomainScreenshot(Dom NonnullDomain, Screen uint32, Flags uint32) (rMime String, err error) { +func (l *Libvirt) DomainScreenshot(Dom NonnullDomain, Screen uint32, Flags uint32) (rMime OptString, err error) { var buf bytes.Buffer args := DomainScreenshotArgs { @@ -10338,7 +10338,7 @@ func (l *Libvirt) DomainScreenshot(Dom NonnullDomain, Screen uint32, Flags uint3 // Return value unmarshaling rdr := bytes.NewReader(r.Payload) dec := xdr.NewDecoder(rdr) - // Mime: String + // Mime: OptString _, err = dec.Decode(&rMime) if err != nil { return @@ -10389,7 +10389,7 @@ func (l *Libvirt) DomainGetState(Dom NonnullDomain, Flags uint32) (rState int32, return } -func (l *Libvirt) DomainMigrateBegin3(Dom NonnullDomain, Xmlin String, Flags uint64, Dname String, Resource uint64) (rCookieOut []byte, rXML string, err error) { +func (l *Libvirt) DomainMigrateBegin3(Dom NonnullDomain, Xmlin OptString, Flags uint64, Dname OptString, Resource uint64) (rCookieOut []byte, rXML string, err error) { var buf bytes.Buffer args := DomainMigrateBegin3Args { @@ -10434,7 +10434,7 @@ func (l *Libvirt) DomainMigrateBegin3(Dom NonnullDomain, Xmlin String, Flags uin return } -func (l *Libvirt) DomainMigratePrepare3(CookieIn []byte, UriIn String, Flags uint64, Dname String, Resource uint64, DomXML string) (rCookieOut []byte, rUriOut String, err error) { +func (l *Libvirt) DomainMigratePrepare3(CookieIn []byte, UriIn OptString, Flags uint64, Dname OptString, Resource uint64, DomXML string) (rCookieOut []byte, rUriOut OptString, err error) { var buf bytes.Buffer args := DomainMigratePrepare3Args { @@ -10471,7 +10471,7 @@ func (l *Libvirt) DomainMigratePrepare3(CookieIn []byte, UriIn String, Flags uin if err != nil { return } - // UriOut: String + // UriOut: OptString _, err = dec.Decode(&rUriOut) if err != nil { return @@ -10480,7 +10480,7 @@ func (l *Libvirt) DomainMigratePrepare3(CookieIn []byte, UriIn String, Flags uin return } -func (l *Libvirt) DomainMigratePrepareTunnel3(CookieIn []byte, Flags uint64, Dname String, Resource uint64, DomXML string) (rCookieOut []byte, err error) { +func (l *Libvirt) DomainMigratePrepareTunnel3(CookieIn []byte, Flags uint64, Dname OptString, Resource uint64, DomXML string) (rCookieOut []byte, err error) { var buf bytes.Buffer args := DomainMigratePrepareTunnel3Args { @@ -10520,7 +10520,7 @@ func (l *Libvirt) DomainMigratePrepareTunnel3(CookieIn []byte, Flags uint64, Dna return } -func (l *Libvirt) DomainMigratePerform3(Dom NonnullDomain, Xmlin String, CookieIn []byte, Dconnuri String, Uri String, Flags uint64, Dname String, Resource uint64) (rCookieOut []byte, err error) { +func (l *Libvirt) DomainMigratePerform3(Dom NonnullDomain, Xmlin OptString, CookieIn []byte, Dconnuri OptString, Uri OptString, Flags uint64, Dname OptString, Resource uint64) (rCookieOut []byte, err error) { var buf bytes.Buffer args := DomainMigratePerform3Args { @@ -10563,7 +10563,7 @@ func (l *Libvirt) DomainMigratePerform3(Dom NonnullDomain, Xmlin String, CookieI return } -func (l *Libvirt) DomainMigrateFinish3(Dname string, CookieIn []byte, Dconnuri String, Uri String, Flags uint64, Cancelled int32) (rDom NonnullDomain, rCookieOut []byte, err error) { +func (l *Libvirt) DomainMigrateFinish3(Dname string, CookieIn []byte, Dconnuri OptString, Uri OptString, Flags uint64, Cancelled int32) (rDom NonnullDomain, rCookieOut []byte, err error) { var buf bytes.Buffer args := DomainMigrateFinish3Args { @@ -11072,7 +11072,7 @@ func (l *Libvirt) DomainUndefineFlags(Dom NonnullDomain, Flags uint32) (err erro return } -func (l *Libvirt) DomainSaveFlags(Dom NonnullDomain, To string, Dxml String, Flags uint32) (err error) { +func (l *Libvirt) DomainSaveFlags(Dom NonnullDomain, To string, Dxml OptString, Flags uint32) (err error) { var buf bytes.Buffer args := DomainSaveFlagsArgs { @@ -11102,7 +11102,7 @@ func (l *Libvirt) DomainSaveFlags(Dom NonnullDomain, To string, Dxml String, Fla return } -func (l *Libvirt) DomainRestoreFlags(From string, Dxml String, Flags uint32) (err error) { +func (l *Libvirt) DomainRestoreFlags(From string, Dxml OptString, Flags uint32) (err error) { var buf bytes.Buffer args := DomainRestoreFlagsArgs { @@ -11748,7 +11748,7 @@ func (l *Libvirt) DomainSetBlockIOTune(Dom NonnullDomain, Disk string, Params [] return } -func (l *Libvirt) DomainGetBlockIOTune(Dom NonnullDomain, Disk String, Nparams int32, Flags uint32) (rParams []TypedParam, rNparams int32, err error) { +func (l *Libvirt) DomainGetBlockIOTune(Dom NonnullDomain, Disk OptString, Nparams int32, Flags uint32) (rParams []TypedParam, rNparams int32, err error) { var buf bytes.Buffer args := DomainGetBlockIOTuneArgs { @@ -12146,7 +12146,7 @@ func (l *Libvirt) DomainGetDiskErrors(Dom NonnullDomain, Maxerrors uint32, Flags return } -func (l *Libvirt) DomainSetMetadata(Dom NonnullDomain, Type int32, Metadata String, Key String, Uri String, Flags uint32) (err error) { +func (l *Libvirt) DomainSetMetadata(Dom NonnullDomain, Type int32, Metadata OptString, Key OptString, Uri OptString, Flags uint32) (err error) { var buf bytes.Buffer args := DomainSetMetadataArgs { @@ -12178,7 +12178,7 @@ func (l *Libvirt) DomainSetMetadata(Dom NonnullDomain, Type int32, Metadata Stri return } -func (l *Libvirt) DomainGetMetadata(Dom NonnullDomain, Type int32, Uri String, Flags uint32) (rMetadata string, err error) { +func (l *Libvirt) DomainGetMetadata(Dom NonnullDomain, Type int32, Uri OptString, Flags uint32) (rMetadata string, err error) { var buf bytes.Buffer args := DomainGetMetadataArgs { @@ -12217,7 +12217,7 @@ func (l *Libvirt) DomainGetMetadata(Dom NonnullDomain, Type int32, Uri String, F return } -func (l *Libvirt) DomainBlockRebase(Dom NonnullDomain, Path string, Base String, Bandwidth uint64, Flags uint32) (err error) { +func (l *Libvirt) DomainBlockRebase(Dom NonnullDomain, Path string, Base OptString, Bandwidth uint64, Flags uint32) (err error) { var buf bytes.Buffer args := DomainBlockRebaseArgs { @@ -13066,7 +13066,7 @@ func (l *Libvirt) NodeGetMemoryParameters(Nparams int32, Flags uint32) (rParams return } -func (l *Libvirt) DomainBlockCommit(Dom NonnullDomain, Disk string, Base String, Top String, Bandwidth uint64, Flags uint32) (err error) { +func (l *Libvirt) DomainBlockCommit(Dom NonnullDomain, Disk string, Base OptString, Top OptString, Bandwidth uint64, Flags uint32) (err error) { var buf bytes.Buffer args := DomainBlockCommitArgs { @@ -13196,7 +13196,7 @@ func (l *Libvirt) NodeGetCPUMap(NeedMap int32, NeedOnline int32, Flags uint32) ( return } -func (l *Libvirt) DomainFstrim(Dom NonnullDomain, MountPoint String, Minimum uint64, Flags uint32) (err error) { +func (l *Libvirt) DomainFstrim(Dom NonnullDomain, MountPoint OptString, Minimum uint64, Flags uint32) (err error) { var buf bytes.Buffer args := DomainFstrimArgs { @@ -13256,7 +13256,7 @@ func (l *Libvirt) DomainSendProcessSignal(Dom NonnullDomain, PidValue int64, Sig return } -func (l *Libvirt) DomainOpenChannel(Dom NonnullDomain, Name String, Flags uint32) (err error) { +func (l *Libvirt) DomainOpenChannel(Dom NonnullDomain, Name OptString, Flags uint32) (err error) { var buf bytes.Buffer args := DomainOpenChannelArgs { @@ -13432,7 +13432,7 @@ func (l *Libvirt) DomainMigrateSetCompressionCache(Dom NonnullDomain, CacheSize return } -func (l *Libvirt) NodeDeviceDetachFlags(Name string, DriverName String, Flags uint32) (err error) { +func (l *Libvirt) NodeDeviceDetachFlags(Name string, DriverName OptString, Flags uint32) (err error) { var buf bytes.Buffer args := NodeDeviceDetachFlagsArgs { @@ -13504,7 +13504,7 @@ func (l *Libvirt) DomainMigrateBegin3Params(Dom NonnullDomain, Params []TypedPar return } -func (l *Libvirt) DomainMigratePrepare3Params(Params []TypedParam, CookieIn []byte, Flags uint32) (rCookieOut []byte, rUriOut String, err error) { +func (l *Libvirt) DomainMigratePrepare3Params(Params []TypedParam, CookieIn []byte, Flags uint32) (rCookieOut []byte, rUriOut OptString, err error) { var buf bytes.Buffer args := DomainMigratePrepare3ParamsArgs { @@ -13538,7 +13538,7 @@ func (l *Libvirt) DomainMigratePrepare3Params(Params []TypedParam, CookieIn []by if err != nil { return } - // UriOut: String + // UriOut: OptString _, err = dec.Decode(&rUriOut) if err != nil { return @@ -13585,7 +13585,7 @@ func (l *Libvirt) DomainMigratePrepareTunnel3Params(Params []TypedParam, CookieI return } -func (l *Libvirt) DomainMigratePerform3Params(Dom NonnullDomain, Dconnuri String, Params []TypedParam, CookieIn []byte, Flags uint32) (rCookieOut []byte, err error) { +func (l *Libvirt) DomainMigratePerform3Params(Dom NonnullDomain, Dconnuri OptString, Params []TypedParam, CookieIn []byte, Flags uint32) (rCookieOut []byte, err error) { var buf bytes.Buffer args := DomainMigratePerform3ParamsArgs { @@ -14533,7 +14533,7 @@ func (l *Libvirt) NodeGetFreePages(Pages []uint32, StartCell int32, CellCount ui return } -func (l *Libvirt) NetworkGetDhcpLeases(Net NonnullNetwork, Mac String, NeedResults int32, Flags uint32) (rLeases []NetworkDhcpLease, rRet uint32, err error) { +func (l *Libvirt) NetworkGetDhcpLeases(Net NonnullNetwork, Mac OptString, NeedResults int32, Flags uint32) (rLeases []NetworkDhcpLease, rRet uint32, err error) { var buf bytes.Buffer args := NetworkGetDhcpLeasesArgs { @@ -14577,7 +14577,7 @@ func (l *Libvirt) NetworkGetDhcpLeases(Net NonnullNetwork, Mac String, NeedResul return } -func (l *Libvirt) ConnectGetDomainCapabilities(Emulatorbin String, Arch String, Machine String, Virttype String, Flags uint32) (rCapabilities string, err error) { +func (l *Libvirt) ConnectGetDomainCapabilities(Emulatorbin OptString, Arch OptString, Machine OptString, Virttype OptString, Flags uint32) (rCapabilities string, err error) { var buf bytes.Buffer args := ConnectGetDomainCapabilitiesArgs { @@ -15056,7 +15056,7 @@ func (l *Libvirt) DomainDelIothread(Dom NonnullDomain, IothreadID uint32, Flags return } -func (l *Libvirt) DomainSetUserPassword(Dom NonnullDomain, User String, Password String, Flags uint32) (err error) { +func (l *Libvirt) DomainSetUserPassword(Dom NonnullDomain, User OptString, Password OptString, Flags uint32) (err error) { var buf bytes.Buffer args := DomainSetUserPasswordArgs { @@ -15086,7 +15086,7 @@ func (l *Libvirt) DomainSetUserPassword(Dom NonnullDomain, User String, Password return } -func (l *Libvirt) DomainRename(Dom NonnullDomain, NewName String, Flags uint32) (rRetcode int32, err error) { +func (l *Libvirt) DomainRename(Dom NonnullDomain, NewName OptString, Flags uint32) (rRetcode int32, err error) { var buf bytes.Buffer args := DomainRenameArgs { @@ -15912,7 +15912,7 @@ func (l *Libvirt) DomainManagedSaveGetXMLDesc(Dom NonnullDomain, Flags uint32) ( return } -func (l *Libvirt) DomainManagedSaveDefineXML(Dom NonnullDomain, Dxml String, Flags uint32) (err error) { +func (l *Libvirt) DomainManagedSaveDefineXML(Dom NonnullDomain, Dxml OptString, Flags uint32) (err error) { var buf bytes.Buffer args := DomainManagedSaveDefineXMLArgs { From f0eaf10a262f6c95011cd362d67559827e95149e Mon Sep 17 00:00:00 2001 From: Geoff Hickey Date: Thu, 16 Nov 2017 15:49:40 -0500 Subject: [PATCH 09/20] Review comments --- internal/lvgen/constants.tmpl | 4 +- internal/lvgen/gen/main.go | 4 +- internal/lvgen/lv-gen.go | 9 ++-- internal/lvgen/lvlexer.go | 1 - libvirt.go | 82 ----------------------------------- 5 files changed, 8 insertions(+), 92 deletions(-) diff --git a/internal/lvgen/constants.tmpl b/internal/lvgen/constants.tmpl index 3d7425f..6677409 100644 --- a/internal/lvgen/constants.tmpl +++ b/internal/lvgen/constants.tmpl @@ -4,10 +4,10 @@ * To regenerate, run 'go generate' in internal/lvgen. */ +// Package constants contains libvirt procedure identifiers and other enums and +// constants. package constants -// libvirt procedure identifiers and other enums -// // These are libvirt procedure numbers which correspond to each respective // API call between remote_internal driver and libvirtd. Each procedure is // identified by a unique number which *may change in any future libvirt diff --git a/internal/lvgen/gen/main.go b/internal/lvgen/gen/main.go index c36a6d4..c91910b 100644 --- a/internal/lvgen/gen/main.go +++ b/internal/lvgen/gen/main.go @@ -17,7 +17,7 @@ package main import ( "fmt" "os" - "path" + "path/filepath" "github.com/digitalocean/go-libvirt/internal/lvgen" ) @@ -30,7 +30,7 @@ func main() { fmt.Println("set $LIBVIRT_SOURCE to point to the root of the libvirt sources and retry") os.Exit(1) } - lvFile := path.Join(lvPath, protoPath) + lvFile := filepath.Join(lvPath, protoPath) rdr, err := os.Open(lvFile) if err != nil { fmt.Printf("failed to open protocol file at %v: %v\n", lvFile, err) diff --git a/internal/lvgen/lv-gen.go b/internal/lvgen/lv-gen.go index c622f74..5b8af82 100644 --- a/internal/lvgen/lv-gen.go +++ b/internal/lvgen/lv-gen.go @@ -1,9 +1,8 @@ -package lvgen - -// This file contains the instructions for regenerating the libvirt bindings. -// We do this by parsing the remote_protocol.x file included in the libvirt -// sources. Bindings will be generated if you run `go generate` in this +// Package lvgen contains the instructions for regenerating the libvirt +// bindings. We do this by parsing the remote_protocol.x file included in the +// libvirt sources. Bindings will be generated if you run `go generate` in this // directory. +package lvgen // Before running `go generate`: // 1) Make sure goyacc is installed from golang.org/x/tools (you can use this diff --git a/internal/lvgen/lvlexer.go b/internal/lvgen/lvlexer.go index 06341a2..40dcbed 100644 --- a/internal/lvgen/lvlexer.go +++ b/internal/lvgen/lvlexer.go @@ -124,7 +124,6 @@ func (l *Lexer) Lex(st *yySymType) int { s := <-l.items l.lastItem = s st.val = s.val - // fmt.Println("Lex returning", s) return int(s.typ) } diff --git a/libvirt.go b/libvirt.go index 280a2a7..37c6546 100644 --- a/libvirt.go +++ b/libvirt.go @@ -96,88 +96,6 @@ const ( FlagTypedParamStringOkay ) -// Consts relating to TypedParams: -const ( - // TypeParamInt is a C int. - TypeParamInt = iota + 1 - // TypeParamUInt is a C unsigned int. - TypeParamUInt - // TypeParamLLong is a C long long int. - TypeParamLLong - // TypeParamULLong is a C unsigned long long int. - TypeParamULLong - // TypeParamDouble is a C double. - TypeParamDouble - // TypeParamBoolean is a C char. - TypeParamBoolean - // TypeParamString is a C char*. - TypeParamString - - // TypeParamLast is just an end-of-enum marker. - TypeParamLast -) - -// TypedParamULongLong contains a 64-bit unsigned integer. -type TypedParamULongLong struct { - Fld string - PType int32 - Val uint64 -} - -// Field returns the field name, a string name for the parameter. -func (tp *TypedParamULongLong) Field() string { - return tp.Fld -} - -// Value returns the value for the typed parameter, as an empty interface. -func (tp *TypedParamULongLong) Value() interface{} { - return tp.Val -} - -// NewTypedParamULongLong returns a TypedParam encoding for an unsigned long long. -func NewTypedParamULongLong(name string, v uint64) *TypedParamULongLong { - // Truncate the field name if it's longer than the limit. - if len(name) > constants.TypedParamFieldLength { - name = name[:constants.TypedParamFieldLength] - } - tp := TypedParamULongLong{ - Fld: name, - PType: TypeParamULLong, - Val: v, - } - return &tp -} - -// TypedParamString contains a string parameter. -type TypedParamString struct { - Fld string - PType int - Val string -} - -// Field returns the field name, a string name for the parameter. -func (tp *TypedParamString) Field() string { - return tp.Fld -} - -// Value returns the value for the typed parameter, as an empty interface. -func (tp *TypedParamString) Value() interface{} { - return tp.Val -} - -// NewTypedParamString returns a typed parameter containing the passed string. -// func NewTypedParamString(name string, v string) TypedParam { -// if len(name) > constants.TypedParamFieldLength { -// name = name[:constants.TypedParamFieldLength] -// } -// tp := TypedParamString{ -// Fld: name, -// PType: TypeParamString, -// Val: v, -// } -// return &tp -// } - const ( // DomainXMLFlagSecure dumps XML with sensitive information included. DomainXMLFlagSecure DomainXMLFlags = 1 << iota From 4ec9ce0aea03a5a2d9d9067551988170c4fd2253 Mon Sep 17 00:00:00 2001 From: Geoff Hickey Date: Thu, 16 Nov 2017 15:56:36 -0500 Subject: [PATCH 10/20] git add parser output files in lvgen --- internal/lvgen/.gitignore | 4 - internal/lvgen/y.go | 747 +++++++++++++++++++++++ internal/lvgen/y.output | 1195 +++++++++++++++++++++++++++++++++++++ 3 files changed, 1942 insertions(+), 4 deletions(-) delete mode 100644 internal/lvgen/.gitignore create mode 100644 internal/lvgen/y.go create mode 100644 internal/lvgen/y.output diff --git a/internal/lvgen/.gitignore b/internal/lvgen/.gitignore deleted file mode 100644 index a12bedf..0000000 --- a/internal/lvgen/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -# Ignore the yacc intermediate files. -y.go -y.output - diff --git a/internal/lvgen/y.go b/internal/lvgen/y.go new file mode 100644 index 0000000..4554414 --- /dev/null +++ b/internal/lvgen/y.go @@ -0,0 +1,747 @@ +//line sunrpc.y:2 +package lvgen + +import __yyfmt__ "fmt" + +//line sunrpc.y:3 +import ( +//"fmt" +) + +//line sunrpc.y:12 +type yySymType struct { + yys int + val string +} + +const BOOL = 57346 +const CASE = 57347 +const CONST = 57348 +const DEFAULT = 57349 +const DOUBLE = 57350 +const ENUM = 57351 +const FLOAT = 57352 +const OPAQUE = 57353 +const STRING = 57354 +const STRUCT = 57355 +const SWITCH = 57356 +const TYPEDEF = 57357 +const UNION = 57358 +const UNSIGNED = 57359 +const VOID = 57360 +const HYPER = 57361 +const INT = 57362 +const SHORT = 57363 +const CHAR = 57364 +const IDENTIFIER = 57365 +const CONSTANT = 57366 +const ERROR = 57367 +const PROGRAM = 57368 +const VERSION = 57369 + +var yyToknames = [...]string{ + "$end", + "error", + "$unk", + "BOOL", + "CASE", + "CONST", + "DEFAULT", + "DOUBLE", + "ENUM", + "FLOAT", + "OPAQUE", + "STRING", + "STRUCT", + "SWITCH", + "TYPEDEF", + "UNION", + "UNSIGNED", + "VOID", + "HYPER", + "INT", + "SHORT", + "CHAR", + "IDENTIFIER", + "CONSTANT", + "ERROR", + "PROGRAM", + "VERSION", + "';'", + "'{'", + "'}'", + "','", + "'='", + "'['", + "']'", + "'<'", + "'>'", + "'*'", + "'('", + "')'", + "':'", +} +var yyStatenames = [...]string{} + +const yyEofCode = 1 +const yyErrCode = 2 +const yyInitialStackSize = 16 + +//line sunrpc.y:222 + +//line yacctab:1 +var yyExca = [...]int{ + -1, 1, + 1, -1, + -2, 0, +} + +const yyPrivate = 57344 + +const yyLast = 148 + +var yyAct = [...]int{ + + 84, 77, 36, 111, 103, 76, 61, 67, 32, 129, + 55, 126, 128, 100, 37, 117, 85, 86, 78, 63, + 98, 97, 73, 31, 74, 69, 131, 115, 71, 89, + 41, 94, 72, 62, 40, 10, 39, 43, 42, 13, + 30, 118, 14, 38, 107, 48, 49, 50, 51, 47, + 90, 11, 79, 64, 10, 70, 106, 96, 13, 54, + 12, 14, 52, 29, 134, 127, 119, 108, 91, 75, + 80, 15, 16, 110, 87, 88, 85, 86, 59, 60, + 63, 93, 83, 48, 49, 50, 51, 92, 95, 58, + 82, 27, 25, 23, 20, 102, 18, 99, 2, 105, + 101, 46, 8, 66, 45, 7, 109, 44, 4, 104, + 113, 105, 114, 116, 120, 28, 122, 81, 8, 68, + 123, 7, 26, 124, 4, 121, 125, 112, 130, 53, + 24, 132, 133, 65, 22, 35, 34, 33, 21, 19, + 57, 56, 17, 9, 6, 5, 3, 1, +} +var yyPact = [...]int{ + + 45, -1000, -1000, 44, -1000, -1000, -1000, -1000, -1000, -1000, + 73, 71, -1000, 70, 69, 68, 45, 34, -1000, 8, + -1000, 26, 33, -1000, -1000, -1000, 30, -1000, -1000, 66, + 55, -1000, -1000, -1000, -1000, -1000, -4, -1000, 64, -1000, + -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, + -1000, -1000, -1000, 89, -2, 25, -3, 0, -1000, -1000, + -1000, -11, 57, -1000, -1000, 26, -20, 22, 42, 67, + -1000, 66, 53, 53, -7, -1000, 20, 40, 26, -1, + -2, 28, -1000, -1000, -1000, -1000, -1000, -13, -16, -1000, + -1000, 26, -26, 57, 53, -1000, 26, -1000, -1000, -1000, + 27, -1000, -1000, 14, 39, 50, 105, -5, 26, -23, + -1000, 11, 38, 53, -1000, 53, -1000, 26, -1000, 105, + -1000, -29, 37, -27, -1000, -31, 26, -1000, -6, 26, + -1000, 53, -1000, 36, -1000, +} +var yyPgo = [...]int{ + + 0, 147, 98, 0, 146, 107, 145, 144, 104, 101, + 143, 142, 10, 141, 140, 139, 138, 1, 8, 137, + 136, 135, 2, 6, 14, 134, 133, 5, 130, 129, + 3, 127, 126, 125, 122, 7, 119, 117, 4, 109, + 106, +} +var yyR1 = [...]int{ + + 0, 1, 3, 3, 2, 2, 4, 4, 4, 4, + 4, 4, 5, 12, 12, 13, 13, 11, 14, 6, + 6, 15, 16, 7, 17, 17, 17, 17, 18, 22, + 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, + 24, 24, 24, 24, 23, 19, 20, 20, 21, 26, + 8, 25, 27, 27, 29, 9, 28, 30, 30, 32, + 31, 33, 31, 10, 34, 35, 35, 36, 37, 38, + 38, 39, 40, +} +var yyR2 = [...]int{ + + 0, 1, 1, 1, 2, 3, 1, 1, 1, 1, + 1, 1, 5, 1, 3, 1, 3, 1, 1, 4, + 4, 1, 0, 3, 1, 1, 1, 1, 2, 1, + 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 5, 5, 4, 3, 0, + 6, 1, 2, 3, 0, 10, 1, 2, 3, 0, + 5, 0, 4, 7, 1, 2, 3, 8, 1, 2, + 3, 8, 1, +} +var yyChk = [...]int{ + + -1000, -1, -2, -4, -5, -6, -7, -8, -9, -10, + 9, 6, 15, 13, 16, 26, 28, -11, 23, -15, + 23, -16, -25, 23, -28, 23, -34, 23, -2, 29, + 32, -17, -18, -19, -20, -21, -22, -24, 17, 10, + 8, 4, 12, 11, -5, -8, -9, 23, 19, 20, + 21, 22, 29, -29, 29, -12, -13, -14, 23, 23, + 24, -23, 37, 23, -24, -26, 14, -35, -36, 27, + 30, 31, 32, 33, 35, -23, -27, -17, 38, 30, + 28, -37, 23, -12, -3, 23, 24, -3, -3, 36, + 30, 28, -18, -22, 32, -35, 29, 34, 36, -27, + 39, -23, -3, -38, -39, -22, 29, 30, 28, -40, + 23, -30, -31, 5, 7, 32, -38, 38, 30, 28, + -3, -33, -3, -22, -30, -32, 40, 28, 39, 40, + -17, 32, -17, -3, 28, +} +var yyDef = [...]int{ + + 0, -2, 1, 0, 6, 7, 8, 9, 10, 11, + 0, 0, 22, 0, 0, 0, 4, 0, 17, 0, + 21, 0, 0, 51, 54, 56, 0, 64, 5, 0, + 0, 23, 24, 25, 26, 27, 0, 29, 0, 31, + 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, + 42, 43, 49, 0, 0, 0, 13, 15, 18, 19, + 20, 28, 0, 44, 30, 0, 0, 0, 0, 0, + 12, 0, 0, 0, 0, 48, 0, 0, 0, 0, + 65, 0, 68, 14, 16, 2, 3, 0, 0, 47, + 50, 52, 0, 0, 0, 66, 0, 45, 46, 53, + 0, 28, 63, 0, 0, 0, 0, 0, 69, 0, + 72, 0, 0, 0, 61, 0, 70, 0, 55, 57, + 59, 0, 0, 0, 58, 0, 0, 67, 0, 0, + 62, 0, 60, 0, 71, +} +var yyTok1 = [...]int{ + + 1, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 38, 39, 37, 3, 31, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 40, 28, + 35, 32, 36, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 33, 3, 34, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 29, 3, 30, +} +var yyTok2 = [...]int{ + + 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, + 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, + 22, 23, 24, 25, 26, 27, +} +var yyTok3 = [...]int{ + 0, +} + +var yyErrorMessages = [...]struct { + state int + token int + msg string +}{} + +//line yaccpar:1 + +/* parser for yacc output */ + +var ( + yyDebug = 0 + yyErrorVerbose = false +) + +type yyLexer interface { + Lex(lval *yySymType) int + Error(s string) +} + +type yyParser interface { + Parse(yyLexer) int + Lookahead() int +} + +type yyParserImpl struct { + lval yySymType + stack [yyInitialStackSize]yySymType + char int +} + +func (p *yyParserImpl) Lookahead() int { + return p.char +} + +func yyNewParser() yyParser { + return &yyParserImpl{} +} + +const yyFlag = -1000 + +func yyTokname(c int) string { + if c >= 1 && c-1 < len(yyToknames) { + if yyToknames[c-1] != "" { + return yyToknames[c-1] + } + } + return __yyfmt__.Sprintf("tok-%v", c) +} + +func yyStatname(s int) string { + if s >= 0 && s < len(yyStatenames) { + if yyStatenames[s] != "" { + return yyStatenames[s] + } + } + return __yyfmt__.Sprintf("state-%v", s) +} + +func yyErrorMessage(state, lookAhead int) string { + const TOKSTART = 4 + + if !yyErrorVerbose { + return "syntax error" + } + + for _, e := range yyErrorMessages { + if e.state == state && e.token == lookAhead { + return "syntax error: " + e.msg + } + } + + res := "syntax error: unexpected " + yyTokname(lookAhead) + + // To match Bison, suggest at most four expected tokens. + expected := make([]int, 0, 4) + + // Look for shiftable tokens. + base := yyPact[state] + for tok := TOKSTART; tok-1 < len(yyToknames); tok++ { + if n := base + tok; n >= 0 && n < yyLast && yyChk[yyAct[n]] == tok { + if len(expected) == cap(expected) { + return res + } + expected = append(expected, tok) + } + } + + if yyDef[state] == -2 { + i := 0 + for yyExca[i] != -1 || yyExca[i+1] != state { + i += 2 + } + + // Look for tokens that we accept or reduce. + for i += 2; yyExca[i] >= 0; i += 2 { + tok := yyExca[i] + if tok < TOKSTART || yyExca[i+1] == 0 { + continue + } + if len(expected) == cap(expected) { + return res + } + expected = append(expected, tok) + } + + // If the default action is to accept or reduce, give up. + if yyExca[i+1] != 0 { + return res + } + } + + for i, tok := range expected { + if i == 0 { + res += ", expecting " + } else { + res += " or " + } + res += yyTokname(tok) + } + return res +} + +func yylex1(lex yyLexer, lval *yySymType) (char, token int) { + token = 0 + char = lex.Lex(lval) + if char <= 0 { + token = yyTok1[0] + goto out + } + if char < len(yyTok1) { + token = yyTok1[char] + goto out + } + if char >= yyPrivate { + if char < yyPrivate+len(yyTok2) { + token = yyTok2[char-yyPrivate] + goto out + } + } + for i := 0; i < len(yyTok3); i += 2 { + token = yyTok3[i+0] + if token == char { + token = yyTok3[i+1] + goto out + } + } + +out: + if token == 0 { + token = yyTok2[1] /* unknown char */ + } + if yyDebug >= 3 { + __yyfmt__.Printf("lex %s(%d)\n", yyTokname(token), uint(char)) + } + return char, token +} + +func yyParse(yylex yyLexer) int { + return yyNewParser().Parse(yylex) +} + +func (yyrcvr *yyParserImpl) Parse(yylex yyLexer) int { + var yyn int + var yyVAL yySymType + var yyDollar []yySymType + _ = yyDollar // silence set and not used + yyS := yyrcvr.stack[:] + + Nerrs := 0 /* number of errors */ + Errflag := 0 /* error recovery flag */ + yystate := 0 + yyrcvr.char = -1 + yytoken := -1 // yyrcvr.char translated into internal numbering + defer func() { + // Make sure we report no lookahead when not parsing. + yystate = -1 + yyrcvr.char = -1 + yytoken = -1 + }() + yyp := -1 + goto yystack + +ret0: + return 0 + +ret1: + return 1 + +yystack: + /* put a state and value onto the stack */ + if yyDebug >= 4 { + __yyfmt__.Printf("char %v in %v\n", yyTokname(yytoken), yyStatname(yystate)) + } + + yyp++ + if yyp >= len(yyS) { + nyys := make([]yySymType, len(yyS)*2) + copy(nyys, yyS) + yyS = nyys + } + yyS[yyp] = yyVAL + yyS[yyp].yys = yystate + +yynewstate: + yyn = yyPact[yystate] + if yyn <= yyFlag { + goto yydefault /* simple state */ + } + if yyrcvr.char < 0 { + yyrcvr.char, yytoken = yylex1(yylex, &yyrcvr.lval) + } + yyn += yytoken + if yyn < 0 || yyn >= yyLast { + goto yydefault + } + yyn = yyAct[yyn] + if yyChk[yyn] == yytoken { /* valid shift */ + yyrcvr.char = -1 + yytoken = -1 + yyVAL = yyrcvr.lval + yystate = yyn + if Errflag > 0 { + Errflag-- + } + goto yystack + } + +yydefault: + /* default state action */ + yyn = yyDef[yystate] + if yyn == -2 { + if yyrcvr.char < 0 { + yyrcvr.char, yytoken = yylex1(yylex, &yyrcvr.lval) + } + + /* look through exception table */ + xi := 0 + for { + if yyExca[xi+0] == -1 && yyExca[xi+1] == yystate { + break + } + xi += 2 + } + for xi += 2; ; xi += 2 { + yyn = yyExca[xi+0] + if yyn < 0 || yyn == yytoken { + break + } + } + yyn = yyExca[xi+1] + if yyn < 0 { + goto ret0 + } + } + if yyn == 0 { + /* error ... attempt to resume parsing */ + switch Errflag { + case 0: /* brand new error */ + yylex.Error(yyErrorMessage(yystate, yytoken)) + Nerrs++ + if yyDebug >= 1 { + __yyfmt__.Printf("%s", yyStatname(yystate)) + __yyfmt__.Printf(" saw %s\n", yyTokname(yytoken)) + } + fallthrough + + case 1, 2: /* incompletely recovered error ... try again */ + Errflag = 3 + + /* find a state where "error" is a legal shift action */ + for yyp >= 0 { + yyn = yyPact[yyS[yyp].yys] + yyErrCode + if yyn >= 0 && yyn < yyLast { + yystate = yyAct[yyn] /* simulate a shift of "error" */ + if yyChk[yystate] == yyErrCode { + goto yystack + } + } + + /* the current p has no shift on "error", pop stack */ + if yyDebug >= 2 { + __yyfmt__.Printf("error recovery pops state %d\n", yyS[yyp].yys) + } + yyp-- + } + /* there is no state on the stack with an error shift ... abort */ + goto ret1 + + case 3: /* no shift yet; clobber input char */ + if yyDebug >= 2 { + __yyfmt__.Printf("error recovery discards %s\n", yyTokname(yytoken)) + } + if yytoken == yyEofCode { + goto ret1 + } + yyrcvr.char = -1 + yytoken = -1 + goto yynewstate /* try again in the same state */ + } + } + + /* reduction by production yyn */ + if yyDebug >= 2 { + __yyfmt__.Printf("reduce %v in:\n\t%v\n", yyn, yyStatname(yystate)) + } + + yynt := yyn + yypt := yyp + _ = yypt // guard against "declared and not used" + + yyp -= yyR2[yyn] + // yyp is now the index of $0. Perform the default action. Iff the + // reduced production is ε, $1 is possibly out of range. + if yyp+1 >= len(yyS) { + nyys := make([]yySymType, len(yyS)*2) + copy(nyys, yyS) + yyS = nyys + } + yyVAL = yyS[yyp+1] + + /* consult goto table to find next state */ + yyn = yyR1[yyn] + yyg := yyPgo[yyn] + yyj := yyg + yyS[yyp].yys + 1 + + if yyj >= yyLast { + yystate = yyAct[yyg] + } else { + yystate = yyAct[yyj] + if yyChk[yystate] != -yyn { + yystate = yyAct[yyg] + } + } + // dummy call; replaced with literal code + switch yynt { + + case 12: + yyDollar = yyS[yypt-5 : yypt+1] + //line sunrpc.y:49 + { + StartEnum(yyDollar[2].val) + } + case 15: + yyDollar = yyS[yypt-1 : yypt+1] + //line sunrpc.y:58 + { + err := AddEnumAutoVal(yyDollar[1].val) + if err != nil { + yylex.Error(err.Error()) + return 1 + } + } + case 16: + yyDollar = yyS[yypt-3 : yypt+1] + //line sunrpc.y:65 + { + err := AddEnumVal(yyDollar[1].val, yyDollar[3].val) + if err != nil { + yylex.Error(err.Error()) + return 1 + } + } + case 20: + yyDollar = yyS[yypt-4 : yypt+1] + //line sunrpc.y:87 + { + err := AddConst(yyDollar[2].val, yyDollar[4].val) + if err != nil { + yylex.Error(err.Error()) + return 1 + } + } + case 22: + yyDollar = yyS[yypt-1 : yypt+1] + //line sunrpc.y:101 + { + StartTypedef() + } + case 28: + yyDollar = yyS[yypt-2 : yypt+1] + //line sunrpc.y:112 + { + AddDeclaration(yyDollar[2].val, yyDollar[1].val) + } + case 30: + yyDollar = yyS[yypt-2 : yypt+1] + //line sunrpc.y:117 + { + yyVAL.val = "u" + yyDollar[2].val + } + case 31: + yyDollar = yyS[yypt-1 : yypt+1] + //line sunrpc.y:118 + { + yyVAL.val = "float32" + } + case 32: + yyDollar = yyS[yypt-1 : yypt+1] + //line sunrpc.y:119 + { + yyVAL.val = "float64" + } + case 33: + yyDollar = yyS[yypt-1 : yypt+1] + //line sunrpc.y:120 + { + yyVAL.val = "bool" + } + case 34: + yyDollar = yyS[yypt-1 : yypt+1] + //line sunrpc.y:121 + { + yyVAL.val = "string" + } + case 35: + yyDollar = yyS[yypt-1 : yypt+1] + //line sunrpc.y:122 + { + yyVAL.val = "byte" + } + case 40: + yyDollar = yyS[yypt-1 : yypt+1] + //line sunrpc.y:130 + { + yyVAL.val = "int64" + } + case 41: + yyDollar = yyS[yypt-1 : yypt+1] + //line sunrpc.y:131 + { + yyVAL.val = "int32" + } + case 42: + yyDollar = yyS[yypt-1 : yypt+1] + //line sunrpc.y:132 + { + yyVAL.val = "int16" + } + case 43: + yyDollar = yyS[yypt-1 : yypt+1] + //line sunrpc.y:133 + { + yyVAL.val = "int8" + } + case 45: + yyDollar = yyS[yypt-5 : yypt+1] + //line sunrpc.y:141 + { + AddFixedArray(yyDollar[2].val, yyDollar[1].val, yyDollar[4].val) + } + case 46: + yyDollar = yyS[yypt-5 : yypt+1] + //line sunrpc.y:145 + { + AddVariableArray(yyDollar[2].val, yyDollar[1].val, yyDollar[4].val) + } + case 47: + yyDollar = yyS[yypt-4 : yypt+1] + //line sunrpc.y:146 + { + AddVariableArray(yyDollar[2].val, yyDollar[1].val, "") + } + case 48: + yyDollar = yyS[yypt-3 : yypt+1] + //line sunrpc.y:154 + { + AddVariableArray(yyDollar[3].val, yyDollar[1].val, "1") + } + case 49: + yyDollar = yyS[yypt-3 : yypt+1] + //line sunrpc.y:158 + { + StartStruct(yyDollar[2].val) + } + case 50: + yyDollar = yyS[yypt-6 : yypt+1] + //line sunrpc.y:158 + { + AddStruct() + } + case 54: + yyDollar = yyS[yypt-2 : yypt+1] + //line sunrpc.y:171 + { + StartUnion(yyDollar[2].val) + } + case 55: + yyDollar = yyS[yypt-10 : yypt+1] + //line sunrpc.y:171 + { + AddUnion() + } + case 59: + yyDollar = yyS[yypt-2 : yypt+1] + //line sunrpc.y:184 + { + StartCase(yyDollar[2].val) + } + case 60: + yyDollar = yyS[yypt-5 : yypt+1] + //line sunrpc.y:184 + { + AddCase() + } + case 61: + yyDollar = yyS[yypt-1 : yypt+1] + //line sunrpc.y:185 + { + StartCase("default") + } + case 62: + yyDollar = yyS[yypt-4 : yypt+1] + //line sunrpc.y:185 + { + AddCase() + } + } + goto yystack /* stack new state and value */ +} diff --git a/internal/lvgen/y.output b/internal/lvgen/y.output new file mode 100644 index 0000000..45552f6 --- /dev/null +++ b/internal/lvgen/y.output @@ -0,0 +1,1195 @@ + +state 0 + $accept: .specification $end + + CONST shift 11 + ENUM shift 10 + STRUCT shift 13 + TYPEDEF shift 12 + UNION shift 14 + PROGRAM shift 15 + . error + + specification goto 1 + definition_list goto 2 + definition goto 3 + enum_definition goto 4 + const_definition goto 5 + typedef_definition goto 6 + struct_definition goto 7 + union_definition goto 8 + program_definition goto 9 + +state 1 + $accept: specification.$end + + $end accept + . error + + +state 2 + specification: definition_list. (1) + + . reduce 1 (src line 25) + + +state 3 + definition_list: definition.';' + definition_list: definition.';' definition_list + + ';' shift 16 + . error + + +state 4 + definition: enum_definition. (6) + + . reduce 6 (src line 39) + + +state 5 + definition: const_definition. (7) + + . reduce 7 (src line 41) + + +state 6 + definition: typedef_definition. (8) + + . reduce 8 (src line 42) + + +state 7 + definition: struct_definition. (9) + + . reduce 9 (src line 43) + + +state 8 + definition: union_definition. (10) + + . reduce 10 (src line 44) + + +state 9 + definition: program_definition. (11) + + . reduce 11 (src line 45) + + +state 10 + enum_definition: ENUM.enum_ident '{' enum_value_list '}' + + IDENTIFIER shift 18 + . error + + enum_ident goto 17 + +state 11 + const_definition: CONST.const_ident '=' IDENTIFIER + const_definition: CONST.const_ident '=' CONSTANT + + IDENTIFIER shift 20 + . error + + const_ident goto 19 + +state 12 + typedef_definition: TYPEDEF.$$22 declaration + $$22: . (22) + + . reduce 22 (src line 100) + + $$22 goto 21 + +state 13 + struct_definition: STRUCT.struct_ident '{' $$49 declaration_list '}' + + IDENTIFIER shift 23 + . error + + struct_ident goto 22 + +state 14 + union_definition: UNION.union_ident $$54 SWITCH '(' simple_declaration ')' '{' case_list '}' + + IDENTIFIER shift 25 + . error + + union_ident goto 24 + +state 15 + program_definition: PROGRAM.program_ident '{' version_list '}' '=' value + + IDENTIFIER shift 27 + . error + + program_ident goto 26 + +state 16 + definition_list: definition ';'. (4) + definition_list: definition ';'.definition_list + + CONST shift 11 + ENUM shift 10 + STRUCT shift 13 + TYPEDEF shift 12 + UNION shift 14 + PROGRAM shift 15 + . reduce 4 (src line 34) + + definition_list goto 28 + definition goto 3 + enum_definition goto 4 + const_definition goto 5 + typedef_definition goto 6 + struct_definition goto 7 + union_definition goto 8 + program_definition goto 9 + +state 17 + enum_definition: ENUM enum_ident.'{' enum_value_list '}' + + '{' shift 29 + . error + + +state 18 + enum_ident: IDENTIFIER. (17) + + . reduce 17 (src line 74) + + +state 19 + const_definition: CONST const_ident.'=' IDENTIFIER + const_definition: CONST const_ident.'=' CONSTANT + + '=' shift 30 + . error + + +state 20 + const_ident: IDENTIFIER. (21) + + . reduce 21 (src line 96) + + +state 21 + typedef_definition: TYPEDEF $$22.declaration + + BOOL shift 41 + DOUBLE shift 40 + ENUM shift 10 + FLOAT shift 39 + OPAQUE shift 43 + STRING shift 42 + STRUCT shift 13 + UNION shift 14 + UNSIGNED shift 38 + HYPER shift 48 + INT shift 49 + SHORT shift 50 + CHAR shift 51 + IDENTIFIER shift 47 + . error + + enum_definition goto 44 + struct_definition goto 45 + union_definition goto 46 + declaration goto 31 + simple_declaration goto 32 + fixed_array_declaration goto 33 + variable_array_declaration goto 34 + pointer_declaration goto 35 + type_specifier goto 36 + int_spec goto 37 + +state 22 + struct_definition: STRUCT struct_ident.'{' $$49 declaration_list '}' + + '{' shift 52 + . error + + +state 23 + struct_ident: IDENTIFIER. (51) + + . reduce 51 (src line 161) + + +state 24 + union_definition: UNION union_ident.$$54 SWITCH '(' simple_declaration ')' '{' case_list '}' + $$54: . (54) + + . reduce 54 (src line 170) + + $$54 goto 53 + +state 25 + union_ident: IDENTIFIER. (56) + + . reduce 56 (src line 174) + + +state 26 + program_definition: PROGRAM program_ident.'{' version_list '}' '=' value + + '{' shift 54 + . error + + +state 27 + program_ident: IDENTIFIER. (64) + + . reduce 64 (src line 192) + + +state 28 + definition_list: definition ';' definition_list. (5) + + . reduce 5 (src line 36) + + +state 29 + enum_definition: ENUM enum_ident '{'.enum_value_list '}' + + IDENTIFIER shift 58 + . error + + enum_value_list goto 55 + enum_value goto 56 + enum_value_ident goto 57 + +state 30 + const_definition: CONST const_ident '='.IDENTIFIER + const_definition: CONST const_ident '='.CONSTANT + + IDENTIFIER shift 59 + CONSTANT shift 60 + . error + + +state 31 + typedef_definition: TYPEDEF $$22 declaration. (23) + + . reduce 23 (src line 101) + + +state 32 + declaration: simple_declaration. (24) + + . reduce 24 (src line 104) + + +state 33 + declaration: fixed_array_declaration. (25) + + . reduce 25 (src line 106) + + +state 34 + declaration: variable_array_declaration. (26) + + . reduce 26 (src line 107) + + +state 35 + declaration: pointer_declaration. (27) + + . reduce 27 (src line 108) + + +state 36 + simple_declaration: type_specifier.variable_ident + fixed_array_declaration: type_specifier.variable_ident '[' value ']' + variable_array_declaration: type_specifier.variable_ident '<' value '>' + variable_array_declaration: type_specifier.variable_ident '<' '>' + pointer_declaration: type_specifier.'*' variable_ident + + IDENTIFIER shift 63 + '*' shift 62 + . error + + variable_ident goto 61 + +state 37 + type_specifier: int_spec. (29) + + . reduce 29 (src line 115) + + +state 38 + type_specifier: UNSIGNED.int_spec + + HYPER shift 48 + INT shift 49 + SHORT shift 50 + CHAR shift 51 + . error + + int_spec goto 64 + +state 39 + type_specifier: FLOAT. (31) + + . reduce 31 (src line 118) + + +state 40 + type_specifier: DOUBLE. (32) + + . reduce 32 (src line 119) + + +state 41 + type_specifier: BOOL. (33) + + . reduce 33 (src line 120) + + +state 42 + type_specifier: STRING. (34) + + . reduce 34 (src line 121) + + +state 43 + type_specifier: OPAQUE. (35) + + . reduce 35 (src line 122) + + +state 44 + type_specifier: enum_definition. (36) + + . reduce 36 (src line 123) + + +state 45 + type_specifier: struct_definition. (37) + + . reduce 37 (src line 124) + + +state 46 + type_specifier: union_definition. (38) + + . reduce 38 (src line 125) + + +state 47 + type_specifier: IDENTIFIER. (39) + + . reduce 39 (src line 126) + + +state 48 + int_spec: HYPER. (40) + + . reduce 40 (src line 129) + + +state 49 + int_spec: INT. (41) + + . reduce 41 (src line 131) + + +state 50 + int_spec: SHORT. (42) + + . reduce 42 (src line 132) + + +state 51 + int_spec: CHAR. (43) + + . reduce 43 (src line 133) + + +state 52 + struct_definition: STRUCT struct_ident '{'.$$49 declaration_list '}' + $$49: . (49) + + . reduce 49 (src line 157) + + $$49 goto 65 + +state 53 + union_definition: UNION union_ident $$54.SWITCH '(' simple_declaration ')' '{' case_list '}' + + SWITCH shift 66 + . error + + +state 54 + program_definition: PROGRAM program_ident '{'.version_list '}' '=' value + + VERSION shift 69 + . error + + version_list goto 67 + version goto 68 + +state 55 + enum_definition: ENUM enum_ident '{' enum_value_list.'}' + + '}' shift 70 + . error + + +state 56 + enum_value_list: enum_value. (13) + enum_value_list: enum_value.',' enum_value_list + + ',' shift 71 + . reduce 13 (src line 52) + + +state 57 + enum_value: enum_value_ident. (15) + enum_value: enum_value_ident.'=' value + + '=' shift 72 + . reduce 15 (src line 57) + + +state 58 + enum_value_ident: IDENTIFIER. (18) + + . reduce 18 (src line 78) + + +state 59 + const_definition: CONST const_ident '=' IDENTIFIER. (19) + + . reduce 19 (src line 85) + + +state 60 + const_definition: CONST const_ident '=' CONSTANT. (20) + + . reduce 20 (src line 87) + + +state 61 + simple_declaration: type_specifier variable_ident. (28) + fixed_array_declaration: type_specifier variable_ident.'[' value ']' + variable_array_declaration: type_specifier variable_ident.'<' value '>' + variable_array_declaration: type_specifier variable_ident.'<' '>' + + '[' shift 73 + '<' shift 74 + . reduce 28 (src line 111) + + +state 62 + pointer_declaration: type_specifier '*'.variable_ident + + IDENTIFIER shift 63 + . error + + variable_ident goto 75 + +state 63 + variable_ident: IDENTIFIER. (44) + + . reduce 44 (src line 136) + + +state 64 + type_specifier: UNSIGNED int_spec. (30) + + . reduce 30 (src line 117) + + +state 65 + struct_definition: STRUCT struct_ident '{' $$49.declaration_list '}' + + BOOL shift 41 + DOUBLE shift 40 + ENUM shift 10 + FLOAT shift 39 + OPAQUE shift 43 + STRING shift 42 + STRUCT shift 13 + UNION shift 14 + UNSIGNED shift 38 + HYPER shift 48 + INT shift 49 + SHORT shift 50 + CHAR shift 51 + IDENTIFIER shift 47 + . error + + enum_definition goto 44 + struct_definition goto 45 + union_definition goto 46 + declaration goto 77 + simple_declaration goto 32 + fixed_array_declaration goto 33 + variable_array_declaration goto 34 + pointer_declaration goto 35 + type_specifier goto 36 + int_spec goto 37 + declaration_list goto 76 + +state 66 + union_definition: UNION union_ident $$54 SWITCH.'(' simple_declaration ')' '{' case_list '}' + + '(' shift 78 + . error + + +state 67 + program_definition: PROGRAM program_ident '{' version_list.'}' '=' value + + '}' shift 79 + . error + + +state 68 + version_list: version.';' + version_list: version.';' version_list + + ';' shift 80 + . error + + +state 69 + version: VERSION.version_ident '{' procedure_list '}' '=' value ';' + + IDENTIFIER shift 82 + . error + + version_ident goto 81 + +state 70 + enum_definition: ENUM enum_ident '{' enum_value_list '}'. (12) + + . reduce 12 (src line 48) + + +state 71 + enum_value_list: enum_value ','.enum_value_list + + IDENTIFIER shift 58 + . error + + enum_value_list goto 83 + enum_value goto 56 + enum_value_ident goto 57 + +state 72 + enum_value: enum_value_ident '='.value + + IDENTIFIER shift 85 + CONSTANT shift 86 + . error + + value goto 84 + +state 73 + fixed_array_declaration: type_specifier variable_ident '['.value ']' + + IDENTIFIER shift 85 + CONSTANT shift 86 + . error + + value goto 87 + +state 74 + variable_array_declaration: type_specifier variable_ident '<'.value '>' + variable_array_declaration: type_specifier variable_ident '<'.'>' + + IDENTIFIER shift 85 + CONSTANT shift 86 + '>' shift 89 + . error + + value goto 88 + +state 75 + pointer_declaration: type_specifier '*' variable_ident. (48) + + . reduce 48 (src line 153) + + +state 76 + struct_definition: STRUCT struct_ident '{' $$49 declaration_list.'}' + + '}' shift 90 + . error + + +state 77 + declaration_list: declaration.';' + declaration_list: declaration.';' declaration_list + + ';' shift 91 + . error + + +state 78 + union_definition: UNION union_ident $$54 SWITCH '('.simple_declaration ')' '{' case_list '}' + + BOOL shift 41 + DOUBLE shift 40 + ENUM shift 10 + FLOAT shift 39 + OPAQUE shift 43 + STRING shift 42 + STRUCT shift 13 + UNION shift 14 + UNSIGNED shift 38 + HYPER shift 48 + INT shift 49 + SHORT shift 50 + CHAR shift 51 + IDENTIFIER shift 47 + . error + + enum_definition goto 44 + struct_definition goto 45 + union_definition goto 46 + simple_declaration goto 92 + type_specifier goto 93 + int_spec goto 37 + +state 79 + program_definition: PROGRAM program_ident '{' version_list '}'.'=' value + + '=' shift 94 + . error + + +state 80 + version_list: version ';'. (65) + version_list: version ';'.version_list + + VERSION shift 69 + . reduce 65 (src line 196) + + version_list goto 95 + version goto 68 + +state 81 + version: VERSION version_ident.'{' procedure_list '}' '=' value ';' + + '{' shift 96 + . error + + +state 82 + version_ident: IDENTIFIER. (68) + + . reduce 68 (src line 205) + + +state 83 + enum_value_list: enum_value ',' enum_value_list. (14) + + . reduce 14 (src line 54) + + +state 84 + enum_value: enum_value_ident '=' value. (16) + + . reduce 16 (src line 65) + + +state 85 + value: IDENTIFIER. (2) + + . reduce 2 (src line 29) + + +state 86 + value: CONSTANT. (3) + + . reduce 3 (src line 31) + + +state 87 + fixed_array_declaration: type_specifier variable_ident '[' value.']' + + ']' shift 97 + . error + + +state 88 + variable_array_declaration: type_specifier variable_ident '<' value.'>' + + '>' shift 98 + . error + + +state 89 + variable_array_declaration: type_specifier variable_ident '<' '>'. (47) + + . reduce 47 (src line 146) + + +state 90 + struct_definition: STRUCT struct_ident '{' $$49 declaration_list '}'. (50) + + . reduce 50 (src line 158) + + +state 91 + declaration_list: declaration ';'. (52) + declaration_list: declaration ';'.declaration_list + + BOOL shift 41 + DOUBLE shift 40 + ENUM shift 10 + FLOAT shift 39 + OPAQUE shift 43 + STRING shift 42 + STRUCT shift 13 + UNION shift 14 + UNSIGNED shift 38 + HYPER shift 48 + INT shift 49 + SHORT shift 50 + CHAR shift 51 + IDENTIFIER shift 47 + . reduce 52 (src line 165) + + enum_definition goto 44 + struct_definition goto 45 + union_definition goto 46 + declaration goto 77 + simple_declaration goto 32 + fixed_array_declaration goto 33 + variable_array_declaration goto 34 + pointer_declaration goto 35 + type_specifier goto 36 + int_spec goto 37 + declaration_list goto 99 + +state 92 + union_definition: UNION union_ident $$54 SWITCH '(' simple_declaration.')' '{' case_list '}' + + ')' shift 100 + . error + + +state 93 + simple_declaration: type_specifier.variable_ident + + IDENTIFIER shift 63 + . error + + variable_ident goto 101 + +state 94 + program_definition: PROGRAM program_ident '{' version_list '}' '='.value + + IDENTIFIER shift 85 + CONSTANT shift 86 + . error + + value goto 102 + +state 95 + version_list: version ';' version_list. (66) + + . reduce 66 (src line 198) + + +state 96 + version: VERSION version_ident '{'.procedure_list '}' '=' value ';' + + BOOL shift 41 + DOUBLE shift 40 + ENUM shift 10 + FLOAT shift 39 + OPAQUE shift 43 + STRING shift 42 + STRUCT shift 13 + UNION shift 14 + UNSIGNED shift 38 + HYPER shift 48 + INT shift 49 + SHORT shift 50 + CHAR shift 51 + IDENTIFIER shift 47 + . error + + enum_definition goto 44 + struct_definition goto 45 + union_definition goto 46 + type_specifier goto 105 + int_spec goto 37 + procedure_list goto 103 + procedure goto 104 + +state 97 + fixed_array_declaration: type_specifier variable_ident '[' value ']'. (45) + + . reduce 45 (src line 140) + + +state 98 + variable_array_declaration: type_specifier variable_ident '<' value '>'. (46) + + . reduce 46 (src line 144) + + +state 99 + declaration_list: declaration ';' declaration_list. (53) + + . reduce 53 (src line 167) + + +state 100 + union_definition: UNION union_ident $$54 SWITCH '(' simple_declaration ')'.'{' case_list '}' + + '{' shift 106 + . error + + +state 101 + simple_declaration: type_specifier variable_ident. (28) + + . reduce 28 (src line 111) + + +state 102 + program_definition: PROGRAM program_ident '{' version_list '}' '=' value. (63) + + . reduce 63 (src line 188) + + +state 103 + version: VERSION version_ident '{' procedure_list.'}' '=' value ';' + + '}' shift 107 + . error + + +state 104 + procedure_list: procedure.';' + procedure_list: procedure.';' procedure_list + + ';' shift 108 + . error + + +state 105 + procedure: type_specifier.procedure_ident '(' type_specifier ')' '=' value ';' + + IDENTIFIER shift 110 + . error + + procedure_ident goto 109 + +state 106 + union_definition: UNION union_ident $$54 SWITCH '(' simple_declaration ')' '{'.case_list '}' + + CASE shift 113 + DEFAULT shift 114 + . error + + case_list goto 111 + case goto 112 + +state 107 + version: VERSION version_ident '{' procedure_list '}'.'=' value ';' + + '=' shift 115 + . error + + +state 108 + procedure_list: procedure ';'. (69) + procedure_list: procedure ';'.procedure_list + + BOOL shift 41 + DOUBLE shift 40 + ENUM shift 10 + FLOAT shift 39 + OPAQUE shift 43 + STRING shift 42 + STRUCT shift 13 + UNION shift 14 + UNSIGNED shift 38 + HYPER shift 48 + INT shift 49 + SHORT shift 50 + CHAR shift 51 + IDENTIFIER shift 47 + . reduce 69 (src line 209) + + enum_definition goto 44 + struct_definition goto 45 + union_definition goto 46 + type_specifier goto 105 + int_spec goto 37 + procedure_list goto 116 + procedure goto 104 + +state 109 + procedure: type_specifier procedure_ident.'(' type_specifier ')' '=' value ';' + + '(' shift 117 + . error + + +state 110 + procedure_ident: IDENTIFIER. (72) + + . reduce 72 (src line 218) + + +state 111 + union_definition: UNION union_ident $$54 SWITCH '(' simple_declaration ')' '{' case_list.'}' + + '}' shift 118 + . error + + +state 112 + case_list: case.';' + case_list: case.';' case_list + + ';' shift 119 + . error + + +state 113 + case: CASE.value $$59 ':' declaration + + IDENTIFIER shift 85 + CONSTANT shift 86 + . error + + value goto 120 + +state 114 + case: DEFAULT.$$61 ':' declaration + $$61: . (61) + + . reduce 61 (src line 185) + + $$61 goto 121 + +state 115 + version: VERSION version_ident '{' procedure_list '}' '='.value ';' + + IDENTIFIER shift 85 + CONSTANT shift 86 + . error + + value goto 122 + +state 116 + procedure_list: procedure ';' procedure_list. (70) + + . reduce 70 (src line 211) + + +state 117 + procedure: type_specifier procedure_ident '('.type_specifier ')' '=' value ';' + + BOOL shift 41 + DOUBLE shift 40 + ENUM shift 10 + FLOAT shift 39 + OPAQUE shift 43 + STRING shift 42 + STRUCT shift 13 + UNION shift 14 + UNSIGNED shift 38 + HYPER shift 48 + INT shift 49 + SHORT shift 50 + CHAR shift 51 + IDENTIFIER shift 47 + . error + + enum_definition goto 44 + struct_definition goto 45 + union_definition goto 46 + type_specifier goto 123 + int_spec goto 37 + +state 118 + union_definition: UNION union_ident $$54 SWITCH '(' simple_declaration ')' '{' case_list '}'. (55) + + . reduce 55 (src line 171) + + +state 119 + case_list: case ';'. (57) + case_list: case ';'.case_list + + CASE shift 113 + DEFAULT shift 114 + . reduce 57 (src line 178) + + case_list goto 124 + case goto 112 + +state 120 + case: CASE value.$$59 ':' declaration + $$59: . (59) + + . reduce 59 (src line 183) + + $$59 goto 125 + +state 121 + case: DEFAULT $$61.':' declaration + + ':' shift 126 + . error + + +state 122 + version: VERSION version_ident '{' procedure_list '}' '=' value.';' + + ';' shift 127 + . error + + +state 123 + procedure: type_specifier procedure_ident '(' type_specifier.')' '=' value ';' + + ')' shift 128 + . error + + +state 124 + case_list: case ';' case_list. (58) + + . reduce 58 (src line 180) + + +state 125 + case: CASE value $$59.':' declaration + + ':' shift 129 + . error + + +state 126 + case: DEFAULT $$61 ':'.declaration + + BOOL shift 41 + DOUBLE shift 40 + ENUM shift 10 + FLOAT shift 39 + OPAQUE shift 43 + STRING shift 42 + STRUCT shift 13 + UNION shift 14 + UNSIGNED shift 38 + HYPER shift 48 + INT shift 49 + SHORT shift 50 + CHAR shift 51 + IDENTIFIER shift 47 + . error + + enum_definition goto 44 + struct_definition goto 45 + union_definition goto 46 + declaration goto 130 + simple_declaration goto 32 + fixed_array_declaration goto 33 + variable_array_declaration goto 34 + pointer_declaration goto 35 + type_specifier goto 36 + int_spec goto 37 + +state 127 + version: VERSION version_ident '{' procedure_list '}' '=' value ';'. (67) + + . reduce 67 (src line 201) + + +state 128 + procedure: type_specifier procedure_ident '(' type_specifier ')'.'=' value ';' + + '=' shift 131 + . error + + +state 129 + case: CASE value $$59 ':'.declaration + + BOOL shift 41 + DOUBLE shift 40 + ENUM shift 10 + FLOAT shift 39 + OPAQUE shift 43 + STRING shift 42 + STRUCT shift 13 + UNION shift 14 + UNSIGNED shift 38 + HYPER shift 48 + INT shift 49 + SHORT shift 50 + CHAR shift 51 + IDENTIFIER shift 47 + . error + + enum_definition goto 44 + struct_definition goto 45 + union_definition goto 46 + declaration goto 132 + simple_declaration goto 32 + fixed_array_declaration goto 33 + variable_array_declaration goto 34 + pointer_declaration goto 35 + type_specifier goto 36 + int_spec goto 37 + +state 130 + case: DEFAULT $$61 ':' declaration. (62) + + . reduce 62 (src line 185) + + +state 131 + procedure: type_specifier procedure_ident '(' type_specifier ')' '='.value ';' + + IDENTIFIER shift 85 + CONSTANT shift 86 + . error + + value goto 133 + +state 132 + case: CASE value $$59 ':' declaration. (60) + + . reduce 60 (src line 184) + + +state 133 + procedure: type_specifier procedure_ident '(' type_specifier ')' '=' value.';' + + ';' shift 134 + . error + + +state 134 + procedure: type_specifier procedure_ident '(' type_specifier ')' '=' value ';'. (71) + + . reduce 71 (src line 214) + + +40 terminals, 41 nonterminals +73 grammar rules, 135/8000 states +0 shift/reduce, 0 reduce/reduce conflicts reported +90 working sets used +memory: parser 155/120000 +40 extra closures +212 shift entries, 1 exceptions +69 goto entries +62 entries saved by goto default +Optimizer space used: output 148/120000 +148 table entries, 0 zero +maximum spread: 40, maximum offset: 131 From 71f606ddd7b75bd840533858f09be1728f1d9a01 Mon Sep 17 00:00:00 2001 From: Geoff Hickey Date: Thu, 16 Nov 2017 17:14:05 -0500 Subject: [PATCH 11/20] Add comments to generated code, fix integration test. --- internal/constants/constants.gen.go | 453 +++++++++++- internal/lvgen/constants.tmpl | 6 +- internal/lvgen/generate.go | 61 +- internal/lvgen/procedures.tmpl | 26 +- libvirt.gen.go | 1039 ++++++++++++++++++++++++++- libvirt.go | 67 +- libvirt_integration_test.go | 16 +- 7 files changed, 1558 insertions(+), 110 deletions(-) diff --git a/internal/constants/constants.gen.go b/internal/constants/constants.gen.go index 7c4a43d..bd14cfe 100644 --- a/internal/constants/constants.gen.go +++ b/internal/constants/constants.gen.go @@ -4,10 +4,10 @@ * To regenerate, run 'go generate' in internal/lvgen. */ +// Package constants contains libvirt procedure identifiers and other enums and +// constants. package constants -// libvirt procedure identifiers and other enums -// // These are libvirt procedure numbers which correspond to each respective // API call between remote_internal driver and libvirtd. Each procedure is // identified by a unique number which *may change in any future libvirt @@ -19,456 +19,905 @@ package constants // REMOTE_PROC_DOMAIN_MIGRATE_SET_MAX_SPEED = 207, const ( // From enums: + // AuthNone is libvirt's REMOTE_AUTH_NONE AuthNone = 0 + // AuthSasl is libvirt's REMOTE_AUTH_SASL AuthSasl = 1 + // AuthPolkit is libvirt's REMOTE_AUTH_POLKIT AuthPolkit = 2 + // ProcConnectOpen is libvirt's REMOTE_PROC_CONNECT_OPEN ProcConnectOpen = 1 + // ProcConnectClose is libvirt's REMOTE_PROC_CONNECT_CLOSE ProcConnectClose = 2 + // ProcConnectGetType is libvirt's REMOTE_PROC_CONNECT_GET_TYPE ProcConnectGetType = 3 + // ProcConnectGetVersion is libvirt's REMOTE_PROC_CONNECT_GET_VERSION ProcConnectGetVersion = 4 + // ProcConnectGetMaxVcpus is libvirt's REMOTE_PROC_CONNECT_GET_MAX_VCPUS ProcConnectGetMaxVcpus = 5 + // ProcNodeGetInfo is libvirt's REMOTE_PROC_NODE_GET_INFO ProcNodeGetInfo = 6 + // ProcConnectGetCapabilities is libvirt's REMOTE_PROC_CONNECT_GET_CAPABILITIES ProcConnectGetCapabilities = 7 + // ProcDomainAttachDevice is libvirt's REMOTE_PROC_DOMAIN_ATTACH_DEVICE ProcDomainAttachDevice = 8 + // ProcDomainCreate is libvirt's REMOTE_PROC_DOMAIN_CREATE ProcDomainCreate = 9 + // ProcDomainCreateXML is libvirt's REMOTE_PROC_DOMAIN_CREATE_XML ProcDomainCreateXML = 10 + // ProcDomainDefineXML is libvirt's REMOTE_PROC_DOMAIN_DEFINE_XML ProcDomainDefineXML = 11 + // ProcDomainDestroy is libvirt's REMOTE_PROC_DOMAIN_DESTROY ProcDomainDestroy = 12 + // ProcDomainDetachDevice is libvirt's REMOTE_PROC_DOMAIN_DETACH_DEVICE ProcDomainDetachDevice = 13 + // ProcDomainGetXMLDesc is libvirt's REMOTE_PROC_DOMAIN_GET_XML_DESC ProcDomainGetXMLDesc = 14 + // ProcDomainGetAutostart is libvirt's REMOTE_PROC_DOMAIN_GET_AUTOSTART ProcDomainGetAutostart = 15 + // ProcDomainGetInfo is libvirt's REMOTE_PROC_DOMAIN_GET_INFO ProcDomainGetInfo = 16 + // ProcDomainGetMaxMemory is libvirt's REMOTE_PROC_DOMAIN_GET_MAX_MEMORY ProcDomainGetMaxMemory = 17 + // ProcDomainGetMaxVcpus is libvirt's REMOTE_PROC_DOMAIN_GET_MAX_VCPUS ProcDomainGetMaxVcpus = 18 + // ProcDomainGetOsType is libvirt's REMOTE_PROC_DOMAIN_GET_OS_TYPE ProcDomainGetOsType = 19 + // ProcDomainGetVcpus is libvirt's REMOTE_PROC_DOMAIN_GET_VCPUS ProcDomainGetVcpus = 20 + // ProcConnectListDefinedDomains is libvirt's REMOTE_PROC_CONNECT_LIST_DEFINED_DOMAINS ProcConnectListDefinedDomains = 21 + // ProcDomainLookupByID is libvirt's REMOTE_PROC_DOMAIN_LOOKUP_BY_ID ProcDomainLookupByID = 22 + // ProcDomainLookupByName is libvirt's REMOTE_PROC_DOMAIN_LOOKUP_BY_NAME ProcDomainLookupByName = 23 + // ProcDomainLookupByUUID is libvirt's REMOTE_PROC_DOMAIN_LOOKUP_BY_UUID ProcDomainLookupByUUID = 24 + // ProcConnectNumOfDefinedDomains is libvirt's REMOTE_PROC_CONNECT_NUM_OF_DEFINED_DOMAINS ProcConnectNumOfDefinedDomains = 25 + // ProcDomainPinVcpu is libvirt's REMOTE_PROC_DOMAIN_PIN_VCPU ProcDomainPinVcpu = 26 + // ProcDomainReboot is libvirt's REMOTE_PROC_DOMAIN_REBOOT ProcDomainReboot = 27 + // ProcDomainResume is libvirt's REMOTE_PROC_DOMAIN_RESUME ProcDomainResume = 28 + // ProcDomainSetAutostart is libvirt's REMOTE_PROC_DOMAIN_SET_AUTOSTART ProcDomainSetAutostart = 29 + // ProcDomainSetMaxMemory is libvirt's REMOTE_PROC_DOMAIN_SET_MAX_MEMORY ProcDomainSetMaxMemory = 30 + // ProcDomainSetMemory is libvirt's REMOTE_PROC_DOMAIN_SET_MEMORY ProcDomainSetMemory = 31 + // ProcDomainSetVcpus is libvirt's REMOTE_PROC_DOMAIN_SET_VCPUS ProcDomainSetVcpus = 32 + // ProcDomainShutdown is libvirt's REMOTE_PROC_DOMAIN_SHUTDOWN ProcDomainShutdown = 33 + // ProcDomainSuspend is libvirt's REMOTE_PROC_DOMAIN_SUSPEND ProcDomainSuspend = 34 + // ProcDomainUndefine is libvirt's REMOTE_PROC_DOMAIN_UNDEFINE ProcDomainUndefine = 35 + // ProcConnectListDefinedNetworks is libvirt's REMOTE_PROC_CONNECT_LIST_DEFINED_NETWORKS ProcConnectListDefinedNetworks = 36 + // ProcConnectListDomains is libvirt's REMOTE_PROC_CONNECT_LIST_DOMAINS ProcConnectListDomains = 37 + // ProcConnectListNetworks is libvirt's REMOTE_PROC_CONNECT_LIST_NETWORKS ProcConnectListNetworks = 38 + // ProcNetworkCreate is libvirt's REMOTE_PROC_NETWORK_CREATE ProcNetworkCreate = 39 + // ProcNetworkCreateXML is libvirt's REMOTE_PROC_NETWORK_CREATE_XML ProcNetworkCreateXML = 40 + // ProcNetworkDefineXML is libvirt's REMOTE_PROC_NETWORK_DEFINE_XML ProcNetworkDefineXML = 41 + // ProcNetworkDestroy is libvirt's REMOTE_PROC_NETWORK_DESTROY ProcNetworkDestroy = 42 + // ProcNetworkGetXMLDesc is libvirt's REMOTE_PROC_NETWORK_GET_XML_DESC ProcNetworkGetXMLDesc = 43 + // ProcNetworkGetAutostart is libvirt's REMOTE_PROC_NETWORK_GET_AUTOSTART ProcNetworkGetAutostart = 44 + // ProcNetworkGetBridgeName is libvirt's REMOTE_PROC_NETWORK_GET_BRIDGE_NAME ProcNetworkGetBridgeName = 45 + // ProcNetworkLookupByName is libvirt's REMOTE_PROC_NETWORK_LOOKUP_BY_NAME ProcNetworkLookupByName = 46 + // ProcNetworkLookupByUUID is libvirt's REMOTE_PROC_NETWORK_LOOKUP_BY_UUID ProcNetworkLookupByUUID = 47 + // ProcNetworkSetAutostart is libvirt's REMOTE_PROC_NETWORK_SET_AUTOSTART ProcNetworkSetAutostart = 48 + // ProcNetworkUndefine is libvirt's REMOTE_PROC_NETWORK_UNDEFINE ProcNetworkUndefine = 49 + // ProcConnectNumOfDefinedNetworks is libvirt's REMOTE_PROC_CONNECT_NUM_OF_DEFINED_NETWORKS ProcConnectNumOfDefinedNetworks = 50 + // ProcConnectNumOfDomains is libvirt's REMOTE_PROC_CONNECT_NUM_OF_DOMAINS ProcConnectNumOfDomains = 51 + // ProcConnectNumOfNetworks is libvirt's REMOTE_PROC_CONNECT_NUM_OF_NETWORKS ProcConnectNumOfNetworks = 52 + // ProcDomainCoreDump is libvirt's REMOTE_PROC_DOMAIN_CORE_DUMP ProcDomainCoreDump = 53 + // ProcDomainRestore is libvirt's REMOTE_PROC_DOMAIN_RESTORE ProcDomainRestore = 54 + // ProcDomainSave is libvirt's REMOTE_PROC_DOMAIN_SAVE ProcDomainSave = 55 + // ProcDomainGetSchedulerType is libvirt's REMOTE_PROC_DOMAIN_GET_SCHEDULER_TYPE ProcDomainGetSchedulerType = 56 + // ProcDomainGetSchedulerParameters is libvirt's REMOTE_PROC_DOMAIN_GET_SCHEDULER_PARAMETERS ProcDomainGetSchedulerParameters = 57 + // ProcDomainSetSchedulerParameters is libvirt's REMOTE_PROC_DOMAIN_SET_SCHEDULER_PARAMETERS ProcDomainSetSchedulerParameters = 58 + // ProcConnectGetHostname is libvirt's REMOTE_PROC_CONNECT_GET_HOSTNAME ProcConnectGetHostname = 59 + // ProcConnectSupportsFeature is libvirt's REMOTE_PROC_CONNECT_SUPPORTS_FEATURE ProcConnectSupportsFeature = 60 + // ProcDomainMigratePrepare is libvirt's REMOTE_PROC_DOMAIN_MIGRATE_PREPARE ProcDomainMigratePrepare = 61 + // ProcDomainMigratePerform is libvirt's REMOTE_PROC_DOMAIN_MIGRATE_PERFORM ProcDomainMigratePerform = 62 + // ProcDomainMigrateFinish is libvirt's REMOTE_PROC_DOMAIN_MIGRATE_FINISH ProcDomainMigrateFinish = 63 + // ProcDomainBlockStats is libvirt's REMOTE_PROC_DOMAIN_BLOCK_STATS ProcDomainBlockStats = 64 + // ProcDomainInterfaceStats is libvirt's REMOTE_PROC_DOMAIN_INTERFACE_STATS ProcDomainInterfaceStats = 65 + // ProcAuthList is libvirt's REMOTE_PROC_AUTH_LIST ProcAuthList = 66 + // ProcAuthSaslInit is libvirt's REMOTE_PROC_AUTH_SASL_INIT ProcAuthSaslInit = 67 + // ProcAuthSaslStart is libvirt's REMOTE_PROC_AUTH_SASL_START ProcAuthSaslStart = 68 + // ProcAuthSaslStep is libvirt's REMOTE_PROC_AUTH_SASL_STEP ProcAuthSaslStep = 69 + // ProcAuthPolkit is libvirt's REMOTE_PROC_AUTH_POLKIT ProcAuthPolkit = 70 + // ProcConnectNumOfStoragePools is libvirt's REMOTE_PROC_CONNECT_NUM_OF_STORAGE_POOLS ProcConnectNumOfStoragePools = 71 + // ProcConnectListStoragePools is libvirt's REMOTE_PROC_CONNECT_LIST_STORAGE_POOLS ProcConnectListStoragePools = 72 + // ProcConnectNumOfDefinedStoragePools is libvirt's REMOTE_PROC_CONNECT_NUM_OF_DEFINED_STORAGE_POOLS ProcConnectNumOfDefinedStoragePools = 73 + // ProcConnectListDefinedStoragePools is libvirt's REMOTE_PROC_CONNECT_LIST_DEFINED_STORAGE_POOLS ProcConnectListDefinedStoragePools = 74 + // ProcConnectFindStoragePoolSources is libvirt's REMOTE_PROC_CONNECT_FIND_STORAGE_POOL_SOURCES ProcConnectFindStoragePoolSources = 75 + // ProcStoragePoolCreateXML is libvirt's REMOTE_PROC_STORAGE_POOL_CREATE_XML ProcStoragePoolCreateXML = 76 + // ProcStoragePoolDefineXML is libvirt's REMOTE_PROC_STORAGE_POOL_DEFINE_XML ProcStoragePoolDefineXML = 77 + // ProcStoragePoolCreate is libvirt's REMOTE_PROC_STORAGE_POOL_CREATE ProcStoragePoolCreate = 78 + // ProcStoragePoolBuild is libvirt's REMOTE_PROC_STORAGE_POOL_BUILD ProcStoragePoolBuild = 79 + // ProcStoragePoolDestroy is libvirt's REMOTE_PROC_STORAGE_POOL_DESTROY ProcStoragePoolDestroy = 80 + // ProcStoragePoolDelete is libvirt's REMOTE_PROC_STORAGE_POOL_DELETE ProcStoragePoolDelete = 81 + // ProcStoragePoolUndefine is libvirt's REMOTE_PROC_STORAGE_POOL_UNDEFINE ProcStoragePoolUndefine = 82 + // ProcStoragePoolRefresh is libvirt's REMOTE_PROC_STORAGE_POOL_REFRESH ProcStoragePoolRefresh = 83 + // ProcStoragePoolLookupByName is libvirt's REMOTE_PROC_STORAGE_POOL_LOOKUP_BY_NAME ProcStoragePoolLookupByName = 84 + // ProcStoragePoolLookupByUUID is libvirt's REMOTE_PROC_STORAGE_POOL_LOOKUP_BY_UUID ProcStoragePoolLookupByUUID = 85 + // ProcStoragePoolLookupByVolume is libvirt's REMOTE_PROC_STORAGE_POOL_LOOKUP_BY_VOLUME ProcStoragePoolLookupByVolume = 86 + // ProcStoragePoolGetInfo is libvirt's REMOTE_PROC_STORAGE_POOL_GET_INFO ProcStoragePoolGetInfo = 87 + // ProcStoragePoolGetXMLDesc is libvirt's REMOTE_PROC_STORAGE_POOL_GET_XML_DESC ProcStoragePoolGetXMLDesc = 88 + // ProcStoragePoolGetAutostart is libvirt's REMOTE_PROC_STORAGE_POOL_GET_AUTOSTART ProcStoragePoolGetAutostart = 89 + // ProcStoragePoolSetAutostart is libvirt's REMOTE_PROC_STORAGE_POOL_SET_AUTOSTART ProcStoragePoolSetAutostart = 90 + // ProcStoragePoolNumOfVolumes is libvirt's REMOTE_PROC_STORAGE_POOL_NUM_OF_VOLUMES ProcStoragePoolNumOfVolumes = 91 + // ProcStoragePoolListVolumes is libvirt's REMOTE_PROC_STORAGE_POOL_LIST_VOLUMES ProcStoragePoolListVolumes = 92 + // ProcStorageVolCreateXML is libvirt's REMOTE_PROC_STORAGE_VOL_CREATE_XML ProcStorageVolCreateXML = 93 + // ProcStorageVolDelete is libvirt's REMOTE_PROC_STORAGE_VOL_DELETE ProcStorageVolDelete = 94 + // ProcStorageVolLookupByName is libvirt's REMOTE_PROC_STORAGE_VOL_LOOKUP_BY_NAME ProcStorageVolLookupByName = 95 + // ProcStorageVolLookupByKey is libvirt's REMOTE_PROC_STORAGE_VOL_LOOKUP_BY_KEY ProcStorageVolLookupByKey = 96 + // ProcStorageVolLookupByPath is libvirt's REMOTE_PROC_STORAGE_VOL_LOOKUP_BY_PATH ProcStorageVolLookupByPath = 97 + // ProcStorageVolGetInfo is libvirt's REMOTE_PROC_STORAGE_VOL_GET_INFO ProcStorageVolGetInfo = 98 + // ProcStorageVolGetXMLDesc is libvirt's REMOTE_PROC_STORAGE_VOL_GET_XML_DESC ProcStorageVolGetXMLDesc = 99 + // ProcStorageVolGetPath is libvirt's REMOTE_PROC_STORAGE_VOL_GET_PATH ProcStorageVolGetPath = 100 + // ProcNodeGetCellsFreeMemory is libvirt's REMOTE_PROC_NODE_GET_CELLS_FREE_MEMORY ProcNodeGetCellsFreeMemory = 101 + // ProcNodeGetFreeMemory is libvirt's REMOTE_PROC_NODE_GET_FREE_MEMORY ProcNodeGetFreeMemory = 102 + // ProcDomainBlockPeek is libvirt's REMOTE_PROC_DOMAIN_BLOCK_PEEK ProcDomainBlockPeek = 103 + // ProcDomainMemoryPeek is libvirt's REMOTE_PROC_DOMAIN_MEMORY_PEEK ProcDomainMemoryPeek = 104 + // ProcConnectDomainEventRegister is libvirt's REMOTE_PROC_CONNECT_DOMAIN_EVENT_REGISTER ProcConnectDomainEventRegister = 105 + // ProcConnectDomainEventDeregister is libvirt's REMOTE_PROC_CONNECT_DOMAIN_EVENT_DEREGISTER ProcConnectDomainEventDeregister = 106 + // ProcDomainEventLifecycle is libvirt's REMOTE_PROC_DOMAIN_EVENT_LIFECYCLE ProcDomainEventLifecycle = 107 + // ProcDomainMigratePrepare2 is libvirt's REMOTE_PROC_DOMAIN_MIGRATE_PREPARE2 ProcDomainMigratePrepare2 = 108 + // ProcDomainMigrateFinish2 is libvirt's REMOTE_PROC_DOMAIN_MIGRATE_FINISH2 ProcDomainMigrateFinish2 = 109 + // ProcConnectGetUri is libvirt's REMOTE_PROC_CONNECT_GET_URI ProcConnectGetUri = 110 + // ProcNodeNumOfDevices is libvirt's REMOTE_PROC_NODE_NUM_OF_DEVICES ProcNodeNumOfDevices = 111 + // ProcNodeListDevices is libvirt's REMOTE_PROC_NODE_LIST_DEVICES ProcNodeListDevices = 112 + // ProcNodeDeviceLookupByName is libvirt's REMOTE_PROC_NODE_DEVICE_LOOKUP_BY_NAME ProcNodeDeviceLookupByName = 113 + // ProcNodeDeviceGetXMLDesc is libvirt's REMOTE_PROC_NODE_DEVICE_GET_XML_DESC ProcNodeDeviceGetXMLDesc = 114 + // ProcNodeDeviceGetParent is libvirt's REMOTE_PROC_NODE_DEVICE_GET_PARENT ProcNodeDeviceGetParent = 115 + // ProcNodeDeviceNumOfCaps is libvirt's REMOTE_PROC_NODE_DEVICE_NUM_OF_CAPS ProcNodeDeviceNumOfCaps = 116 + // ProcNodeDeviceListCaps is libvirt's REMOTE_PROC_NODE_DEVICE_LIST_CAPS ProcNodeDeviceListCaps = 117 + // ProcNodeDeviceDettach is libvirt's REMOTE_PROC_NODE_DEVICE_DETTACH ProcNodeDeviceDettach = 118 + // ProcNodeDeviceReAttach is libvirt's REMOTE_PROC_NODE_DEVICE_RE_ATTACH ProcNodeDeviceReAttach = 119 + // ProcNodeDeviceReset is libvirt's REMOTE_PROC_NODE_DEVICE_RESET ProcNodeDeviceReset = 120 + // ProcDomainGetSecurityLabel is libvirt's REMOTE_PROC_DOMAIN_GET_SECURITY_LABEL ProcDomainGetSecurityLabel = 121 + // ProcNodeGetSecurityModel is libvirt's REMOTE_PROC_NODE_GET_SECURITY_MODEL ProcNodeGetSecurityModel = 122 + // ProcNodeDeviceCreateXML is libvirt's REMOTE_PROC_NODE_DEVICE_CREATE_XML ProcNodeDeviceCreateXML = 123 + // ProcNodeDeviceDestroy is libvirt's REMOTE_PROC_NODE_DEVICE_DESTROY ProcNodeDeviceDestroy = 124 + // ProcStorageVolCreateXMLFrom is libvirt's REMOTE_PROC_STORAGE_VOL_CREATE_XML_FROM ProcStorageVolCreateXMLFrom = 125 + // ProcConnectNumOfInterfaces is libvirt's REMOTE_PROC_CONNECT_NUM_OF_INTERFACES ProcConnectNumOfInterfaces = 126 + // ProcConnectListInterfaces is libvirt's REMOTE_PROC_CONNECT_LIST_INTERFACES ProcConnectListInterfaces = 127 + // ProcInterfaceLookupByName is libvirt's REMOTE_PROC_INTERFACE_LOOKUP_BY_NAME ProcInterfaceLookupByName = 128 + // ProcInterfaceLookupByMacString is libvirt's REMOTE_PROC_INTERFACE_LOOKUP_BY_MAC_STRING ProcInterfaceLookupByMacString = 129 + // ProcInterfaceGetXMLDesc is libvirt's REMOTE_PROC_INTERFACE_GET_XML_DESC ProcInterfaceGetXMLDesc = 130 + // ProcInterfaceDefineXML is libvirt's REMOTE_PROC_INTERFACE_DEFINE_XML ProcInterfaceDefineXML = 131 + // ProcInterfaceUndefine is libvirt's REMOTE_PROC_INTERFACE_UNDEFINE ProcInterfaceUndefine = 132 + // ProcInterfaceCreate is libvirt's REMOTE_PROC_INTERFACE_CREATE ProcInterfaceCreate = 133 + // ProcInterfaceDestroy is libvirt's REMOTE_PROC_INTERFACE_DESTROY ProcInterfaceDestroy = 134 + // ProcConnectDomainXMLFromNative is libvirt's REMOTE_PROC_CONNECT_DOMAIN_XML_FROM_NATIVE ProcConnectDomainXMLFromNative = 135 + // ProcConnectDomainXMLToNative is libvirt's REMOTE_PROC_CONNECT_DOMAIN_XML_TO_NATIVE ProcConnectDomainXMLToNative = 136 + // ProcConnectNumOfDefinedInterfaces is libvirt's REMOTE_PROC_CONNECT_NUM_OF_DEFINED_INTERFACES ProcConnectNumOfDefinedInterfaces = 137 + // ProcConnectListDefinedInterfaces is libvirt's REMOTE_PROC_CONNECT_LIST_DEFINED_INTERFACES ProcConnectListDefinedInterfaces = 138 + // ProcConnectNumOfSecrets is libvirt's REMOTE_PROC_CONNECT_NUM_OF_SECRETS ProcConnectNumOfSecrets = 139 + // ProcConnectListSecrets is libvirt's REMOTE_PROC_CONNECT_LIST_SECRETS ProcConnectListSecrets = 140 + // ProcSecretLookupByUUID is libvirt's REMOTE_PROC_SECRET_LOOKUP_BY_UUID ProcSecretLookupByUUID = 141 + // ProcSecretDefineXML is libvirt's REMOTE_PROC_SECRET_DEFINE_XML ProcSecretDefineXML = 142 + // ProcSecretGetXMLDesc is libvirt's REMOTE_PROC_SECRET_GET_XML_DESC ProcSecretGetXMLDesc = 143 + // ProcSecretSetValue is libvirt's REMOTE_PROC_SECRET_SET_VALUE ProcSecretSetValue = 144 + // ProcSecretGetValue is libvirt's REMOTE_PROC_SECRET_GET_VALUE ProcSecretGetValue = 145 + // ProcSecretUndefine is libvirt's REMOTE_PROC_SECRET_UNDEFINE ProcSecretUndefine = 146 + // ProcSecretLookupByUsage is libvirt's REMOTE_PROC_SECRET_LOOKUP_BY_USAGE ProcSecretLookupByUsage = 147 + // ProcDomainMigratePrepareTunnel is libvirt's REMOTE_PROC_DOMAIN_MIGRATE_PREPARE_TUNNEL ProcDomainMigratePrepareTunnel = 148 + // ProcConnectIsSecure is libvirt's REMOTE_PROC_CONNECT_IS_SECURE ProcConnectIsSecure = 149 + // ProcDomainIsActive is libvirt's REMOTE_PROC_DOMAIN_IS_ACTIVE ProcDomainIsActive = 150 + // ProcDomainIsPersistent is libvirt's REMOTE_PROC_DOMAIN_IS_PERSISTENT ProcDomainIsPersistent = 151 + // ProcNetworkIsActive is libvirt's REMOTE_PROC_NETWORK_IS_ACTIVE ProcNetworkIsActive = 152 + // ProcNetworkIsPersistent is libvirt's REMOTE_PROC_NETWORK_IS_PERSISTENT ProcNetworkIsPersistent = 153 + // ProcStoragePoolIsActive is libvirt's REMOTE_PROC_STORAGE_POOL_IS_ACTIVE ProcStoragePoolIsActive = 154 + // ProcStoragePoolIsPersistent is libvirt's REMOTE_PROC_STORAGE_POOL_IS_PERSISTENT ProcStoragePoolIsPersistent = 155 + // ProcInterfaceIsActive is libvirt's REMOTE_PROC_INTERFACE_IS_ACTIVE ProcInterfaceIsActive = 156 + // ProcConnectGetLibVersion is libvirt's REMOTE_PROC_CONNECT_GET_LIB_VERSION ProcConnectGetLibVersion = 157 + // ProcConnectCompareCPU is libvirt's REMOTE_PROC_CONNECT_COMPARE_CPU ProcConnectCompareCPU = 158 + // ProcDomainMemoryStats is libvirt's REMOTE_PROC_DOMAIN_MEMORY_STATS ProcDomainMemoryStats = 159 + // ProcDomainAttachDeviceFlags is libvirt's REMOTE_PROC_DOMAIN_ATTACH_DEVICE_FLAGS ProcDomainAttachDeviceFlags = 160 + // ProcDomainDetachDeviceFlags is libvirt's REMOTE_PROC_DOMAIN_DETACH_DEVICE_FLAGS ProcDomainDetachDeviceFlags = 161 + // ProcConnectBaselineCPU is libvirt's REMOTE_PROC_CONNECT_BASELINE_CPU ProcConnectBaselineCPU = 162 + // ProcDomainGetJobInfo is libvirt's REMOTE_PROC_DOMAIN_GET_JOB_INFO ProcDomainGetJobInfo = 163 + // ProcDomainAbortJob is libvirt's REMOTE_PROC_DOMAIN_ABORT_JOB ProcDomainAbortJob = 164 + // ProcStorageVolWipe is libvirt's REMOTE_PROC_STORAGE_VOL_WIPE ProcStorageVolWipe = 165 + // ProcDomainMigrateSetMaxDowntime is libvirt's REMOTE_PROC_DOMAIN_MIGRATE_SET_MAX_DOWNTIME ProcDomainMigrateSetMaxDowntime = 166 + // ProcConnectDomainEventRegisterAny is libvirt's REMOTE_PROC_CONNECT_DOMAIN_EVENT_REGISTER_ANY ProcConnectDomainEventRegisterAny = 167 + // ProcConnectDomainEventDeregisterAny is libvirt's REMOTE_PROC_CONNECT_DOMAIN_EVENT_DEREGISTER_ANY ProcConnectDomainEventDeregisterAny = 168 + // ProcDomainEventReboot is libvirt's REMOTE_PROC_DOMAIN_EVENT_REBOOT ProcDomainEventReboot = 169 + // ProcDomainEventRtcChange is libvirt's REMOTE_PROC_DOMAIN_EVENT_RTC_CHANGE ProcDomainEventRtcChange = 170 + // ProcDomainEventWatchdog is libvirt's REMOTE_PROC_DOMAIN_EVENT_WATCHDOG ProcDomainEventWatchdog = 171 + // ProcDomainEventIOError is libvirt's REMOTE_PROC_DOMAIN_EVENT_IO_ERROR ProcDomainEventIOError = 172 + // ProcDomainEventGraphics is libvirt's REMOTE_PROC_DOMAIN_EVENT_GRAPHICS ProcDomainEventGraphics = 173 + // ProcDomainUpdateDeviceFlags is libvirt's REMOTE_PROC_DOMAIN_UPDATE_DEVICE_FLAGS ProcDomainUpdateDeviceFlags = 174 + // ProcNwfilterLookupByName is libvirt's REMOTE_PROC_NWFILTER_LOOKUP_BY_NAME ProcNwfilterLookupByName = 175 + // ProcNwfilterLookupByUUID is libvirt's REMOTE_PROC_NWFILTER_LOOKUP_BY_UUID ProcNwfilterLookupByUUID = 176 + // ProcNwfilterGetXMLDesc is libvirt's REMOTE_PROC_NWFILTER_GET_XML_DESC ProcNwfilterGetXMLDesc = 177 + // ProcConnectNumOfNwfilters is libvirt's REMOTE_PROC_CONNECT_NUM_OF_NWFILTERS ProcConnectNumOfNwfilters = 178 + // ProcConnectListNwfilters is libvirt's REMOTE_PROC_CONNECT_LIST_NWFILTERS ProcConnectListNwfilters = 179 + // ProcNwfilterDefineXML is libvirt's REMOTE_PROC_NWFILTER_DEFINE_XML ProcNwfilterDefineXML = 180 + // ProcNwfilterUndefine is libvirt's REMOTE_PROC_NWFILTER_UNDEFINE ProcNwfilterUndefine = 181 + // ProcDomainManagedSave is libvirt's REMOTE_PROC_DOMAIN_MANAGED_SAVE ProcDomainManagedSave = 182 + // ProcDomainHasManagedSaveImage is libvirt's REMOTE_PROC_DOMAIN_HAS_MANAGED_SAVE_IMAGE ProcDomainHasManagedSaveImage = 183 + // ProcDomainManagedSaveRemove is libvirt's REMOTE_PROC_DOMAIN_MANAGED_SAVE_REMOVE ProcDomainManagedSaveRemove = 184 + // ProcDomainSnapshotCreateXML is libvirt's REMOTE_PROC_DOMAIN_SNAPSHOT_CREATE_XML ProcDomainSnapshotCreateXML = 185 + // ProcDomainSnapshotGetXMLDesc is libvirt's REMOTE_PROC_DOMAIN_SNAPSHOT_GET_XML_DESC ProcDomainSnapshotGetXMLDesc = 186 + // ProcDomainSnapshotNum is libvirt's REMOTE_PROC_DOMAIN_SNAPSHOT_NUM ProcDomainSnapshotNum = 187 + // ProcDomainSnapshotListNames is libvirt's REMOTE_PROC_DOMAIN_SNAPSHOT_LIST_NAMES ProcDomainSnapshotListNames = 188 + // ProcDomainSnapshotLookupByName is libvirt's REMOTE_PROC_DOMAIN_SNAPSHOT_LOOKUP_BY_NAME ProcDomainSnapshotLookupByName = 189 + // ProcDomainHasCurrentSnapshot is libvirt's REMOTE_PROC_DOMAIN_HAS_CURRENT_SNAPSHOT ProcDomainHasCurrentSnapshot = 190 + // ProcDomainSnapshotCurrent is libvirt's REMOTE_PROC_DOMAIN_SNAPSHOT_CURRENT ProcDomainSnapshotCurrent = 191 + // ProcDomainRevertToSnapshot is libvirt's REMOTE_PROC_DOMAIN_REVERT_TO_SNAPSHOT ProcDomainRevertToSnapshot = 192 + // ProcDomainSnapshotDelete is libvirt's REMOTE_PROC_DOMAIN_SNAPSHOT_DELETE ProcDomainSnapshotDelete = 193 + // ProcDomainGetBlockInfo is libvirt's REMOTE_PROC_DOMAIN_GET_BLOCK_INFO ProcDomainGetBlockInfo = 194 + // ProcDomainEventIOErrorReason is libvirt's REMOTE_PROC_DOMAIN_EVENT_IO_ERROR_REASON ProcDomainEventIOErrorReason = 195 + // ProcDomainCreateWithFlags is libvirt's REMOTE_PROC_DOMAIN_CREATE_WITH_FLAGS ProcDomainCreateWithFlags = 196 + // ProcDomainSetMemoryParameters is libvirt's REMOTE_PROC_DOMAIN_SET_MEMORY_PARAMETERS ProcDomainSetMemoryParameters = 197 + // ProcDomainGetMemoryParameters is libvirt's REMOTE_PROC_DOMAIN_GET_MEMORY_PARAMETERS ProcDomainGetMemoryParameters = 198 + // ProcDomainSetVcpusFlags is libvirt's REMOTE_PROC_DOMAIN_SET_VCPUS_FLAGS ProcDomainSetVcpusFlags = 199 + // ProcDomainGetVcpusFlags is libvirt's REMOTE_PROC_DOMAIN_GET_VCPUS_FLAGS ProcDomainGetVcpusFlags = 200 + // ProcDomainOpenConsole is libvirt's REMOTE_PROC_DOMAIN_OPEN_CONSOLE ProcDomainOpenConsole = 201 + // ProcDomainIsUpdated is libvirt's REMOTE_PROC_DOMAIN_IS_UPDATED ProcDomainIsUpdated = 202 + // ProcConnectGetSysinfo is libvirt's REMOTE_PROC_CONNECT_GET_SYSINFO ProcConnectGetSysinfo = 203 + // ProcDomainSetMemoryFlags is libvirt's REMOTE_PROC_DOMAIN_SET_MEMORY_FLAGS ProcDomainSetMemoryFlags = 204 + // ProcDomainSetBlkioParameters is libvirt's REMOTE_PROC_DOMAIN_SET_BLKIO_PARAMETERS ProcDomainSetBlkioParameters = 205 + // ProcDomainGetBlkioParameters is libvirt's REMOTE_PROC_DOMAIN_GET_BLKIO_PARAMETERS ProcDomainGetBlkioParameters = 206 + // ProcDomainMigrateSetMaxSpeed is libvirt's REMOTE_PROC_DOMAIN_MIGRATE_SET_MAX_SPEED ProcDomainMigrateSetMaxSpeed = 207 + // ProcStorageVolUpload is libvirt's REMOTE_PROC_STORAGE_VOL_UPLOAD ProcStorageVolUpload = 208 + // ProcStorageVolDownload is libvirt's REMOTE_PROC_STORAGE_VOL_DOWNLOAD ProcStorageVolDownload = 209 + // ProcDomainInjectNmi is libvirt's REMOTE_PROC_DOMAIN_INJECT_NMI ProcDomainInjectNmi = 210 + // ProcDomainScreenshot is libvirt's REMOTE_PROC_DOMAIN_SCREENSHOT ProcDomainScreenshot = 211 + // ProcDomainGetState is libvirt's REMOTE_PROC_DOMAIN_GET_STATE ProcDomainGetState = 212 + // ProcDomainMigrateBegin3 is libvirt's REMOTE_PROC_DOMAIN_MIGRATE_BEGIN3 ProcDomainMigrateBegin3 = 213 + // ProcDomainMigratePrepare3 is libvirt's REMOTE_PROC_DOMAIN_MIGRATE_PREPARE3 ProcDomainMigratePrepare3 = 214 + // ProcDomainMigratePrepareTunnel3 is libvirt's REMOTE_PROC_DOMAIN_MIGRATE_PREPARE_TUNNEL3 ProcDomainMigratePrepareTunnel3 = 215 + // ProcDomainMigratePerform3 is libvirt's REMOTE_PROC_DOMAIN_MIGRATE_PERFORM3 ProcDomainMigratePerform3 = 216 + // ProcDomainMigrateFinish3 is libvirt's REMOTE_PROC_DOMAIN_MIGRATE_FINISH3 ProcDomainMigrateFinish3 = 217 + // ProcDomainMigrateConfirm3 is libvirt's REMOTE_PROC_DOMAIN_MIGRATE_CONFIRM3 ProcDomainMigrateConfirm3 = 218 + // ProcDomainSetSchedulerParametersFlags is libvirt's REMOTE_PROC_DOMAIN_SET_SCHEDULER_PARAMETERS_FLAGS ProcDomainSetSchedulerParametersFlags = 219 + // ProcInterfaceChangeBegin is libvirt's REMOTE_PROC_INTERFACE_CHANGE_BEGIN ProcInterfaceChangeBegin = 220 + // ProcInterfaceChangeCommit is libvirt's REMOTE_PROC_INTERFACE_CHANGE_COMMIT ProcInterfaceChangeCommit = 221 + // ProcInterfaceChangeRollback is libvirt's REMOTE_PROC_INTERFACE_CHANGE_ROLLBACK ProcInterfaceChangeRollback = 222 + // ProcDomainGetSchedulerParametersFlags is libvirt's REMOTE_PROC_DOMAIN_GET_SCHEDULER_PARAMETERS_FLAGS ProcDomainGetSchedulerParametersFlags = 223 + // ProcDomainEventControlError is libvirt's REMOTE_PROC_DOMAIN_EVENT_CONTROL_ERROR ProcDomainEventControlError = 224 + // ProcDomainPinVcpuFlags is libvirt's REMOTE_PROC_DOMAIN_PIN_VCPU_FLAGS ProcDomainPinVcpuFlags = 225 + // ProcDomainSendKey is libvirt's REMOTE_PROC_DOMAIN_SEND_KEY ProcDomainSendKey = 226 + // ProcNodeGetCPUStats is libvirt's REMOTE_PROC_NODE_GET_CPU_STATS ProcNodeGetCPUStats = 227 + // ProcNodeGetMemoryStats is libvirt's REMOTE_PROC_NODE_GET_MEMORY_STATS ProcNodeGetMemoryStats = 228 + // ProcDomainGetControlInfo is libvirt's REMOTE_PROC_DOMAIN_GET_CONTROL_INFO ProcDomainGetControlInfo = 229 + // ProcDomainGetVcpuPinInfo is libvirt's REMOTE_PROC_DOMAIN_GET_VCPU_PIN_INFO ProcDomainGetVcpuPinInfo = 230 + // ProcDomainUndefineFlags is libvirt's REMOTE_PROC_DOMAIN_UNDEFINE_FLAGS ProcDomainUndefineFlags = 231 + // ProcDomainSaveFlags is libvirt's REMOTE_PROC_DOMAIN_SAVE_FLAGS ProcDomainSaveFlags = 232 + // ProcDomainRestoreFlags is libvirt's REMOTE_PROC_DOMAIN_RESTORE_FLAGS ProcDomainRestoreFlags = 233 + // ProcDomainDestroyFlags is libvirt's REMOTE_PROC_DOMAIN_DESTROY_FLAGS ProcDomainDestroyFlags = 234 + // ProcDomainSaveImageGetXMLDesc is libvirt's REMOTE_PROC_DOMAIN_SAVE_IMAGE_GET_XML_DESC ProcDomainSaveImageGetXMLDesc = 235 + // ProcDomainSaveImageDefineXML is libvirt's REMOTE_PROC_DOMAIN_SAVE_IMAGE_DEFINE_XML ProcDomainSaveImageDefineXML = 236 + // ProcDomainBlockJobAbort is libvirt's REMOTE_PROC_DOMAIN_BLOCK_JOB_ABORT ProcDomainBlockJobAbort = 237 + // ProcDomainGetBlockJobInfo is libvirt's REMOTE_PROC_DOMAIN_GET_BLOCK_JOB_INFO ProcDomainGetBlockJobInfo = 238 + // ProcDomainBlockJobSetSpeed is libvirt's REMOTE_PROC_DOMAIN_BLOCK_JOB_SET_SPEED ProcDomainBlockJobSetSpeed = 239 + // ProcDomainBlockPull is libvirt's REMOTE_PROC_DOMAIN_BLOCK_PULL ProcDomainBlockPull = 240 + // ProcDomainEventBlockJob is libvirt's REMOTE_PROC_DOMAIN_EVENT_BLOCK_JOB ProcDomainEventBlockJob = 241 + // ProcDomainMigrateGetMaxSpeed is libvirt's REMOTE_PROC_DOMAIN_MIGRATE_GET_MAX_SPEED ProcDomainMigrateGetMaxSpeed = 242 + // ProcDomainBlockStatsFlags is libvirt's REMOTE_PROC_DOMAIN_BLOCK_STATS_FLAGS ProcDomainBlockStatsFlags = 243 + // ProcDomainSnapshotGetParent is libvirt's REMOTE_PROC_DOMAIN_SNAPSHOT_GET_PARENT ProcDomainSnapshotGetParent = 244 + // ProcDomainReset is libvirt's REMOTE_PROC_DOMAIN_RESET ProcDomainReset = 245 + // ProcDomainSnapshotNumChildren is libvirt's REMOTE_PROC_DOMAIN_SNAPSHOT_NUM_CHILDREN ProcDomainSnapshotNumChildren = 246 + // ProcDomainSnapshotListChildrenNames is libvirt's REMOTE_PROC_DOMAIN_SNAPSHOT_LIST_CHILDREN_NAMES ProcDomainSnapshotListChildrenNames = 247 + // ProcDomainEventDiskChange is libvirt's REMOTE_PROC_DOMAIN_EVENT_DISK_CHANGE ProcDomainEventDiskChange = 248 + // ProcDomainOpenGraphics is libvirt's REMOTE_PROC_DOMAIN_OPEN_GRAPHICS ProcDomainOpenGraphics = 249 + // ProcNodeSuspendForDuration is libvirt's REMOTE_PROC_NODE_SUSPEND_FOR_DURATION ProcNodeSuspendForDuration = 250 + // ProcDomainBlockResize is libvirt's REMOTE_PROC_DOMAIN_BLOCK_RESIZE ProcDomainBlockResize = 251 + // ProcDomainSetBlockIOTune is libvirt's REMOTE_PROC_DOMAIN_SET_BLOCK_IO_TUNE ProcDomainSetBlockIOTune = 252 + // ProcDomainGetBlockIOTune is libvirt's REMOTE_PROC_DOMAIN_GET_BLOCK_IO_TUNE ProcDomainGetBlockIOTune = 253 + // ProcDomainSetNumaParameters is libvirt's REMOTE_PROC_DOMAIN_SET_NUMA_PARAMETERS ProcDomainSetNumaParameters = 254 + // ProcDomainGetNumaParameters is libvirt's REMOTE_PROC_DOMAIN_GET_NUMA_PARAMETERS ProcDomainGetNumaParameters = 255 + // ProcDomainSetInterfaceParameters is libvirt's REMOTE_PROC_DOMAIN_SET_INTERFACE_PARAMETERS ProcDomainSetInterfaceParameters = 256 + // ProcDomainGetInterfaceParameters is libvirt's REMOTE_PROC_DOMAIN_GET_INTERFACE_PARAMETERS ProcDomainGetInterfaceParameters = 257 + // ProcDomainShutdownFlags is libvirt's REMOTE_PROC_DOMAIN_SHUTDOWN_FLAGS ProcDomainShutdownFlags = 258 + // ProcStorageVolWipePattern is libvirt's REMOTE_PROC_STORAGE_VOL_WIPE_PATTERN ProcStorageVolWipePattern = 259 + // ProcStorageVolResize is libvirt's REMOTE_PROC_STORAGE_VOL_RESIZE ProcStorageVolResize = 260 + // ProcDomainPmSuspendForDuration is libvirt's REMOTE_PROC_DOMAIN_PM_SUSPEND_FOR_DURATION ProcDomainPmSuspendForDuration = 261 + // ProcDomainGetCPUStats is libvirt's REMOTE_PROC_DOMAIN_GET_CPU_STATS ProcDomainGetCPUStats = 262 + // ProcDomainGetDiskErrors is libvirt's REMOTE_PROC_DOMAIN_GET_DISK_ERRORS ProcDomainGetDiskErrors = 263 + // ProcDomainSetMetadata is libvirt's REMOTE_PROC_DOMAIN_SET_METADATA ProcDomainSetMetadata = 264 + // ProcDomainGetMetadata is libvirt's REMOTE_PROC_DOMAIN_GET_METADATA ProcDomainGetMetadata = 265 + // ProcDomainBlockRebase is libvirt's REMOTE_PROC_DOMAIN_BLOCK_REBASE ProcDomainBlockRebase = 266 + // ProcDomainPmWakeup is libvirt's REMOTE_PROC_DOMAIN_PM_WAKEUP ProcDomainPmWakeup = 267 + // ProcDomainEventTrayChange is libvirt's REMOTE_PROC_DOMAIN_EVENT_TRAY_CHANGE ProcDomainEventTrayChange = 268 + // ProcDomainEventPmwakeup is libvirt's REMOTE_PROC_DOMAIN_EVENT_PMWAKEUP ProcDomainEventPmwakeup = 269 + // ProcDomainEventPmsuspend is libvirt's REMOTE_PROC_DOMAIN_EVENT_PMSUSPEND ProcDomainEventPmsuspend = 270 + // ProcDomainSnapshotIsCurrent is libvirt's REMOTE_PROC_DOMAIN_SNAPSHOT_IS_CURRENT ProcDomainSnapshotIsCurrent = 271 + // ProcDomainSnapshotHasMetadata is libvirt's REMOTE_PROC_DOMAIN_SNAPSHOT_HAS_METADATA ProcDomainSnapshotHasMetadata = 272 + // ProcConnectListAllDomains is libvirt's REMOTE_PROC_CONNECT_LIST_ALL_DOMAINS ProcConnectListAllDomains = 273 + // ProcDomainListAllSnapshots is libvirt's REMOTE_PROC_DOMAIN_LIST_ALL_SNAPSHOTS ProcDomainListAllSnapshots = 274 + // ProcDomainSnapshotListAllChildren is libvirt's REMOTE_PROC_DOMAIN_SNAPSHOT_LIST_ALL_CHILDREN ProcDomainSnapshotListAllChildren = 275 + // ProcDomainEventBalloonChange is libvirt's REMOTE_PROC_DOMAIN_EVENT_BALLOON_CHANGE ProcDomainEventBalloonChange = 276 + // ProcDomainGetHostname is libvirt's REMOTE_PROC_DOMAIN_GET_HOSTNAME ProcDomainGetHostname = 277 + // ProcDomainGetSecurityLabelList is libvirt's REMOTE_PROC_DOMAIN_GET_SECURITY_LABEL_LIST ProcDomainGetSecurityLabelList = 278 + // ProcDomainPinEmulator is libvirt's REMOTE_PROC_DOMAIN_PIN_EMULATOR ProcDomainPinEmulator = 279 + // ProcDomainGetEmulatorPinInfo is libvirt's REMOTE_PROC_DOMAIN_GET_EMULATOR_PIN_INFO ProcDomainGetEmulatorPinInfo = 280 + // ProcConnectListAllStoragePools is libvirt's REMOTE_PROC_CONNECT_LIST_ALL_STORAGE_POOLS ProcConnectListAllStoragePools = 281 + // ProcStoragePoolListAllVolumes is libvirt's REMOTE_PROC_STORAGE_POOL_LIST_ALL_VOLUMES ProcStoragePoolListAllVolumes = 282 + // ProcConnectListAllNetworks is libvirt's REMOTE_PROC_CONNECT_LIST_ALL_NETWORKS ProcConnectListAllNetworks = 283 + // ProcConnectListAllInterfaces is libvirt's REMOTE_PROC_CONNECT_LIST_ALL_INTERFACES ProcConnectListAllInterfaces = 284 + // ProcConnectListAllNodeDevices is libvirt's REMOTE_PROC_CONNECT_LIST_ALL_NODE_DEVICES ProcConnectListAllNodeDevices = 285 + // ProcConnectListAllNwfilters is libvirt's REMOTE_PROC_CONNECT_LIST_ALL_NWFILTERS ProcConnectListAllNwfilters = 286 + // ProcConnectListAllSecrets is libvirt's REMOTE_PROC_CONNECT_LIST_ALL_SECRETS ProcConnectListAllSecrets = 287 + // ProcNodeSetMemoryParameters is libvirt's REMOTE_PROC_NODE_SET_MEMORY_PARAMETERS ProcNodeSetMemoryParameters = 288 + // ProcNodeGetMemoryParameters is libvirt's REMOTE_PROC_NODE_GET_MEMORY_PARAMETERS ProcNodeGetMemoryParameters = 289 + // ProcDomainBlockCommit is libvirt's REMOTE_PROC_DOMAIN_BLOCK_COMMIT ProcDomainBlockCommit = 290 + // ProcNetworkUpdate is libvirt's REMOTE_PROC_NETWORK_UPDATE ProcNetworkUpdate = 291 + // ProcDomainEventPmsuspendDisk is libvirt's REMOTE_PROC_DOMAIN_EVENT_PMSUSPEND_DISK ProcDomainEventPmsuspendDisk = 292 + // ProcNodeGetCPUMap is libvirt's REMOTE_PROC_NODE_GET_CPU_MAP ProcNodeGetCPUMap = 293 + // ProcDomainFstrim is libvirt's REMOTE_PROC_DOMAIN_FSTRIM ProcDomainFstrim = 294 + // ProcDomainSendProcessSignal is libvirt's REMOTE_PROC_DOMAIN_SEND_PROCESS_SIGNAL ProcDomainSendProcessSignal = 295 + // ProcDomainOpenChannel is libvirt's REMOTE_PROC_DOMAIN_OPEN_CHANNEL ProcDomainOpenChannel = 296 + // ProcNodeDeviceLookupScsiHostByWwn is libvirt's REMOTE_PROC_NODE_DEVICE_LOOKUP_SCSI_HOST_BY_WWN ProcNodeDeviceLookupScsiHostByWwn = 297 + // ProcDomainGetJobStats is libvirt's REMOTE_PROC_DOMAIN_GET_JOB_STATS ProcDomainGetJobStats = 298 + // ProcDomainMigrateGetCompressionCache is libvirt's REMOTE_PROC_DOMAIN_MIGRATE_GET_COMPRESSION_CACHE ProcDomainMigrateGetCompressionCache = 299 + // ProcDomainMigrateSetCompressionCache is libvirt's REMOTE_PROC_DOMAIN_MIGRATE_SET_COMPRESSION_CACHE ProcDomainMigrateSetCompressionCache = 300 + // ProcNodeDeviceDetachFlags is libvirt's REMOTE_PROC_NODE_DEVICE_DETACH_FLAGS ProcNodeDeviceDetachFlags = 301 + // ProcDomainMigrateBegin3Params is libvirt's REMOTE_PROC_DOMAIN_MIGRATE_BEGIN3_PARAMS ProcDomainMigrateBegin3Params = 302 + // ProcDomainMigratePrepare3Params is libvirt's REMOTE_PROC_DOMAIN_MIGRATE_PREPARE3_PARAMS ProcDomainMigratePrepare3Params = 303 + // ProcDomainMigratePrepareTunnel3Params is libvirt's REMOTE_PROC_DOMAIN_MIGRATE_PREPARE_TUNNEL3_PARAMS ProcDomainMigratePrepareTunnel3Params = 304 + // ProcDomainMigratePerform3Params is libvirt's REMOTE_PROC_DOMAIN_MIGRATE_PERFORM3_PARAMS ProcDomainMigratePerform3Params = 305 + // ProcDomainMigrateFinish3Params is libvirt's REMOTE_PROC_DOMAIN_MIGRATE_FINISH3_PARAMS ProcDomainMigrateFinish3Params = 306 + // ProcDomainMigrateConfirm3Params is libvirt's REMOTE_PROC_DOMAIN_MIGRATE_CONFIRM3_PARAMS ProcDomainMigrateConfirm3Params = 307 + // ProcDomainSetMemoryStatsPeriod is libvirt's REMOTE_PROC_DOMAIN_SET_MEMORY_STATS_PERIOD ProcDomainSetMemoryStatsPeriod = 308 + // ProcDomainCreateXMLWithFiles is libvirt's REMOTE_PROC_DOMAIN_CREATE_XML_WITH_FILES ProcDomainCreateXMLWithFiles = 309 + // ProcDomainCreateWithFiles is libvirt's REMOTE_PROC_DOMAIN_CREATE_WITH_FILES ProcDomainCreateWithFiles = 310 + // ProcDomainEventDeviceRemoved is libvirt's REMOTE_PROC_DOMAIN_EVENT_DEVICE_REMOVED ProcDomainEventDeviceRemoved = 311 + // ProcConnectGetCPUModelNames is libvirt's REMOTE_PROC_CONNECT_GET_CPU_MODEL_NAMES ProcConnectGetCPUModelNames = 312 + // ProcConnectNetworkEventRegisterAny is libvirt's REMOTE_PROC_CONNECT_NETWORK_EVENT_REGISTER_ANY ProcConnectNetworkEventRegisterAny = 313 + // ProcConnectNetworkEventDeregisterAny is libvirt's REMOTE_PROC_CONNECT_NETWORK_EVENT_DEREGISTER_ANY ProcConnectNetworkEventDeregisterAny = 314 + // ProcNetworkEventLifecycle is libvirt's REMOTE_PROC_NETWORK_EVENT_LIFECYCLE ProcNetworkEventLifecycle = 315 + // ProcConnectDomainEventCallbackRegisterAny is libvirt's REMOTE_PROC_CONNECT_DOMAIN_EVENT_CALLBACK_REGISTER_ANY ProcConnectDomainEventCallbackRegisterAny = 316 + // ProcConnectDomainEventCallbackDeregisterAny is libvirt's REMOTE_PROC_CONNECT_DOMAIN_EVENT_CALLBACK_DEREGISTER_ANY ProcConnectDomainEventCallbackDeregisterAny = 317 + // ProcDomainEventCallbackLifecycle is libvirt's REMOTE_PROC_DOMAIN_EVENT_CALLBACK_LIFECYCLE ProcDomainEventCallbackLifecycle = 318 + // ProcDomainEventCallbackReboot is libvirt's REMOTE_PROC_DOMAIN_EVENT_CALLBACK_REBOOT ProcDomainEventCallbackReboot = 319 + // ProcDomainEventCallbackRtcChange is libvirt's REMOTE_PROC_DOMAIN_EVENT_CALLBACK_RTC_CHANGE ProcDomainEventCallbackRtcChange = 320 + // ProcDomainEventCallbackWatchdog is libvirt's REMOTE_PROC_DOMAIN_EVENT_CALLBACK_WATCHDOG ProcDomainEventCallbackWatchdog = 321 + // ProcDomainEventCallbackIOError is libvirt's REMOTE_PROC_DOMAIN_EVENT_CALLBACK_IO_ERROR ProcDomainEventCallbackIOError = 322 + // ProcDomainEventCallbackGraphics is libvirt's REMOTE_PROC_DOMAIN_EVENT_CALLBACK_GRAPHICS ProcDomainEventCallbackGraphics = 323 + // ProcDomainEventCallbackIOErrorReason is libvirt's REMOTE_PROC_DOMAIN_EVENT_CALLBACK_IO_ERROR_REASON ProcDomainEventCallbackIOErrorReason = 324 + // ProcDomainEventCallbackControlError is libvirt's REMOTE_PROC_DOMAIN_EVENT_CALLBACK_CONTROL_ERROR ProcDomainEventCallbackControlError = 325 + // ProcDomainEventCallbackBlockJob is libvirt's REMOTE_PROC_DOMAIN_EVENT_CALLBACK_BLOCK_JOB ProcDomainEventCallbackBlockJob = 326 + // ProcDomainEventCallbackDiskChange is libvirt's REMOTE_PROC_DOMAIN_EVENT_CALLBACK_DISK_CHANGE ProcDomainEventCallbackDiskChange = 327 + // ProcDomainEventCallbackTrayChange is libvirt's REMOTE_PROC_DOMAIN_EVENT_CALLBACK_TRAY_CHANGE ProcDomainEventCallbackTrayChange = 328 + // ProcDomainEventCallbackPmwakeup is libvirt's REMOTE_PROC_DOMAIN_EVENT_CALLBACK_PMWAKEUP ProcDomainEventCallbackPmwakeup = 329 + // ProcDomainEventCallbackPmsuspend is libvirt's REMOTE_PROC_DOMAIN_EVENT_CALLBACK_PMSUSPEND ProcDomainEventCallbackPmsuspend = 330 + // ProcDomainEventCallbackBalloonChange is libvirt's REMOTE_PROC_DOMAIN_EVENT_CALLBACK_BALLOON_CHANGE ProcDomainEventCallbackBalloonChange = 331 + // ProcDomainEventCallbackPmsuspendDisk is libvirt's REMOTE_PROC_DOMAIN_EVENT_CALLBACK_PMSUSPEND_DISK ProcDomainEventCallbackPmsuspendDisk = 332 + // ProcDomainEventCallbackDeviceRemoved is libvirt's REMOTE_PROC_DOMAIN_EVENT_CALLBACK_DEVICE_REMOVED ProcDomainEventCallbackDeviceRemoved = 333 + // ProcDomainCoreDumpWithFormat is libvirt's REMOTE_PROC_DOMAIN_CORE_DUMP_WITH_FORMAT ProcDomainCoreDumpWithFormat = 334 + // ProcDomainFsfreeze is libvirt's REMOTE_PROC_DOMAIN_FSFREEZE ProcDomainFsfreeze = 335 + // ProcDomainFsthaw is libvirt's REMOTE_PROC_DOMAIN_FSTHAW ProcDomainFsthaw = 336 + // ProcDomainGetTime is libvirt's REMOTE_PROC_DOMAIN_GET_TIME ProcDomainGetTime = 337 + // ProcDomainSetTime is libvirt's REMOTE_PROC_DOMAIN_SET_TIME ProcDomainSetTime = 338 + // ProcDomainEventBlockJob2 is libvirt's REMOTE_PROC_DOMAIN_EVENT_BLOCK_JOB_2 ProcDomainEventBlockJob2 = 339 + // ProcNodeGetFreePages is libvirt's REMOTE_PROC_NODE_GET_FREE_PAGES ProcNodeGetFreePages = 340 + // ProcNetworkGetDhcpLeases is libvirt's REMOTE_PROC_NETWORK_GET_DHCP_LEASES ProcNetworkGetDhcpLeases = 341 + // ProcConnectGetDomainCapabilities is libvirt's REMOTE_PROC_CONNECT_GET_DOMAIN_CAPABILITIES ProcConnectGetDomainCapabilities = 342 + // ProcDomainOpenGraphicsFd is libvirt's REMOTE_PROC_DOMAIN_OPEN_GRAPHICS_FD ProcDomainOpenGraphicsFd = 343 + // ProcConnectGetAllDomainStats is libvirt's REMOTE_PROC_CONNECT_GET_ALL_DOMAIN_STATS ProcConnectGetAllDomainStats = 344 + // ProcDomainBlockCopy is libvirt's REMOTE_PROC_DOMAIN_BLOCK_COPY ProcDomainBlockCopy = 345 + // ProcDomainEventCallbackTunable is libvirt's REMOTE_PROC_DOMAIN_EVENT_CALLBACK_TUNABLE ProcDomainEventCallbackTunable = 346 + // ProcNodeAllocPages is libvirt's REMOTE_PROC_NODE_ALLOC_PAGES ProcNodeAllocPages = 347 + // ProcDomainEventCallbackAgentLifecycle is libvirt's REMOTE_PROC_DOMAIN_EVENT_CALLBACK_AGENT_LIFECYCLE ProcDomainEventCallbackAgentLifecycle = 348 + // ProcDomainGetFsinfo is libvirt's REMOTE_PROC_DOMAIN_GET_FSINFO ProcDomainGetFsinfo = 349 + // ProcDomainDefineXMLFlags is libvirt's REMOTE_PROC_DOMAIN_DEFINE_XML_FLAGS ProcDomainDefineXMLFlags = 350 + // ProcDomainGetIothreadInfo is libvirt's REMOTE_PROC_DOMAIN_GET_IOTHREAD_INFO ProcDomainGetIothreadInfo = 351 + // ProcDomainPinIothread is libvirt's REMOTE_PROC_DOMAIN_PIN_IOTHREAD ProcDomainPinIothread = 352 + // ProcDomainInterfaceAddresses is libvirt's REMOTE_PROC_DOMAIN_INTERFACE_ADDRESSES ProcDomainInterfaceAddresses = 353 + // ProcDomainEventCallbackDeviceAdded is libvirt's REMOTE_PROC_DOMAIN_EVENT_CALLBACK_DEVICE_ADDED ProcDomainEventCallbackDeviceAdded = 354 + // ProcDomainAddIothread is libvirt's REMOTE_PROC_DOMAIN_ADD_IOTHREAD ProcDomainAddIothread = 355 + // ProcDomainDelIothread is libvirt's REMOTE_PROC_DOMAIN_DEL_IOTHREAD ProcDomainDelIothread = 356 + // ProcDomainSetUserPassword is libvirt's REMOTE_PROC_DOMAIN_SET_USER_PASSWORD ProcDomainSetUserPassword = 357 + // ProcDomainRename is libvirt's REMOTE_PROC_DOMAIN_RENAME ProcDomainRename = 358 + // ProcDomainEventCallbackMigrationIteration is libvirt's REMOTE_PROC_DOMAIN_EVENT_CALLBACK_MIGRATION_ITERATION ProcDomainEventCallbackMigrationIteration = 359 + // ProcConnectRegisterCloseCallback is libvirt's REMOTE_PROC_CONNECT_REGISTER_CLOSE_CALLBACK ProcConnectRegisterCloseCallback = 360 + // ProcConnectUnregisterCloseCallback is libvirt's REMOTE_PROC_CONNECT_UNREGISTER_CLOSE_CALLBACK ProcConnectUnregisterCloseCallback = 361 + // ProcConnectEventConnectionClosed is libvirt's REMOTE_PROC_CONNECT_EVENT_CONNECTION_CLOSED ProcConnectEventConnectionClosed = 362 + // ProcDomainEventCallbackJobCompleted is libvirt's REMOTE_PROC_DOMAIN_EVENT_CALLBACK_JOB_COMPLETED ProcDomainEventCallbackJobCompleted = 363 + // ProcDomainMigrateStartPostCopy is libvirt's REMOTE_PROC_DOMAIN_MIGRATE_START_POST_COPY ProcDomainMigrateStartPostCopy = 364 + // ProcDomainGetPerfEvents is libvirt's REMOTE_PROC_DOMAIN_GET_PERF_EVENTS ProcDomainGetPerfEvents = 365 + // ProcDomainSetPerfEvents is libvirt's REMOTE_PROC_DOMAIN_SET_PERF_EVENTS ProcDomainSetPerfEvents = 366 + // ProcDomainEventCallbackDeviceRemovalFailed is libvirt's REMOTE_PROC_DOMAIN_EVENT_CALLBACK_DEVICE_REMOVAL_FAILED ProcDomainEventCallbackDeviceRemovalFailed = 367 + // ProcConnectStoragePoolEventRegisterAny is libvirt's REMOTE_PROC_CONNECT_STORAGE_POOL_EVENT_REGISTER_ANY ProcConnectStoragePoolEventRegisterAny = 368 + // ProcConnectStoragePoolEventDeregisterAny is libvirt's REMOTE_PROC_CONNECT_STORAGE_POOL_EVENT_DEREGISTER_ANY ProcConnectStoragePoolEventDeregisterAny = 369 + // ProcStoragePoolEventLifecycle is libvirt's REMOTE_PROC_STORAGE_POOL_EVENT_LIFECYCLE ProcStoragePoolEventLifecycle = 370 + // ProcDomainGetGuestVcpus is libvirt's REMOTE_PROC_DOMAIN_GET_GUEST_VCPUS ProcDomainGetGuestVcpus = 371 + // ProcDomainSetGuestVcpus is libvirt's REMOTE_PROC_DOMAIN_SET_GUEST_VCPUS ProcDomainSetGuestVcpus = 372 + // ProcStoragePoolEventRefresh is libvirt's REMOTE_PROC_STORAGE_POOL_EVENT_REFRESH ProcStoragePoolEventRefresh = 373 + // ProcConnectNodeDeviceEventRegisterAny is libvirt's REMOTE_PROC_CONNECT_NODE_DEVICE_EVENT_REGISTER_ANY ProcConnectNodeDeviceEventRegisterAny = 374 + // ProcConnectNodeDeviceEventDeregisterAny is libvirt's REMOTE_PROC_CONNECT_NODE_DEVICE_EVENT_DEREGISTER_ANY ProcConnectNodeDeviceEventDeregisterAny = 375 + // ProcNodeDeviceEventLifecycle is libvirt's REMOTE_PROC_NODE_DEVICE_EVENT_LIFECYCLE ProcNodeDeviceEventLifecycle = 376 + // ProcNodeDeviceEventUpdate is libvirt's REMOTE_PROC_NODE_DEVICE_EVENT_UPDATE ProcNodeDeviceEventUpdate = 377 + // ProcStorageVolGetInfoFlags is libvirt's REMOTE_PROC_STORAGE_VOL_GET_INFO_FLAGS ProcStorageVolGetInfoFlags = 378 + // ProcDomainEventCallbackMetadataChange is libvirt's REMOTE_PROC_DOMAIN_EVENT_CALLBACK_METADATA_CHANGE ProcDomainEventCallbackMetadataChange = 379 + // ProcConnectSecretEventRegisterAny is libvirt's REMOTE_PROC_CONNECT_SECRET_EVENT_REGISTER_ANY ProcConnectSecretEventRegisterAny = 380 + // ProcConnectSecretEventDeregisterAny is libvirt's REMOTE_PROC_CONNECT_SECRET_EVENT_DEREGISTER_ANY ProcConnectSecretEventDeregisterAny = 381 + // ProcSecretEventLifecycle is libvirt's REMOTE_PROC_SECRET_EVENT_LIFECYCLE ProcSecretEventLifecycle = 382 + // ProcSecretEventValueChanged is libvirt's REMOTE_PROC_SECRET_EVENT_VALUE_CHANGED ProcSecretEventValueChanged = 383 + // ProcDomainSetVcpu is libvirt's REMOTE_PROC_DOMAIN_SET_VCPU ProcDomainSetVcpu = 384 + // ProcDomainEventBlockThreshold is libvirt's REMOTE_PROC_DOMAIN_EVENT_BLOCK_THRESHOLD ProcDomainEventBlockThreshold = 385 + // ProcDomainSetBlockThreshold is libvirt's REMOTE_PROC_DOMAIN_SET_BLOCK_THRESHOLD ProcDomainSetBlockThreshold = 386 + // ProcDomainMigrateGetMaxDowntime is libvirt's REMOTE_PROC_DOMAIN_MIGRATE_GET_MAX_DOWNTIME ProcDomainMigrateGetMaxDowntime = 387 + // ProcDomainManagedSaveGetXMLDesc is libvirt's REMOTE_PROC_DOMAIN_MANAGED_SAVE_GET_XML_DESC ProcDomainManagedSaveGetXMLDesc = 388 + // ProcDomainManagedSaveDefineXML is libvirt's REMOTE_PROC_DOMAIN_MANAGED_SAVE_DEFINE_XML ProcDomainManagedSaveDefineXML = 389 + // ProcDomainSetLifecycleAction is libvirt's REMOTE_PROC_DOMAIN_SET_LIFECYCLE_ACTION ProcDomainSetLifecycleAction = 390 // From consts: + // StringMax is libvirt's REMOTE_STRING_MAX StringMax = 4194304 + // DomainListMax is libvirt's REMOTE_DOMAIN_LIST_MAX DomainListMax = 16384 + // CpumapMax is libvirt's REMOTE_CPUMAP_MAX CpumapMax = 2048 + // VcpuinfoMax is libvirt's REMOTE_VCPUINFO_MAX VcpuinfoMax = 16384 + // CpumapsMax is libvirt's REMOTE_CPUMAPS_MAX CpumapsMax = 8388608 + // IothreadInfoMax is libvirt's REMOTE_IOTHREAD_INFO_MAX IothreadInfoMax = 16384 + // MigrateCookieMax is libvirt's REMOTE_MIGRATE_COOKIE_MAX MigrateCookieMax = 4194304 + // NetworkListMax is libvirt's REMOTE_NETWORK_LIST_MAX NetworkListMax = 16384 + // InterfaceListMax is libvirt's REMOTE_INTERFACE_LIST_MAX InterfaceListMax = 16384 + // StoragePoolListMax is libvirt's REMOTE_STORAGE_POOL_LIST_MAX StoragePoolListMax = 16384 + // StorageVolListMax is libvirt's REMOTE_STORAGE_VOL_LIST_MAX StorageVolListMax = 16384 + // NodeDeviceListMax is libvirt's REMOTE_NODE_DEVICE_LIST_MAX NodeDeviceListMax = 65536 + // NodeDeviceCapsListMax is libvirt's REMOTE_NODE_DEVICE_CAPS_LIST_MAX NodeDeviceCapsListMax = 65536 + // NwfilterListMax is libvirt's REMOTE_NWFILTER_LIST_MAX NwfilterListMax = 16384 + // DomainSchedulerParametersMax is libvirt's REMOTE_DOMAIN_SCHEDULER_PARAMETERS_MAX DomainSchedulerParametersMax = 16 + // DomainBlkioParametersMax is libvirt's REMOTE_DOMAIN_BLKIO_PARAMETERS_MAX DomainBlkioParametersMax = 16 + // DomainMemoryParametersMax is libvirt's REMOTE_DOMAIN_MEMORY_PARAMETERS_MAX DomainMemoryParametersMax = 16 + // DomainBlockIOTuneParametersMax is libvirt's REMOTE_DOMAIN_BLOCK_IO_TUNE_PARAMETERS_MAX DomainBlockIOTuneParametersMax = 32 + // DomainNumaParametersMax is libvirt's REMOTE_DOMAIN_NUMA_PARAMETERS_MAX DomainNumaParametersMax = 16 + // DomainPerfEventsMax is libvirt's REMOTE_DOMAIN_PERF_EVENTS_MAX DomainPerfEventsMax = 64 + // DomainBlockCopyParametersMax is libvirt's REMOTE_DOMAIN_BLOCK_COPY_PARAMETERS_MAX DomainBlockCopyParametersMax = 16 + // NodeCPUStatsMax is libvirt's REMOTE_NODE_CPU_STATS_MAX NodeCPUStatsMax = 16 + // NodeMemoryStatsMax is libvirt's REMOTE_NODE_MEMORY_STATS_MAX NodeMemoryStatsMax = 16 + // DomainBlockStatsParametersMax is libvirt's REMOTE_DOMAIN_BLOCK_STATS_PARAMETERS_MAX DomainBlockStatsParametersMax = 16 + // NodeMaxCells is libvirt's REMOTE_NODE_MAX_CELLS NodeMaxCells = 1024 + // AuthSaslDataMax is libvirt's REMOTE_AUTH_SASL_DATA_MAX AuthSaslDataMax = 65536 + // AuthTypeListMax is libvirt's REMOTE_AUTH_TYPE_LIST_MAX AuthTypeListMax = 20 + // DomainMemoryStatsMax is libvirt's REMOTE_DOMAIN_MEMORY_STATS_MAX DomainMemoryStatsMax = 1024 + // DomainSnapshotListMax is libvirt's REMOTE_DOMAIN_SNAPSHOT_LIST_MAX DomainSnapshotListMax = 16384 + // DomainBlockPeekBufferMax is libvirt's REMOTE_DOMAIN_BLOCK_PEEK_BUFFER_MAX DomainBlockPeekBufferMax = 4194304 + // DomainMemoryPeekBufferMax is libvirt's REMOTE_DOMAIN_MEMORY_PEEK_BUFFER_MAX DomainMemoryPeekBufferMax = 4194304 + // SecurityLabelListMax is libvirt's REMOTE_SECURITY_LABEL_LIST_MAX SecurityLabelListMax = 64 + // SecretValueMax is libvirt's REMOTE_SECRET_VALUE_MAX SecretValueMax = 65536 + // SecretListMax is libvirt's REMOTE_SECRET_LIST_MAX SecretListMax = 16384 + // CPUBaselineMax is libvirt's REMOTE_CPU_BASELINE_MAX CPUBaselineMax = 256 + // DomainSendKeyMax is libvirt's REMOTE_DOMAIN_SEND_KEY_MAX DomainSendKeyMax = 16 + // DomainInterfaceParametersMax is libvirt's REMOTE_DOMAIN_INTERFACE_PARAMETERS_MAX DomainInterfaceParametersMax = 16 + // DomainGetCPUStatsNcpusMax is libvirt's REMOTE_DOMAIN_GET_CPU_STATS_NCPUS_MAX DomainGetCPUStatsNcpusMax = 128 + // DomainGetCPUStatsMax is libvirt's REMOTE_DOMAIN_GET_CPU_STATS_MAX DomainGetCPUStatsMax = 2048 + // DomainDiskErrorsMax is libvirt's REMOTE_DOMAIN_DISK_ERRORS_MAX DomainDiskErrorsMax = 256 + // NodeMemoryParametersMax is libvirt's REMOTE_NODE_MEMORY_PARAMETERS_MAX NodeMemoryParametersMax = 64 + // DomainMigrateParamListMax is libvirt's REMOTE_DOMAIN_MIGRATE_PARAM_LIST_MAX DomainMigrateParamListMax = 64 + // DomainJobStatsMax is libvirt's REMOTE_DOMAIN_JOB_STATS_MAX DomainJobStatsMax = 64 + // ConnectCPUModelsMax is libvirt's REMOTE_CONNECT_CPU_MODELS_MAX ConnectCPUModelsMax = 8192 + // DomainFsfreezeMountpointsMax is libvirt's REMOTE_DOMAIN_FSFREEZE_MOUNTPOINTS_MAX DomainFsfreezeMountpointsMax = 256 + // NetworkDhcpLeasesMax is libvirt's REMOTE_NETWORK_DHCP_LEASES_MAX NetworkDhcpLeasesMax = 65536 + // ConnectGetAllDomainStatsMax is libvirt's REMOTE_CONNECT_GET_ALL_DOMAIN_STATS_MAX ConnectGetAllDomainStatsMax = 262144 + // DomainEventTunableMax is libvirt's REMOTE_DOMAIN_EVENT_TUNABLE_MAX DomainEventTunableMax = 2048 + // DomainFsinfoMax is libvirt's REMOTE_DOMAIN_FSINFO_MAX DomainFsinfoMax = 256 + // DomainFsinfoDisksMax is libvirt's REMOTE_DOMAIN_FSINFO_DISKS_MAX DomainFsinfoDisksMax = 256 + // DomainInterfaceMax is libvirt's REMOTE_DOMAIN_INTERFACE_MAX DomainInterfaceMax = 2048 + // DomainIPAddrMax is libvirt's REMOTE_DOMAIN_IP_ADDR_MAX DomainIPAddrMax = 2048 + // DomainGuestVcpuParamsMax is libvirt's REMOTE_DOMAIN_GUEST_VCPU_PARAMS_MAX DomainGuestVcpuParamsMax = 64 + // DomainEventGraphicsIdentityMax is libvirt's REMOTE_DOMAIN_EVENT_GRAPHICS_IDENTITY_MAX DomainEventGraphicsIdentityMax = 20 + // Program is libvirt's REMOTE_PROGRAM Program = 0x20008086 + // ProtocolVersion is libvirt's REMOTE_PROTOCOL_VERSION ProtocolVersion = 1 ) diff --git a/internal/lvgen/constants.tmpl b/internal/lvgen/constants.tmpl index 6677409..75da0ef 100644 --- a/internal/lvgen/constants.tmpl +++ b/internal/lvgen/constants.tmpl @@ -19,10 +19,12 @@ package constants // REMOTE_PROC_DOMAIN_MIGRATE_SET_MAX_SPEED = 207, const ( // From enums: -{{range .EnumVals}} {{.Name}} = {{.Val}} +{{range .EnumVals}} // {{.Name}} is libvirt's {{.LVName}} + {{.Name}} = {{.Val}} {{end}} // From consts: -{{range .Consts}} {{.Name}} = {{.Val}} +{{range .Consts}} // {{.Name}} is libvirt's {{.LVName}} + {{.Name}} = {{.Val}} {{end -}} ) diff --git a/internal/lvgen/generate.go b/internal/lvgen/generate.go index 681002a..5eb6c3d 100644 --- a/internal/lvgen/generate.go +++ b/internal/lvgen/generate.go @@ -32,8 +32,9 @@ import ( // ConstItem stores an const's symbol and value from the parser. This struct is // also used for enums. type ConstItem struct { - Name string - Val string + Name string + LVName string + Val string } // Generator holds all the information parsed out of the protocol file. @@ -120,19 +121,19 @@ var lvTypedParams = map[string]uint32{ // Decl records a declaration, like 'int x' or 'remote_nonnull_string str' type Decl struct { - Name, Type string + Name, LVName, Type string } // Structure records the name and members of a struct definition. type Structure struct { Name string + LVName string Members []Decl } // Typedef holds the name and underlying type for a typedef. type Typedef struct { - Name string - Type string + Decl } // Union holds a "discriminated union", which consists of a discriminant, which @@ -152,12 +153,13 @@ type Case struct { // Proc holds information about a libvirt procedure the parser has found. type Proc struct { - Num int64 - Name string - Args []Decl - Ret []Decl - ArgsStruct string - RetStruct string + Num int64 // The libvirt procedure number. + Name string // The name of the go func. + LVName string // The name of the libvirt proc this wraps. + Args []Decl // The contents of the args struct for this procedure. + Ret []Decl // The contents of the ret struct for this procedure. + ArgsStruct string // The name of the args struct for this procedure. + RetStruct string // The name of the ret struct for this procedure. } type structStack []*Structure @@ -395,8 +397,8 @@ func procLink() { // StartEnum is called when the parser has found a valid enum. func StartEnum(name string) { // Enums are always signed 32-bit integers. - name = identifierTransform(name) - Gen.Enums = append(Gen.Enums, Decl{name, "int32"}) + goname := identifierTransform(name) + Gen.Enums = append(Gen.Enums, Decl{goname, name, "int32"}) // Set the automatic value var to -1; it will be incremented before being // assigned to an enum value. CurrentEnumVal = -1 @@ -420,10 +422,10 @@ func AddEnumAutoVal(name string) error { } func addEnumVal(name string, val int64) error { - name = constNameTransform(name) - Gen.EnumVals = append(Gen.EnumVals, ConstItem{name, fmt.Sprintf("%d", val)}) + goname := constNameTransform(name) + Gen.EnumVals = append(Gen.EnumVals, ConstItem{goname, name, fmt.Sprintf("%d", val)}) CurrentEnumVal = val - addProc(name, val) + addProc(goname, name, val) return nil } @@ -433,19 +435,19 @@ 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}) + goname := constNameTransform(name) + Gen.Consts = append(Gen.Consts, ConstItem{goname, name, val}) return nil } // addProc checks an enum value to see if it's a procedure number. If so, we // add the procedure to our list for later generation. -func addProc(name string, val int64) { - if !strings.HasPrefix(name, "Proc") { +func addProc(goname, lvname string, val int64) { + if !strings.HasPrefix(goname, "Proc") { return } - name = name[4:] - proc := &Proc{Num: val, Name: name} + goname = goname[4:] + proc := &Proc{Num: val, Name: goname, LVName: lvname} Gen.Procs = append(Gen.Procs, *proc) } @@ -464,8 +466,8 @@ func parseNumber(val string) (int64, error) { // 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.push(&Structure{Name: name}) + goname := identifierTransform(name) + CurrentStruct.push(&Structure{Name: goname, LVName: name}) } // AddStruct is called when the parser has finished parsing a struct. It adds @@ -529,23 +531,24 @@ func AddCase() { func AddDeclaration(identifier, itype string) { // fmt.Println("adding", identifier, itype) // If the name is a reserved word, transform it so it isn't. - identifier = identifierTransform(identifier) + goidentifier := identifierTransform(identifier) itype = typeTransform(itype) - decl := Decl{Name: identifier, Type: itype} + decl := Decl{Name: goidentifier, LVName: identifier, Type: itype} if !CurrentStruct.empty() { st := CurrentStruct.peek() st.Members = append(st.Members, decl) } else if CurrentTypedef != nil { - CurrentTypedef.Name = identifier + CurrentTypedef.Name = goidentifier + CurrentTypedef.LVName = identifier CurrentTypedef.Type = itype - if identifier != "string" { + if goidentifier != "string" { // Omit recursive typedefs. These happen because we're massaging // some of the type names. Gen.Typedefs = append(Gen.Typedefs, *CurrentTypedef) } CurrentTypedef = nil } else if CurrentCase != nil { - CurrentCase.Name = identifier + CurrentCase.Name = goidentifier CurrentCase.Type = itype } else if CurrentUnion != nil { CurrentUnion.DiscriminantType = itype diff --git a/internal/lvgen/procedures.tmpl b/internal/lvgen/procedures.tmpl index 6e72c8f..e8f7383 100644 --- a/internal/lvgen/procedures.tmpl +++ b/internal/lvgen/procedures.tmpl @@ -18,30 +18,41 @@ const ( VirUUIDBuflen = 16 ) +// // Typedefs: -{{range .Typedefs}}type {{.Name}} {{.Type}} +// +{{range .Typedefs}}// {{.Name}} is libvirt's {{.LVName}} +type {{.Name}} {{.Type}} {{end}} +// // Enums: -{{range .Enums}}type {{.Name}} {{.Type}} +// +{{range .Enums}}// {{.Name}} is libvirt's {{.LVName}} +type {{.Name}} {{.Type}} {{end}} +// // Structs: -{{range .Structs}}type {{.Name}} struct { +// +{{range .Structs}}// {{.Name}} is libvirt's {{.LVName}} +type {{.Name}} struct { {{range .Members}} {{.Name}} {{.Type}} {{end -}} } {{end}} -// Unions: -{{range .Unions}}type {{.Name}} interface { +{{range .Unions}}// {{.Name}} is a discriminated union. +type {{.Name}} interface { Get() interface{} {{end -}} } - {{range .Unions}}{{$uname := .Name}}{{range .Cases}}{{$casetype := printf "%v%v" $uname .CaseName}} +// {{$casetype}} is one of the possible values of the {{$uname}} union. type {{$casetype}} struct { DVal uint32 {{.Name}} {{.Type}} } +// New{{$casetype}} creates a discriminated union value satisfying +// the {{$uname}} interface. func New{{$casetype}}(v {{.Type}}) *{{$casetype}} { return &{{$casetype}}{DVal: {{.DiscriminantVal}}, {{.Name}}: v} } @@ -53,6 +64,7 @@ func decode{{$casetype}}(dec *xdr.Decoder) (*{{$casetype}}, error) { } return New{{$casetype}}(v), nil } +// Get satisfies the {{$uname}} interface. func (c *{{$casetype}}) Get() interface{} { return c.{{.Name}} } {{end}} func decode{{.Name}}(dec *xdr.Decoder) ({{.Name}}, error) { @@ -100,8 +112,8 @@ func decodeTypedParams(dec *xdr.Decoder) ([]TypedParam, error) { return params, nil } -// Procedures: {{range .Procs}} +// {{.Name}} is the go wrapper for {{.LVName}}. func (l *Libvirt) {{.Name}}({{range $ix, $arg := .Args}}{{if $ix}}, {{end}}{{.Name}} {{.Type}}{{end}}) ({{range .Ret}}r{{.Name}} {{.Type}}, {{end}}err error) { var buf bytes.Buffer {{if .ArgsStruct}} diff --git a/libvirt.gen.go b/libvirt.gen.go index 2ea52ef..d44b486 100644 --- a/libvirt.gen.go +++ b/libvirt.gen.go @@ -18,69 +18,96 @@ const ( VirUUIDBuflen = 16 ) +// // Typedefs: +// +// OptString is libvirt's remote_string type OptString []string +// UUID is libvirt's remote_uuid type UUID [VirUUIDBuflen]byte +// Domain is libvirt's remote_domain type Domain []NonnullDomain +// Network is libvirt's remote_network type Network []NonnullNetwork +// Nwfilter is libvirt's remote_nwfilter type Nwfilter []NonnullNwfilter +// StoragePool is libvirt's remote_storage_pool type StoragePool []NonnullStoragePool +// StorageVol is libvirt's remote_storage_vol type StorageVol []NonnullStorageVol +// NodeDevice is libvirt's remote_node_device type NodeDevice []NonnullNodeDevice +// Secret is libvirt's remote_secret type Secret []NonnullSecret +// // Enums: +// +// AuthType is libvirt's remote_auth_type type AuthType int32 +// Procedure is libvirt's remote_procedure type Procedure int32 +// // Structs: +// +// NonnullDomain is libvirt's remote_nonnull_domain type NonnullDomain struct { Name string UUID UUID ID int32 } +// NonnullNetwork is libvirt's remote_nonnull_network type NonnullNetwork struct { Name string UUID UUID } +// NonnullNwfilter is libvirt's remote_nonnull_nwfilter type NonnullNwfilter struct { Name string UUID UUID } +// NonnullInterface is libvirt's remote_nonnull_interface type NonnullInterface struct { Name string Mac string } +// NonnullStoragePool is libvirt's remote_nonnull_storage_pool type NonnullStoragePool struct { Name string UUID UUID } +// NonnullStorageVol is libvirt's remote_nonnull_storage_vol type NonnullStorageVol struct { Pool string Name string Key string } +// NonnullNodeDevice is libvirt's remote_nonnull_node_device type NonnullNodeDevice struct { Name string } +// NonnullSecret is libvirt's remote_nonnull_secret type NonnullSecret struct { UUID UUID UsageType int32 UsageID string } +// NonnullDomainSnapshot is libvirt's remote_nonnull_domain_snapshot type NonnullDomainSnapshot struct { Name string Dom NonnullDomain } +// Error is libvirt's remote_error type Error struct { Code int32 Domain int32 @@ -95,6 +122,7 @@ type Error struct { Net Network } +// VcpuInfo is libvirt's remote_vcpu_info type VcpuInfo struct { Number uint32 State int32 @@ -102,75 +130,92 @@ type VcpuInfo struct { CPU int32 } +// TypedParam is libvirt's remote_typed_param type TypedParam struct { Field string Value TypedParamValue } +// NodeGetCPUStats is libvirt's remote_node_get_cpu_stats type NodeGetCPUStats struct { Field string Value uint64 } +// NodeGetMemoryStats is libvirt's remote_node_get_memory_stats type NodeGetMemoryStats struct { Field string Value uint64 } +// DomainDiskError is libvirt's remote_domain_disk_error type DomainDiskError struct { Disk string Error int32 } +// ConnectOpenArgs is libvirt's remote_connect_open_args type ConnectOpenArgs struct { Name OptString Flags uint32 } +// ConnectSupportsFeatureArgs is libvirt's remote_connect_supports_feature_args type ConnectSupportsFeatureArgs struct { Feature int32 } +// ConnectSupportsFeatureRet is libvirt's remote_connect_supports_feature_ret type ConnectSupportsFeatureRet struct { Supported int32 } +// ConnectGetTypeRet is libvirt's remote_connect_get_type_ret type ConnectGetTypeRet struct { Type string } +// ConnectGetVersionRet is libvirt's remote_connect_get_version_ret type ConnectGetVersionRet struct { HvVer uint64 } +// ConnectGetLibVersionRet is libvirt's remote_connect_get_lib_version_ret type ConnectGetLibVersionRet struct { LibVer uint64 } +// ConnectGetHostnameRet is libvirt's remote_connect_get_hostname_ret type ConnectGetHostnameRet struct { Hostname string } +// ConnectGetSysinfoArgs is libvirt's remote_connect_get_sysinfo_args type ConnectGetSysinfoArgs struct { Flags uint32 } +// ConnectGetSysinfoRet is libvirt's remote_connect_get_sysinfo_ret type ConnectGetSysinfoRet struct { Sysinfo string } +// ConnectGetUriRet is libvirt's remote_connect_get_uri_ret type ConnectGetUriRet struct { Uri string } +// ConnectGetMaxVcpusArgs is libvirt's remote_connect_get_max_vcpus_args type ConnectGetMaxVcpusArgs struct { Type OptString } +// ConnectGetMaxVcpusRet is libvirt's remote_connect_get_max_vcpus_ret type ConnectGetMaxVcpusRet struct { MaxVcpus int32 } +// NodeGetInfoRet is libvirt's remote_node_get_info_ret type NodeGetInfoRet struct { Model [32]int8 Memory uint64 @@ -182,10 +227,12 @@ type NodeGetInfoRet struct { Threads int32 } +// ConnectGetCapabilitiesRet is libvirt's remote_connect_get_capabilities_ret type ConnectGetCapabilitiesRet struct { Capabilities string } +// ConnectGetDomainCapabilitiesArgs is libvirt's remote_connect_get_domain_capabilities_args type ConnectGetDomainCapabilitiesArgs struct { Emulatorbin OptString Arch OptString @@ -194,118 +241,141 @@ type ConnectGetDomainCapabilitiesArgs struct { Flags uint32 } +// ConnectGetDomainCapabilitiesRet is libvirt's remote_connect_get_domain_capabilities_ret type ConnectGetDomainCapabilitiesRet struct { Capabilities string } +// NodeGetCPUStatsArgs is libvirt's remote_node_get_cpu_stats_args type NodeGetCPUStatsArgs struct { CPUNum int32 Nparams int32 Flags uint32 } +// NodeGetCPUStatsRet is libvirt's remote_node_get_cpu_stats_ret type NodeGetCPUStatsRet struct { Params []NodeGetCPUStats Nparams int32 } +// NodeGetMemoryStatsArgs is libvirt's remote_node_get_memory_stats_args type NodeGetMemoryStatsArgs struct { Nparams int32 CellNum int32 Flags uint32 } +// NodeGetMemoryStatsRet is libvirt's remote_node_get_memory_stats_ret type NodeGetMemoryStatsRet struct { Params []NodeGetMemoryStats Nparams int32 } +// NodeGetCellsFreeMemoryArgs is libvirt's remote_node_get_cells_free_memory_args type NodeGetCellsFreeMemoryArgs struct { StartCell int32 Maxcells int32 } +// NodeGetCellsFreeMemoryRet is libvirt's remote_node_get_cells_free_memory_ret type NodeGetCellsFreeMemoryRet struct { Cells []uint64 } +// NodeGetFreeMemoryRet is libvirt's remote_node_get_free_memory_ret type NodeGetFreeMemoryRet struct { FreeMem uint64 } +// DomainGetSchedulerTypeArgs is libvirt's remote_domain_get_scheduler_type_args type DomainGetSchedulerTypeArgs struct { Dom NonnullDomain } +// DomainGetSchedulerTypeRet is libvirt's remote_domain_get_scheduler_type_ret type DomainGetSchedulerTypeRet struct { Type string Nparams int32 } +// DomainGetSchedulerParametersArgs is libvirt's remote_domain_get_scheduler_parameters_args type DomainGetSchedulerParametersArgs struct { Dom NonnullDomain Nparams int32 } +// DomainGetSchedulerParametersRet is libvirt's remote_domain_get_scheduler_parameters_ret type DomainGetSchedulerParametersRet struct { Params []TypedParam } +// DomainGetSchedulerParametersFlagsArgs is libvirt's remote_domain_get_scheduler_parameters_flags_args type DomainGetSchedulerParametersFlagsArgs struct { Dom NonnullDomain Nparams int32 Flags uint32 } +// DomainGetSchedulerParametersFlagsRet is libvirt's remote_domain_get_scheduler_parameters_flags_ret type DomainGetSchedulerParametersFlagsRet struct { Params []TypedParam } +// DomainSetSchedulerParametersArgs is libvirt's remote_domain_set_scheduler_parameters_args type DomainSetSchedulerParametersArgs struct { Dom NonnullDomain Params []TypedParam } +// DomainSetSchedulerParametersFlagsArgs is libvirt's remote_domain_set_scheduler_parameters_flags_args type DomainSetSchedulerParametersFlagsArgs struct { Dom NonnullDomain Params []TypedParam Flags uint32 } +// DomainSetBlkioParametersArgs is libvirt's remote_domain_set_blkio_parameters_args type DomainSetBlkioParametersArgs struct { Dom NonnullDomain Params []TypedParam Flags uint32 } +// DomainGetBlkioParametersArgs is libvirt's remote_domain_get_blkio_parameters_args type DomainGetBlkioParametersArgs struct { Dom NonnullDomain Nparams int32 Flags uint32 } +// DomainGetBlkioParametersRet is libvirt's remote_domain_get_blkio_parameters_ret type DomainGetBlkioParametersRet struct { Params []TypedParam Nparams int32 } +// DomainSetMemoryParametersArgs is libvirt's remote_domain_set_memory_parameters_args type DomainSetMemoryParametersArgs struct { Dom NonnullDomain Params []TypedParam Flags uint32 } +// DomainGetMemoryParametersArgs is libvirt's remote_domain_get_memory_parameters_args type DomainGetMemoryParametersArgs struct { Dom NonnullDomain Nparams int32 Flags uint32 } +// DomainGetMemoryParametersRet is libvirt's remote_domain_get_memory_parameters_ret type DomainGetMemoryParametersRet struct { Params []TypedParam Nparams int32 } +// DomainBlockResizeArgs is libvirt's remote_domain_block_resize_args type DomainBlockResizeArgs struct { Dom NonnullDomain Disk string @@ -313,43 +383,51 @@ type DomainBlockResizeArgs struct { Flags uint32 } +// DomainSetNumaParametersArgs is libvirt's remote_domain_set_numa_parameters_args type DomainSetNumaParametersArgs struct { Dom NonnullDomain Params []TypedParam Flags uint32 } +// DomainGetNumaParametersArgs is libvirt's remote_domain_get_numa_parameters_args type DomainGetNumaParametersArgs struct { Dom NonnullDomain Nparams int32 Flags uint32 } +// DomainGetNumaParametersRet is libvirt's remote_domain_get_numa_parameters_ret type DomainGetNumaParametersRet struct { Params []TypedParam Nparams int32 } +// DomainSetPerfEventsArgs is libvirt's remote_domain_set_perf_events_args type DomainSetPerfEventsArgs struct { Dom NonnullDomain Params []TypedParam Flags uint32 } +// DomainGetPerfEventsArgs is libvirt's remote_domain_get_perf_events_args type DomainGetPerfEventsArgs struct { Dom NonnullDomain Flags uint32 } +// DomainGetPerfEventsRet is libvirt's remote_domain_get_perf_events_ret type DomainGetPerfEventsRet struct { Params []TypedParam } +// DomainBlockStatsArgs is libvirt's remote_domain_block_stats_args type DomainBlockStatsArgs struct { Dom NonnullDomain Path string } +// DomainBlockStatsRet is libvirt's remote_domain_block_stats_ret type DomainBlockStatsRet struct { RdReq int64 RdBytes int64 @@ -358,6 +436,7 @@ type DomainBlockStatsRet struct { Errs int64 } +// DomainBlockStatsFlagsArgs is libvirt's remote_domain_block_stats_flags_args type DomainBlockStatsFlagsArgs struct { Dom NonnullDomain Path string @@ -365,16 +444,19 @@ type DomainBlockStatsFlagsArgs struct { Flags uint32 } +// DomainBlockStatsFlagsRet is libvirt's remote_domain_block_stats_flags_ret type DomainBlockStatsFlagsRet struct { Params []TypedParam Nparams int32 } +// DomainInterfaceStatsArgs is libvirt's remote_domain_interface_stats_args type DomainInterfaceStatsArgs struct { Dom NonnullDomain Device string } +// DomainInterfaceStatsRet is libvirt's remote_domain_interface_stats_ret type DomainInterfaceStatsRet struct { RxBytes int64 RxPackets int64 @@ -386,6 +468,7 @@ type DomainInterfaceStatsRet struct { TxDrop int64 } +// DomainSetInterfaceParametersArgs is libvirt's remote_domain_set_interface_parameters_args type DomainSetInterfaceParametersArgs struct { Dom NonnullDomain Device string @@ -393,6 +476,7 @@ type DomainSetInterfaceParametersArgs struct { Flags uint32 } +// DomainGetInterfaceParametersArgs is libvirt's remote_domain_get_interface_parameters_args type DomainGetInterfaceParametersArgs struct { Dom NonnullDomain Device string @@ -400,26 +484,31 @@ type DomainGetInterfaceParametersArgs struct { Flags uint32 } +// DomainGetInterfaceParametersRet is libvirt's remote_domain_get_interface_parameters_ret type DomainGetInterfaceParametersRet struct { Params []TypedParam Nparams int32 } +// DomainMemoryStatsArgs is libvirt's remote_domain_memory_stats_args type DomainMemoryStatsArgs struct { Dom NonnullDomain MaxStats uint32 Flags uint32 } +// DomainMemoryStat is libvirt's remote_domain_memory_stat type DomainMemoryStat struct { Tag int32 Val uint64 } +// DomainMemoryStatsRet is libvirt's remote_domain_memory_stats_ret type DomainMemoryStatsRet struct { Stats []DomainMemoryStat } +// DomainBlockPeekArgs is libvirt's remote_domain_block_peek_args type DomainBlockPeekArgs struct { Dom NonnullDomain Path string @@ -428,10 +517,12 @@ type DomainBlockPeekArgs struct { Flags uint32 } +// DomainBlockPeekRet is libvirt's remote_domain_block_peek_ret type DomainBlockPeekRet struct { Buffer []byte } +// DomainMemoryPeekArgs is libvirt's remote_domain_memory_peek_args type DomainMemoryPeekArgs struct { Dom NonnullDomain Offset uint64 @@ -439,84 +530,103 @@ type DomainMemoryPeekArgs struct { Flags uint32 } +// DomainMemoryPeekRet is libvirt's remote_domain_memory_peek_ret type DomainMemoryPeekRet struct { Buffer []byte } +// DomainGetBlockInfoArgs is libvirt's remote_domain_get_block_info_args type DomainGetBlockInfoArgs struct { Dom NonnullDomain Path string Flags uint32 } +// DomainGetBlockInfoRet is libvirt's remote_domain_get_block_info_ret type DomainGetBlockInfoRet struct { Allocation uint64 Capacity uint64 Physical uint64 } +// ConnectListDomainsArgs is libvirt's remote_connect_list_domains_args type ConnectListDomainsArgs struct { Maxids int32 } +// ConnectListDomainsRet is libvirt's remote_connect_list_domains_ret type ConnectListDomainsRet struct { Ids []int32 } +// ConnectNumOfDomainsRet is libvirt's remote_connect_num_of_domains_ret type ConnectNumOfDomainsRet struct { Num int32 } +// DomainCreateXMLArgs is libvirt's remote_domain_create_xml_args type DomainCreateXMLArgs struct { XMLDesc string Flags uint32 } +// DomainCreateXMLRet is libvirt's remote_domain_create_xml_ret type DomainCreateXMLRet struct { Dom NonnullDomain } +// DomainCreateXMLWithFilesArgs is libvirt's remote_domain_create_xml_with_files_args type DomainCreateXMLWithFilesArgs struct { XMLDesc string Flags uint32 } +// DomainCreateXMLWithFilesRet is libvirt's remote_domain_create_xml_with_files_ret type DomainCreateXMLWithFilesRet struct { Dom NonnullDomain } +// DomainLookupByIDArgs is libvirt's remote_domain_lookup_by_id_args type DomainLookupByIDArgs struct { ID int32 } +// DomainLookupByIDRet is libvirt's remote_domain_lookup_by_id_ret type DomainLookupByIDRet struct { Dom NonnullDomain } +// DomainLookupByUUIDArgs is libvirt's remote_domain_lookup_by_uuid_args type DomainLookupByUUIDArgs struct { UUID UUID } +// DomainLookupByUUIDRet is libvirt's remote_domain_lookup_by_uuid_ret type DomainLookupByUUIDRet struct { Dom NonnullDomain } +// DomainLookupByNameArgs is libvirt's remote_domain_lookup_by_name_args type DomainLookupByNameArgs struct { Name string } +// DomainLookupByNameRet is libvirt's remote_domain_lookup_by_name_ret type DomainLookupByNameRet struct { Dom NonnullDomain } +// DomainSuspendArgs is libvirt's remote_domain_suspend_args type DomainSuspendArgs struct { Dom NonnullDomain } +// DomainResumeArgs is libvirt's remote_domain_resume_args type DomainResumeArgs struct { Dom NonnullDomain } +// DomainPmSuspendForDurationArgs is libvirt's remote_domain_pm_suspend_for_duration_args type DomainPmSuspendForDurationArgs struct { Dom NonnullDomain Target uint32 @@ -524,76 +634,92 @@ type DomainPmSuspendForDurationArgs struct { Flags uint32 } +// DomainPmWakeupArgs is libvirt's remote_domain_pm_wakeup_args type DomainPmWakeupArgs struct { Dom NonnullDomain Flags uint32 } +// DomainShutdownArgs is libvirt's remote_domain_shutdown_args type DomainShutdownArgs struct { Dom NonnullDomain } +// DomainRebootArgs is libvirt's remote_domain_reboot_args type DomainRebootArgs struct { Dom NonnullDomain Flags uint32 } +// DomainResetArgs is libvirt's remote_domain_reset_args type DomainResetArgs struct { Dom NonnullDomain Flags uint32 } +// DomainDestroyArgs is libvirt's remote_domain_destroy_args type DomainDestroyArgs struct { Dom NonnullDomain } +// DomainDestroyFlagsArgs is libvirt's remote_domain_destroy_flags_args type DomainDestroyFlagsArgs struct { Dom NonnullDomain Flags uint32 } +// DomainGetOsTypeArgs is libvirt's remote_domain_get_os_type_args type DomainGetOsTypeArgs struct { Dom NonnullDomain } +// DomainGetOsTypeRet is libvirt's remote_domain_get_os_type_ret type DomainGetOsTypeRet struct { Type string } +// DomainGetMaxMemoryArgs is libvirt's remote_domain_get_max_memory_args type DomainGetMaxMemoryArgs struct { Dom NonnullDomain } +// DomainGetMaxMemoryRet is libvirt's remote_domain_get_max_memory_ret type DomainGetMaxMemoryRet struct { Memory uint64 } +// DomainSetMaxMemoryArgs is libvirt's remote_domain_set_max_memory_args type DomainSetMaxMemoryArgs struct { Dom NonnullDomain Memory uint64 } +// DomainSetMemoryArgs is libvirt's remote_domain_set_memory_args type DomainSetMemoryArgs struct { Dom NonnullDomain Memory uint64 } +// DomainSetMemoryFlagsArgs is libvirt's remote_domain_set_memory_flags_args type DomainSetMemoryFlagsArgs struct { Dom NonnullDomain Memory uint64 Flags uint32 } +// DomainSetMemoryStatsPeriodArgs is libvirt's remote_domain_set_memory_stats_period_args type DomainSetMemoryStatsPeriodArgs struct { Dom NonnullDomain Period int32 Flags uint32 } +// DomainGetInfoArgs is libvirt's remote_domain_get_info_args type DomainGetInfoArgs struct { Dom NonnullDomain } +// DomainGetInfoRet is libvirt's remote_domain_get_info_ret type DomainGetInfoRet struct { State uint8 MaxMem uint64 @@ -602,11 +728,13 @@ type DomainGetInfoRet struct { CPUTime uint64 } +// DomainSaveArgs is libvirt's remote_domain_save_args type DomainSaveArgs struct { Dom NonnullDomain To string } +// DomainSaveFlagsArgs is libvirt's remote_domain_save_flags_args type DomainSaveFlagsArgs struct { Dom NonnullDomain To string @@ -614,37 +742,44 @@ type DomainSaveFlagsArgs struct { Flags uint32 } +// DomainRestoreArgs is libvirt's remote_domain_restore_args type DomainRestoreArgs struct { From string } +// DomainRestoreFlagsArgs is libvirt's remote_domain_restore_flags_args type DomainRestoreFlagsArgs struct { From string Dxml OptString Flags uint32 } +// DomainSaveImageGetXMLDescArgs is libvirt's remote_domain_save_image_get_xml_desc_args type DomainSaveImageGetXMLDescArgs struct { File string Flags uint32 } +// DomainSaveImageGetXMLDescRet is libvirt's remote_domain_save_image_get_xml_desc_ret type DomainSaveImageGetXMLDescRet struct { XML string } +// DomainSaveImageDefineXMLArgs is libvirt's remote_domain_save_image_define_xml_args type DomainSaveImageDefineXMLArgs struct { File string Dxml string Flags uint32 } +// DomainCoreDumpArgs is libvirt's remote_domain_core_dump_args type DomainCoreDumpArgs struct { Dom NonnullDomain To string Flags uint32 } +// DomainCoreDumpWithFormatArgs is libvirt's remote_domain_core_dump_with_format_args type DomainCoreDumpWithFormatArgs struct { Dom NonnullDomain To string @@ -652,25 +787,30 @@ type DomainCoreDumpWithFormatArgs struct { Flags uint32 } +// DomainScreenshotArgs is libvirt's remote_domain_screenshot_args type DomainScreenshotArgs struct { Dom NonnullDomain Screen uint32 Flags uint32 } +// DomainScreenshotRet is libvirt's remote_domain_screenshot_ret type DomainScreenshotRet struct { Mime OptString } +// DomainGetXMLDescArgs is libvirt's remote_domain_get_xml_desc_args type DomainGetXMLDescArgs struct { Dom NonnullDomain Flags uint32 } +// DomainGetXMLDescRet is libvirt's remote_domain_get_xml_desc_ret type DomainGetXMLDescRet struct { XML string } +// DomainMigratePrepareArgs is libvirt's remote_domain_migrate_prepare_args type DomainMigratePrepareArgs struct { UriIn OptString Flags uint64 @@ -678,11 +818,13 @@ type DomainMigratePrepareArgs struct { Resource uint64 } +// DomainMigratePrepareRet is libvirt's remote_domain_migrate_prepare_ret type DomainMigratePrepareRet struct { Cookie []byte UriOut OptString } +// DomainMigratePerformArgs is libvirt's remote_domain_migrate_perform_args type DomainMigratePerformArgs struct { Dom NonnullDomain Cookie []byte @@ -692,6 +834,7 @@ type DomainMigratePerformArgs struct { Resource uint64 } +// DomainMigrateFinishArgs is libvirt's remote_domain_migrate_finish_args type DomainMigrateFinishArgs struct { Dname string Cookie []byte @@ -699,10 +842,12 @@ type DomainMigrateFinishArgs struct { Flags uint64 } +// DomainMigrateFinishRet is libvirt's remote_domain_migrate_finish_ret type DomainMigrateFinishRet struct { Ddom NonnullDomain } +// DomainMigratePrepare2Args is libvirt's remote_domain_migrate_prepare2_args type DomainMigratePrepare2Args struct { UriIn OptString Flags uint64 @@ -711,11 +856,13 @@ type DomainMigratePrepare2Args struct { DomXML string } +// DomainMigratePrepare2Ret is libvirt's remote_domain_migrate_prepare2_ret type DomainMigratePrepare2Ret struct { Cookie []byte UriOut OptString } +// DomainMigrateFinish2Args is libvirt's remote_domain_migrate_finish2_args type DomainMigrateFinish2Args struct { Dname string Cookie []byte @@ -724,75 +871,92 @@ type DomainMigrateFinish2Args struct { Retcode int32 } +// DomainMigrateFinish2Ret is libvirt's remote_domain_migrate_finish2_ret type DomainMigrateFinish2Ret struct { Ddom NonnullDomain } +// ConnectListDefinedDomainsArgs is libvirt's remote_connect_list_defined_domains_args type ConnectListDefinedDomainsArgs struct { Maxnames int32 } +// ConnectListDefinedDomainsRet is libvirt's remote_connect_list_defined_domains_ret type ConnectListDefinedDomainsRet struct { Names []string } +// ConnectNumOfDefinedDomainsRet is libvirt's remote_connect_num_of_defined_domains_ret type ConnectNumOfDefinedDomainsRet struct { Num int32 } +// DomainCreateArgs is libvirt's remote_domain_create_args type DomainCreateArgs struct { Dom NonnullDomain } +// DomainCreateWithFlagsArgs is libvirt's remote_domain_create_with_flags_args type DomainCreateWithFlagsArgs struct { Dom NonnullDomain Flags uint32 } +// DomainCreateWithFlagsRet is libvirt's remote_domain_create_with_flags_ret type DomainCreateWithFlagsRet struct { Dom NonnullDomain } +// DomainCreateWithFilesArgs is libvirt's remote_domain_create_with_files_args type DomainCreateWithFilesArgs struct { Dom NonnullDomain Flags uint32 } +// DomainCreateWithFilesRet is libvirt's remote_domain_create_with_files_ret type DomainCreateWithFilesRet struct { Dom NonnullDomain } +// DomainDefineXMLArgs is libvirt's remote_domain_define_xml_args type DomainDefineXMLArgs struct { XML string } +// DomainDefineXMLRet is libvirt's remote_domain_define_xml_ret type DomainDefineXMLRet struct { Dom NonnullDomain } +// DomainDefineXMLFlagsArgs is libvirt's remote_domain_define_xml_flags_args type DomainDefineXMLFlagsArgs struct { XML string Flags uint32 } +// DomainDefineXMLFlagsRet is libvirt's remote_domain_define_xml_flags_ret type DomainDefineXMLFlagsRet struct { Dom NonnullDomain } +// DomainUndefineArgs is libvirt's remote_domain_undefine_args type DomainUndefineArgs struct { Dom NonnullDomain } +// DomainUndefineFlagsArgs is libvirt's remote_domain_undefine_flags_args type DomainUndefineFlagsArgs struct { Dom NonnullDomain Flags uint32 } +// DomainInjectNmiArgs is libvirt's remote_domain_inject_nmi_args type DomainInjectNmiArgs struct { Dom NonnullDomain Flags uint32 } +// DomainSendKeyArgs is libvirt's remote_domain_send_key_args type DomainSendKeyArgs struct { Dom NonnullDomain Codeset uint32 @@ -801,6 +965,7 @@ type DomainSendKeyArgs struct { Flags uint32 } +// DomainSendProcessSignalArgs is libvirt's remote_domain_send_process_signal_args type DomainSendProcessSignalArgs struct { Dom NonnullDomain PidValue int64 @@ -808,32 +973,38 @@ type DomainSendProcessSignalArgs struct { Flags uint32 } +// DomainSetVcpusArgs is libvirt's remote_domain_set_vcpus_args type DomainSetVcpusArgs struct { Dom NonnullDomain Nvcpus uint32 } +// DomainSetVcpusFlagsArgs is libvirt's remote_domain_set_vcpus_flags_args type DomainSetVcpusFlagsArgs struct { Dom NonnullDomain Nvcpus uint32 Flags uint32 } +// DomainGetVcpusFlagsArgs is libvirt's remote_domain_get_vcpus_flags_args type DomainGetVcpusFlagsArgs struct { Dom NonnullDomain Flags uint32 } +// DomainGetVcpusFlagsRet is libvirt's remote_domain_get_vcpus_flags_ret type DomainGetVcpusFlagsRet struct { Num int32 } +// DomainPinVcpuArgs is libvirt's remote_domain_pin_vcpu_args type DomainPinVcpuArgs struct { Dom NonnullDomain Vcpu uint32 Cpumap []byte } +// DomainPinVcpuFlagsArgs is libvirt's remote_domain_pin_vcpu_flags_args type DomainPinVcpuFlagsArgs struct { Dom NonnullDomain Vcpu uint32 @@ -841,6 +1012,7 @@ type DomainPinVcpuFlagsArgs struct { Flags uint32 } +// DomainGetVcpuPinInfoArgs is libvirt's remote_domain_get_vcpu_pin_info_args type DomainGetVcpuPinInfoArgs struct { Dom NonnullDomain Ncpumaps int32 @@ -848,62 +1020,74 @@ type DomainGetVcpuPinInfoArgs struct { Flags uint32 } +// DomainGetVcpuPinInfoRet is libvirt's remote_domain_get_vcpu_pin_info_ret type DomainGetVcpuPinInfoRet struct { Cpumaps []byte Num int32 } +// DomainPinEmulatorArgs is libvirt's remote_domain_pin_emulator_args type DomainPinEmulatorArgs struct { Dom NonnullDomain Cpumap []byte Flags uint32 } +// DomainGetEmulatorPinInfoArgs is libvirt's remote_domain_get_emulator_pin_info_args type DomainGetEmulatorPinInfoArgs struct { Dom NonnullDomain Maplen int32 Flags uint32 } +// DomainGetEmulatorPinInfoRet is libvirt's remote_domain_get_emulator_pin_info_ret type DomainGetEmulatorPinInfoRet struct { Cpumaps []byte Ret int32 } +// DomainGetVcpusArgs is libvirt's remote_domain_get_vcpus_args type DomainGetVcpusArgs struct { Dom NonnullDomain Maxinfo int32 Maplen int32 } +// DomainGetVcpusRet is libvirt's remote_domain_get_vcpus_ret type DomainGetVcpusRet struct { Info []VcpuInfo Cpumaps []byte } +// DomainGetMaxVcpusArgs is libvirt's remote_domain_get_max_vcpus_args type DomainGetMaxVcpusArgs struct { Dom NonnullDomain } +// DomainGetMaxVcpusRet is libvirt's remote_domain_get_max_vcpus_ret type DomainGetMaxVcpusRet struct { Num int32 } +// DomainIothreadInfo is libvirt's remote_domain_iothread_info type DomainIothreadInfo struct { IothreadID uint32 Cpumap []byte } +// DomainGetIothreadInfoArgs is libvirt's remote_domain_get_iothread_info_args type DomainGetIothreadInfoArgs struct { Dom NonnullDomain Flags uint32 } +// DomainGetIothreadInfoRet is libvirt's remote_domain_get_iothread_info_ret type DomainGetIothreadInfoRet struct { Info []DomainIothreadInfo Ret uint32 } +// DomainPinIothreadArgs is libvirt's remote_domain_pin_iothread_args type DomainPinIothreadArgs struct { Dom NonnullDomain IothreadsID uint32 @@ -911,82 +1095,98 @@ type DomainPinIothreadArgs struct { Flags uint32 } +// DomainAddIothreadArgs is libvirt's remote_domain_add_iothread_args type DomainAddIothreadArgs struct { Dom NonnullDomain IothreadID uint32 Flags uint32 } +// DomainDelIothreadArgs is libvirt's remote_domain_del_iothread_args type DomainDelIothreadArgs struct { Dom NonnullDomain IothreadID uint32 Flags uint32 } +// DomainGetSecurityLabelArgs is libvirt's remote_domain_get_security_label_args type DomainGetSecurityLabelArgs struct { Dom NonnullDomain } +// DomainGetSecurityLabelRet is libvirt's remote_domain_get_security_label_ret type DomainGetSecurityLabelRet struct { Label []int8 Enforcing int32 } +// DomainGetSecurityLabelListArgs is libvirt's remote_domain_get_security_label_list_args type DomainGetSecurityLabelListArgs struct { Dom NonnullDomain } +// DomainGetSecurityLabelListRet is libvirt's remote_domain_get_security_label_list_ret type DomainGetSecurityLabelListRet struct { Labels []DomainGetSecurityLabelRet Ret int32 } +// NodeGetSecurityModelRet is libvirt's remote_node_get_security_model_ret type NodeGetSecurityModelRet struct { Model []int8 Doi []int8 } +// DomainAttachDeviceArgs is libvirt's remote_domain_attach_device_args type DomainAttachDeviceArgs struct { Dom NonnullDomain XML string } +// DomainAttachDeviceFlagsArgs is libvirt's remote_domain_attach_device_flags_args type DomainAttachDeviceFlagsArgs struct { Dom NonnullDomain XML string Flags uint32 } +// DomainDetachDeviceArgs is libvirt's remote_domain_detach_device_args type DomainDetachDeviceArgs struct { Dom NonnullDomain XML string } +// DomainDetachDeviceFlagsArgs is libvirt's remote_domain_detach_device_flags_args type DomainDetachDeviceFlagsArgs struct { Dom NonnullDomain XML string Flags uint32 } +// DomainUpdateDeviceFlagsArgs is libvirt's remote_domain_update_device_flags_args type DomainUpdateDeviceFlagsArgs struct { Dom NonnullDomain XML string Flags uint32 } +// DomainGetAutostartArgs is libvirt's remote_domain_get_autostart_args type DomainGetAutostartArgs struct { Dom NonnullDomain } +// DomainGetAutostartRet is libvirt's remote_domain_get_autostart_ret type DomainGetAutostartRet struct { Autostart int32 } +// DomainSetAutostartArgs is libvirt's remote_domain_set_autostart_args type DomainSetAutostartArgs struct { Dom NonnullDomain Autostart int32 } +// DomainSetMetadataArgs is libvirt's remote_domain_set_metadata_args type DomainSetMetadataArgs struct { Dom NonnullDomain Type int32 @@ -996,6 +1196,7 @@ type DomainSetMetadataArgs struct { Flags uint32 } +// DomainGetMetadataArgs is libvirt's remote_domain_get_metadata_args type DomainGetMetadataArgs struct { Dom NonnullDomain Type int32 @@ -1003,22 +1204,26 @@ type DomainGetMetadataArgs struct { Flags uint32 } +// DomainGetMetadataRet is libvirt's remote_domain_get_metadata_ret type DomainGetMetadataRet struct { Metadata string } +// DomainBlockJobAbortArgs is libvirt's remote_domain_block_job_abort_args type DomainBlockJobAbortArgs struct { Dom NonnullDomain Path string Flags uint32 } +// DomainGetBlockJobInfoArgs is libvirt's remote_domain_get_block_job_info_args type DomainGetBlockJobInfoArgs struct { Dom NonnullDomain Path string Flags uint32 } +// DomainGetBlockJobInfoRet is libvirt's remote_domain_get_block_job_info_ret type DomainGetBlockJobInfoRet struct { Found int32 Type int32 @@ -1027,6 +1232,7 @@ type DomainGetBlockJobInfoRet struct { End uint64 } +// DomainBlockJobSetSpeedArgs is libvirt's remote_domain_block_job_set_speed_args type DomainBlockJobSetSpeedArgs struct { Dom NonnullDomain Path string @@ -1034,6 +1240,7 @@ type DomainBlockJobSetSpeedArgs struct { Flags uint32 } +// DomainBlockPullArgs is libvirt's remote_domain_block_pull_args type DomainBlockPullArgs struct { Dom NonnullDomain Path string @@ -1041,6 +1248,7 @@ type DomainBlockPullArgs struct { Flags uint32 } +// DomainBlockRebaseArgs is libvirt's remote_domain_block_rebase_args type DomainBlockRebaseArgs struct { Dom NonnullDomain Path string @@ -1049,6 +1257,7 @@ type DomainBlockRebaseArgs struct { Flags uint32 } +// DomainBlockCopyArgs is libvirt's remote_domain_block_copy_args type DomainBlockCopyArgs struct { Dom NonnullDomain Path string @@ -1057,6 +1266,7 @@ type DomainBlockCopyArgs struct { Flags uint32 } +// DomainBlockCommitArgs is libvirt's remote_domain_block_commit_args type DomainBlockCommitArgs struct { Dom NonnullDomain Disk string @@ -1066,6 +1276,7 @@ type DomainBlockCommitArgs struct { Flags uint32 } +// DomainSetBlockIOTuneArgs is libvirt's remote_domain_set_block_io_tune_args type DomainSetBlockIOTuneArgs struct { Dom NonnullDomain Disk string @@ -1073,6 +1284,7 @@ type DomainSetBlockIOTuneArgs struct { Flags uint32 } +// DomainGetBlockIOTuneArgs is libvirt's remote_domain_get_block_io_tune_args type DomainGetBlockIOTuneArgs struct { Dom NonnullDomain Disk OptString @@ -1080,11 +1292,13 @@ type DomainGetBlockIOTuneArgs struct { Flags uint32 } +// DomainGetBlockIOTuneRet is libvirt's remote_domain_get_block_io_tune_ret type DomainGetBlockIOTuneRet struct { Params []TypedParam Nparams int32 } +// DomainGetCPUStatsArgs is libvirt's remote_domain_get_cpu_stats_args type DomainGetCPUStatsArgs struct { Dom NonnullDomain Nparams uint32 @@ -1093,80 +1307,99 @@ type DomainGetCPUStatsArgs struct { Flags uint32 } +// DomainGetCPUStatsRet is libvirt's remote_domain_get_cpu_stats_ret type DomainGetCPUStatsRet struct { Params []TypedParam Nparams int32 } +// DomainGetHostnameArgs is libvirt's remote_domain_get_hostname_args type DomainGetHostnameArgs struct { Dom NonnullDomain Flags uint32 } +// DomainGetHostnameRet is libvirt's remote_domain_get_hostname_ret type DomainGetHostnameRet struct { Hostname string } +// ConnectNumOfNetworksRet is libvirt's remote_connect_num_of_networks_ret type ConnectNumOfNetworksRet struct { Num int32 } +// ConnectListNetworksArgs is libvirt's remote_connect_list_networks_args type ConnectListNetworksArgs struct { Maxnames int32 } +// ConnectListNetworksRet is libvirt's remote_connect_list_networks_ret type ConnectListNetworksRet struct { Names []string } +// ConnectNumOfDefinedNetworksRet is libvirt's remote_connect_num_of_defined_networks_ret type ConnectNumOfDefinedNetworksRet struct { Num int32 } +// ConnectListDefinedNetworksArgs is libvirt's remote_connect_list_defined_networks_args type ConnectListDefinedNetworksArgs struct { Maxnames int32 } +// ConnectListDefinedNetworksRet is libvirt's remote_connect_list_defined_networks_ret type ConnectListDefinedNetworksRet struct { Names []string } +// NetworkLookupByUUIDArgs is libvirt's remote_network_lookup_by_uuid_args type NetworkLookupByUUIDArgs struct { UUID UUID } +// NetworkLookupByUUIDRet is libvirt's remote_network_lookup_by_uuid_ret type NetworkLookupByUUIDRet struct { Net NonnullNetwork } +// NetworkLookupByNameArgs is libvirt's remote_network_lookup_by_name_args type NetworkLookupByNameArgs struct { Name string } +// NetworkLookupByNameRet is libvirt's remote_network_lookup_by_name_ret type NetworkLookupByNameRet struct { Net NonnullNetwork } +// NetworkCreateXMLArgs is libvirt's remote_network_create_xml_args type NetworkCreateXMLArgs struct { XML string } +// NetworkCreateXMLRet is libvirt's remote_network_create_xml_ret type NetworkCreateXMLRet struct { Net NonnullNetwork } +// NetworkDefineXMLArgs is libvirt's remote_network_define_xml_args type NetworkDefineXMLArgs struct { XML string } +// NetworkDefineXMLRet is libvirt's remote_network_define_xml_ret type NetworkDefineXMLRet struct { Net NonnullNetwork } +// NetworkUndefineArgs is libvirt's remote_network_undefine_args type NetworkUndefineArgs struct { Net NonnullNetwork } +// NetworkUpdateArgs is libvirt's remote_network_update_args type NetworkUpdateArgs struct { Net NonnullNetwork Command uint32 @@ -1176,329 +1409,405 @@ type NetworkUpdateArgs struct { Flags uint32 } +// NetworkCreateArgs is libvirt's remote_network_create_args type NetworkCreateArgs struct { Net NonnullNetwork } +// NetworkDestroyArgs is libvirt's remote_network_destroy_args type NetworkDestroyArgs struct { Net NonnullNetwork } +// NetworkGetXMLDescArgs is libvirt's remote_network_get_xml_desc_args type NetworkGetXMLDescArgs struct { Net NonnullNetwork Flags uint32 } +// NetworkGetXMLDescRet is libvirt's remote_network_get_xml_desc_ret type NetworkGetXMLDescRet struct { XML string } +// NetworkGetBridgeNameArgs is libvirt's remote_network_get_bridge_name_args type NetworkGetBridgeNameArgs struct { Net NonnullNetwork } +// NetworkGetBridgeNameRet is libvirt's remote_network_get_bridge_name_ret type NetworkGetBridgeNameRet struct { Name string } +// NetworkGetAutostartArgs is libvirt's remote_network_get_autostart_args type NetworkGetAutostartArgs struct { Net NonnullNetwork } +// NetworkGetAutostartRet is libvirt's remote_network_get_autostart_ret type NetworkGetAutostartRet struct { Autostart int32 } +// NetworkSetAutostartArgs is libvirt's remote_network_set_autostart_args type NetworkSetAutostartArgs struct { Net NonnullNetwork Autostart int32 } +// ConnectNumOfNwfiltersRet is libvirt's remote_connect_num_of_nwfilters_ret type ConnectNumOfNwfiltersRet struct { Num int32 } +// ConnectListNwfiltersArgs is libvirt's remote_connect_list_nwfilters_args type ConnectListNwfiltersArgs struct { Maxnames int32 } +// ConnectListNwfiltersRet is libvirt's remote_connect_list_nwfilters_ret type ConnectListNwfiltersRet struct { Names []string } +// NwfilterLookupByUUIDArgs is libvirt's remote_nwfilter_lookup_by_uuid_args type NwfilterLookupByUUIDArgs struct { UUID UUID } +// NwfilterLookupByUUIDRet is libvirt's remote_nwfilter_lookup_by_uuid_ret type NwfilterLookupByUUIDRet struct { Nwfilter NonnullNwfilter } +// NwfilterLookupByNameArgs is libvirt's remote_nwfilter_lookup_by_name_args type NwfilterLookupByNameArgs struct { Name string } +// NwfilterLookupByNameRet is libvirt's remote_nwfilter_lookup_by_name_ret type NwfilterLookupByNameRet struct { Nwfilter NonnullNwfilter } +// NwfilterDefineXMLArgs is libvirt's remote_nwfilter_define_xml_args type NwfilterDefineXMLArgs struct { XML string } +// NwfilterDefineXMLRet is libvirt's remote_nwfilter_define_xml_ret type NwfilterDefineXMLRet struct { Nwfilter NonnullNwfilter } +// NwfilterUndefineArgs is libvirt's remote_nwfilter_undefine_args type NwfilterUndefineArgs struct { Nwfilter NonnullNwfilter } +// NwfilterGetXMLDescArgs is libvirt's remote_nwfilter_get_xml_desc_args type NwfilterGetXMLDescArgs struct { Nwfilter NonnullNwfilter Flags uint32 } +// NwfilterGetXMLDescRet is libvirt's remote_nwfilter_get_xml_desc_ret type NwfilterGetXMLDescRet struct { XML string } +// ConnectNumOfInterfacesRet is libvirt's remote_connect_num_of_interfaces_ret type ConnectNumOfInterfacesRet struct { Num int32 } +// ConnectListInterfacesArgs is libvirt's remote_connect_list_interfaces_args type ConnectListInterfacesArgs struct { Maxnames int32 } +// ConnectListInterfacesRet is libvirt's remote_connect_list_interfaces_ret type ConnectListInterfacesRet struct { Names []string } +// ConnectNumOfDefinedInterfacesRet is libvirt's remote_connect_num_of_defined_interfaces_ret type ConnectNumOfDefinedInterfacesRet struct { Num int32 } +// ConnectListDefinedInterfacesArgs is libvirt's remote_connect_list_defined_interfaces_args type ConnectListDefinedInterfacesArgs struct { Maxnames int32 } +// ConnectListDefinedInterfacesRet is libvirt's remote_connect_list_defined_interfaces_ret type ConnectListDefinedInterfacesRet struct { Names []string } +// InterfaceLookupByNameArgs is libvirt's remote_interface_lookup_by_name_args type InterfaceLookupByNameArgs struct { Name string } +// InterfaceLookupByNameRet is libvirt's remote_interface_lookup_by_name_ret type InterfaceLookupByNameRet struct { Iface NonnullInterface } +// InterfaceLookupByMacStringArgs is libvirt's remote_interface_lookup_by_mac_string_args type InterfaceLookupByMacStringArgs struct { Mac string } +// InterfaceLookupByMacStringRet is libvirt's remote_interface_lookup_by_mac_string_ret type InterfaceLookupByMacStringRet struct { Iface NonnullInterface } +// InterfaceGetXMLDescArgs is libvirt's remote_interface_get_xml_desc_args type InterfaceGetXMLDescArgs struct { Iface NonnullInterface Flags uint32 } +// InterfaceGetXMLDescRet is libvirt's remote_interface_get_xml_desc_ret type InterfaceGetXMLDescRet struct { XML string } +// InterfaceDefineXMLArgs is libvirt's remote_interface_define_xml_args type InterfaceDefineXMLArgs struct { XML string Flags uint32 } +// InterfaceDefineXMLRet is libvirt's remote_interface_define_xml_ret type InterfaceDefineXMLRet struct { Iface NonnullInterface } +// InterfaceUndefineArgs is libvirt's remote_interface_undefine_args type InterfaceUndefineArgs struct { Iface NonnullInterface } +// InterfaceCreateArgs is libvirt's remote_interface_create_args type InterfaceCreateArgs struct { Iface NonnullInterface Flags uint32 } +// InterfaceDestroyArgs is libvirt's remote_interface_destroy_args type InterfaceDestroyArgs struct { Iface NonnullInterface Flags uint32 } +// InterfaceChangeBeginArgs is libvirt's remote_interface_change_begin_args type InterfaceChangeBeginArgs struct { Flags uint32 } +// InterfaceChangeCommitArgs is libvirt's remote_interface_change_commit_args type InterfaceChangeCommitArgs struct { Flags uint32 } +// InterfaceChangeRollbackArgs is libvirt's remote_interface_change_rollback_args type InterfaceChangeRollbackArgs struct { Flags uint32 } +// AuthListRet is libvirt's remote_auth_list_ret type AuthListRet struct { Types []AuthType } +// AuthSaslInitRet is libvirt's remote_auth_sasl_init_ret type AuthSaslInitRet struct { Mechlist string } +// AuthSaslStartArgs is libvirt's remote_auth_sasl_start_args type AuthSaslStartArgs struct { Mech string Nil int32 Data []int8 } +// AuthSaslStartRet is libvirt's remote_auth_sasl_start_ret type AuthSaslStartRet struct { Complete int32 Nil int32 Data []int8 } +// AuthSaslStepArgs is libvirt's remote_auth_sasl_step_args type AuthSaslStepArgs struct { Nil int32 Data []int8 } +// AuthSaslStepRet is libvirt's remote_auth_sasl_step_ret type AuthSaslStepRet struct { Complete int32 Nil int32 Data []int8 } +// AuthPolkitRet is libvirt's remote_auth_polkit_ret type AuthPolkitRet struct { Complete int32 } +// ConnectNumOfStoragePoolsRet is libvirt's remote_connect_num_of_storage_pools_ret type ConnectNumOfStoragePoolsRet struct { Num int32 } +// ConnectListStoragePoolsArgs is libvirt's remote_connect_list_storage_pools_args type ConnectListStoragePoolsArgs struct { Maxnames int32 } +// ConnectListStoragePoolsRet is libvirt's remote_connect_list_storage_pools_ret type ConnectListStoragePoolsRet struct { Names []string } +// ConnectNumOfDefinedStoragePoolsRet is libvirt's remote_connect_num_of_defined_storage_pools_ret type ConnectNumOfDefinedStoragePoolsRet struct { Num int32 } +// ConnectListDefinedStoragePoolsArgs is libvirt's remote_connect_list_defined_storage_pools_args type ConnectListDefinedStoragePoolsArgs struct { Maxnames int32 } +// ConnectListDefinedStoragePoolsRet is libvirt's remote_connect_list_defined_storage_pools_ret type ConnectListDefinedStoragePoolsRet struct { Names []string } +// ConnectFindStoragePoolSourcesArgs is libvirt's remote_connect_find_storage_pool_sources_args type ConnectFindStoragePoolSourcesArgs struct { Type string SrcSpec OptString Flags uint32 } +// ConnectFindStoragePoolSourcesRet is libvirt's remote_connect_find_storage_pool_sources_ret type ConnectFindStoragePoolSourcesRet struct { XML string } +// StoragePoolLookupByUUIDArgs is libvirt's remote_storage_pool_lookup_by_uuid_args type StoragePoolLookupByUUIDArgs struct { UUID UUID } +// StoragePoolLookupByUUIDRet is libvirt's remote_storage_pool_lookup_by_uuid_ret type StoragePoolLookupByUUIDRet struct { Pool NonnullStoragePool } +// StoragePoolLookupByNameArgs is libvirt's remote_storage_pool_lookup_by_name_args type StoragePoolLookupByNameArgs struct { Name string } +// StoragePoolLookupByNameRet is libvirt's remote_storage_pool_lookup_by_name_ret type StoragePoolLookupByNameRet struct { Pool NonnullStoragePool } +// StoragePoolLookupByVolumeArgs is libvirt's remote_storage_pool_lookup_by_volume_args type StoragePoolLookupByVolumeArgs struct { Vol NonnullStorageVol } +// StoragePoolLookupByVolumeRet is libvirt's remote_storage_pool_lookup_by_volume_ret type StoragePoolLookupByVolumeRet struct { Pool NonnullStoragePool } +// StoragePoolCreateXMLArgs is libvirt's remote_storage_pool_create_xml_args type StoragePoolCreateXMLArgs struct { XML string Flags uint32 } +// StoragePoolCreateXMLRet is libvirt's remote_storage_pool_create_xml_ret type StoragePoolCreateXMLRet struct { Pool NonnullStoragePool } +// StoragePoolDefineXMLArgs is libvirt's remote_storage_pool_define_xml_args type StoragePoolDefineXMLArgs struct { XML string Flags uint32 } +// StoragePoolDefineXMLRet is libvirt's remote_storage_pool_define_xml_ret type StoragePoolDefineXMLRet struct { Pool NonnullStoragePool } +// StoragePoolBuildArgs is libvirt's remote_storage_pool_build_args type StoragePoolBuildArgs struct { Pool NonnullStoragePool Flags uint32 } +// StoragePoolUndefineArgs is libvirt's remote_storage_pool_undefine_args type StoragePoolUndefineArgs struct { Pool NonnullStoragePool } +// StoragePoolCreateArgs is libvirt's remote_storage_pool_create_args type StoragePoolCreateArgs struct { Pool NonnullStoragePool Flags uint32 } +// StoragePoolDestroyArgs is libvirt's remote_storage_pool_destroy_args type StoragePoolDestroyArgs struct { Pool NonnullStoragePool } +// StoragePoolDeleteArgs is libvirt's remote_storage_pool_delete_args type StoragePoolDeleteArgs struct { Pool NonnullStoragePool Flags uint32 } +// StoragePoolRefreshArgs is libvirt's remote_storage_pool_refresh_args type StoragePoolRefreshArgs struct { Pool NonnullStoragePool Flags uint32 } +// StoragePoolGetXMLDescArgs is libvirt's remote_storage_pool_get_xml_desc_args type StoragePoolGetXMLDescArgs struct { Pool NonnullStoragePool Flags uint32 } +// StoragePoolGetXMLDescRet is libvirt's remote_storage_pool_get_xml_desc_ret type StoragePoolGetXMLDescRet struct { XML string } +// StoragePoolGetInfoArgs is libvirt's remote_storage_pool_get_info_args type StoragePoolGetInfoArgs struct { Pool NonnullStoragePool } +// StoragePoolGetInfoRet is libvirt's remote_storage_pool_get_info_ret type StoragePoolGetInfoRet struct { State uint8 Capacity uint64 @@ -1506,71 +1815,87 @@ type StoragePoolGetInfoRet struct { Available uint64 } +// StoragePoolGetAutostartArgs is libvirt's remote_storage_pool_get_autostart_args type StoragePoolGetAutostartArgs struct { Pool NonnullStoragePool } +// StoragePoolGetAutostartRet is libvirt's remote_storage_pool_get_autostart_ret type StoragePoolGetAutostartRet struct { Autostart int32 } +// StoragePoolSetAutostartArgs is libvirt's remote_storage_pool_set_autostart_args type StoragePoolSetAutostartArgs struct { Pool NonnullStoragePool Autostart int32 } +// StoragePoolNumOfVolumesArgs is libvirt's remote_storage_pool_num_of_volumes_args type StoragePoolNumOfVolumesArgs struct { Pool NonnullStoragePool } +// StoragePoolNumOfVolumesRet is libvirt's remote_storage_pool_num_of_volumes_ret type StoragePoolNumOfVolumesRet struct { Num int32 } +// StoragePoolListVolumesArgs is libvirt's remote_storage_pool_list_volumes_args type StoragePoolListVolumesArgs struct { Pool NonnullStoragePool Maxnames int32 } +// StoragePoolListVolumesRet is libvirt's remote_storage_pool_list_volumes_ret type StoragePoolListVolumesRet struct { Names []string } +// StorageVolLookupByNameArgs is libvirt's remote_storage_vol_lookup_by_name_args type StorageVolLookupByNameArgs struct { Pool NonnullStoragePool Name string } +// StorageVolLookupByNameRet is libvirt's remote_storage_vol_lookup_by_name_ret type StorageVolLookupByNameRet struct { Vol NonnullStorageVol } +// StorageVolLookupByKeyArgs is libvirt's remote_storage_vol_lookup_by_key_args type StorageVolLookupByKeyArgs struct { Key string } +// StorageVolLookupByKeyRet is libvirt's remote_storage_vol_lookup_by_key_ret type StorageVolLookupByKeyRet struct { Vol NonnullStorageVol } +// StorageVolLookupByPathArgs is libvirt's remote_storage_vol_lookup_by_path_args type StorageVolLookupByPathArgs struct { Path string } +// StorageVolLookupByPathRet is libvirt's remote_storage_vol_lookup_by_path_ret type StorageVolLookupByPathRet struct { Vol NonnullStorageVol } +// StorageVolCreateXMLArgs is libvirt's remote_storage_vol_create_xml_args type StorageVolCreateXMLArgs struct { Pool NonnullStoragePool XML string Flags uint32 } +// StorageVolCreateXMLRet is libvirt's remote_storage_vol_create_xml_ret type StorageVolCreateXMLRet struct { Vol NonnullStorageVol } +// StorageVolCreateXMLFromArgs is libvirt's remote_storage_vol_create_xml_from_args type StorageVolCreateXMLFromArgs struct { Pool NonnullStoragePool XML string @@ -1578,277 +1903,337 @@ type StorageVolCreateXMLFromArgs struct { Flags uint32 } +// StorageVolCreateXMLFromRet is libvirt's remote_storage_vol_create_xml_from_ret type StorageVolCreateXMLFromRet struct { Vol NonnullStorageVol } +// StorageVolDeleteArgs is libvirt's remote_storage_vol_delete_args type StorageVolDeleteArgs struct { Vol NonnullStorageVol Flags uint32 } +// StorageVolWipeArgs is libvirt's remote_storage_vol_wipe_args type StorageVolWipeArgs struct { Vol NonnullStorageVol Flags uint32 } +// StorageVolWipePatternArgs is libvirt's remote_storage_vol_wipe_pattern_args type StorageVolWipePatternArgs struct { Vol NonnullStorageVol Algorithm uint32 Flags uint32 } +// StorageVolGetXMLDescArgs is libvirt's remote_storage_vol_get_xml_desc_args type StorageVolGetXMLDescArgs struct { Vol NonnullStorageVol Flags uint32 } +// StorageVolGetXMLDescRet is libvirt's remote_storage_vol_get_xml_desc_ret type StorageVolGetXMLDescRet struct { XML string } +// StorageVolGetInfoArgs is libvirt's remote_storage_vol_get_info_args type StorageVolGetInfoArgs struct { Vol NonnullStorageVol } +// StorageVolGetInfoRet is libvirt's remote_storage_vol_get_info_ret type StorageVolGetInfoRet struct { Type int8 Capacity uint64 Allocation uint64 } +// StorageVolGetInfoFlagsArgs is libvirt's remote_storage_vol_get_info_flags_args type StorageVolGetInfoFlagsArgs struct { Vol NonnullStorageVol Flags uint32 } +// StorageVolGetInfoFlagsRet is libvirt's remote_storage_vol_get_info_flags_ret type StorageVolGetInfoFlagsRet struct { Type int8 Capacity uint64 Allocation uint64 } +// StorageVolGetPathArgs is libvirt's remote_storage_vol_get_path_args type StorageVolGetPathArgs struct { Vol NonnullStorageVol } +// StorageVolGetPathRet is libvirt's remote_storage_vol_get_path_ret type StorageVolGetPathRet struct { Name string } +// StorageVolResizeArgs is libvirt's remote_storage_vol_resize_args type StorageVolResizeArgs struct { Vol NonnullStorageVol Capacity uint64 Flags uint32 } +// NodeNumOfDevicesArgs is libvirt's remote_node_num_of_devices_args type NodeNumOfDevicesArgs struct { Cap OptString Flags uint32 } +// NodeNumOfDevicesRet is libvirt's remote_node_num_of_devices_ret type NodeNumOfDevicesRet struct { Num int32 } +// NodeListDevicesArgs is libvirt's remote_node_list_devices_args type NodeListDevicesArgs struct { Cap OptString Maxnames int32 Flags uint32 } +// NodeListDevicesRet is libvirt's remote_node_list_devices_ret type NodeListDevicesRet struct { Names []string } +// NodeDeviceLookupByNameArgs is libvirt's remote_node_device_lookup_by_name_args type NodeDeviceLookupByNameArgs struct { Name string } +// NodeDeviceLookupByNameRet is libvirt's remote_node_device_lookup_by_name_ret type NodeDeviceLookupByNameRet struct { Dev NonnullNodeDevice } +// NodeDeviceLookupScsiHostByWwnArgs is libvirt's remote_node_device_lookup_scsi_host_by_wwn_args type NodeDeviceLookupScsiHostByWwnArgs struct { Wwnn string Wwpn string Flags uint32 } +// NodeDeviceLookupScsiHostByWwnRet is libvirt's remote_node_device_lookup_scsi_host_by_wwn_ret type NodeDeviceLookupScsiHostByWwnRet struct { Dev NonnullNodeDevice } +// NodeDeviceGetXMLDescArgs is libvirt's remote_node_device_get_xml_desc_args type NodeDeviceGetXMLDescArgs struct { Name string Flags uint32 } +// NodeDeviceGetXMLDescRet is libvirt's remote_node_device_get_xml_desc_ret type NodeDeviceGetXMLDescRet struct { XML string } +// NodeDeviceGetParentArgs is libvirt's remote_node_device_get_parent_args type NodeDeviceGetParentArgs struct { Name string } +// NodeDeviceGetParentRet is libvirt's remote_node_device_get_parent_ret type NodeDeviceGetParentRet struct { Parent OptString } +// NodeDeviceNumOfCapsArgs is libvirt's remote_node_device_num_of_caps_args type NodeDeviceNumOfCapsArgs struct { Name string } +// NodeDeviceNumOfCapsRet is libvirt's remote_node_device_num_of_caps_ret type NodeDeviceNumOfCapsRet struct { Num int32 } +// NodeDeviceListCapsArgs is libvirt's remote_node_device_list_caps_args type NodeDeviceListCapsArgs struct { Name string Maxnames int32 } +// NodeDeviceListCapsRet is libvirt's remote_node_device_list_caps_ret type NodeDeviceListCapsRet struct { Names []string } +// NodeDeviceDettachArgs is libvirt's remote_node_device_dettach_args type NodeDeviceDettachArgs struct { Name string } +// NodeDeviceDetachFlagsArgs is libvirt's remote_node_device_detach_flags_args type NodeDeviceDetachFlagsArgs struct { Name string DriverName OptString Flags uint32 } +// NodeDeviceReAttachArgs is libvirt's remote_node_device_re_attach_args type NodeDeviceReAttachArgs struct { Name string } +// NodeDeviceResetArgs is libvirt's remote_node_device_reset_args type NodeDeviceResetArgs struct { Name string } +// NodeDeviceCreateXMLArgs is libvirt's remote_node_device_create_xml_args type NodeDeviceCreateXMLArgs struct { XMLDesc string Flags uint32 } +// NodeDeviceCreateXMLRet is libvirt's remote_node_device_create_xml_ret type NodeDeviceCreateXMLRet struct { Dev NonnullNodeDevice } +// NodeDeviceDestroyArgs is libvirt's remote_node_device_destroy_args type NodeDeviceDestroyArgs struct { Name string } +// ConnectDomainEventRegisterRet is libvirt's remote_connect_domain_event_register_ret type ConnectDomainEventRegisterRet struct { CbRegistered int32 } +// ConnectDomainEventDeregisterRet is libvirt's remote_connect_domain_event_deregister_ret type ConnectDomainEventDeregisterRet struct { CbRegistered int32 } +// DomainEventLifecycleMsg is libvirt's remote_domain_event_lifecycle_msg type DomainEventLifecycleMsg struct { Dom NonnullDomain Event int32 Detail int32 } +// DomainEventCallbackLifecycleMsg is libvirt's remote_domain_event_callback_lifecycle_msg type DomainEventCallbackLifecycleMsg struct { CallbackID int32 Msg DomainEventLifecycleMsg } +// ConnectDomainXMLFromNativeArgs is libvirt's remote_connect_domain_xml_from_native_args type ConnectDomainXMLFromNativeArgs struct { NativeFormat string NativeConfig string Flags uint32 } +// ConnectDomainXMLFromNativeRet is libvirt's remote_connect_domain_xml_from_native_ret type ConnectDomainXMLFromNativeRet struct { DomainXML string } +// ConnectDomainXMLToNativeArgs is libvirt's remote_connect_domain_xml_to_native_args type ConnectDomainXMLToNativeArgs struct { NativeFormat string DomainXML string Flags uint32 } +// ConnectDomainXMLToNativeRet is libvirt's remote_connect_domain_xml_to_native_ret type ConnectDomainXMLToNativeRet struct { NativeConfig string } +// ConnectNumOfSecretsRet is libvirt's remote_connect_num_of_secrets_ret type ConnectNumOfSecretsRet struct { Num int32 } +// ConnectListSecretsArgs is libvirt's remote_connect_list_secrets_args type ConnectListSecretsArgs struct { Maxuuids int32 } +// ConnectListSecretsRet is libvirt's remote_connect_list_secrets_ret type ConnectListSecretsRet struct { Uuids []string } +// SecretLookupByUUIDArgs is libvirt's remote_secret_lookup_by_uuid_args type SecretLookupByUUIDArgs struct { UUID UUID } +// SecretLookupByUUIDRet is libvirt's remote_secret_lookup_by_uuid_ret type SecretLookupByUUIDRet struct { Secret NonnullSecret } +// SecretDefineXMLArgs is libvirt's remote_secret_define_xml_args type SecretDefineXMLArgs struct { XML string Flags uint32 } +// SecretDefineXMLRet is libvirt's remote_secret_define_xml_ret type SecretDefineXMLRet struct { Secret NonnullSecret } +// SecretGetXMLDescArgs is libvirt's remote_secret_get_xml_desc_args type SecretGetXMLDescArgs struct { Secret NonnullSecret Flags uint32 } +// SecretGetXMLDescRet is libvirt's remote_secret_get_xml_desc_ret type SecretGetXMLDescRet struct { XML string } +// SecretSetValueArgs is libvirt's remote_secret_set_value_args type SecretSetValueArgs struct { Secret NonnullSecret Value []byte Flags uint32 } +// SecretGetValueArgs is libvirt's remote_secret_get_value_args type SecretGetValueArgs struct { Secret NonnullSecret Flags uint32 } +// SecretGetValueRet is libvirt's remote_secret_get_value_ret type SecretGetValueRet struct { Value []byte } +// SecretUndefineArgs is libvirt's remote_secret_undefine_args type SecretUndefineArgs struct { Secret NonnullSecret } +// SecretLookupByUsageArgs is libvirt's remote_secret_lookup_by_usage_args type SecretLookupByUsageArgs struct { UsageType int32 UsageID string } +// SecretLookupByUsageRet is libvirt's remote_secret_lookup_by_usage_ret type SecretLookupByUsageRet struct { Secret NonnullSecret } +// DomainMigratePrepareTunnelArgs is libvirt's remote_domain_migrate_prepare_tunnel_args type DomainMigratePrepareTunnelArgs struct { Flags uint64 Dname OptString @@ -1856,96 +2241,119 @@ type DomainMigratePrepareTunnelArgs struct { DomXML string } +// ConnectIsSecureRet is libvirt's remote_connect_is_secure_ret type ConnectIsSecureRet struct { Secure int32 } +// DomainIsActiveArgs is libvirt's remote_domain_is_active_args type DomainIsActiveArgs struct { Dom NonnullDomain } +// DomainIsActiveRet is libvirt's remote_domain_is_active_ret type DomainIsActiveRet struct { Active int32 } +// DomainIsPersistentArgs is libvirt's remote_domain_is_persistent_args type DomainIsPersistentArgs struct { Dom NonnullDomain } +// DomainIsPersistentRet is libvirt's remote_domain_is_persistent_ret type DomainIsPersistentRet struct { Persistent int32 } +// DomainIsUpdatedArgs is libvirt's remote_domain_is_updated_args type DomainIsUpdatedArgs struct { Dom NonnullDomain } +// DomainIsUpdatedRet is libvirt's remote_domain_is_updated_ret type DomainIsUpdatedRet struct { Updated int32 } +// NetworkIsActiveArgs is libvirt's remote_network_is_active_args type NetworkIsActiveArgs struct { Net NonnullNetwork } +// NetworkIsActiveRet is libvirt's remote_network_is_active_ret type NetworkIsActiveRet struct { Active int32 } +// NetworkIsPersistentArgs is libvirt's remote_network_is_persistent_args type NetworkIsPersistentArgs struct { Net NonnullNetwork } +// NetworkIsPersistentRet is libvirt's remote_network_is_persistent_ret type NetworkIsPersistentRet struct { Persistent int32 } +// StoragePoolIsActiveArgs is libvirt's remote_storage_pool_is_active_args type StoragePoolIsActiveArgs struct { Pool NonnullStoragePool } +// StoragePoolIsActiveRet is libvirt's remote_storage_pool_is_active_ret type StoragePoolIsActiveRet struct { Active int32 } +// StoragePoolIsPersistentArgs is libvirt's remote_storage_pool_is_persistent_args type StoragePoolIsPersistentArgs struct { Pool NonnullStoragePool } +// StoragePoolIsPersistentRet is libvirt's remote_storage_pool_is_persistent_ret type StoragePoolIsPersistentRet struct { Persistent int32 } +// InterfaceIsActiveArgs is libvirt's remote_interface_is_active_args type InterfaceIsActiveArgs struct { Iface NonnullInterface } +// InterfaceIsActiveRet is libvirt's remote_interface_is_active_ret type InterfaceIsActiveRet struct { Active int32 } +// ConnectCompareCPUArgs is libvirt's remote_connect_compare_cpu_args type ConnectCompareCPUArgs struct { XML string Flags uint32 } +// ConnectCompareCPURet is libvirt's remote_connect_compare_cpu_ret type ConnectCompareCPURet struct { Result int32 } +// ConnectBaselineCPUArgs is libvirt's remote_connect_baseline_cpu_args type ConnectBaselineCPUArgs struct { XMLCPUs []string Flags uint32 } +// ConnectBaselineCPURet is libvirt's remote_connect_baseline_cpu_ret type ConnectBaselineCPURet struct { CPU string } +// DomainGetJobInfoArgs is libvirt's remote_domain_get_job_info_args type DomainGetJobInfoArgs struct { Dom NonnullDomain } +// DomainGetJobInfoRet is libvirt's remote_domain_get_job_info_ret type DomainGetJobInfoRet struct { Type int32 TimeElapsed uint64 @@ -1961,115 +2369,139 @@ type DomainGetJobInfoRet struct { FileRemaining uint64 } +// DomainGetJobStatsArgs is libvirt's remote_domain_get_job_stats_args type DomainGetJobStatsArgs struct { Dom NonnullDomain Flags uint32 } +// DomainGetJobStatsRet is libvirt's remote_domain_get_job_stats_ret type DomainGetJobStatsRet struct { Type int32 Params []TypedParam } +// DomainAbortJobArgs is libvirt's remote_domain_abort_job_args type DomainAbortJobArgs struct { Dom NonnullDomain } +// DomainMigrateGetMaxDowntimeArgs is libvirt's remote_domain_migrate_get_max_downtime_args type DomainMigrateGetMaxDowntimeArgs struct { Dom NonnullDomain Flags uint32 } +// DomainMigrateGetMaxDowntimeRet is libvirt's remote_domain_migrate_get_max_downtime_ret type DomainMigrateGetMaxDowntimeRet struct { Downtime uint64 } +// DomainMigrateSetMaxDowntimeArgs is libvirt's remote_domain_migrate_set_max_downtime_args type DomainMigrateSetMaxDowntimeArgs struct { Dom NonnullDomain Downtime uint64 Flags uint32 } +// DomainMigrateGetCompressionCacheArgs is libvirt's remote_domain_migrate_get_compression_cache_args type DomainMigrateGetCompressionCacheArgs struct { Dom NonnullDomain Flags uint32 } +// DomainMigrateGetCompressionCacheRet is libvirt's remote_domain_migrate_get_compression_cache_ret type DomainMigrateGetCompressionCacheRet struct { CacheSize uint64 } +// DomainMigrateSetCompressionCacheArgs is libvirt's remote_domain_migrate_set_compression_cache_args type DomainMigrateSetCompressionCacheArgs struct { Dom NonnullDomain CacheSize uint64 Flags uint32 } +// DomainMigrateSetMaxSpeedArgs is libvirt's remote_domain_migrate_set_max_speed_args type DomainMigrateSetMaxSpeedArgs struct { Dom NonnullDomain Bandwidth uint64 Flags uint32 } +// DomainMigrateGetMaxSpeedArgs is libvirt's remote_domain_migrate_get_max_speed_args type DomainMigrateGetMaxSpeedArgs struct { Dom NonnullDomain Flags uint32 } +// DomainMigrateGetMaxSpeedRet is libvirt's remote_domain_migrate_get_max_speed_ret type DomainMigrateGetMaxSpeedRet struct { Bandwidth uint64 } +// ConnectDomainEventRegisterAnyArgs is libvirt's remote_connect_domain_event_register_any_args type ConnectDomainEventRegisterAnyArgs struct { EventID int32 } +// ConnectDomainEventDeregisterAnyArgs is libvirt's remote_connect_domain_event_deregister_any_args type ConnectDomainEventDeregisterAnyArgs struct { EventID int32 } +// ConnectDomainEventCallbackRegisterAnyArgs is libvirt's remote_connect_domain_event_callback_register_any_args type ConnectDomainEventCallbackRegisterAnyArgs struct { EventID int32 Dom Domain } +// ConnectDomainEventCallbackRegisterAnyRet is libvirt's remote_connect_domain_event_callback_register_any_ret type ConnectDomainEventCallbackRegisterAnyRet struct { CallbackID int32 } +// ConnectDomainEventCallbackDeregisterAnyArgs is libvirt's remote_connect_domain_event_callback_deregister_any_args type ConnectDomainEventCallbackDeregisterAnyArgs struct { CallbackID int32 } +// DomainEventRebootMsg is libvirt's remote_domain_event_reboot_msg type DomainEventRebootMsg struct { Dom NonnullDomain } +// DomainEventCallbackRebootMsg is libvirt's remote_domain_event_callback_reboot_msg type DomainEventCallbackRebootMsg struct { CallbackID int32 Msg DomainEventRebootMsg } +// DomainEventRtcChangeMsg is libvirt's remote_domain_event_rtc_change_msg type DomainEventRtcChangeMsg struct { Dom NonnullDomain Offset int64 } +// DomainEventCallbackRtcChangeMsg is libvirt's remote_domain_event_callback_rtc_change_msg type DomainEventCallbackRtcChangeMsg struct { CallbackID int32 Msg DomainEventRtcChangeMsg } +// DomainEventWatchdogMsg is libvirt's remote_domain_event_watchdog_msg type DomainEventWatchdogMsg struct { Dom NonnullDomain Action int32 } +// DomainEventCallbackWatchdogMsg is libvirt's remote_domain_event_callback_watchdog_msg type DomainEventCallbackWatchdogMsg struct { CallbackID int32 Msg DomainEventWatchdogMsg } +// DomainEventIOErrorMsg is libvirt's remote_domain_event_io_error_msg type DomainEventIOErrorMsg struct { Dom NonnullDomain SrcPath string @@ -2077,11 +2509,13 @@ type DomainEventIOErrorMsg struct { Action int32 } +// DomainEventCallbackIOErrorMsg is libvirt's remote_domain_event_callback_io_error_msg type DomainEventCallbackIOErrorMsg struct { CallbackID int32 Msg DomainEventIOErrorMsg } +// DomainEventIOErrorReasonMsg is libvirt's remote_domain_event_io_error_reason_msg type DomainEventIOErrorReasonMsg struct { Dom NonnullDomain SrcPath string @@ -2090,22 +2524,26 @@ type DomainEventIOErrorReasonMsg struct { Reason string } +// DomainEventCallbackIOErrorReasonMsg is libvirt's remote_domain_event_callback_io_error_reason_msg type DomainEventCallbackIOErrorReasonMsg struct { CallbackID int32 Msg DomainEventIOErrorReasonMsg } +// DomainEventGraphicsAddress is libvirt's remote_domain_event_graphics_address type DomainEventGraphicsAddress struct { Family int32 Node string Service string } +// DomainEventGraphicsIdentity is libvirt's remote_domain_event_graphics_identity type DomainEventGraphicsIdentity struct { Type string Name string } +// DomainEventGraphicsMsg is libvirt's remote_domain_event_graphics_msg type DomainEventGraphicsMsg struct { Dom NonnullDomain Phase int32 @@ -2115,11 +2553,13 @@ type DomainEventGraphicsMsg struct { Subject []DomainEventGraphicsIdentity } +// DomainEventCallbackGraphicsMsg is libvirt's remote_domain_event_callback_graphics_msg type DomainEventCallbackGraphicsMsg struct { CallbackID int32 Msg DomainEventGraphicsMsg } +// DomainEventBlockJobMsg is libvirt's remote_domain_event_block_job_msg type DomainEventBlockJobMsg struct { Dom NonnullDomain Path string @@ -2127,11 +2567,13 @@ type DomainEventBlockJobMsg struct { Status int32 } +// DomainEventCallbackBlockJobMsg is libvirt's remote_domain_event_callback_block_job_msg type DomainEventCallbackBlockJobMsg struct { CallbackID int32 Msg DomainEventBlockJobMsg } +// DomainEventDiskChangeMsg is libvirt's remote_domain_event_disk_change_msg type DomainEventDiskChangeMsg struct { Dom NonnullDomain OldSrcPath OptString @@ -2140,252 +2582,303 @@ type DomainEventDiskChangeMsg struct { Reason int32 } +// DomainEventCallbackDiskChangeMsg is libvirt's remote_domain_event_callback_disk_change_msg type DomainEventCallbackDiskChangeMsg struct { CallbackID int32 Msg DomainEventDiskChangeMsg } +// DomainEventTrayChangeMsg is libvirt's remote_domain_event_tray_change_msg type DomainEventTrayChangeMsg struct { Dom NonnullDomain DevAlias string Reason int32 } +// DomainEventCallbackTrayChangeMsg is libvirt's remote_domain_event_callback_tray_change_msg type DomainEventCallbackTrayChangeMsg struct { CallbackID int32 Msg DomainEventTrayChangeMsg } +// DomainEventPmwakeupMsg is libvirt's remote_domain_event_pmwakeup_msg type DomainEventPmwakeupMsg struct { Dom NonnullDomain } +// DomainEventCallbackPmwakeupMsg is libvirt's remote_domain_event_callback_pmwakeup_msg type DomainEventCallbackPmwakeupMsg struct { CallbackID int32 Reason int32 Msg DomainEventPmwakeupMsg } +// DomainEventPmsuspendMsg is libvirt's remote_domain_event_pmsuspend_msg type DomainEventPmsuspendMsg struct { Dom NonnullDomain } +// DomainEventCallbackPmsuspendMsg is libvirt's remote_domain_event_callback_pmsuspend_msg type DomainEventCallbackPmsuspendMsg struct { CallbackID int32 Reason int32 Msg DomainEventPmsuspendMsg } +// DomainEventBalloonChangeMsg is libvirt's remote_domain_event_balloon_change_msg type DomainEventBalloonChangeMsg struct { Dom NonnullDomain Actual uint64 } +// DomainEventCallbackBalloonChangeMsg is libvirt's remote_domain_event_callback_balloon_change_msg type DomainEventCallbackBalloonChangeMsg struct { CallbackID int32 Msg DomainEventBalloonChangeMsg } +// DomainEventPmsuspendDiskMsg is libvirt's remote_domain_event_pmsuspend_disk_msg type DomainEventPmsuspendDiskMsg struct { Dom NonnullDomain } +// DomainEventCallbackPmsuspendDiskMsg is libvirt's remote_domain_event_callback_pmsuspend_disk_msg type DomainEventCallbackPmsuspendDiskMsg struct { CallbackID int32 Reason int32 Msg DomainEventPmsuspendDiskMsg } +// DomainManagedSaveArgs is libvirt's remote_domain_managed_save_args type DomainManagedSaveArgs struct { Dom NonnullDomain Flags uint32 } +// DomainHasManagedSaveImageArgs is libvirt's remote_domain_has_managed_save_image_args type DomainHasManagedSaveImageArgs struct { Dom NonnullDomain Flags uint32 } +// DomainHasManagedSaveImageRet is libvirt's remote_domain_has_managed_save_image_ret type DomainHasManagedSaveImageRet struct { Result int32 } +// DomainManagedSaveRemoveArgs is libvirt's remote_domain_managed_save_remove_args type DomainManagedSaveRemoveArgs struct { Dom NonnullDomain Flags uint32 } +// DomainManagedSaveGetXMLDescArgs is libvirt's remote_domain_managed_save_get_xml_desc_args type DomainManagedSaveGetXMLDescArgs struct { Dom NonnullDomain Flags uint32 } +// DomainManagedSaveGetXMLDescRet is libvirt's remote_domain_managed_save_get_xml_desc_ret type DomainManagedSaveGetXMLDescRet struct { XML string } +// DomainManagedSaveDefineXMLArgs is libvirt's remote_domain_managed_save_define_xml_args type DomainManagedSaveDefineXMLArgs struct { Dom NonnullDomain Dxml OptString Flags uint32 } +// DomainSnapshotCreateXMLArgs is libvirt's remote_domain_snapshot_create_xml_args type DomainSnapshotCreateXMLArgs struct { Dom NonnullDomain XMLDesc string Flags uint32 } +// DomainSnapshotCreateXMLRet is libvirt's remote_domain_snapshot_create_xml_ret type DomainSnapshotCreateXMLRet struct { Snap NonnullDomainSnapshot } +// DomainSnapshotGetXMLDescArgs is libvirt's remote_domain_snapshot_get_xml_desc_args type DomainSnapshotGetXMLDescArgs struct { Snap NonnullDomainSnapshot Flags uint32 } +// DomainSnapshotGetXMLDescRet is libvirt's remote_domain_snapshot_get_xml_desc_ret type DomainSnapshotGetXMLDescRet struct { XML string } +// DomainSnapshotNumArgs is libvirt's remote_domain_snapshot_num_args type DomainSnapshotNumArgs struct { Dom NonnullDomain Flags uint32 } +// DomainSnapshotNumRet is libvirt's remote_domain_snapshot_num_ret type DomainSnapshotNumRet struct { Num int32 } +// DomainSnapshotListNamesArgs is libvirt's remote_domain_snapshot_list_names_args type DomainSnapshotListNamesArgs struct { Dom NonnullDomain Maxnames int32 Flags uint32 } +// DomainSnapshotListNamesRet is libvirt's remote_domain_snapshot_list_names_ret type DomainSnapshotListNamesRet struct { Names []string } +// DomainListAllSnapshotsArgs is libvirt's remote_domain_list_all_snapshots_args type DomainListAllSnapshotsArgs struct { Dom NonnullDomain NeedResults int32 Flags uint32 } +// DomainListAllSnapshotsRet is libvirt's remote_domain_list_all_snapshots_ret type DomainListAllSnapshotsRet struct { Snapshots []NonnullDomainSnapshot Ret int32 } +// DomainSnapshotNumChildrenArgs is libvirt's remote_domain_snapshot_num_children_args type DomainSnapshotNumChildrenArgs struct { Snap NonnullDomainSnapshot Flags uint32 } +// DomainSnapshotNumChildrenRet is libvirt's remote_domain_snapshot_num_children_ret type DomainSnapshotNumChildrenRet struct { Num int32 } +// DomainSnapshotListChildrenNamesArgs is libvirt's remote_domain_snapshot_list_children_names_args type DomainSnapshotListChildrenNamesArgs struct { Snap NonnullDomainSnapshot Maxnames int32 Flags uint32 } +// DomainSnapshotListChildrenNamesRet is libvirt's remote_domain_snapshot_list_children_names_ret type DomainSnapshotListChildrenNamesRet struct { Names []string } +// DomainSnapshotListAllChildrenArgs is libvirt's remote_domain_snapshot_list_all_children_args type DomainSnapshotListAllChildrenArgs struct { Snapshot NonnullDomainSnapshot NeedResults int32 Flags uint32 } +// DomainSnapshotListAllChildrenRet is libvirt's remote_domain_snapshot_list_all_children_ret type DomainSnapshotListAllChildrenRet struct { Snapshots []NonnullDomainSnapshot Ret int32 } +// DomainSnapshotLookupByNameArgs is libvirt's remote_domain_snapshot_lookup_by_name_args type DomainSnapshotLookupByNameArgs struct { Dom NonnullDomain Name string Flags uint32 } +// DomainSnapshotLookupByNameRet is libvirt's remote_domain_snapshot_lookup_by_name_ret type DomainSnapshotLookupByNameRet struct { Snap NonnullDomainSnapshot } +// DomainHasCurrentSnapshotArgs is libvirt's remote_domain_has_current_snapshot_args type DomainHasCurrentSnapshotArgs struct { Dom NonnullDomain Flags uint32 } +// DomainHasCurrentSnapshotRet is libvirt's remote_domain_has_current_snapshot_ret type DomainHasCurrentSnapshotRet struct { Result int32 } +// DomainSnapshotGetParentArgs is libvirt's remote_domain_snapshot_get_parent_args type DomainSnapshotGetParentArgs struct { Snap NonnullDomainSnapshot Flags uint32 } +// DomainSnapshotGetParentRet is libvirt's remote_domain_snapshot_get_parent_ret type DomainSnapshotGetParentRet struct { Snap NonnullDomainSnapshot } +// DomainSnapshotCurrentArgs is libvirt's remote_domain_snapshot_current_args type DomainSnapshotCurrentArgs struct { Dom NonnullDomain Flags uint32 } +// DomainSnapshotCurrentRet is libvirt's remote_domain_snapshot_current_ret type DomainSnapshotCurrentRet struct { Snap NonnullDomainSnapshot } +// DomainSnapshotIsCurrentArgs is libvirt's remote_domain_snapshot_is_current_args type DomainSnapshotIsCurrentArgs struct { Snap NonnullDomainSnapshot Flags uint32 } +// DomainSnapshotIsCurrentRet is libvirt's remote_domain_snapshot_is_current_ret type DomainSnapshotIsCurrentRet struct { Current int32 } +// DomainSnapshotHasMetadataArgs is libvirt's remote_domain_snapshot_has_metadata_args type DomainSnapshotHasMetadataArgs struct { Snap NonnullDomainSnapshot Flags uint32 } +// DomainSnapshotHasMetadataRet is libvirt's remote_domain_snapshot_has_metadata_ret type DomainSnapshotHasMetadataRet struct { Metadata int32 } +// DomainRevertToSnapshotArgs is libvirt's remote_domain_revert_to_snapshot_args type DomainRevertToSnapshotArgs struct { Snap NonnullDomainSnapshot Flags uint32 } +// DomainSnapshotDeleteArgs is libvirt's remote_domain_snapshot_delete_args type DomainSnapshotDeleteArgs struct { Snap NonnullDomainSnapshot Flags uint32 } +// DomainOpenConsoleArgs is libvirt's remote_domain_open_console_args type DomainOpenConsoleArgs struct { Dom NonnullDomain DevName OptString Flags uint32 } +// DomainOpenChannelArgs is libvirt's remote_domain_open_channel_args type DomainOpenChannelArgs struct { Dom NonnullDomain Name OptString Flags uint32 } +// StorageVolUploadArgs is libvirt's remote_storage_vol_upload_args type StorageVolUploadArgs struct { Vol NonnullStorageVol Offset uint64 @@ -2393,6 +2886,7 @@ type StorageVolUploadArgs struct { Flags uint32 } +// StorageVolDownloadArgs is libvirt's remote_storage_vol_download_args type StorageVolDownloadArgs struct { Vol NonnullStorageVol Offset uint64 @@ -2400,16 +2894,19 @@ type StorageVolDownloadArgs struct { Flags uint32 } +// DomainGetStateArgs is libvirt's remote_domain_get_state_args type DomainGetStateArgs struct { Dom NonnullDomain Flags uint32 } +// DomainGetStateRet is libvirt's remote_domain_get_state_ret type DomainGetStateRet struct { State int32 Reason int32 } +// DomainMigrateBegin3Args is libvirt's remote_domain_migrate_begin3_args type DomainMigrateBegin3Args struct { Dom NonnullDomain Xmlin OptString @@ -2418,11 +2915,13 @@ type DomainMigrateBegin3Args struct { Resource uint64 } +// DomainMigrateBegin3Ret is libvirt's remote_domain_migrate_begin3_ret type DomainMigrateBegin3Ret struct { CookieOut []byte XML string } +// DomainMigratePrepare3Args is libvirt's remote_domain_migrate_prepare3_args type DomainMigratePrepare3Args struct { CookieIn []byte UriIn OptString @@ -2432,11 +2931,13 @@ type DomainMigratePrepare3Args struct { DomXML string } +// DomainMigratePrepare3Ret is libvirt's remote_domain_migrate_prepare3_ret type DomainMigratePrepare3Ret struct { CookieOut []byte UriOut OptString } +// DomainMigratePrepareTunnel3Args is libvirt's remote_domain_migrate_prepare_tunnel3_args type DomainMigratePrepareTunnel3Args struct { CookieIn []byte Flags uint64 @@ -2445,10 +2946,12 @@ type DomainMigratePrepareTunnel3Args struct { DomXML string } +// DomainMigratePrepareTunnel3Ret is libvirt's remote_domain_migrate_prepare_tunnel3_ret type DomainMigratePrepareTunnel3Ret struct { CookieOut []byte } +// DomainMigratePerform3Args is libvirt's remote_domain_migrate_perform3_args type DomainMigratePerform3Args struct { Dom NonnullDomain Xmlin OptString @@ -2460,10 +2963,12 @@ type DomainMigratePerform3Args struct { Resource uint64 } +// DomainMigratePerform3Ret is libvirt's remote_domain_migrate_perform3_ret type DomainMigratePerform3Ret struct { CookieOut []byte } +// DomainMigrateFinish3Args is libvirt's remote_domain_migrate_finish3_args type DomainMigrateFinish3Args struct { Dname string CookieIn []byte @@ -2473,11 +2978,13 @@ type DomainMigrateFinish3Args struct { Cancelled int32 } +// DomainMigrateFinish3Ret is libvirt's remote_domain_migrate_finish3_ret type DomainMigrateFinish3Ret struct { Dom NonnullDomain CookieOut []byte } +// DomainMigrateConfirm3Args is libvirt's remote_domain_migrate_confirm3_args type DomainMigrateConfirm3Args struct { Dom NonnullDomain CookieIn []byte @@ -2485,168 +2992,200 @@ type DomainMigrateConfirm3Args struct { Cancelled int32 } +// DomainEventControlErrorMsg is libvirt's remote_domain_event_control_error_msg type DomainEventControlErrorMsg struct { Dom NonnullDomain } +// DomainEventCallbackControlErrorMsg is libvirt's remote_domain_event_callback_control_error_msg type DomainEventCallbackControlErrorMsg struct { CallbackID int32 Msg DomainEventControlErrorMsg } +// DomainGetControlInfoArgs is libvirt's remote_domain_get_control_info_args type DomainGetControlInfoArgs struct { Dom NonnullDomain Flags uint32 } +// DomainGetControlInfoRet is libvirt's remote_domain_get_control_info_ret type DomainGetControlInfoRet struct { State uint32 Details uint32 StateTime uint64 } +// DomainOpenGraphicsArgs is libvirt's remote_domain_open_graphics_args type DomainOpenGraphicsArgs struct { Dom NonnullDomain Idx uint32 Flags uint32 } +// DomainOpenGraphicsFdArgs is libvirt's remote_domain_open_graphics_fd_args type DomainOpenGraphicsFdArgs struct { Dom NonnullDomain Idx uint32 Flags uint32 } +// NodeSuspendForDurationArgs is libvirt's remote_node_suspend_for_duration_args type NodeSuspendForDurationArgs struct { Target uint32 Duration uint64 Flags uint32 } +// DomainShutdownFlagsArgs is libvirt's remote_domain_shutdown_flags_args type DomainShutdownFlagsArgs struct { Dom NonnullDomain Flags uint32 } +// DomainGetDiskErrorsArgs is libvirt's remote_domain_get_disk_errors_args type DomainGetDiskErrorsArgs struct { Dom NonnullDomain Maxerrors uint32 Flags uint32 } +// DomainGetDiskErrorsRet is libvirt's remote_domain_get_disk_errors_ret type DomainGetDiskErrorsRet struct { Errors []DomainDiskError Nerrors int32 } +// ConnectListAllDomainsArgs is libvirt's remote_connect_list_all_domains_args type ConnectListAllDomainsArgs struct { NeedResults int32 Flags uint32 } +// ConnectListAllDomainsRet is libvirt's remote_connect_list_all_domains_ret type ConnectListAllDomainsRet struct { Domains []NonnullDomain Ret uint32 } +// ConnectListAllStoragePoolsArgs is libvirt's remote_connect_list_all_storage_pools_args type ConnectListAllStoragePoolsArgs struct { NeedResults int32 Flags uint32 } +// ConnectListAllStoragePoolsRet is libvirt's remote_connect_list_all_storage_pools_ret type ConnectListAllStoragePoolsRet struct { Pools []NonnullStoragePool Ret uint32 } +// StoragePoolListAllVolumesArgs is libvirt's remote_storage_pool_list_all_volumes_args type StoragePoolListAllVolumesArgs struct { Pool NonnullStoragePool NeedResults int32 Flags uint32 } +// StoragePoolListAllVolumesRet is libvirt's remote_storage_pool_list_all_volumes_ret type StoragePoolListAllVolumesRet struct { Vols []NonnullStorageVol Ret uint32 } +// ConnectListAllNetworksArgs is libvirt's remote_connect_list_all_networks_args type ConnectListAllNetworksArgs struct { NeedResults int32 Flags uint32 } +// ConnectListAllNetworksRet is libvirt's remote_connect_list_all_networks_ret type ConnectListAllNetworksRet struct { Nets []NonnullNetwork Ret uint32 } +// ConnectListAllInterfacesArgs is libvirt's remote_connect_list_all_interfaces_args type ConnectListAllInterfacesArgs struct { NeedResults int32 Flags uint32 } +// ConnectListAllInterfacesRet is libvirt's remote_connect_list_all_interfaces_ret type ConnectListAllInterfacesRet struct { Ifaces []NonnullInterface Ret uint32 } +// ConnectListAllNodeDevicesArgs is libvirt's remote_connect_list_all_node_devices_args type ConnectListAllNodeDevicesArgs struct { NeedResults int32 Flags uint32 } +// ConnectListAllNodeDevicesRet is libvirt's remote_connect_list_all_node_devices_ret type ConnectListAllNodeDevicesRet struct { Devices []NonnullNodeDevice Ret uint32 } +// ConnectListAllNwfiltersArgs is libvirt's remote_connect_list_all_nwfilters_args type ConnectListAllNwfiltersArgs struct { NeedResults int32 Flags uint32 } +// ConnectListAllNwfiltersRet is libvirt's remote_connect_list_all_nwfilters_ret type ConnectListAllNwfiltersRet struct { Filters []NonnullNwfilter Ret uint32 } +// ConnectListAllSecretsArgs is libvirt's remote_connect_list_all_secrets_args type ConnectListAllSecretsArgs struct { NeedResults int32 Flags uint32 } +// ConnectListAllSecretsRet is libvirt's remote_connect_list_all_secrets_ret type ConnectListAllSecretsRet struct { Secrets []NonnullSecret Ret uint32 } +// NodeSetMemoryParametersArgs is libvirt's remote_node_set_memory_parameters_args type NodeSetMemoryParametersArgs struct { Params []TypedParam Flags uint32 } +// NodeGetMemoryParametersArgs is libvirt's remote_node_get_memory_parameters_args type NodeGetMemoryParametersArgs struct { Nparams int32 Flags uint32 } +// NodeGetMemoryParametersRet is libvirt's remote_node_get_memory_parameters_ret type NodeGetMemoryParametersRet struct { Params []TypedParam Nparams int32 } +// NodeGetCPUMapArgs is libvirt's remote_node_get_cpu_map_args type NodeGetCPUMapArgs struct { NeedMap int32 NeedOnline int32 Flags uint32 } +// NodeGetCPUMapRet is libvirt's remote_node_get_cpu_map_ret type NodeGetCPUMapRet struct { Cpumap []byte Online uint32 Ret int32 } +// DomainFstrimArgs is libvirt's remote_domain_fstrim_args type DomainFstrimArgs struct { Dom NonnullDomain MountPoint OptString @@ -2654,16 +3193,19 @@ type DomainFstrimArgs struct { Flags uint32 } +// DomainGetTimeArgs is libvirt's remote_domain_get_time_args type DomainGetTimeArgs struct { Dom NonnullDomain Flags uint32 } +// DomainGetTimeRet is libvirt's remote_domain_get_time_ret type DomainGetTimeRet struct { Seconds int64 Nseconds uint32 } +// DomainSetTimeArgs is libvirt's remote_domain_set_time_args type DomainSetTimeArgs struct { Dom NonnullDomain Seconds int64 @@ -2671,38 +3213,45 @@ type DomainSetTimeArgs struct { Flags uint32 } +// DomainMigrateBegin3ParamsArgs is libvirt's remote_domain_migrate_begin3_params_args type DomainMigrateBegin3ParamsArgs struct { Dom NonnullDomain Params []TypedParam Flags uint32 } +// DomainMigrateBegin3ParamsRet is libvirt's remote_domain_migrate_begin3_params_ret type DomainMigrateBegin3ParamsRet struct { CookieOut []byte XML string } +// DomainMigratePrepare3ParamsArgs is libvirt's remote_domain_migrate_prepare3_params_args type DomainMigratePrepare3ParamsArgs struct { Params []TypedParam CookieIn []byte Flags uint32 } +// DomainMigratePrepare3ParamsRet is libvirt's remote_domain_migrate_prepare3_params_ret type DomainMigratePrepare3ParamsRet struct { CookieOut []byte UriOut OptString } +// DomainMigratePrepareTunnel3ParamsArgs is libvirt's remote_domain_migrate_prepare_tunnel3_params_args type DomainMigratePrepareTunnel3ParamsArgs struct { Params []TypedParam CookieIn []byte Flags uint32 } +// DomainMigratePrepareTunnel3ParamsRet is libvirt's remote_domain_migrate_prepare_tunnel3_params_ret type DomainMigratePrepareTunnel3ParamsRet struct { CookieOut []byte } +// DomainMigratePerform3ParamsArgs is libvirt's remote_domain_migrate_perform3_params_args type DomainMigratePerform3ParamsArgs struct { Dom NonnullDomain Dconnuri OptString @@ -2711,10 +3260,12 @@ type DomainMigratePerform3ParamsArgs struct { Flags uint32 } +// DomainMigratePerform3ParamsRet is libvirt's remote_domain_migrate_perform3_params_ret type DomainMigratePerform3ParamsRet struct { CookieOut []byte } +// DomainMigrateFinish3ParamsArgs is libvirt's remote_domain_migrate_finish3_params_args type DomainMigrateFinish3ParamsArgs struct { Params []TypedParam CookieIn []byte @@ -2722,11 +3273,13 @@ type DomainMigrateFinish3ParamsArgs struct { Cancelled int32 } +// DomainMigrateFinish3ParamsRet is libvirt's remote_domain_migrate_finish3_params_ret type DomainMigrateFinish3ParamsRet struct { Dom NonnullDomain CookieOut []byte } +// DomainMigrateConfirm3ParamsArgs is libvirt's remote_domain_migrate_confirm3_params_args type DomainMigrateConfirm3ParamsArgs struct { Dom NonnullDomain Params []TypedParam @@ -2735,16 +3288,19 @@ type DomainMigrateConfirm3ParamsArgs struct { Cancelled int32 } +// DomainEventDeviceRemovedMsg is libvirt's remote_domain_event_device_removed_msg type DomainEventDeviceRemovedMsg struct { Dom NonnullDomain DevAlias string } +// DomainEventCallbackDeviceRemovedMsg is libvirt's remote_domain_event_callback_device_removed_msg type DomainEventCallbackDeviceRemovedMsg struct { CallbackID int32 Msg DomainEventDeviceRemovedMsg } +// DomainEventBlockJob2Msg is libvirt's remote_domain_event_block_job_2_msg type DomainEventBlockJob2Msg struct { CallbackID int32 Dom NonnullDomain @@ -2753,6 +3309,7 @@ type DomainEventBlockJob2Msg struct { Status int32 } +// DomainEventBlockThresholdMsg is libvirt's remote_domain_event_block_threshold_msg type DomainEventBlockThresholdMsg struct { CallbackID int32 Dom NonnullDomain @@ -2762,46 +3319,55 @@ type DomainEventBlockThresholdMsg struct { Excess uint64 } +// DomainEventCallbackTunableMsg is libvirt's remote_domain_event_callback_tunable_msg type DomainEventCallbackTunableMsg struct { CallbackID int32 Dom NonnullDomain Params []TypedParam } +// DomainEventCallbackDeviceAddedMsg is libvirt's remote_domain_event_callback_device_added_msg type DomainEventCallbackDeviceAddedMsg struct { CallbackID int32 Dom NonnullDomain DevAlias string } +// ConnectEventConnectionClosedMsg is libvirt's remote_connect_event_connection_closed_msg type ConnectEventConnectionClosedMsg struct { Reason int32 } +// ConnectGetCPUModelNamesArgs is libvirt's remote_connect_get_cpu_model_names_args type ConnectGetCPUModelNamesArgs struct { Arch string NeedResults int32 Flags uint32 } +// ConnectGetCPUModelNamesRet is libvirt's remote_connect_get_cpu_model_names_ret type ConnectGetCPUModelNamesRet struct { Models []string Ret int32 } +// ConnectNetworkEventRegisterAnyArgs is libvirt's remote_connect_network_event_register_any_args type ConnectNetworkEventRegisterAnyArgs struct { EventID int32 Net Network } +// ConnectNetworkEventRegisterAnyRet is libvirt's remote_connect_network_event_register_any_ret type ConnectNetworkEventRegisterAnyRet struct { CallbackID int32 } +// ConnectNetworkEventDeregisterAnyArgs is libvirt's remote_connect_network_event_deregister_any_args type ConnectNetworkEventDeregisterAnyArgs struct { CallbackID int32 } +// NetworkEventLifecycleMsg is libvirt's remote_network_event_lifecycle_msg type NetworkEventLifecycleMsg struct { CallbackID int32 Net NonnullNetwork @@ -2809,19 +3375,23 @@ type NetworkEventLifecycleMsg struct { Detail int32 } +// ConnectStoragePoolEventRegisterAnyArgs is libvirt's remote_connect_storage_pool_event_register_any_args type ConnectStoragePoolEventRegisterAnyArgs struct { EventID int32 Pool StoragePool } +// ConnectStoragePoolEventRegisterAnyRet is libvirt's remote_connect_storage_pool_event_register_any_ret type ConnectStoragePoolEventRegisterAnyRet struct { CallbackID int32 } +// ConnectStoragePoolEventDeregisterAnyArgs is libvirt's remote_connect_storage_pool_event_deregister_any_args type ConnectStoragePoolEventDeregisterAnyArgs struct { CallbackID int32 } +// StoragePoolEventLifecycleMsg is libvirt's remote_storage_pool_event_lifecycle_msg type StoragePoolEventLifecycleMsg struct { CallbackID int32 Pool NonnullStoragePool @@ -2829,24 +3399,29 @@ type StoragePoolEventLifecycleMsg struct { Detail int32 } +// StoragePoolEventRefreshMsg is libvirt's remote_storage_pool_event_refresh_msg type StoragePoolEventRefreshMsg struct { CallbackID int32 Pool NonnullStoragePool } +// ConnectNodeDeviceEventRegisterAnyArgs is libvirt's remote_connect_node_device_event_register_any_args type ConnectNodeDeviceEventRegisterAnyArgs struct { EventID int32 Dev NodeDevice } +// ConnectNodeDeviceEventRegisterAnyRet is libvirt's remote_connect_node_device_event_register_any_ret type ConnectNodeDeviceEventRegisterAnyRet struct { CallbackID int32 } +// ConnectNodeDeviceEventDeregisterAnyArgs is libvirt's remote_connect_node_device_event_deregister_any_args type ConnectNodeDeviceEventDeregisterAnyArgs struct { CallbackID int32 } +// NodeDeviceEventLifecycleMsg is libvirt's remote_node_device_event_lifecycle_msg type NodeDeviceEventLifecycleMsg struct { CallbackID int32 Dev NonnullNodeDevice @@ -2854,31 +3429,37 @@ type NodeDeviceEventLifecycleMsg struct { Detail int32 } +// NodeDeviceEventUpdateMsg is libvirt's remote_node_device_event_update_msg type NodeDeviceEventUpdateMsg struct { CallbackID int32 Dev NonnullNodeDevice } +// DomainFsfreezeArgs is libvirt's remote_domain_fsfreeze_args type DomainFsfreezeArgs struct { Dom NonnullDomain Mountpoints []string Flags uint32 } +// DomainFsfreezeRet is libvirt's remote_domain_fsfreeze_ret type DomainFsfreezeRet struct { Filesystems int32 } +// DomainFsthawArgs is libvirt's remote_domain_fsthaw_args type DomainFsthawArgs struct { Dom NonnullDomain Mountpoints []string Flags uint32 } +// DomainFsthawRet is libvirt's remote_domain_fsthaw_ret type DomainFsthawRet struct { Filesystems int32 } +// NodeGetFreePagesArgs is libvirt's remote_node_get_free_pages_args type NodeGetFreePagesArgs struct { Pages []uint32 StartCell int32 @@ -2886,10 +3467,12 @@ type NodeGetFreePagesArgs struct { Flags uint32 } +// NodeGetFreePagesRet is libvirt's remote_node_get_free_pages_ret type NodeGetFreePagesRet struct { Counts []uint64 } +// NodeAllocPagesArgs is libvirt's remote_node_alloc_pages_args type NodeAllocPagesArgs struct { PageSizes []uint32 PageCounts []uint64 @@ -2898,10 +3481,12 @@ type NodeAllocPagesArgs struct { Flags uint32 } +// NodeAllocPagesRet is libvirt's remote_node_alloc_pages_ret type NodeAllocPagesRet struct { Ret int32 } +// NetworkDhcpLease is libvirt's remote_network_dhcp_lease type NetworkDhcpLease struct { Iface string Expirytime int64 @@ -2914,6 +3499,7 @@ type NetworkDhcpLease struct { Clientid OptString } +// NetworkGetDhcpLeasesArgs is libvirt's remote_network_get_dhcp_leases_args type NetworkGetDhcpLeasesArgs struct { Net NonnullNetwork Mac OptString @@ -2921,22 +3507,26 @@ type NetworkGetDhcpLeasesArgs struct { Flags uint32 } +// NetworkGetDhcpLeasesRet is libvirt's remote_network_get_dhcp_leases_ret type NetworkGetDhcpLeasesRet struct { Leases []NetworkDhcpLease Ret uint32 } +// DomainStatsRecord is libvirt's remote_domain_stats_record type DomainStatsRecord struct { Dom NonnullDomain Params []TypedParam } +// ConnectGetAllDomainStatsArgs is libvirt's remote_connect_get_all_domain_stats_args type ConnectGetAllDomainStatsArgs struct { Doms []NonnullDomain Stats uint32 Flags uint32 } +// DomainEventCallbackAgentLifecycleMsg is libvirt's remote_domain_event_callback_agent_lifecycle_msg type DomainEventCallbackAgentLifecycleMsg struct { CallbackID int32 Dom NonnullDomain @@ -2944,10 +3534,12 @@ type DomainEventCallbackAgentLifecycleMsg struct { Reason int32 } +// ConnectGetAllDomainStatsRet is libvirt's remote_connect_get_all_domain_stats_ret type ConnectGetAllDomainStatsRet struct { RetStats []DomainStatsRecord } +// DomainFsinfo is libvirt's remote_domain_fsinfo type DomainFsinfo struct { Mountpoint string Name string @@ -2955,38 +3547,45 @@ type DomainFsinfo struct { DevAliases []string } +// DomainGetFsinfoArgs is libvirt's remote_domain_get_fsinfo_args type DomainGetFsinfoArgs struct { Dom NonnullDomain Flags uint32 } +// DomainGetFsinfoRet is libvirt's remote_domain_get_fsinfo_ret type DomainGetFsinfoRet struct { Info []DomainFsinfo Ret uint32 } +// DomainIPAddr is libvirt's remote_domain_ip_addr type DomainIPAddr struct { Type int32 Addr string Prefix uint32 } +// DomainInterface is libvirt's remote_domain_interface type DomainInterface struct { Name string Hwaddr OptString Addrs []DomainIPAddr } +// DomainInterfaceAddressesArgs is libvirt's remote_domain_interface_addresses_args type DomainInterfaceAddressesArgs struct { Dom NonnullDomain Source uint32 Flags uint32 } +// DomainInterfaceAddressesRet is libvirt's remote_domain_interface_addresses_ret type DomainInterfaceAddressesRet struct { Ifaces []DomainInterface } +// DomainSetUserPasswordArgs is libvirt's remote_domain_set_user_password_args type DomainSetUserPasswordArgs struct { Dom NonnullDomain User OptString @@ -2994,48 +3593,57 @@ type DomainSetUserPasswordArgs struct { Flags uint32 } +// DomainRenameArgs is libvirt's remote_domain_rename_args type DomainRenameArgs struct { Dom NonnullDomain NewName OptString Flags uint32 } +// DomainRenameRet is libvirt's remote_domain_rename_ret type DomainRenameRet struct { Retcode int32 } +// DomainEventCallbackMigrationIterationMsg is libvirt's remote_domain_event_callback_migration_iteration_msg type DomainEventCallbackMigrationIterationMsg struct { CallbackID int32 Dom NonnullDomain Iteration int32 } +// DomainEventCallbackJobCompletedMsg is libvirt's remote_domain_event_callback_job_completed_msg type DomainEventCallbackJobCompletedMsg struct { CallbackID int32 Dom NonnullDomain Params []TypedParam } +// DomainMigrateStartPostCopyArgs is libvirt's remote_domain_migrate_start_post_copy_args type DomainMigrateStartPostCopyArgs struct { Dom NonnullDomain Flags uint32 } +// DomainEventCallbackDeviceRemovalFailedMsg is libvirt's remote_domain_event_callback_device_removal_failed_msg type DomainEventCallbackDeviceRemovalFailedMsg struct { CallbackID int32 Dom NonnullDomain DevAlias string } +// DomainGetGuestVcpusArgs is libvirt's remote_domain_get_guest_vcpus_args type DomainGetGuestVcpusArgs struct { Dom NonnullDomain Flags uint32 } +// DomainGetGuestVcpusRet is libvirt's remote_domain_get_guest_vcpus_ret type DomainGetGuestVcpusRet struct { Params []TypedParam } +// DomainSetGuestVcpusArgs is libvirt's remote_domain_set_guest_vcpus_args type DomainSetGuestVcpusArgs struct { Dom NonnullDomain Cpumap string @@ -3043,6 +3651,7 @@ type DomainSetGuestVcpusArgs struct { Flags uint32 } +// DomainSetVcpuArgs is libvirt's remote_domain_set_vcpu_args type DomainSetVcpuArgs struct { Dom NonnullDomain Cpumap string @@ -3050,6 +3659,7 @@ type DomainSetVcpuArgs struct { Flags uint32 } +// DomainEventCallbackMetadataChangeMsg is libvirt's remote_domain_event_callback_metadata_change_msg type DomainEventCallbackMetadataChangeMsg struct { CallbackID int32 Dom NonnullDomain @@ -3057,19 +3667,23 @@ type DomainEventCallbackMetadataChangeMsg struct { Nsuri OptString } +// ConnectSecretEventRegisterAnyArgs is libvirt's remote_connect_secret_event_register_any_args type ConnectSecretEventRegisterAnyArgs struct { EventID int32 Secret Secret } +// ConnectSecretEventRegisterAnyRet is libvirt's remote_connect_secret_event_register_any_ret type ConnectSecretEventRegisterAnyRet struct { CallbackID int32 } +// ConnectSecretEventDeregisterAnyArgs is libvirt's remote_connect_secret_event_deregister_any_args type ConnectSecretEventDeregisterAnyArgs struct { CallbackID int32 } +// SecretEventLifecycleMsg is libvirt's remote_secret_event_lifecycle_msg type SecretEventLifecycleMsg struct { CallbackID int32 Secret NonnullSecret @@ -3077,11 +3691,13 @@ type SecretEventLifecycleMsg struct { Detail int32 } +// SecretEventValueChangedMsg is libvirt's remote_secret_event_value_changed_msg type SecretEventValueChangedMsg struct { CallbackID int32 Secret NonnullSecret } +// DomainSetBlockThresholdArgs is libvirt's remote_domain_set_block_threshold_args type DomainSetBlockThresholdArgs struct { Dom NonnullDomain Dev string @@ -3089,6 +3705,7 @@ type DomainSetBlockThresholdArgs struct { Flags uint32 } +// DomainSetLifecycleActionArgs is libvirt's remote_domain_set_lifecycle_action_args type DomainSetLifecycleActionArgs struct { Dom NonnullDomain Type uint32 @@ -3097,16 +3714,18 @@ type DomainSetLifecycleActionArgs struct { } -// Unions: +// TypedParamValue is a discriminated union. type TypedParamValue interface { Get() interface{} } - +// TypedParamValueInt is one of the possible values of the TypedParamValue union. type TypedParamValueInt struct { DVal uint32 I int32 } +// NewTypedParamValueInt creates a discriminated union value satisfying +// the TypedParamValue interface. func NewTypedParamValueInt(v int32) *TypedParamValueInt { return &TypedParamValueInt{DVal: 1, I: v} } @@ -3118,12 +3737,16 @@ func decodeTypedParamValueInt(dec *xdr.Decoder) (*TypedParamValueInt, error) { } return NewTypedParamValueInt(v), nil } +// Get satisfies the TypedParamValue interface. func (c *TypedParamValueInt) Get() interface{} { return c.I } +// TypedParamValueUint is one of the possible values of the TypedParamValue union. type TypedParamValueUint struct { DVal uint32 Ui uint32 } +// NewTypedParamValueUint creates a discriminated union value satisfying +// the TypedParamValue interface. func NewTypedParamValueUint(v uint32) *TypedParamValueUint { return &TypedParamValueUint{DVal: 2, Ui: v} } @@ -3135,12 +3758,16 @@ func decodeTypedParamValueUint(dec *xdr.Decoder) (*TypedParamValueUint, error) { } return NewTypedParamValueUint(v), nil } +// Get satisfies the TypedParamValue interface. func (c *TypedParamValueUint) Get() interface{} { return c.Ui } +// TypedParamValueLlong is one of the possible values of the TypedParamValue union. type TypedParamValueLlong struct { DVal uint32 L int64 } +// NewTypedParamValueLlong creates a discriminated union value satisfying +// the TypedParamValue interface. func NewTypedParamValueLlong(v int64) *TypedParamValueLlong { return &TypedParamValueLlong{DVal: 3, L: v} } @@ -3152,12 +3779,16 @@ func decodeTypedParamValueLlong(dec *xdr.Decoder) (*TypedParamValueLlong, error) } return NewTypedParamValueLlong(v), nil } +// Get satisfies the TypedParamValue interface. func (c *TypedParamValueLlong) Get() interface{} { return c.L } +// TypedParamValueUllong is one of the possible values of the TypedParamValue union. type TypedParamValueUllong struct { DVal uint32 Ul uint64 } +// NewTypedParamValueUllong creates a discriminated union value satisfying +// the TypedParamValue interface. func NewTypedParamValueUllong(v uint64) *TypedParamValueUllong { return &TypedParamValueUllong{DVal: 4, Ul: v} } @@ -3169,12 +3800,16 @@ func decodeTypedParamValueUllong(dec *xdr.Decoder) (*TypedParamValueUllong, erro } return NewTypedParamValueUllong(v), nil } +// Get satisfies the TypedParamValue interface. func (c *TypedParamValueUllong) Get() interface{} { return c.Ul } +// TypedParamValueDouble is one of the possible values of the TypedParamValue union. type TypedParamValueDouble struct { DVal uint32 D float64 } +// NewTypedParamValueDouble creates a discriminated union value satisfying +// the TypedParamValue interface. func NewTypedParamValueDouble(v float64) *TypedParamValueDouble { return &TypedParamValueDouble{DVal: 5, D: v} } @@ -3186,12 +3821,16 @@ func decodeTypedParamValueDouble(dec *xdr.Decoder) (*TypedParamValueDouble, erro } return NewTypedParamValueDouble(v), nil } +// Get satisfies the TypedParamValue interface. func (c *TypedParamValueDouble) Get() interface{} { return c.D } +// TypedParamValueBoolean is one of the possible values of the TypedParamValue union. type TypedParamValueBoolean struct { DVal uint32 B int32 } +// NewTypedParamValueBoolean creates a discriminated union value satisfying +// the TypedParamValue interface. func NewTypedParamValueBoolean(v int32) *TypedParamValueBoolean { return &TypedParamValueBoolean{DVal: 6, B: v} } @@ -3203,12 +3842,16 @@ func decodeTypedParamValueBoolean(dec *xdr.Decoder) (*TypedParamValueBoolean, er } return NewTypedParamValueBoolean(v), nil } +// Get satisfies the TypedParamValue interface. func (c *TypedParamValueBoolean) Get() interface{} { return c.B } +// TypedParamValueString is one of the possible values of the TypedParamValue union. type TypedParamValueString struct { DVal uint32 S string } +// NewTypedParamValueString creates a discriminated union value satisfying +// the TypedParamValue interface. func NewTypedParamValueString(v string) *TypedParamValueString { return &TypedParamValueString{DVal: 7, S: v} } @@ -3220,6 +3863,7 @@ func decodeTypedParamValueString(dec *xdr.Decoder) (*TypedParamValueString, erro } return NewTypedParamValueString(v), nil } +// Get satisfies the TypedParamValue interface. func (c *TypedParamValueString) Get() interface{} { return c.S } func decodeTypedParamValue(dec *xdr.Decoder) (TypedParamValue, error) { @@ -3278,8 +3922,8 @@ func decodeTypedParams(dec *xdr.Decoder) ([]TypedParam, error) { return params, nil } -// Procedures: +// ConnectOpen is the go wrapper for REMOTE_PROC_CONNECT_OPEN. func (l *Libvirt) ConnectOpen(Name OptString, Flags uint32) (err error) { var buf bytes.Buffer @@ -3308,6 +3952,7 @@ func (l *Libvirt) ConnectOpen(Name OptString, Flags uint32) (err error) { return } +// ConnectClose is the go wrapper for REMOTE_PROC_CONNECT_CLOSE. func (l *Libvirt) ConnectClose() (err error) { var buf bytes.Buffer @@ -3326,6 +3971,7 @@ func (l *Libvirt) ConnectClose() (err error) { return } +// ConnectGetType is the go wrapper for REMOTE_PROC_CONNECT_GET_TYPE. func (l *Libvirt) ConnectGetType() (rType string, err error) { var buf bytes.Buffer @@ -3353,6 +3999,7 @@ func (l *Libvirt) ConnectGetType() (rType string, err error) { return } +// ConnectGetVersion is the go wrapper for REMOTE_PROC_CONNECT_GET_VERSION. func (l *Libvirt) ConnectGetVersion() (rHvVer uint64, err error) { var buf bytes.Buffer @@ -3380,6 +4027,7 @@ func (l *Libvirt) ConnectGetVersion() (rHvVer uint64, err error) { return } +// ConnectGetMaxVcpus is the go wrapper for REMOTE_PROC_CONNECT_GET_MAX_VCPUS. func (l *Libvirt) ConnectGetMaxVcpus(Type OptString) (rMaxVcpus int32, err error) { var buf bytes.Buffer @@ -3416,6 +4064,7 @@ func (l *Libvirt) ConnectGetMaxVcpus(Type OptString) (rMaxVcpus int32, err error return } +// NodeGetInfo is the go wrapper for REMOTE_PROC_NODE_GET_INFO. func (l *Libvirt) NodeGetInfo() (rModel [32]int8, rMemory uint64, rCpus int32, rMhz int32, rNodes int32, rSockets int32, rCores int32, rThreads int32, err error) { var buf bytes.Buffer @@ -3478,6 +4127,7 @@ func (l *Libvirt) NodeGetInfo() (rModel [32]int8, rMemory uint64, rCpus int32, r return } +// ConnectGetCapabilities is the go wrapper for REMOTE_PROC_CONNECT_GET_CAPABILITIES. func (l *Libvirt) ConnectGetCapabilities() (rCapabilities string, err error) { var buf bytes.Buffer @@ -3505,6 +4155,7 @@ func (l *Libvirt) ConnectGetCapabilities() (rCapabilities string, err error) { return } +// DomainAttachDevice is the go wrapper for REMOTE_PROC_DOMAIN_ATTACH_DEVICE. func (l *Libvirt) DomainAttachDevice(Dom NonnullDomain, XML string) (err error) { var buf bytes.Buffer @@ -3533,6 +4184,7 @@ func (l *Libvirt) DomainAttachDevice(Dom NonnullDomain, XML string) (err error) return } +// DomainCreate is the go wrapper for REMOTE_PROC_DOMAIN_CREATE. func (l *Libvirt) DomainCreate(Dom NonnullDomain) (err error) { var buf bytes.Buffer @@ -3560,6 +4212,7 @@ func (l *Libvirt) DomainCreate(Dom NonnullDomain) (err error) { return } +// DomainCreateXML is the go wrapper for REMOTE_PROC_DOMAIN_CREATE_XML. func (l *Libvirt) DomainCreateXML(XMLDesc string, Flags uint32) (rDom NonnullDomain, err error) { var buf bytes.Buffer @@ -3597,6 +4250,7 @@ func (l *Libvirt) DomainCreateXML(XMLDesc string, Flags uint32) (rDom NonnullDom return } +// DomainDefineXML is the go wrapper for REMOTE_PROC_DOMAIN_DEFINE_XML. func (l *Libvirt) DomainDefineXML(XML string) (rDom NonnullDomain, err error) { var buf bytes.Buffer @@ -3633,6 +4287,7 @@ func (l *Libvirt) DomainDefineXML(XML string) (rDom NonnullDomain, err error) { return } +// DomainDestroy is the go wrapper for REMOTE_PROC_DOMAIN_DESTROY. func (l *Libvirt) DomainDestroy(Dom NonnullDomain) (err error) { var buf bytes.Buffer @@ -3660,6 +4315,7 @@ func (l *Libvirt) DomainDestroy(Dom NonnullDomain) (err error) { return } +// DomainDetachDevice is the go wrapper for REMOTE_PROC_DOMAIN_DETACH_DEVICE. func (l *Libvirt) DomainDetachDevice(Dom NonnullDomain, XML string) (err error) { var buf bytes.Buffer @@ -3688,6 +4344,7 @@ func (l *Libvirt) DomainDetachDevice(Dom NonnullDomain, XML string) (err error) return } +// DomainGetXMLDesc is the go wrapper for REMOTE_PROC_DOMAIN_GET_XML_DESC. func (l *Libvirt) DomainGetXMLDesc(Dom NonnullDomain, Flags uint32) (rXML string, err error) { var buf bytes.Buffer @@ -3725,6 +4382,7 @@ func (l *Libvirt) DomainGetXMLDesc(Dom NonnullDomain, Flags uint32) (rXML string return } +// DomainGetAutostart is the go wrapper for REMOTE_PROC_DOMAIN_GET_AUTOSTART. func (l *Libvirt) DomainGetAutostart(Dom NonnullDomain) (rAutostart int32, err error) { var buf bytes.Buffer @@ -3761,6 +4419,7 @@ func (l *Libvirt) DomainGetAutostart(Dom NonnullDomain) (rAutostart int32, err e return } +// DomainGetInfo is the go wrapper for REMOTE_PROC_DOMAIN_GET_INFO. func (l *Libvirt) DomainGetInfo(Dom NonnullDomain) (rState uint8, rMaxMem uint64, rMemory uint64, rNrVirtCPU uint16, rCPUTime uint64, err error) { var buf bytes.Buffer @@ -3817,6 +4476,7 @@ func (l *Libvirt) DomainGetInfo(Dom NonnullDomain) (rState uint8, rMaxMem uint64 return } +// DomainGetMaxMemory is the go wrapper for REMOTE_PROC_DOMAIN_GET_MAX_MEMORY. func (l *Libvirt) DomainGetMaxMemory(Dom NonnullDomain) (rMemory uint64, err error) { var buf bytes.Buffer @@ -3853,6 +4513,7 @@ func (l *Libvirt) DomainGetMaxMemory(Dom NonnullDomain) (rMemory uint64, err err return } +// DomainGetMaxVcpus is the go wrapper for REMOTE_PROC_DOMAIN_GET_MAX_VCPUS. func (l *Libvirt) DomainGetMaxVcpus(Dom NonnullDomain) (rNum int32, err error) { var buf bytes.Buffer @@ -3889,6 +4550,7 @@ func (l *Libvirt) DomainGetMaxVcpus(Dom NonnullDomain) (rNum int32, err error) { return } +// DomainGetOsType is the go wrapper for REMOTE_PROC_DOMAIN_GET_OS_TYPE. func (l *Libvirt) DomainGetOsType(Dom NonnullDomain) (rType string, err error) { var buf bytes.Buffer @@ -3925,6 +4587,7 @@ func (l *Libvirt) DomainGetOsType(Dom NonnullDomain) (rType string, err error) { return } +// DomainGetVcpus is the go wrapper for REMOTE_PROC_DOMAIN_GET_VCPUS. func (l *Libvirt) DomainGetVcpus(Dom NonnullDomain, Maxinfo int32, Maplen int32) (rInfo []VcpuInfo, rCpumaps []byte, err error) { var buf bytes.Buffer @@ -3968,6 +4631,7 @@ func (l *Libvirt) DomainGetVcpus(Dom NonnullDomain, Maxinfo int32, Maplen int32) return } +// ConnectListDefinedDomains is the go wrapper for REMOTE_PROC_CONNECT_LIST_DEFINED_DOMAINS. func (l *Libvirt) ConnectListDefinedDomains(Maxnames int32) (rNames []string, err error) { var buf bytes.Buffer @@ -4004,6 +4668,7 @@ func (l *Libvirt) ConnectListDefinedDomains(Maxnames int32) (rNames []string, er return } +// DomainLookupByID is the go wrapper for REMOTE_PROC_DOMAIN_LOOKUP_BY_ID. func (l *Libvirt) DomainLookupByID(ID int32) (rDom NonnullDomain, err error) { var buf bytes.Buffer @@ -4040,6 +4705,7 @@ func (l *Libvirt) DomainLookupByID(ID int32) (rDom NonnullDomain, err error) { return } +// DomainLookupByName is the go wrapper for REMOTE_PROC_DOMAIN_LOOKUP_BY_NAME. func (l *Libvirt) DomainLookupByName(Name string) (rDom NonnullDomain, err error) { var buf bytes.Buffer @@ -4076,6 +4742,7 @@ func (l *Libvirt) DomainLookupByName(Name string) (rDom NonnullDomain, err error return } +// DomainLookupByUUID is the go wrapper for REMOTE_PROC_DOMAIN_LOOKUP_BY_UUID. func (l *Libvirt) DomainLookupByUUID(UUID UUID) (rDom NonnullDomain, err error) { var buf bytes.Buffer @@ -4112,6 +4779,7 @@ func (l *Libvirt) DomainLookupByUUID(UUID UUID) (rDom NonnullDomain, err error) return } +// ConnectNumOfDefinedDomains is the go wrapper for REMOTE_PROC_CONNECT_NUM_OF_DEFINED_DOMAINS. func (l *Libvirt) ConnectNumOfDefinedDomains() (rNum int32, err error) { var buf bytes.Buffer @@ -4139,6 +4807,7 @@ func (l *Libvirt) ConnectNumOfDefinedDomains() (rNum int32, err error) { return } +// DomainPinVcpu is the go wrapper for REMOTE_PROC_DOMAIN_PIN_VCPU. func (l *Libvirt) DomainPinVcpu(Dom NonnullDomain, Vcpu uint32, Cpumap []byte) (err error) { var buf bytes.Buffer @@ -4168,6 +4837,7 @@ func (l *Libvirt) DomainPinVcpu(Dom NonnullDomain, Vcpu uint32, Cpumap []byte) ( return } +// DomainReboot is the go wrapper for REMOTE_PROC_DOMAIN_REBOOT. func (l *Libvirt) DomainReboot(Dom NonnullDomain, Flags uint32) (err error) { var buf bytes.Buffer @@ -4196,6 +4866,7 @@ func (l *Libvirt) DomainReboot(Dom NonnullDomain, Flags uint32) (err error) { return } +// DomainResume is the go wrapper for REMOTE_PROC_DOMAIN_RESUME. func (l *Libvirt) DomainResume(Dom NonnullDomain) (err error) { var buf bytes.Buffer @@ -4223,6 +4894,7 @@ func (l *Libvirt) DomainResume(Dom NonnullDomain) (err error) { return } +// DomainSetAutostart is the go wrapper for REMOTE_PROC_DOMAIN_SET_AUTOSTART. func (l *Libvirt) DomainSetAutostart(Dom NonnullDomain, Autostart int32) (err error) { var buf bytes.Buffer @@ -4251,6 +4923,7 @@ func (l *Libvirt) DomainSetAutostart(Dom NonnullDomain, Autostart int32) (err er return } +// DomainSetMaxMemory is the go wrapper for REMOTE_PROC_DOMAIN_SET_MAX_MEMORY. func (l *Libvirt) DomainSetMaxMemory(Dom NonnullDomain, Memory uint64) (err error) { var buf bytes.Buffer @@ -4279,6 +4952,7 @@ func (l *Libvirt) DomainSetMaxMemory(Dom NonnullDomain, Memory uint64) (err erro return } +// DomainSetMemory is the go wrapper for REMOTE_PROC_DOMAIN_SET_MEMORY. func (l *Libvirt) DomainSetMemory(Dom NonnullDomain, Memory uint64) (err error) { var buf bytes.Buffer @@ -4307,6 +4981,7 @@ func (l *Libvirt) DomainSetMemory(Dom NonnullDomain, Memory uint64) (err error) return } +// DomainSetVcpus is the go wrapper for REMOTE_PROC_DOMAIN_SET_VCPUS. func (l *Libvirt) DomainSetVcpus(Dom NonnullDomain, Nvcpus uint32) (err error) { var buf bytes.Buffer @@ -4335,6 +5010,7 @@ func (l *Libvirt) DomainSetVcpus(Dom NonnullDomain, Nvcpus uint32) (err error) { return } +// DomainShutdown is the go wrapper for REMOTE_PROC_DOMAIN_SHUTDOWN. func (l *Libvirt) DomainShutdown(Dom NonnullDomain) (err error) { var buf bytes.Buffer @@ -4362,6 +5038,7 @@ func (l *Libvirt) DomainShutdown(Dom NonnullDomain) (err error) { return } +// DomainSuspend is the go wrapper for REMOTE_PROC_DOMAIN_SUSPEND. func (l *Libvirt) DomainSuspend(Dom NonnullDomain) (err error) { var buf bytes.Buffer @@ -4389,6 +5066,7 @@ func (l *Libvirt) DomainSuspend(Dom NonnullDomain) (err error) { return } +// DomainUndefine is the go wrapper for REMOTE_PROC_DOMAIN_UNDEFINE. func (l *Libvirt) DomainUndefine(Dom NonnullDomain) (err error) { var buf bytes.Buffer @@ -4416,6 +5094,7 @@ func (l *Libvirt) DomainUndefine(Dom NonnullDomain) (err error) { return } +// ConnectListDefinedNetworks is the go wrapper for REMOTE_PROC_CONNECT_LIST_DEFINED_NETWORKS. func (l *Libvirt) ConnectListDefinedNetworks(Maxnames int32) (rNames []string, err error) { var buf bytes.Buffer @@ -4452,6 +5131,7 @@ func (l *Libvirt) ConnectListDefinedNetworks(Maxnames int32) (rNames []string, e return } +// ConnectListDomains is the go wrapper for REMOTE_PROC_CONNECT_LIST_DOMAINS. func (l *Libvirt) ConnectListDomains(Maxids int32) (rIds []int32, err error) { var buf bytes.Buffer @@ -4488,6 +5168,7 @@ func (l *Libvirt) ConnectListDomains(Maxids int32) (rIds []int32, err error) { return } +// ConnectListNetworks is the go wrapper for REMOTE_PROC_CONNECT_LIST_NETWORKS. func (l *Libvirt) ConnectListNetworks(Maxnames int32) (rNames []string, err error) { var buf bytes.Buffer @@ -4524,6 +5205,7 @@ func (l *Libvirt) ConnectListNetworks(Maxnames int32) (rNames []string, err erro return } +// NetworkCreate is the go wrapper for REMOTE_PROC_NETWORK_CREATE. func (l *Libvirt) NetworkCreate(Net NonnullNetwork) (err error) { var buf bytes.Buffer @@ -4551,6 +5233,7 @@ func (l *Libvirt) NetworkCreate(Net NonnullNetwork) (err error) { return } +// NetworkCreateXML is the go wrapper for REMOTE_PROC_NETWORK_CREATE_XML. func (l *Libvirt) NetworkCreateXML(XML string) (rNet NonnullNetwork, err error) { var buf bytes.Buffer @@ -4587,6 +5270,7 @@ func (l *Libvirt) NetworkCreateXML(XML string) (rNet NonnullNetwork, err error) return } +// NetworkDefineXML is the go wrapper for REMOTE_PROC_NETWORK_DEFINE_XML. func (l *Libvirt) NetworkDefineXML(XML string) (rNet NonnullNetwork, err error) { var buf bytes.Buffer @@ -4623,6 +5307,7 @@ func (l *Libvirt) NetworkDefineXML(XML string) (rNet NonnullNetwork, err error) return } +// NetworkDestroy is the go wrapper for REMOTE_PROC_NETWORK_DESTROY. func (l *Libvirt) NetworkDestroy(Net NonnullNetwork) (err error) { var buf bytes.Buffer @@ -4650,6 +5335,7 @@ func (l *Libvirt) NetworkDestroy(Net NonnullNetwork) (err error) { return } +// NetworkGetXMLDesc is the go wrapper for REMOTE_PROC_NETWORK_GET_XML_DESC. func (l *Libvirt) NetworkGetXMLDesc(Net NonnullNetwork, Flags uint32) (rXML string, err error) { var buf bytes.Buffer @@ -4687,6 +5373,7 @@ func (l *Libvirt) NetworkGetXMLDesc(Net NonnullNetwork, Flags uint32) (rXML stri return } +// NetworkGetAutostart is the go wrapper for REMOTE_PROC_NETWORK_GET_AUTOSTART. func (l *Libvirt) NetworkGetAutostart(Net NonnullNetwork) (rAutostart int32, err error) { var buf bytes.Buffer @@ -4723,6 +5410,7 @@ func (l *Libvirt) NetworkGetAutostart(Net NonnullNetwork) (rAutostart int32, err return } +// NetworkGetBridgeName is the go wrapper for REMOTE_PROC_NETWORK_GET_BRIDGE_NAME. func (l *Libvirt) NetworkGetBridgeName(Net NonnullNetwork) (rName string, err error) { var buf bytes.Buffer @@ -4759,6 +5447,7 @@ func (l *Libvirt) NetworkGetBridgeName(Net NonnullNetwork) (rName string, err er return } +// NetworkLookupByName is the go wrapper for REMOTE_PROC_NETWORK_LOOKUP_BY_NAME. func (l *Libvirt) NetworkLookupByName(Name string) (rNet NonnullNetwork, err error) { var buf bytes.Buffer @@ -4795,6 +5484,7 @@ func (l *Libvirt) NetworkLookupByName(Name string) (rNet NonnullNetwork, err err return } +// NetworkLookupByUUID is the go wrapper for REMOTE_PROC_NETWORK_LOOKUP_BY_UUID. func (l *Libvirt) NetworkLookupByUUID(UUID UUID) (rNet NonnullNetwork, err error) { var buf bytes.Buffer @@ -4831,6 +5521,7 @@ func (l *Libvirt) NetworkLookupByUUID(UUID UUID) (rNet NonnullNetwork, err error return } +// NetworkSetAutostart is the go wrapper for REMOTE_PROC_NETWORK_SET_AUTOSTART. func (l *Libvirt) NetworkSetAutostart(Net NonnullNetwork, Autostart int32) (err error) { var buf bytes.Buffer @@ -4859,6 +5550,7 @@ func (l *Libvirt) NetworkSetAutostart(Net NonnullNetwork, Autostart int32) (err return } +// NetworkUndefine is the go wrapper for REMOTE_PROC_NETWORK_UNDEFINE. func (l *Libvirt) NetworkUndefine(Net NonnullNetwork) (err error) { var buf bytes.Buffer @@ -4886,6 +5578,7 @@ func (l *Libvirt) NetworkUndefine(Net NonnullNetwork) (err error) { return } +// ConnectNumOfDefinedNetworks is the go wrapper for REMOTE_PROC_CONNECT_NUM_OF_DEFINED_NETWORKS. func (l *Libvirt) ConnectNumOfDefinedNetworks() (rNum int32, err error) { var buf bytes.Buffer @@ -4913,6 +5606,7 @@ func (l *Libvirt) ConnectNumOfDefinedNetworks() (rNum int32, err error) { return } +// ConnectNumOfDomains is the go wrapper for REMOTE_PROC_CONNECT_NUM_OF_DOMAINS. func (l *Libvirt) ConnectNumOfDomains() (rNum int32, err error) { var buf bytes.Buffer @@ -4940,6 +5634,7 @@ func (l *Libvirt) ConnectNumOfDomains() (rNum int32, err error) { return } +// ConnectNumOfNetworks is the go wrapper for REMOTE_PROC_CONNECT_NUM_OF_NETWORKS. func (l *Libvirt) ConnectNumOfNetworks() (rNum int32, err error) { var buf bytes.Buffer @@ -4967,6 +5662,7 @@ func (l *Libvirt) ConnectNumOfNetworks() (rNum int32, err error) { return } +// DomainCoreDump is the go wrapper for REMOTE_PROC_DOMAIN_CORE_DUMP. func (l *Libvirt) DomainCoreDump(Dom NonnullDomain, To string, Flags uint32) (err error) { var buf bytes.Buffer @@ -4996,6 +5692,7 @@ func (l *Libvirt) DomainCoreDump(Dom NonnullDomain, To string, Flags uint32) (er return } +// DomainRestore is the go wrapper for REMOTE_PROC_DOMAIN_RESTORE. func (l *Libvirt) DomainRestore(From string) (err error) { var buf bytes.Buffer @@ -5023,6 +5720,7 @@ func (l *Libvirt) DomainRestore(From string) (err error) { return } +// DomainSave is the go wrapper for REMOTE_PROC_DOMAIN_SAVE. func (l *Libvirt) DomainSave(Dom NonnullDomain, To string) (err error) { var buf bytes.Buffer @@ -5051,6 +5749,7 @@ func (l *Libvirt) DomainSave(Dom NonnullDomain, To string) (err error) { return } +// DomainGetSchedulerType is the go wrapper for REMOTE_PROC_DOMAIN_GET_SCHEDULER_TYPE. func (l *Libvirt) DomainGetSchedulerType(Dom NonnullDomain) (rType string, rNparams int32, err error) { var buf bytes.Buffer @@ -5092,6 +5791,7 @@ func (l *Libvirt) DomainGetSchedulerType(Dom NonnullDomain) (rType string, rNpar return } +// DomainGetSchedulerParameters is the go wrapper for REMOTE_PROC_DOMAIN_GET_SCHEDULER_PARAMETERS. func (l *Libvirt) DomainGetSchedulerParameters(Dom NonnullDomain, Nparams int32) (rParams []TypedParam, err error) { var buf bytes.Buffer @@ -5130,6 +5830,7 @@ func (l *Libvirt) DomainGetSchedulerParameters(Dom NonnullDomain, Nparams int32) return } +// DomainSetSchedulerParameters is the go wrapper for REMOTE_PROC_DOMAIN_SET_SCHEDULER_PARAMETERS. func (l *Libvirt) DomainSetSchedulerParameters(Dom NonnullDomain, Params []TypedParam) (err error) { var buf bytes.Buffer @@ -5158,6 +5859,7 @@ func (l *Libvirt) DomainSetSchedulerParameters(Dom NonnullDomain, Params []Typed return } +// ConnectGetHostname is the go wrapper for REMOTE_PROC_CONNECT_GET_HOSTNAME. func (l *Libvirt) ConnectGetHostname() (rHostname string, err error) { var buf bytes.Buffer @@ -5185,6 +5887,7 @@ func (l *Libvirt) ConnectGetHostname() (rHostname string, err error) { return } +// ConnectSupportsFeature is the go wrapper for REMOTE_PROC_CONNECT_SUPPORTS_FEATURE. func (l *Libvirt) ConnectSupportsFeature(Feature int32) (rSupported int32, err error) { var buf bytes.Buffer @@ -5221,6 +5924,7 @@ func (l *Libvirt) ConnectSupportsFeature(Feature int32) (rSupported int32, err e return } +// DomainMigratePrepare is the go wrapper for REMOTE_PROC_DOMAIN_MIGRATE_PREPARE. func (l *Libvirt) DomainMigratePrepare(UriIn OptString, Flags uint64, Dname OptString, Resource uint64) (rCookie []byte, rUriOut OptString, err error) { var buf bytes.Buffer @@ -5265,6 +5969,7 @@ func (l *Libvirt) DomainMigratePrepare(UriIn OptString, Flags uint64, Dname OptS return } +// DomainMigratePerform is the go wrapper for REMOTE_PROC_DOMAIN_MIGRATE_PERFORM. func (l *Libvirt) DomainMigratePerform(Dom NonnullDomain, Cookie []byte, Uri string, Flags uint64, Dname OptString, Resource uint64) (err error) { var buf bytes.Buffer @@ -5297,6 +6002,7 @@ func (l *Libvirt) DomainMigratePerform(Dom NonnullDomain, Cookie []byte, Uri str return } +// DomainMigrateFinish is the go wrapper for REMOTE_PROC_DOMAIN_MIGRATE_FINISH. func (l *Libvirt) DomainMigrateFinish(Dname string, Cookie []byte, Uri string, Flags uint64) (rDdom NonnullDomain, err error) { var buf bytes.Buffer @@ -5336,6 +6042,7 @@ func (l *Libvirt) DomainMigrateFinish(Dname string, Cookie []byte, Uri string, F return } +// DomainBlockStats is the go wrapper for REMOTE_PROC_DOMAIN_BLOCK_STATS. func (l *Libvirt) DomainBlockStats(Dom NonnullDomain, Path string) (rRdReq int64, rRdBytes int64, rWrReq int64, rWrBytes int64, rErrs int64, err error) { var buf bytes.Buffer @@ -5393,6 +6100,7 @@ func (l *Libvirt) DomainBlockStats(Dom NonnullDomain, Path string) (rRdReq int64 return } +// DomainInterfaceStats is the go wrapper for REMOTE_PROC_DOMAIN_INTERFACE_STATS. func (l *Libvirt) DomainInterfaceStats(Dom NonnullDomain, Device string) (rRxBytes int64, rRxPackets int64, rRxErrs int64, rRxDrop int64, rTxBytes int64, rTxPackets int64, rTxErrs int64, rTxDrop int64, err error) { var buf bytes.Buffer @@ -5465,6 +6173,7 @@ func (l *Libvirt) DomainInterfaceStats(Dom NonnullDomain, Device string) (rRxByt return } +// AuthList is the go wrapper for REMOTE_PROC_AUTH_LIST. func (l *Libvirt) AuthList() (rTypes []AuthType, err error) { var buf bytes.Buffer @@ -5492,6 +6201,7 @@ func (l *Libvirt) AuthList() (rTypes []AuthType, err error) { return } +// AuthSaslInit is the go wrapper for REMOTE_PROC_AUTH_SASL_INIT. func (l *Libvirt) AuthSaslInit() (rMechlist string, err error) { var buf bytes.Buffer @@ -5519,6 +6229,7 @@ func (l *Libvirt) AuthSaslInit() (rMechlist string, err error) { return } +// AuthSaslStart is the go wrapper for REMOTE_PROC_AUTH_SASL_START. func (l *Libvirt) AuthSaslStart(Mech string, Nil int32, Data []int8) (rComplete int32, rNil int32, rData []int8, err error) { var buf bytes.Buffer @@ -5567,6 +6278,7 @@ func (l *Libvirt) AuthSaslStart(Mech string, Nil int32, Data []int8) (rComplete return } +// AuthSaslStep is the go wrapper for REMOTE_PROC_AUTH_SASL_STEP. func (l *Libvirt) AuthSaslStep(Nil int32, Data []int8) (rComplete int32, rNil int32, rData []int8, err error) { var buf bytes.Buffer @@ -5614,6 +6326,7 @@ func (l *Libvirt) AuthSaslStep(Nil int32, Data []int8) (rComplete int32, rNil in return } +// AuthPolkit is the go wrapper for REMOTE_PROC_AUTH_POLKIT. func (l *Libvirt) AuthPolkit() (rComplete int32, err error) { var buf bytes.Buffer @@ -5641,6 +6354,7 @@ func (l *Libvirt) AuthPolkit() (rComplete int32, err error) { return } +// ConnectNumOfStoragePools is the go wrapper for REMOTE_PROC_CONNECT_NUM_OF_STORAGE_POOLS. func (l *Libvirt) ConnectNumOfStoragePools() (rNum int32, err error) { var buf bytes.Buffer @@ -5668,6 +6382,7 @@ func (l *Libvirt) ConnectNumOfStoragePools() (rNum int32, err error) { return } +// ConnectListStoragePools is the go wrapper for REMOTE_PROC_CONNECT_LIST_STORAGE_POOLS. func (l *Libvirt) ConnectListStoragePools(Maxnames int32) (rNames []string, err error) { var buf bytes.Buffer @@ -5704,6 +6419,7 @@ func (l *Libvirt) ConnectListStoragePools(Maxnames int32) (rNames []string, err return } +// ConnectNumOfDefinedStoragePools is the go wrapper for REMOTE_PROC_CONNECT_NUM_OF_DEFINED_STORAGE_POOLS. func (l *Libvirt) ConnectNumOfDefinedStoragePools() (rNum int32, err error) { var buf bytes.Buffer @@ -5731,6 +6447,7 @@ func (l *Libvirt) ConnectNumOfDefinedStoragePools() (rNum int32, err error) { return } +// ConnectListDefinedStoragePools is the go wrapper for REMOTE_PROC_CONNECT_LIST_DEFINED_STORAGE_POOLS. func (l *Libvirt) ConnectListDefinedStoragePools(Maxnames int32) (rNames []string, err error) { var buf bytes.Buffer @@ -5767,6 +6484,7 @@ func (l *Libvirt) ConnectListDefinedStoragePools(Maxnames int32) (rNames []strin return } +// ConnectFindStoragePoolSources is the go wrapper for REMOTE_PROC_CONNECT_FIND_STORAGE_POOL_SOURCES. func (l *Libvirt) ConnectFindStoragePoolSources(Type string, SrcSpec OptString, Flags uint32) (rXML string, err error) { var buf bytes.Buffer @@ -5805,6 +6523,7 @@ func (l *Libvirt) ConnectFindStoragePoolSources(Type string, SrcSpec OptString, return } +// StoragePoolCreateXML is the go wrapper for REMOTE_PROC_STORAGE_POOL_CREATE_XML. func (l *Libvirt) StoragePoolCreateXML(XML string, Flags uint32) (rPool NonnullStoragePool, err error) { var buf bytes.Buffer @@ -5842,6 +6561,7 @@ func (l *Libvirt) StoragePoolCreateXML(XML string, Flags uint32) (rPool NonnullS return } +// StoragePoolDefineXML is the go wrapper for REMOTE_PROC_STORAGE_POOL_DEFINE_XML. func (l *Libvirt) StoragePoolDefineXML(XML string, Flags uint32) (rPool NonnullStoragePool, err error) { var buf bytes.Buffer @@ -5879,6 +6599,7 @@ func (l *Libvirt) StoragePoolDefineXML(XML string, Flags uint32) (rPool NonnullS return } +// StoragePoolCreate is the go wrapper for REMOTE_PROC_STORAGE_POOL_CREATE. func (l *Libvirt) StoragePoolCreate(Pool NonnullStoragePool, Flags uint32) (err error) { var buf bytes.Buffer @@ -5907,6 +6628,7 @@ func (l *Libvirt) StoragePoolCreate(Pool NonnullStoragePool, Flags uint32) (err return } +// StoragePoolBuild is the go wrapper for REMOTE_PROC_STORAGE_POOL_BUILD. func (l *Libvirt) StoragePoolBuild(Pool NonnullStoragePool, Flags uint32) (err error) { var buf bytes.Buffer @@ -5935,6 +6657,7 @@ func (l *Libvirt) StoragePoolBuild(Pool NonnullStoragePool, Flags uint32) (err e return } +// StoragePoolDestroy is the go wrapper for REMOTE_PROC_STORAGE_POOL_DESTROY. func (l *Libvirt) StoragePoolDestroy(Pool NonnullStoragePool) (err error) { var buf bytes.Buffer @@ -5962,6 +6685,7 @@ func (l *Libvirt) StoragePoolDestroy(Pool NonnullStoragePool) (err error) { return } +// StoragePoolDelete is the go wrapper for REMOTE_PROC_STORAGE_POOL_DELETE. func (l *Libvirt) StoragePoolDelete(Pool NonnullStoragePool, Flags uint32) (err error) { var buf bytes.Buffer @@ -5990,6 +6714,7 @@ func (l *Libvirt) StoragePoolDelete(Pool NonnullStoragePool, Flags uint32) (err return } +// StoragePoolUndefine is the go wrapper for REMOTE_PROC_STORAGE_POOL_UNDEFINE. func (l *Libvirt) StoragePoolUndefine(Pool NonnullStoragePool) (err error) { var buf bytes.Buffer @@ -6017,6 +6742,7 @@ func (l *Libvirt) StoragePoolUndefine(Pool NonnullStoragePool) (err error) { return } +// StoragePoolRefresh is the go wrapper for REMOTE_PROC_STORAGE_POOL_REFRESH. func (l *Libvirt) StoragePoolRefresh(Pool NonnullStoragePool, Flags uint32) (err error) { var buf bytes.Buffer @@ -6045,6 +6771,7 @@ func (l *Libvirt) StoragePoolRefresh(Pool NonnullStoragePool, Flags uint32) (err return } +// StoragePoolLookupByName is the go wrapper for REMOTE_PROC_STORAGE_POOL_LOOKUP_BY_NAME. func (l *Libvirt) StoragePoolLookupByName(Name string) (rPool NonnullStoragePool, err error) { var buf bytes.Buffer @@ -6081,6 +6808,7 @@ func (l *Libvirt) StoragePoolLookupByName(Name string) (rPool NonnullStoragePool return } +// StoragePoolLookupByUUID is the go wrapper for REMOTE_PROC_STORAGE_POOL_LOOKUP_BY_UUID. func (l *Libvirt) StoragePoolLookupByUUID(UUID UUID) (rPool NonnullStoragePool, err error) { var buf bytes.Buffer @@ -6117,6 +6845,7 @@ func (l *Libvirt) StoragePoolLookupByUUID(UUID UUID) (rPool NonnullStoragePool, return } +// StoragePoolLookupByVolume is the go wrapper for REMOTE_PROC_STORAGE_POOL_LOOKUP_BY_VOLUME. func (l *Libvirt) StoragePoolLookupByVolume(Vol NonnullStorageVol) (rPool NonnullStoragePool, err error) { var buf bytes.Buffer @@ -6153,6 +6882,7 @@ func (l *Libvirt) StoragePoolLookupByVolume(Vol NonnullStorageVol) (rPool Nonnul return } +// StoragePoolGetInfo is the go wrapper for REMOTE_PROC_STORAGE_POOL_GET_INFO. func (l *Libvirt) StoragePoolGetInfo(Pool NonnullStoragePool) (rState uint8, rCapacity uint64, rAllocation uint64, rAvailable uint64, err error) { var buf bytes.Buffer @@ -6204,6 +6934,7 @@ func (l *Libvirt) StoragePoolGetInfo(Pool NonnullStoragePool) (rState uint8, rCa return } +// StoragePoolGetXMLDesc is the go wrapper for REMOTE_PROC_STORAGE_POOL_GET_XML_DESC. func (l *Libvirt) StoragePoolGetXMLDesc(Pool NonnullStoragePool, Flags uint32) (rXML string, err error) { var buf bytes.Buffer @@ -6241,6 +6972,7 @@ func (l *Libvirt) StoragePoolGetXMLDesc(Pool NonnullStoragePool, Flags uint32) ( return } +// StoragePoolGetAutostart is the go wrapper for REMOTE_PROC_STORAGE_POOL_GET_AUTOSTART. func (l *Libvirt) StoragePoolGetAutostart(Pool NonnullStoragePool) (rAutostart int32, err error) { var buf bytes.Buffer @@ -6277,6 +7009,7 @@ func (l *Libvirt) StoragePoolGetAutostart(Pool NonnullStoragePool) (rAutostart i return } +// StoragePoolSetAutostart is the go wrapper for REMOTE_PROC_STORAGE_POOL_SET_AUTOSTART. func (l *Libvirt) StoragePoolSetAutostart(Pool NonnullStoragePool, Autostart int32) (err error) { var buf bytes.Buffer @@ -6305,6 +7038,7 @@ func (l *Libvirt) StoragePoolSetAutostart(Pool NonnullStoragePool, Autostart int return } +// StoragePoolNumOfVolumes is the go wrapper for REMOTE_PROC_STORAGE_POOL_NUM_OF_VOLUMES. func (l *Libvirt) StoragePoolNumOfVolumes(Pool NonnullStoragePool) (rNum int32, err error) { var buf bytes.Buffer @@ -6341,6 +7075,7 @@ func (l *Libvirt) StoragePoolNumOfVolumes(Pool NonnullStoragePool) (rNum int32, return } +// StoragePoolListVolumes is the go wrapper for REMOTE_PROC_STORAGE_POOL_LIST_VOLUMES. func (l *Libvirt) StoragePoolListVolumes(Pool NonnullStoragePool, Maxnames int32) (rNames []string, err error) { var buf bytes.Buffer @@ -6378,6 +7113,7 @@ func (l *Libvirt) StoragePoolListVolumes(Pool NonnullStoragePool, Maxnames int32 return } +// StorageVolCreateXML is the go wrapper for REMOTE_PROC_STORAGE_VOL_CREATE_XML. func (l *Libvirt) StorageVolCreateXML(Pool NonnullStoragePool, XML string, Flags uint32) (rVol NonnullStorageVol, err error) { var buf bytes.Buffer @@ -6416,6 +7152,7 @@ func (l *Libvirt) StorageVolCreateXML(Pool NonnullStoragePool, XML string, Flags return } +// StorageVolDelete is the go wrapper for REMOTE_PROC_STORAGE_VOL_DELETE. func (l *Libvirt) StorageVolDelete(Vol NonnullStorageVol, Flags uint32) (err error) { var buf bytes.Buffer @@ -6444,6 +7181,7 @@ func (l *Libvirt) StorageVolDelete(Vol NonnullStorageVol, Flags uint32) (err err return } +// StorageVolLookupByName is the go wrapper for REMOTE_PROC_STORAGE_VOL_LOOKUP_BY_NAME. func (l *Libvirt) StorageVolLookupByName(Pool NonnullStoragePool, Name string) (rVol NonnullStorageVol, err error) { var buf bytes.Buffer @@ -6481,6 +7219,7 @@ func (l *Libvirt) StorageVolLookupByName(Pool NonnullStoragePool, Name string) ( return } +// StorageVolLookupByKey is the go wrapper for REMOTE_PROC_STORAGE_VOL_LOOKUP_BY_KEY. func (l *Libvirt) StorageVolLookupByKey(Key string) (rVol NonnullStorageVol, err error) { var buf bytes.Buffer @@ -6517,6 +7256,7 @@ func (l *Libvirt) StorageVolLookupByKey(Key string) (rVol NonnullStorageVol, err return } +// StorageVolLookupByPath is the go wrapper for REMOTE_PROC_STORAGE_VOL_LOOKUP_BY_PATH. func (l *Libvirt) StorageVolLookupByPath(Path string) (rVol NonnullStorageVol, err error) { var buf bytes.Buffer @@ -6553,6 +7293,7 @@ func (l *Libvirt) StorageVolLookupByPath(Path string) (rVol NonnullStorageVol, e return } +// StorageVolGetInfo is the go wrapper for REMOTE_PROC_STORAGE_VOL_GET_INFO. func (l *Libvirt) StorageVolGetInfo(Vol NonnullStorageVol) (rType int8, rCapacity uint64, rAllocation uint64, err error) { var buf bytes.Buffer @@ -6599,6 +7340,7 @@ func (l *Libvirt) StorageVolGetInfo(Vol NonnullStorageVol) (rType int8, rCapacit return } +// StorageVolGetXMLDesc is the go wrapper for REMOTE_PROC_STORAGE_VOL_GET_XML_DESC. func (l *Libvirt) StorageVolGetXMLDesc(Vol NonnullStorageVol, Flags uint32) (rXML string, err error) { var buf bytes.Buffer @@ -6636,6 +7378,7 @@ func (l *Libvirt) StorageVolGetXMLDesc(Vol NonnullStorageVol, Flags uint32) (rXM return } +// StorageVolGetPath is the go wrapper for REMOTE_PROC_STORAGE_VOL_GET_PATH. func (l *Libvirt) StorageVolGetPath(Vol NonnullStorageVol) (rName string, err error) { var buf bytes.Buffer @@ -6672,6 +7415,7 @@ func (l *Libvirt) StorageVolGetPath(Vol NonnullStorageVol) (rName string, err er return } +// NodeGetCellsFreeMemory is the go wrapper for REMOTE_PROC_NODE_GET_CELLS_FREE_MEMORY. func (l *Libvirt) NodeGetCellsFreeMemory(StartCell int32, Maxcells int32) (rCells []uint64, err error) { var buf bytes.Buffer @@ -6709,6 +7453,7 @@ func (l *Libvirt) NodeGetCellsFreeMemory(StartCell int32, Maxcells int32) (rCell return } +// NodeGetFreeMemory is the go wrapper for REMOTE_PROC_NODE_GET_FREE_MEMORY. func (l *Libvirt) NodeGetFreeMemory() (rFreeMem uint64, err error) { var buf bytes.Buffer @@ -6736,6 +7481,7 @@ func (l *Libvirt) NodeGetFreeMemory() (rFreeMem uint64, err error) { return } +// DomainBlockPeek is the go wrapper for REMOTE_PROC_DOMAIN_BLOCK_PEEK. func (l *Libvirt) DomainBlockPeek(Dom NonnullDomain, Path string, Offset uint64, Size uint32, Flags uint32) (rBuffer []byte, err error) { var buf bytes.Buffer @@ -6776,6 +7522,7 @@ func (l *Libvirt) DomainBlockPeek(Dom NonnullDomain, Path string, Offset uint64, return } +// DomainMemoryPeek is the go wrapper for REMOTE_PROC_DOMAIN_MEMORY_PEEK. func (l *Libvirt) DomainMemoryPeek(Dom NonnullDomain, Offset uint64, Size uint32, Flags uint32) (rBuffer []byte, err error) { var buf bytes.Buffer @@ -6815,6 +7562,7 @@ func (l *Libvirt) DomainMemoryPeek(Dom NonnullDomain, Offset uint64, Size uint32 return } +// ConnectDomainEventRegister is the go wrapper for REMOTE_PROC_CONNECT_DOMAIN_EVENT_REGISTER. func (l *Libvirt) ConnectDomainEventRegister() (rCbRegistered int32, err error) { var buf bytes.Buffer @@ -6842,6 +7590,7 @@ func (l *Libvirt) ConnectDomainEventRegister() (rCbRegistered int32, err error) return } +// ConnectDomainEventDeregister is the go wrapper for REMOTE_PROC_CONNECT_DOMAIN_EVENT_DEREGISTER. func (l *Libvirt) ConnectDomainEventDeregister() (rCbRegistered int32, err error) { var buf bytes.Buffer @@ -6869,6 +7618,7 @@ func (l *Libvirt) ConnectDomainEventDeregister() (rCbRegistered int32, err error return } +// DomainEventLifecycle is the go wrapper for REMOTE_PROC_DOMAIN_EVENT_LIFECYCLE. func (l *Libvirt) DomainEventLifecycle() (err error) { var buf bytes.Buffer @@ -6887,6 +7637,7 @@ func (l *Libvirt) DomainEventLifecycle() (err error) { return } +// DomainMigratePrepare2 is the go wrapper for REMOTE_PROC_DOMAIN_MIGRATE_PREPARE2. func (l *Libvirt) DomainMigratePrepare2(UriIn OptString, Flags uint64, Dname OptString, Resource uint64, DomXML string) (rCookie []byte, rUriOut OptString, err error) { var buf bytes.Buffer @@ -6932,6 +7683,7 @@ func (l *Libvirt) DomainMigratePrepare2(UriIn OptString, Flags uint64, Dname Opt return } +// DomainMigrateFinish2 is the go wrapper for REMOTE_PROC_DOMAIN_MIGRATE_FINISH2. func (l *Libvirt) DomainMigrateFinish2(Dname string, Cookie []byte, Uri string, Flags uint64, Retcode int32) (rDdom NonnullDomain, err error) { var buf bytes.Buffer @@ -6972,6 +7724,7 @@ func (l *Libvirt) DomainMigrateFinish2(Dname string, Cookie []byte, Uri string, return } +// ConnectGetUri is the go wrapper for REMOTE_PROC_CONNECT_GET_URI. func (l *Libvirt) ConnectGetUri() (rUri string, err error) { var buf bytes.Buffer @@ -6999,6 +7752,7 @@ func (l *Libvirt) ConnectGetUri() (rUri string, err error) { return } +// NodeNumOfDevices is the go wrapper for REMOTE_PROC_NODE_NUM_OF_DEVICES. func (l *Libvirt) NodeNumOfDevices(Cap OptString, Flags uint32) (rNum int32, err error) { var buf bytes.Buffer @@ -7036,6 +7790,7 @@ func (l *Libvirt) NodeNumOfDevices(Cap OptString, Flags uint32) (rNum int32, err return } +// NodeListDevices is the go wrapper for REMOTE_PROC_NODE_LIST_DEVICES. func (l *Libvirt) NodeListDevices(Cap OptString, Maxnames int32, Flags uint32) (rNames []string, err error) { var buf bytes.Buffer @@ -7074,6 +7829,7 @@ func (l *Libvirt) NodeListDevices(Cap OptString, Maxnames int32, Flags uint32) ( return } +// NodeDeviceLookupByName is the go wrapper for REMOTE_PROC_NODE_DEVICE_LOOKUP_BY_NAME. func (l *Libvirt) NodeDeviceLookupByName(Name string) (rDev NonnullNodeDevice, err error) { var buf bytes.Buffer @@ -7110,6 +7866,7 @@ func (l *Libvirt) NodeDeviceLookupByName(Name string) (rDev NonnullNodeDevice, e return } +// NodeDeviceGetXMLDesc is the go wrapper for REMOTE_PROC_NODE_DEVICE_GET_XML_DESC. func (l *Libvirt) NodeDeviceGetXMLDesc(Name string, Flags uint32) (rXML string, err error) { var buf bytes.Buffer @@ -7147,6 +7904,7 @@ func (l *Libvirt) NodeDeviceGetXMLDesc(Name string, Flags uint32) (rXML string, return } +// NodeDeviceGetParent is the go wrapper for REMOTE_PROC_NODE_DEVICE_GET_PARENT. func (l *Libvirt) NodeDeviceGetParent(Name string) (rParent OptString, err error) { var buf bytes.Buffer @@ -7183,6 +7941,7 @@ func (l *Libvirt) NodeDeviceGetParent(Name string) (rParent OptString, err error return } +// NodeDeviceNumOfCaps is the go wrapper for REMOTE_PROC_NODE_DEVICE_NUM_OF_CAPS. func (l *Libvirt) NodeDeviceNumOfCaps(Name string) (rNum int32, err error) { var buf bytes.Buffer @@ -7219,6 +7978,7 @@ func (l *Libvirt) NodeDeviceNumOfCaps(Name string) (rNum int32, err error) { return } +// NodeDeviceListCaps is the go wrapper for REMOTE_PROC_NODE_DEVICE_LIST_CAPS. func (l *Libvirt) NodeDeviceListCaps(Name string, Maxnames int32) (rNames []string, err error) { var buf bytes.Buffer @@ -7256,6 +8016,7 @@ func (l *Libvirt) NodeDeviceListCaps(Name string, Maxnames int32) (rNames []stri return } +// NodeDeviceDettach is the go wrapper for REMOTE_PROC_NODE_DEVICE_DETTACH. func (l *Libvirt) NodeDeviceDettach(Name string) (err error) { var buf bytes.Buffer @@ -7283,6 +8044,7 @@ func (l *Libvirt) NodeDeviceDettach(Name string) (err error) { return } +// NodeDeviceReAttach is the go wrapper for REMOTE_PROC_NODE_DEVICE_RE_ATTACH. func (l *Libvirt) NodeDeviceReAttach(Name string) (err error) { var buf bytes.Buffer @@ -7310,6 +8072,7 @@ func (l *Libvirt) NodeDeviceReAttach(Name string) (err error) { return } +// NodeDeviceReset is the go wrapper for REMOTE_PROC_NODE_DEVICE_RESET. func (l *Libvirt) NodeDeviceReset(Name string) (err error) { var buf bytes.Buffer @@ -7337,6 +8100,7 @@ func (l *Libvirt) NodeDeviceReset(Name string) (err error) { return } +// DomainGetSecurityLabel is the go wrapper for REMOTE_PROC_DOMAIN_GET_SECURITY_LABEL. func (l *Libvirt) DomainGetSecurityLabel(Dom NonnullDomain) (rLabel []int8, rEnforcing int32, err error) { var buf bytes.Buffer @@ -7378,6 +8142,7 @@ func (l *Libvirt) DomainGetSecurityLabel(Dom NonnullDomain) (rLabel []int8, rEnf return } +// NodeGetSecurityModel is the go wrapper for REMOTE_PROC_NODE_GET_SECURITY_MODEL. func (l *Libvirt) NodeGetSecurityModel() (rModel []int8, rDoi []int8, err error) { var buf bytes.Buffer @@ -7410,6 +8175,7 @@ func (l *Libvirt) NodeGetSecurityModel() (rModel []int8, rDoi []int8, err error) return } +// NodeDeviceCreateXML is the go wrapper for REMOTE_PROC_NODE_DEVICE_CREATE_XML. func (l *Libvirt) NodeDeviceCreateXML(XMLDesc string, Flags uint32) (rDev NonnullNodeDevice, err error) { var buf bytes.Buffer @@ -7447,6 +8213,7 @@ func (l *Libvirt) NodeDeviceCreateXML(XMLDesc string, Flags uint32) (rDev Nonnul return } +// NodeDeviceDestroy is the go wrapper for REMOTE_PROC_NODE_DEVICE_DESTROY. func (l *Libvirt) NodeDeviceDestroy(Name string) (err error) { var buf bytes.Buffer @@ -7474,6 +8241,7 @@ func (l *Libvirt) NodeDeviceDestroy(Name string) (err error) { return } +// StorageVolCreateXMLFrom is the go wrapper for REMOTE_PROC_STORAGE_VOL_CREATE_XML_FROM. func (l *Libvirt) StorageVolCreateXMLFrom(Pool NonnullStoragePool, XML string, Clonevol NonnullStorageVol, Flags uint32) (rVol NonnullStorageVol, err error) { var buf bytes.Buffer @@ -7513,6 +8281,7 @@ func (l *Libvirt) StorageVolCreateXMLFrom(Pool NonnullStoragePool, XML string, C return } +// ConnectNumOfInterfaces is the go wrapper for REMOTE_PROC_CONNECT_NUM_OF_INTERFACES. func (l *Libvirt) ConnectNumOfInterfaces() (rNum int32, err error) { var buf bytes.Buffer @@ -7540,6 +8309,7 @@ func (l *Libvirt) ConnectNumOfInterfaces() (rNum int32, err error) { return } +// ConnectListInterfaces is the go wrapper for REMOTE_PROC_CONNECT_LIST_INTERFACES. func (l *Libvirt) ConnectListInterfaces(Maxnames int32) (rNames []string, err error) { var buf bytes.Buffer @@ -7576,6 +8346,7 @@ func (l *Libvirt) ConnectListInterfaces(Maxnames int32) (rNames []string, err er return } +// InterfaceLookupByName is the go wrapper for REMOTE_PROC_INTERFACE_LOOKUP_BY_NAME. func (l *Libvirt) InterfaceLookupByName(Name string) (rIface NonnullInterface, err error) { var buf bytes.Buffer @@ -7612,6 +8383,7 @@ func (l *Libvirt) InterfaceLookupByName(Name string) (rIface NonnullInterface, e return } +// InterfaceLookupByMacString is the go wrapper for REMOTE_PROC_INTERFACE_LOOKUP_BY_MAC_STRING. func (l *Libvirt) InterfaceLookupByMacString(Mac string) (rIface NonnullInterface, err error) { var buf bytes.Buffer @@ -7648,6 +8420,7 @@ func (l *Libvirt) InterfaceLookupByMacString(Mac string) (rIface NonnullInterfac return } +// InterfaceGetXMLDesc is the go wrapper for REMOTE_PROC_INTERFACE_GET_XML_DESC. func (l *Libvirt) InterfaceGetXMLDesc(Iface NonnullInterface, Flags uint32) (rXML string, err error) { var buf bytes.Buffer @@ -7685,6 +8458,7 @@ func (l *Libvirt) InterfaceGetXMLDesc(Iface NonnullInterface, Flags uint32) (rXM return } +// InterfaceDefineXML is the go wrapper for REMOTE_PROC_INTERFACE_DEFINE_XML. func (l *Libvirt) InterfaceDefineXML(XML string, Flags uint32) (rIface NonnullInterface, err error) { var buf bytes.Buffer @@ -7722,6 +8496,7 @@ func (l *Libvirt) InterfaceDefineXML(XML string, Flags uint32) (rIface NonnullIn return } +// InterfaceUndefine is the go wrapper for REMOTE_PROC_INTERFACE_UNDEFINE. func (l *Libvirt) InterfaceUndefine(Iface NonnullInterface) (err error) { var buf bytes.Buffer @@ -7749,6 +8524,7 @@ func (l *Libvirt) InterfaceUndefine(Iface NonnullInterface) (err error) { return } +// InterfaceCreate is the go wrapper for REMOTE_PROC_INTERFACE_CREATE. func (l *Libvirt) InterfaceCreate(Iface NonnullInterface, Flags uint32) (err error) { var buf bytes.Buffer @@ -7777,6 +8553,7 @@ func (l *Libvirt) InterfaceCreate(Iface NonnullInterface, Flags uint32) (err err return } +// InterfaceDestroy is the go wrapper for REMOTE_PROC_INTERFACE_DESTROY. func (l *Libvirt) InterfaceDestroy(Iface NonnullInterface, Flags uint32) (err error) { var buf bytes.Buffer @@ -7805,6 +8582,7 @@ func (l *Libvirt) InterfaceDestroy(Iface NonnullInterface, Flags uint32) (err er return } +// ConnectDomainXMLFromNative is the go wrapper for REMOTE_PROC_CONNECT_DOMAIN_XML_FROM_NATIVE. func (l *Libvirt) ConnectDomainXMLFromNative(NativeFormat string, NativeConfig string, Flags uint32) (rDomainXML string, err error) { var buf bytes.Buffer @@ -7843,6 +8621,7 @@ func (l *Libvirt) ConnectDomainXMLFromNative(NativeFormat string, NativeConfig s return } +// ConnectDomainXMLToNative is the go wrapper for REMOTE_PROC_CONNECT_DOMAIN_XML_TO_NATIVE. func (l *Libvirt) ConnectDomainXMLToNative(NativeFormat string, DomainXML string, Flags uint32) (rNativeConfig string, err error) { var buf bytes.Buffer @@ -7881,6 +8660,7 @@ func (l *Libvirt) ConnectDomainXMLToNative(NativeFormat string, DomainXML string return } +// ConnectNumOfDefinedInterfaces is the go wrapper for REMOTE_PROC_CONNECT_NUM_OF_DEFINED_INTERFACES. func (l *Libvirt) ConnectNumOfDefinedInterfaces() (rNum int32, err error) { var buf bytes.Buffer @@ -7908,6 +8688,7 @@ func (l *Libvirt) ConnectNumOfDefinedInterfaces() (rNum int32, err error) { return } +// ConnectListDefinedInterfaces is the go wrapper for REMOTE_PROC_CONNECT_LIST_DEFINED_INTERFACES. func (l *Libvirt) ConnectListDefinedInterfaces(Maxnames int32) (rNames []string, err error) { var buf bytes.Buffer @@ -7944,6 +8725,7 @@ func (l *Libvirt) ConnectListDefinedInterfaces(Maxnames int32) (rNames []string, return } +// ConnectNumOfSecrets is the go wrapper for REMOTE_PROC_CONNECT_NUM_OF_SECRETS. func (l *Libvirt) ConnectNumOfSecrets() (rNum int32, err error) { var buf bytes.Buffer @@ -7971,6 +8753,7 @@ func (l *Libvirt) ConnectNumOfSecrets() (rNum int32, err error) { return } +// ConnectListSecrets is the go wrapper for REMOTE_PROC_CONNECT_LIST_SECRETS. func (l *Libvirt) ConnectListSecrets(Maxuuids int32) (rUuids []string, err error) { var buf bytes.Buffer @@ -8007,6 +8790,7 @@ func (l *Libvirt) ConnectListSecrets(Maxuuids int32) (rUuids []string, err error return } +// SecretLookupByUUID is the go wrapper for REMOTE_PROC_SECRET_LOOKUP_BY_UUID. func (l *Libvirt) SecretLookupByUUID(UUID UUID) (rSecret NonnullSecret, err error) { var buf bytes.Buffer @@ -8043,6 +8827,7 @@ func (l *Libvirt) SecretLookupByUUID(UUID UUID) (rSecret NonnullSecret, err erro return } +// SecretDefineXML is the go wrapper for REMOTE_PROC_SECRET_DEFINE_XML. func (l *Libvirt) SecretDefineXML(XML string, Flags uint32) (rSecret NonnullSecret, err error) { var buf bytes.Buffer @@ -8080,6 +8865,7 @@ func (l *Libvirt) SecretDefineXML(XML string, Flags uint32) (rSecret NonnullSecr return } +// SecretGetXMLDesc is the go wrapper for REMOTE_PROC_SECRET_GET_XML_DESC. func (l *Libvirt) SecretGetXMLDesc(Secret NonnullSecret, Flags uint32) (rXML string, err error) { var buf bytes.Buffer @@ -8117,6 +8903,7 @@ func (l *Libvirt) SecretGetXMLDesc(Secret NonnullSecret, Flags uint32) (rXML str return } +// SecretSetValue is the go wrapper for REMOTE_PROC_SECRET_SET_VALUE. func (l *Libvirt) SecretSetValue(Secret NonnullSecret, Value []byte, Flags uint32) (err error) { var buf bytes.Buffer @@ -8146,6 +8933,7 @@ func (l *Libvirt) SecretSetValue(Secret NonnullSecret, Value []byte, Flags uint3 return } +// SecretGetValue is the go wrapper for REMOTE_PROC_SECRET_GET_VALUE. func (l *Libvirt) SecretGetValue(Secret NonnullSecret, Flags uint32) (rValue []byte, err error) { var buf bytes.Buffer @@ -8183,6 +8971,7 @@ func (l *Libvirt) SecretGetValue(Secret NonnullSecret, Flags uint32) (rValue []b return } +// SecretUndefine is the go wrapper for REMOTE_PROC_SECRET_UNDEFINE. func (l *Libvirt) SecretUndefine(Secret NonnullSecret) (err error) { var buf bytes.Buffer @@ -8210,6 +8999,7 @@ func (l *Libvirt) SecretUndefine(Secret NonnullSecret) (err error) { return } +// SecretLookupByUsage is the go wrapper for REMOTE_PROC_SECRET_LOOKUP_BY_USAGE. func (l *Libvirt) SecretLookupByUsage(UsageType int32, UsageID string) (rSecret NonnullSecret, err error) { var buf bytes.Buffer @@ -8247,6 +9037,7 @@ func (l *Libvirt) SecretLookupByUsage(UsageType int32, UsageID string) (rSecret return } +// DomainMigratePrepareTunnel is the go wrapper for REMOTE_PROC_DOMAIN_MIGRATE_PREPARE_TUNNEL. func (l *Libvirt) DomainMigratePrepareTunnel(Flags uint64, Dname OptString, Resource uint64, DomXML string) (err error) { var buf bytes.Buffer @@ -8277,6 +9068,7 @@ func (l *Libvirt) DomainMigratePrepareTunnel(Flags uint64, Dname OptString, Reso return } +// ConnectIsSecure is the go wrapper for REMOTE_PROC_CONNECT_IS_SECURE. func (l *Libvirt) ConnectIsSecure() (rSecure int32, err error) { var buf bytes.Buffer @@ -8304,6 +9096,7 @@ func (l *Libvirt) ConnectIsSecure() (rSecure int32, err error) { return } +// DomainIsActive is the go wrapper for REMOTE_PROC_DOMAIN_IS_ACTIVE. func (l *Libvirt) DomainIsActive(Dom NonnullDomain) (rActive int32, err error) { var buf bytes.Buffer @@ -8340,6 +9133,7 @@ func (l *Libvirt) DomainIsActive(Dom NonnullDomain) (rActive int32, err error) { return } +// DomainIsPersistent is the go wrapper for REMOTE_PROC_DOMAIN_IS_PERSISTENT. func (l *Libvirt) DomainIsPersistent(Dom NonnullDomain) (rPersistent int32, err error) { var buf bytes.Buffer @@ -8376,6 +9170,7 @@ func (l *Libvirt) DomainIsPersistent(Dom NonnullDomain) (rPersistent int32, err return } +// NetworkIsActive is the go wrapper for REMOTE_PROC_NETWORK_IS_ACTIVE. func (l *Libvirt) NetworkIsActive(Net NonnullNetwork) (rActive int32, err error) { var buf bytes.Buffer @@ -8412,6 +9207,7 @@ func (l *Libvirt) NetworkIsActive(Net NonnullNetwork) (rActive int32, err error) return } +// NetworkIsPersistent is the go wrapper for REMOTE_PROC_NETWORK_IS_PERSISTENT. func (l *Libvirt) NetworkIsPersistent(Net NonnullNetwork) (rPersistent int32, err error) { var buf bytes.Buffer @@ -8448,6 +9244,7 @@ func (l *Libvirt) NetworkIsPersistent(Net NonnullNetwork) (rPersistent int32, er return } +// StoragePoolIsActive is the go wrapper for REMOTE_PROC_STORAGE_POOL_IS_ACTIVE. func (l *Libvirt) StoragePoolIsActive(Pool NonnullStoragePool) (rActive int32, err error) { var buf bytes.Buffer @@ -8484,6 +9281,7 @@ func (l *Libvirt) StoragePoolIsActive(Pool NonnullStoragePool) (rActive int32, e return } +// StoragePoolIsPersistent is the go wrapper for REMOTE_PROC_STORAGE_POOL_IS_PERSISTENT. func (l *Libvirt) StoragePoolIsPersistent(Pool NonnullStoragePool) (rPersistent int32, err error) { var buf bytes.Buffer @@ -8520,6 +9318,7 @@ func (l *Libvirt) StoragePoolIsPersistent(Pool NonnullStoragePool) (rPersistent return } +// InterfaceIsActive is the go wrapper for REMOTE_PROC_INTERFACE_IS_ACTIVE. func (l *Libvirt) InterfaceIsActive(Iface NonnullInterface) (rActive int32, err error) { var buf bytes.Buffer @@ -8556,6 +9355,7 @@ func (l *Libvirt) InterfaceIsActive(Iface NonnullInterface) (rActive int32, err return } +// ConnectGetLibVersion is the go wrapper for REMOTE_PROC_CONNECT_GET_LIB_VERSION. func (l *Libvirt) ConnectGetLibVersion() (rLibVer uint64, err error) { var buf bytes.Buffer @@ -8583,6 +9383,7 @@ func (l *Libvirt) ConnectGetLibVersion() (rLibVer uint64, err error) { return } +// ConnectCompareCPU is the go wrapper for REMOTE_PROC_CONNECT_COMPARE_CPU. func (l *Libvirt) ConnectCompareCPU(XML string, Flags uint32) (rResult int32, err error) { var buf bytes.Buffer @@ -8620,6 +9421,7 @@ func (l *Libvirt) ConnectCompareCPU(XML string, Flags uint32) (rResult int32, er return } +// DomainMemoryStats is the go wrapper for REMOTE_PROC_DOMAIN_MEMORY_STATS. func (l *Libvirt) DomainMemoryStats(Dom NonnullDomain, MaxStats uint32, Flags uint32) (rStats []DomainMemoryStat, err error) { var buf bytes.Buffer @@ -8658,6 +9460,7 @@ func (l *Libvirt) DomainMemoryStats(Dom NonnullDomain, MaxStats uint32, Flags ui return } +// DomainAttachDeviceFlags is the go wrapper for REMOTE_PROC_DOMAIN_ATTACH_DEVICE_FLAGS. func (l *Libvirt) DomainAttachDeviceFlags(Dom NonnullDomain, XML string, Flags uint32) (err error) { var buf bytes.Buffer @@ -8687,6 +9490,7 @@ func (l *Libvirt) DomainAttachDeviceFlags(Dom NonnullDomain, XML string, Flags u return } +// DomainDetachDeviceFlags is the go wrapper for REMOTE_PROC_DOMAIN_DETACH_DEVICE_FLAGS. func (l *Libvirt) DomainDetachDeviceFlags(Dom NonnullDomain, XML string, Flags uint32) (err error) { var buf bytes.Buffer @@ -8716,6 +9520,7 @@ func (l *Libvirt) DomainDetachDeviceFlags(Dom NonnullDomain, XML string, Flags u return } +// ConnectBaselineCPU is the go wrapper for REMOTE_PROC_CONNECT_BASELINE_CPU. func (l *Libvirt) ConnectBaselineCPU(XMLCPUs []string, Flags uint32) (rCPU string, err error) { var buf bytes.Buffer @@ -8753,6 +9558,7 @@ func (l *Libvirt) ConnectBaselineCPU(XMLCPUs []string, Flags uint32) (rCPU strin return } +// DomainGetJobInfo is the go wrapper for REMOTE_PROC_DOMAIN_GET_JOB_INFO. func (l *Libvirt) DomainGetJobInfo(Dom NonnullDomain) (rType int32, rTimeElapsed uint64, rTimeRemaining uint64, rDataTotal uint64, rDataProcessed uint64, rDataRemaining uint64, rMemTotal uint64, rMemProcessed uint64, rMemRemaining uint64, rFileTotal uint64, rFileProcessed uint64, rFileRemaining uint64, err error) { var buf bytes.Buffer @@ -8844,6 +9650,7 @@ func (l *Libvirt) DomainGetJobInfo(Dom NonnullDomain) (rType int32, rTimeElapsed return } +// DomainAbortJob is the go wrapper for REMOTE_PROC_DOMAIN_ABORT_JOB. func (l *Libvirt) DomainAbortJob(Dom NonnullDomain) (err error) { var buf bytes.Buffer @@ -8871,6 +9678,7 @@ func (l *Libvirt) DomainAbortJob(Dom NonnullDomain) (err error) { return } +// StorageVolWipe is the go wrapper for REMOTE_PROC_STORAGE_VOL_WIPE. func (l *Libvirt) StorageVolWipe(Vol NonnullStorageVol, Flags uint32) (err error) { var buf bytes.Buffer @@ -8899,6 +9707,7 @@ func (l *Libvirt) StorageVolWipe(Vol NonnullStorageVol, Flags uint32) (err error return } +// DomainMigrateSetMaxDowntime is the go wrapper for REMOTE_PROC_DOMAIN_MIGRATE_SET_MAX_DOWNTIME. func (l *Libvirt) DomainMigrateSetMaxDowntime(Dom NonnullDomain, Downtime uint64, Flags uint32) (err error) { var buf bytes.Buffer @@ -8928,6 +9737,7 @@ func (l *Libvirt) DomainMigrateSetMaxDowntime(Dom NonnullDomain, Downtime uint64 return } +// ConnectDomainEventRegisterAny is the go wrapper for REMOTE_PROC_CONNECT_DOMAIN_EVENT_REGISTER_ANY. func (l *Libvirt) ConnectDomainEventRegisterAny(EventID int32) (err error) { var buf bytes.Buffer @@ -8955,6 +9765,7 @@ func (l *Libvirt) ConnectDomainEventRegisterAny(EventID int32) (err error) { return } +// ConnectDomainEventDeregisterAny is the go wrapper for REMOTE_PROC_CONNECT_DOMAIN_EVENT_DEREGISTER_ANY. func (l *Libvirt) ConnectDomainEventDeregisterAny(EventID int32) (err error) { var buf bytes.Buffer @@ -8982,6 +9793,7 @@ func (l *Libvirt) ConnectDomainEventDeregisterAny(EventID int32) (err error) { return } +// DomainEventReboot is the go wrapper for REMOTE_PROC_DOMAIN_EVENT_REBOOT. func (l *Libvirt) DomainEventReboot() (err error) { var buf bytes.Buffer @@ -9000,6 +9812,7 @@ func (l *Libvirt) DomainEventReboot() (err error) { return } +// DomainEventRtcChange is the go wrapper for REMOTE_PROC_DOMAIN_EVENT_RTC_CHANGE. func (l *Libvirt) DomainEventRtcChange() (err error) { var buf bytes.Buffer @@ -9018,6 +9831,7 @@ func (l *Libvirt) DomainEventRtcChange() (err error) { return } +// DomainEventWatchdog is the go wrapper for REMOTE_PROC_DOMAIN_EVENT_WATCHDOG. func (l *Libvirt) DomainEventWatchdog() (err error) { var buf bytes.Buffer @@ -9036,6 +9850,7 @@ func (l *Libvirt) DomainEventWatchdog() (err error) { return } +// DomainEventIOError is the go wrapper for REMOTE_PROC_DOMAIN_EVENT_IO_ERROR. func (l *Libvirt) DomainEventIOError() (err error) { var buf bytes.Buffer @@ -9054,6 +9869,7 @@ func (l *Libvirt) DomainEventIOError() (err error) { return } +// DomainEventGraphics is the go wrapper for REMOTE_PROC_DOMAIN_EVENT_GRAPHICS. func (l *Libvirt) DomainEventGraphics() (err error) { var buf bytes.Buffer @@ -9072,6 +9888,7 @@ func (l *Libvirt) DomainEventGraphics() (err error) { return } +// DomainUpdateDeviceFlags is the go wrapper for REMOTE_PROC_DOMAIN_UPDATE_DEVICE_FLAGS. func (l *Libvirt) DomainUpdateDeviceFlags(Dom NonnullDomain, XML string, Flags uint32) (err error) { var buf bytes.Buffer @@ -9101,6 +9918,7 @@ func (l *Libvirt) DomainUpdateDeviceFlags(Dom NonnullDomain, XML string, Flags u return } +// NwfilterLookupByName is the go wrapper for REMOTE_PROC_NWFILTER_LOOKUP_BY_NAME. func (l *Libvirt) NwfilterLookupByName(Name string) (rNwfilter NonnullNwfilter, err error) { var buf bytes.Buffer @@ -9137,6 +9955,7 @@ func (l *Libvirt) NwfilterLookupByName(Name string) (rNwfilter NonnullNwfilter, return } +// NwfilterLookupByUUID is the go wrapper for REMOTE_PROC_NWFILTER_LOOKUP_BY_UUID. func (l *Libvirt) NwfilterLookupByUUID(UUID UUID) (rNwfilter NonnullNwfilter, err error) { var buf bytes.Buffer @@ -9173,6 +9992,7 @@ func (l *Libvirt) NwfilterLookupByUUID(UUID UUID) (rNwfilter NonnullNwfilter, er return } +// NwfilterGetXMLDesc is the go wrapper for REMOTE_PROC_NWFILTER_GET_XML_DESC. func (l *Libvirt) NwfilterGetXMLDesc(Nwfilter NonnullNwfilter, Flags uint32) (rXML string, err error) { var buf bytes.Buffer @@ -9210,6 +10030,7 @@ func (l *Libvirt) NwfilterGetXMLDesc(Nwfilter NonnullNwfilter, Flags uint32) (rX return } +// ConnectNumOfNwfilters is the go wrapper for REMOTE_PROC_CONNECT_NUM_OF_NWFILTERS. func (l *Libvirt) ConnectNumOfNwfilters() (rNum int32, err error) { var buf bytes.Buffer @@ -9237,6 +10058,7 @@ func (l *Libvirt) ConnectNumOfNwfilters() (rNum int32, err error) { return } +// ConnectListNwfilters is the go wrapper for REMOTE_PROC_CONNECT_LIST_NWFILTERS. func (l *Libvirt) ConnectListNwfilters(Maxnames int32) (rNames []string, err error) { var buf bytes.Buffer @@ -9273,6 +10095,7 @@ func (l *Libvirt) ConnectListNwfilters(Maxnames int32) (rNames []string, err err return } +// NwfilterDefineXML is the go wrapper for REMOTE_PROC_NWFILTER_DEFINE_XML. func (l *Libvirt) NwfilterDefineXML(XML string) (rNwfilter NonnullNwfilter, err error) { var buf bytes.Buffer @@ -9309,6 +10132,7 @@ func (l *Libvirt) NwfilterDefineXML(XML string) (rNwfilter NonnullNwfilter, err return } +// NwfilterUndefine is the go wrapper for REMOTE_PROC_NWFILTER_UNDEFINE. func (l *Libvirt) NwfilterUndefine(Nwfilter NonnullNwfilter) (err error) { var buf bytes.Buffer @@ -9336,6 +10160,7 @@ func (l *Libvirt) NwfilterUndefine(Nwfilter NonnullNwfilter) (err error) { return } +// DomainManagedSave is the go wrapper for REMOTE_PROC_DOMAIN_MANAGED_SAVE. func (l *Libvirt) DomainManagedSave(Dom NonnullDomain, Flags uint32) (err error) { var buf bytes.Buffer @@ -9364,6 +10189,7 @@ func (l *Libvirt) DomainManagedSave(Dom NonnullDomain, Flags uint32) (err error) return } +// DomainHasManagedSaveImage is the go wrapper for REMOTE_PROC_DOMAIN_HAS_MANAGED_SAVE_IMAGE. func (l *Libvirt) DomainHasManagedSaveImage(Dom NonnullDomain, Flags uint32) (rResult int32, err error) { var buf bytes.Buffer @@ -9401,6 +10227,7 @@ func (l *Libvirt) DomainHasManagedSaveImage(Dom NonnullDomain, Flags uint32) (rR return } +// DomainManagedSaveRemove is the go wrapper for REMOTE_PROC_DOMAIN_MANAGED_SAVE_REMOVE. func (l *Libvirt) DomainManagedSaveRemove(Dom NonnullDomain, Flags uint32) (err error) { var buf bytes.Buffer @@ -9429,6 +10256,7 @@ func (l *Libvirt) DomainManagedSaveRemove(Dom NonnullDomain, Flags uint32) (err return } +// DomainSnapshotCreateXML is the go wrapper for REMOTE_PROC_DOMAIN_SNAPSHOT_CREATE_XML. func (l *Libvirt) DomainSnapshotCreateXML(Dom NonnullDomain, XMLDesc string, Flags uint32) (rSnap NonnullDomainSnapshot, err error) { var buf bytes.Buffer @@ -9467,6 +10295,7 @@ func (l *Libvirt) DomainSnapshotCreateXML(Dom NonnullDomain, XMLDesc string, Fla return } +// DomainSnapshotGetXMLDesc is the go wrapper for REMOTE_PROC_DOMAIN_SNAPSHOT_GET_XML_DESC. func (l *Libvirt) DomainSnapshotGetXMLDesc(Snap NonnullDomainSnapshot, Flags uint32) (rXML string, err error) { var buf bytes.Buffer @@ -9504,6 +10333,7 @@ func (l *Libvirt) DomainSnapshotGetXMLDesc(Snap NonnullDomainSnapshot, Flags uin return } +// DomainSnapshotNum is the go wrapper for REMOTE_PROC_DOMAIN_SNAPSHOT_NUM. func (l *Libvirt) DomainSnapshotNum(Dom NonnullDomain, Flags uint32) (rNum int32, err error) { var buf bytes.Buffer @@ -9541,6 +10371,7 @@ func (l *Libvirt) DomainSnapshotNum(Dom NonnullDomain, Flags uint32) (rNum int32 return } +// DomainSnapshotListNames is the go wrapper for REMOTE_PROC_DOMAIN_SNAPSHOT_LIST_NAMES. func (l *Libvirt) DomainSnapshotListNames(Dom NonnullDomain, Maxnames int32, Flags uint32) (rNames []string, err error) { var buf bytes.Buffer @@ -9579,6 +10410,7 @@ func (l *Libvirt) DomainSnapshotListNames(Dom NonnullDomain, Maxnames int32, Fla return } +// DomainSnapshotLookupByName is the go wrapper for REMOTE_PROC_DOMAIN_SNAPSHOT_LOOKUP_BY_NAME. func (l *Libvirt) DomainSnapshotLookupByName(Dom NonnullDomain, Name string, Flags uint32) (rSnap NonnullDomainSnapshot, err error) { var buf bytes.Buffer @@ -9617,6 +10449,7 @@ func (l *Libvirt) DomainSnapshotLookupByName(Dom NonnullDomain, Name string, Fla return } +// DomainHasCurrentSnapshot is the go wrapper for REMOTE_PROC_DOMAIN_HAS_CURRENT_SNAPSHOT. func (l *Libvirt) DomainHasCurrentSnapshot(Dom NonnullDomain, Flags uint32) (rResult int32, err error) { var buf bytes.Buffer @@ -9654,6 +10487,7 @@ func (l *Libvirt) DomainHasCurrentSnapshot(Dom NonnullDomain, Flags uint32) (rRe return } +// DomainSnapshotCurrent is the go wrapper for REMOTE_PROC_DOMAIN_SNAPSHOT_CURRENT. func (l *Libvirt) DomainSnapshotCurrent(Dom NonnullDomain, Flags uint32) (rSnap NonnullDomainSnapshot, err error) { var buf bytes.Buffer @@ -9691,6 +10525,7 @@ func (l *Libvirt) DomainSnapshotCurrent(Dom NonnullDomain, Flags uint32) (rSnap return } +// DomainRevertToSnapshot is the go wrapper for REMOTE_PROC_DOMAIN_REVERT_TO_SNAPSHOT. func (l *Libvirt) DomainRevertToSnapshot(Snap NonnullDomainSnapshot, Flags uint32) (err error) { var buf bytes.Buffer @@ -9719,6 +10554,7 @@ func (l *Libvirt) DomainRevertToSnapshot(Snap NonnullDomainSnapshot, Flags uint3 return } +// DomainSnapshotDelete is the go wrapper for REMOTE_PROC_DOMAIN_SNAPSHOT_DELETE. func (l *Libvirt) DomainSnapshotDelete(Snap NonnullDomainSnapshot, Flags uint32) (err error) { var buf bytes.Buffer @@ -9747,6 +10583,7 @@ func (l *Libvirt) DomainSnapshotDelete(Snap NonnullDomainSnapshot, Flags uint32) return } +// DomainGetBlockInfo is the go wrapper for REMOTE_PROC_DOMAIN_GET_BLOCK_INFO. func (l *Libvirt) DomainGetBlockInfo(Dom NonnullDomain, Path string, Flags uint32) (rAllocation uint64, rCapacity uint64, rPhysical uint64, err error) { var buf bytes.Buffer @@ -9795,6 +10632,7 @@ func (l *Libvirt) DomainGetBlockInfo(Dom NonnullDomain, Path string, Flags uint3 return } +// DomainEventIOErrorReason is the go wrapper for REMOTE_PROC_DOMAIN_EVENT_IO_ERROR_REASON. func (l *Libvirt) DomainEventIOErrorReason() (err error) { var buf bytes.Buffer @@ -9813,6 +10651,7 @@ func (l *Libvirt) DomainEventIOErrorReason() (err error) { return } +// DomainCreateWithFlags is the go wrapper for REMOTE_PROC_DOMAIN_CREATE_WITH_FLAGS. func (l *Libvirt) DomainCreateWithFlags(Dom NonnullDomain, Flags uint32) (rDom NonnullDomain, err error) { var buf bytes.Buffer @@ -9850,6 +10689,7 @@ func (l *Libvirt) DomainCreateWithFlags(Dom NonnullDomain, Flags uint32) (rDom N return } +// DomainSetMemoryParameters is the go wrapper for REMOTE_PROC_DOMAIN_SET_MEMORY_PARAMETERS. func (l *Libvirt) DomainSetMemoryParameters(Dom NonnullDomain, Params []TypedParam, Flags uint32) (err error) { var buf bytes.Buffer @@ -9879,6 +10719,7 @@ func (l *Libvirt) DomainSetMemoryParameters(Dom NonnullDomain, Params []TypedPar return } +// DomainGetMemoryParameters is the go wrapper for REMOTE_PROC_DOMAIN_GET_MEMORY_PARAMETERS. func (l *Libvirt) DomainGetMemoryParameters(Dom NonnullDomain, Nparams int32, Flags uint32) (rParams []TypedParam, rNparams int32, err error) { var buf bytes.Buffer @@ -9923,6 +10764,7 @@ func (l *Libvirt) DomainGetMemoryParameters(Dom NonnullDomain, Nparams int32, Fl return } +// DomainSetVcpusFlags is the go wrapper for REMOTE_PROC_DOMAIN_SET_VCPUS_FLAGS. func (l *Libvirt) DomainSetVcpusFlags(Dom NonnullDomain, Nvcpus uint32, Flags uint32) (err error) { var buf bytes.Buffer @@ -9952,6 +10794,7 @@ func (l *Libvirt) DomainSetVcpusFlags(Dom NonnullDomain, Nvcpus uint32, Flags ui return } +// DomainGetVcpusFlags is the go wrapper for REMOTE_PROC_DOMAIN_GET_VCPUS_FLAGS. func (l *Libvirt) DomainGetVcpusFlags(Dom NonnullDomain, Flags uint32) (rNum int32, err error) { var buf bytes.Buffer @@ -9989,6 +10832,7 @@ func (l *Libvirt) DomainGetVcpusFlags(Dom NonnullDomain, Flags uint32) (rNum int return } +// DomainOpenConsole is the go wrapper for REMOTE_PROC_DOMAIN_OPEN_CONSOLE. func (l *Libvirt) DomainOpenConsole(Dom NonnullDomain, DevName OptString, Flags uint32) (err error) { var buf bytes.Buffer @@ -10018,6 +10862,7 @@ func (l *Libvirt) DomainOpenConsole(Dom NonnullDomain, DevName OptString, Flags return } +// DomainIsUpdated is the go wrapper for REMOTE_PROC_DOMAIN_IS_UPDATED. func (l *Libvirt) DomainIsUpdated(Dom NonnullDomain) (rUpdated int32, err error) { var buf bytes.Buffer @@ -10054,6 +10899,7 @@ func (l *Libvirt) DomainIsUpdated(Dom NonnullDomain) (rUpdated int32, err error) return } +// ConnectGetSysinfo is the go wrapper for REMOTE_PROC_CONNECT_GET_SYSINFO. func (l *Libvirt) ConnectGetSysinfo(Flags uint32) (rSysinfo string, err error) { var buf bytes.Buffer @@ -10090,6 +10936,7 @@ func (l *Libvirt) ConnectGetSysinfo(Flags uint32) (rSysinfo string, err error) { return } +// DomainSetMemoryFlags is the go wrapper for REMOTE_PROC_DOMAIN_SET_MEMORY_FLAGS. func (l *Libvirt) DomainSetMemoryFlags(Dom NonnullDomain, Memory uint64, Flags uint32) (err error) { var buf bytes.Buffer @@ -10119,6 +10966,7 @@ func (l *Libvirt) DomainSetMemoryFlags(Dom NonnullDomain, Memory uint64, Flags u return } +// DomainSetBlkioParameters is the go wrapper for REMOTE_PROC_DOMAIN_SET_BLKIO_PARAMETERS. func (l *Libvirt) DomainSetBlkioParameters(Dom NonnullDomain, Params []TypedParam, Flags uint32) (err error) { var buf bytes.Buffer @@ -10148,6 +10996,7 @@ func (l *Libvirt) DomainSetBlkioParameters(Dom NonnullDomain, Params []TypedPara return } +// DomainGetBlkioParameters is the go wrapper for REMOTE_PROC_DOMAIN_GET_BLKIO_PARAMETERS. func (l *Libvirt) DomainGetBlkioParameters(Dom NonnullDomain, Nparams int32, Flags uint32) (rParams []TypedParam, rNparams int32, err error) { var buf bytes.Buffer @@ -10192,6 +11041,7 @@ func (l *Libvirt) DomainGetBlkioParameters(Dom NonnullDomain, Nparams int32, Fla return } +// DomainMigrateSetMaxSpeed is the go wrapper for REMOTE_PROC_DOMAIN_MIGRATE_SET_MAX_SPEED. func (l *Libvirt) DomainMigrateSetMaxSpeed(Dom NonnullDomain, Bandwidth uint64, Flags uint32) (err error) { var buf bytes.Buffer @@ -10221,6 +11071,7 @@ func (l *Libvirt) DomainMigrateSetMaxSpeed(Dom NonnullDomain, Bandwidth uint64, return } +// StorageVolUpload is the go wrapper for REMOTE_PROC_STORAGE_VOL_UPLOAD. func (l *Libvirt) StorageVolUpload(Vol NonnullStorageVol, Offset uint64, Length uint64, Flags uint32) (err error) { var buf bytes.Buffer @@ -10251,6 +11102,7 @@ func (l *Libvirt) StorageVolUpload(Vol NonnullStorageVol, Offset uint64, Length return } +// StorageVolDownload is the go wrapper for REMOTE_PROC_STORAGE_VOL_DOWNLOAD. func (l *Libvirt) StorageVolDownload(Vol NonnullStorageVol, Offset uint64, Length uint64, Flags uint32) (err error) { var buf bytes.Buffer @@ -10281,6 +11133,7 @@ func (l *Libvirt) StorageVolDownload(Vol NonnullStorageVol, Offset uint64, Lengt return } +// DomainInjectNmi is the go wrapper for REMOTE_PROC_DOMAIN_INJECT_NMI. func (l *Libvirt) DomainInjectNmi(Dom NonnullDomain, Flags uint32) (err error) { var buf bytes.Buffer @@ -10309,6 +11162,7 @@ func (l *Libvirt) DomainInjectNmi(Dom NonnullDomain, Flags uint32) (err error) { return } +// DomainScreenshot is the go wrapper for REMOTE_PROC_DOMAIN_SCREENSHOT. func (l *Libvirt) DomainScreenshot(Dom NonnullDomain, Screen uint32, Flags uint32) (rMime OptString, err error) { var buf bytes.Buffer @@ -10347,6 +11201,7 @@ func (l *Libvirt) DomainScreenshot(Dom NonnullDomain, Screen uint32, Flags uint3 return } +// DomainGetState is the go wrapper for REMOTE_PROC_DOMAIN_GET_STATE. func (l *Libvirt) DomainGetState(Dom NonnullDomain, Flags uint32) (rState int32, rReason int32, err error) { var buf bytes.Buffer @@ -10389,6 +11244,7 @@ func (l *Libvirt) DomainGetState(Dom NonnullDomain, Flags uint32) (rState int32, return } +// DomainMigrateBegin3 is the go wrapper for REMOTE_PROC_DOMAIN_MIGRATE_BEGIN3. func (l *Libvirt) DomainMigrateBegin3(Dom NonnullDomain, Xmlin OptString, Flags uint64, Dname OptString, Resource uint64) (rCookieOut []byte, rXML string, err error) { var buf bytes.Buffer @@ -10434,6 +11290,7 @@ func (l *Libvirt) DomainMigrateBegin3(Dom NonnullDomain, Xmlin OptString, Flags return } +// DomainMigratePrepare3 is the go wrapper for REMOTE_PROC_DOMAIN_MIGRATE_PREPARE3. func (l *Libvirt) DomainMigratePrepare3(CookieIn []byte, UriIn OptString, Flags uint64, Dname OptString, Resource uint64, DomXML string) (rCookieOut []byte, rUriOut OptString, err error) { var buf bytes.Buffer @@ -10480,6 +11337,7 @@ func (l *Libvirt) DomainMigratePrepare3(CookieIn []byte, UriIn OptString, Flags return } +// DomainMigratePrepareTunnel3 is the go wrapper for REMOTE_PROC_DOMAIN_MIGRATE_PREPARE_TUNNEL3. func (l *Libvirt) DomainMigratePrepareTunnel3(CookieIn []byte, Flags uint64, Dname OptString, Resource uint64, DomXML string) (rCookieOut []byte, err error) { var buf bytes.Buffer @@ -10520,6 +11378,7 @@ func (l *Libvirt) DomainMigratePrepareTunnel3(CookieIn []byte, Flags uint64, Dna return } +// DomainMigratePerform3 is the go wrapper for REMOTE_PROC_DOMAIN_MIGRATE_PERFORM3. func (l *Libvirt) DomainMigratePerform3(Dom NonnullDomain, Xmlin OptString, CookieIn []byte, Dconnuri OptString, Uri OptString, Flags uint64, Dname OptString, Resource uint64) (rCookieOut []byte, err error) { var buf bytes.Buffer @@ -10563,6 +11422,7 @@ func (l *Libvirt) DomainMigratePerform3(Dom NonnullDomain, Xmlin OptString, Cook return } +// DomainMigrateFinish3 is the go wrapper for REMOTE_PROC_DOMAIN_MIGRATE_FINISH3. func (l *Libvirt) DomainMigrateFinish3(Dname string, CookieIn []byte, Dconnuri OptString, Uri OptString, Flags uint64, Cancelled int32) (rDom NonnullDomain, rCookieOut []byte, err error) { var buf bytes.Buffer @@ -10609,6 +11469,7 @@ func (l *Libvirt) DomainMigrateFinish3(Dname string, CookieIn []byte, Dconnuri O return } +// DomainMigrateConfirm3 is the go wrapper for REMOTE_PROC_DOMAIN_MIGRATE_CONFIRM3. func (l *Libvirt) DomainMigrateConfirm3(Dom NonnullDomain, CookieIn []byte, Flags uint64, Cancelled int32) (err error) { var buf bytes.Buffer @@ -10639,6 +11500,7 @@ func (l *Libvirt) DomainMigrateConfirm3(Dom NonnullDomain, CookieIn []byte, Flag return } +// DomainSetSchedulerParametersFlags is the go wrapper for REMOTE_PROC_DOMAIN_SET_SCHEDULER_PARAMETERS_FLAGS. func (l *Libvirt) DomainSetSchedulerParametersFlags(Dom NonnullDomain, Params []TypedParam, Flags uint32) (err error) { var buf bytes.Buffer @@ -10668,6 +11530,7 @@ func (l *Libvirt) DomainSetSchedulerParametersFlags(Dom NonnullDomain, Params [] return } +// InterfaceChangeBegin is the go wrapper for REMOTE_PROC_INTERFACE_CHANGE_BEGIN. func (l *Libvirt) InterfaceChangeBegin(Flags uint32) (err error) { var buf bytes.Buffer @@ -10695,6 +11558,7 @@ func (l *Libvirt) InterfaceChangeBegin(Flags uint32) (err error) { return } +// InterfaceChangeCommit is the go wrapper for REMOTE_PROC_INTERFACE_CHANGE_COMMIT. func (l *Libvirt) InterfaceChangeCommit(Flags uint32) (err error) { var buf bytes.Buffer @@ -10722,6 +11586,7 @@ func (l *Libvirt) InterfaceChangeCommit(Flags uint32) (err error) { return } +// InterfaceChangeRollback is the go wrapper for REMOTE_PROC_INTERFACE_CHANGE_ROLLBACK. func (l *Libvirt) InterfaceChangeRollback(Flags uint32) (err error) { var buf bytes.Buffer @@ -10749,6 +11614,7 @@ func (l *Libvirt) InterfaceChangeRollback(Flags uint32) (err error) { return } +// DomainGetSchedulerParametersFlags is the go wrapper for REMOTE_PROC_DOMAIN_GET_SCHEDULER_PARAMETERS_FLAGS. func (l *Libvirt) DomainGetSchedulerParametersFlags(Dom NonnullDomain, Nparams int32, Flags uint32) (rParams []TypedParam, err error) { var buf bytes.Buffer @@ -10788,6 +11654,7 @@ func (l *Libvirt) DomainGetSchedulerParametersFlags(Dom NonnullDomain, Nparams i return } +// DomainEventControlError is the go wrapper for REMOTE_PROC_DOMAIN_EVENT_CONTROL_ERROR. func (l *Libvirt) DomainEventControlError() (err error) { var buf bytes.Buffer @@ -10806,6 +11673,7 @@ func (l *Libvirt) DomainEventControlError() (err error) { return } +// DomainPinVcpuFlags is the go wrapper for REMOTE_PROC_DOMAIN_PIN_VCPU_FLAGS. func (l *Libvirt) DomainPinVcpuFlags(Dom NonnullDomain, Vcpu uint32, Cpumap []byte, Flags uint32) (err error) { var buf bytes.Buffer @@ -10836,6 +11704,7 @@ func (l *Libvirt) DomainPinVcpuFlags(Dom NonnullDomain, Vcpu uint32, Cpumap []by return } +// DomainSendKey is the go wrapper for REMOTE_PROC_DOMAIN_SEND_KEY. func (l *Libvirt) DomainSendKey(Dom NonnullDomain, Codeset uint32, Holdtime uint32, Keycodes []uint32, Flags uint32) (err error) { var buf bytes.Buffer @@ -10867,6 +11736,7 @@ func (l *Libvirt) DomainSendKey(Dom NonnullDomain, Codeset uint32, Holdtime uint return } +// NodeGetCPUStats is the go wrapper for REMOTE_PROC_NODE_GET_CPU_STATS. func (l *Libvirt) NodeGetCPUStats(CPUNum int32, Nparams int32, Flags uint32) (rParams []NodeGetCPUStats, rNparams int32, err error) { var buf bytes.Buffer @@ -10910,6 +11780,7 @@ func (l *Libvirt) NodeGetCPUStats(CPUNum int32, Nparams int32, Flags uint32) (rP return } +// NodeGetMemoryStats is the go wrapper for REMOTE_PROC_NODE_GET_MEMORY_STATS. func (l *Libvirt) NodeGetMemoryStats(Nparams int32, CellNum int32, Flags uint32) (rParams []NodeGetMemoryStats, rNparams int32, err error) { var buf bytes.Buffer @@ -10953,6 +11824,7 @@ func (l *Libvirt) NodeGetMemoryStats(Nparams int32, CellNum int32, Flags uint32) return } +// DomainGetControlInfo is the go wrapper for REMOTE_PROC_DOMAIN_GET_CONTROL_INFO. func (l *Libvirt) DomainGetControlInfo(Dom NonnullDomain, Flags uint32) (rState uint32, rDetails uint32, rStateTime uint64, err error) { var buf bytes.Buffer @@ -11000,6 +11872,7 @@ func (l *Libvirt) DomainGetControlInfo(Dom NonnullDomain, Flags uint32) (rState return } +// DomainGetVcpuPinInfo is the go wrapper for REMOTE_PROC_DOMAIN_GET_VCPU_PIN_INFO. func (l *Libvirt) DomainGetVcpuPinInfo(Dom NonnullDomain, Ncpumaps int32, Maplen int32, Flags uint32) (rCpumaps []byte, rNum int32, err error) { var buf bytes.Buffer @@ -11044,6 +11917,7 @@ func (l *Libvirt) DomainGetVcpuPinInfo(Dom NonnullDomain, Ncpumaps int32, Maplen return } +// DomainUndefineFlags is the go wrapper for REMOTE_PROC_DOMAIN_UNDEFINE_FLAGS. func (l *Libvirt) DomainUndefineFlags(Dom NonnullDomain, Flags uint32) (err error) { var buf bytes.Buffer @@ -11072,6 +11946,7 @@ func (l *Libvirt) DomainUndefineFlags(Dom NonnullDomain, Flags uint32) (err erro return } +// DomainSaveFlags is the go wrapper for REMOTE_PROC_DOMAIN_SAVE_FLAGS. func (l *Libvirt) DomainSaveFlags(Dom NonnullDomain, To string, Dxml OptString, Flags uint32) (err error) { var buf bytes.Buffer @@ -11102,6 +11977,7 @@ func (l *Libvirt) DomainSaveFlags(Dom NonnullDomain, To string, Dxml OptString, return } +// DomainRestoreFlags is the go wrapper for REMOTE_PROC_DOMAIN_RESTORE_FLAGS. func (l *Libvirt) DomainRestoreFlags(From string, Dxml OptString, Flags uint32) (err error) { var buf bytes.Buffer @@ -11131,6 +12007,7 @@ func (l *Libvirt) DomainRestoreFlags(From string, Dxml OptString, Flags uint32) return } +// DomainDestroyFlags is the go wrapper for REMOTE_PROC_DOMAIN_DESTROY_FLAGS. func (l *Libvirt) DomainDestroyFlags(Dom NonnullDomain, Flags uint32) (err error) { var buf bytes.Buffer @@ -11159,6 +12036,7 @@ func (l *Libvirt) DomainDestroyFlags(Dom NonnullDomain, Flags uint32) (err error return } +// DomainSaveImageGetXMLDesc is the go wrapper for REMOTE_PROC_DOMAIN_SAVE_IMAGE_GET_XML_DESC. func (l *Libvirt) DomainSaveImageGetXMLDesc(File string, Flags uint32) (rXML string, err error) { var buf bytes.Buffer @@ -11196,6 +12074,7 @@ func (l *Libvirt) DomainSaveImageGetXMLDesc(File string, Flags uint32) (rXML str return } +// DomainSaveImageDefineXML is the go wrapper for REMOTE_PROC_DOMAIN_SAVE_IMAGE_DEFINE_XML. func (l *Libvirt) DomainSaveImageDefineXML(File string, Dxml string, Flags uint32) (err error) { var buf bytes.Buffer @@ -11225,6 +12104,7 @@ func (l *Libvirt) DomainSaveImageDefineXML(File string, Dxml string, Flags uint3 return } +// DomainBlockJobAbort is the go wrapper for REMOTE_PROC_DOMAIN_BLOCK_JOB_ABORT. func (l *Libvirt) DomainBlockJobAbort(Dom NonnullDomain, Path string, Flags uint32) (err error) { var buf bytes.Buffer @@ -11254,6 +12134,7 @@ func (l *Libvirt) DomainBlockJobAbort(Dom NonnullDomain, Path string, Flags uint return } +// DomainGetBlockJobInfo is the go wrapper for REMOTE_PROC_DOMAIN_GET_BLOCK_JOB_INFO. func (l *Libvirt) DomainGetBlockJobInfo(Dom NonnullDomain, Path string, Flags uint32) (rFound int32, rType int32, rBandwidth uint64, rCur uint64, rEnd uint64, err error) { var buf bytes.Buffer @@ -11312,6 +12193,7 @@ func (l *Libvirt) DomainGetBlockJobInfo(Dom NonnullDomain, Path string, Flags ui return } +// DomainBlockJobSetSpeed is the go wrapper for REMOTE_PROC_DOMAIN_BLOCK_JOB_SET_SPEED. func (l *Libvirt) DomainBlockJobSetSpeed(Dom NonnullDomain, Path string, Bandwidth uint64, Flags uint32) (err error) { var buf bytes.Buffer @@ -11342,6 +12224,7 @@ func (l *Libvirt) DomainBlockJobSetSpeed(Dom NonnullDomain, Path string, Bandwid return } +// DomainBlockPull is the go wrapper for REMOTE_PROC_DOMAIN_BLOCK_PULL. func (l *Libvirt) DomainBlockPull(Dom NonnullDomain, Path string, Bandwidth uint64, Flags uint32) (err error) { var buf bytes.Buffer @@ -11372,6 +12255,7 @@ func (l *Libvirt) DomainBlockPull(Dom NonnullDomain, Path string, Bandwidth uint return } +// DomainEventBlockJob is the go wrapper for REMOTE_PROC_DOMAIN_EVENT_BLOCK_JOB. func (l *Libvirt) DomainEventBlockJob() (err error) { var buf bytes.Buffer @@ -11390,6 +12274,7 @@ func (l *Libvirt) DomainEventBlockJob() (err error) { return } +// DomainMigrateGetMaxSpeed is the go wrapper for REMOTE_PROC_DOMAIN_MIGRATE_GET_MAX_SPEED. func (l *Libvirt) DomainMigrateGetMaxSpeed(Dom NonnullDomain, Flags uint32) (rBandwidth uint64, err error) { var buf bytes.Buffer @@ -11427,6 +12312,7 @@ func (l *Libvirt) DomainMigrateGetMaxSpeed(Dom NonnullDomain, Flags uint32) (rBa return } +// DomainBlockStatsFlags is the go wrapper for REMOTE_PROC_DOMAIN_BLOCK_STATS_FLAGS. func (l *Libvirt) DomainBlockStatsFlags(Dom NonnullDomain, Path string, Nparams int32, Flags uint32) (rParams []TypedParam, rNparams int32, err error) { var buf bytes.Buffer @@ -11472,6 +12358,7 @@ func (l *Libvirt) DomainBlockStatsFlags(Dom NonnullDomain, Path string, Nparams return } +// DomainSnapshotGetParent is the go wrapper for REMOTE_PROC_DOMAIN_SNAPSHOT_GET_PARENT. func (l *Libvirt) DomainSnapshotGetParent(Snap NonnullDomainSnapshot, Flags uint32) (rSnap NonnullDomainSnapshot, err error) { var buf bytes.Buffer @@ -11509,6 +12396,7 @@ func (l *Libvirt) DomainSnapshotGetParent(Snap NonnullDomainSnapshot, Flags uint return } +// DomainReset is the go wrapper for REMOTE_PROC_DOMAIN_RESET. func (l *Libvirt) DomainReset(Dom NonnullDomain, Flags uint32) (err error) { var buf bytes.Buffer @@ -11537,6 +12425,7 @@ func (l *Libvirt) DomainReset(Dom NonnullDomain, Flags uint32) (err error) { return } +// DomainSnapshotNumChildren is the go wrapper for REMOTE_PROC_DOMAIN_SNAPSHOT_NUM_CHILDREN. func (l *Libvirt) DomainSnapshotNumChildren(Snap NonnullDomainSnapshot, Flags uint32) (rNum int32, err error) { var buf bytes.Buffer @@ -11574,6 +12463,7 @@ func (l *Libvirt) DomainSnapshotNumChildren(Snap NonnullDomainSnapshot, Flags ui return } +// DomainSnapshotListChildrenNames is the go wrapper for REMOTE_PROC_DOMAIN_SNAPSHOT_LIST_CHILDREN_NAMES. func (l *Libvirt) DomainSnapshotListChildrenNames(Snap NonnullDomainSnapshot, Maxnames int32, Flags uint32) (rNames []string, err error) { var buf bytes.Buffer @@ -11612,6 +12502,7 @@ func (l *Libvirt) DomainSnapshotListChildrenNames(Snap NonnullDomainSnapshot, Ma return } +// DomainEventDiskChange is the go wrapper for REMOTE_PROC_DOMAIN_EVENT_DISK_CHANGE. func (l *Libvirt) DomainEventDiskChange() (err error) { var buf bytes.Buffer @@ -11630,6 +12521,7 @@ func (l *Libvirt) DomainEventDiskChange() (err error) { return } +// DomainOpenGraphics is the go wrapper for REMOTE_PROC_DOMAIN_OPEN_GRAPHICS. func (l *Libvirt) DomainOpenGraphics(Dom NonnullDomain, Idx uint32, Flags uint32) (err error) { var buf bytes.Buffer @@ -11659,6 +12551,7 @@ func (l *Libvirt) DomainOpenGraphics(Dom NonnullDomain, Idx uint32, Flags uint32 return } +// NodeSuspendForDuration is the go wrapper for REMOTE_PROC_NODE_SUSPEND_FOR_DURATION. func (l *Libvirt) NodeSuspendForDuration(Target uint32, Duration uint64, Flags uint32) (err error) { var buf bytes.Buffer @@ -11688,6 +12581,7 @@ func (l *Libvirt) NodeSuspendForDuration(Target uint32, Duration uint64, Flags u return } +// DomainBlockResize is the go wrapper for REMOTE_PROC_DOMAIN_BLOCK_RESIZE. func (l *Libvirt) DomainBlockResize(Dom NonnullDomain, Disk string, Size uint64, Flags uint32) (err error) { var buf bytes.Buffer @@ -11718,6 +12612,7 @@ func (l *Libvirt) DomainBlockResize(Dom NonnullDomain, Disk string, Size uint64, return } +// DomainSetBlockIOTune is the go wrapper for REMOTE_PROC_DOMAIN_SET_BLOCK_IO_TUNE. func (l *Libvirt) DomainSetBlockIOTune(Dom NonnullDomain, Disk string, Params []TypedParam, Flags uint32) (err error) { var buf bytes.Buffer @@ -11748,6 +12643,7 @@ func (l *Libvirt) DomainSetBlockIOTune(Dom NonnullDomain, Disk string, Params [] return } +// DomainGetBlockIOTune is the go wrapper for REMOTE_PROC_DOMAIN_GET_BLOCK_IO_TUNE. func (l *Libvirt) DomainGetBlockIOTune(Dom NonnullDomain, Disk OptString, Nparams int32, Flags uint32) (rParams []TypedParam, rNparams int32, err error) { var buf bytes.Buffer @@ -11793,6 +12689,7 @@ func (l *Libvirt) DomainGetBlockIOTune(Dom NonnullDomain, Disk OptString, Nparam return } +// DomainSetNumaParameters is the go wrapper for REMOTE_PROC_DOMAIN_SET_NUMA_PARAMETERS. func (l *Libvirt) DomainSetNumaParameters(Dom NonnullDomain, Params []TypedParam, Flags uint32) (err error) { var buf bytes.Buffer @@ -11822,6 +12719,7 @@ func (l *Libvirt) DomainSetNumaParameters(Dom NonnullDomain, Params []TypedParam return } +// DomainGetNumaParameters is the go wrapper for REMOTE_PROC_DOMAIN_GET_NUMA_PARAMETERS. func (l *Libvirt) DomainGetNumaParameters(Dom NonnullDomain, Nparams int32, Flags uint32) (rParams []TypedParam, rNparams int32, err error) { var buf bytes.Buffer @@ -11866,6 +12764,7 @@ func (l *Libvirt) DomainGetNumaParameters(Dom NonnullDomain, Nparams int32, Flag return } +// DomainSetInterfaceParameters is the go wrapper for REMOTE_PROC_DOMAIN_SET_INTERFACE_PARAMETERS. func (l *Libvirt) DomainSetInterfaceParameters(Dom NonnullDomain, Device string, Params []TypedParam, Flags uint32) (err error) { var buf bytes.Buffer @@ -11896,6 +12795,7 @@ func (l *Libvirt) DomainSetInterfaceParameters(Dom NonnullDomain, Device string, return } +// DomainGetInterfaceParameters is the go wrapper for REMOTE_PROC_DOMAIN_GET_INTERFACE_PARAMETERS. func (l *Libvirt) DomainGetInterfaceParameters(Dom NonnullDomain, Device string, Nparams int32, Flags uint32) (rParams []TypedParam, rNparams int32, err error) { var buf bytes.Buffer @@ -11941,6 +12841,7 @@ func (l *Libvirt) DomainGetInterfaceParameters(Dom NonnullDomain, Device string, return } +// DomainShutdownFlags is the go wrapper for REMOTE_PROC_DOMAIN_SHUTDOWN_FLAGS. func (l *Libvirt) DomainShutdownFlags(Dom NonnullDomain, Flags uint32) (err error) { var buf bytes.Buffer @@ -11969,6 +12870,7 @@ func (l *Libvirt) DomainShutdownFlags(Dom NonnullDomain, Flags uint32) (err erro return } +// StorageVolWipePattern is the go wrapper for REMOTE_PROC_STORAGE_VOL_WIPE_PATTERN. func (l *Libvirt) StorageVolWipePattern(Vol NonnullStorageVol, Algorithm uint32, Flags uint32) (err error) { var buf bytes.Buffer @@ -11998,6 +12900,7 @@ func (l *Libvirt) StorageVolWipePattern(Vol NonnullStorageVol, Algorithm uint32, return } +// StorageVolResize is the go wrapper for REMOTE_PROC_STORAGE_VOL_RESIZE. func (l *Libvirt) StorageVolResize(Vol NonnullStorageVol, Capacity uint64, Flags uint32) (err error) { var buf bytes.Buffer @@ -12027,6 +12930,7 @@ func (l *Libvirt) StorageVolResize(Vol NonnullStorageVol, Capacity uint64, Flags return } +// DomainPmSuspendForDuration is the go wrapper for REMOTE_PROC_DOMAIN_PM_SUSPEND_FOR_DURATION. func (l *Libvirt) DomainPmSuspendForDuration(Dom NonnullDomain, Target uint32, Duration uint64, Flags uint32) (err error) { var buf bytes.Buffer @@ -12057,6 +12961,7 @@ func (l *Libvirt) DomainPmSuspendForDuration(Dom NonnullDomain, Target uint32, D return } +// DomainGetCPUStats is the go wrapper for REMOTE_PROC_DOMAIN_GET_CPU_STATS. func (l *Libvirt) DomainGetCPUStats(Dom NonnullDomain, Nparams uint32, StartCPU int32, Ncpus uint32, Flags uint32) (rParams []TypedParam, rNparams int32, err error) { var buf bytes.Buffer @@ -12103,6 +13008,7 @@ func (l *Libvirt) DomainGetCPUStats(Dom NonnullDomain, Nparams uint32, StartCPU return } +// DomainGetDiskErrors is the go wrapper for REMOTE_PROC_DOMAIN_GET_DISK_ERRORS. func (l *Libvirt) DomainGetDiskErrors(Dom NonnullDomain, Maxerrors uint32, Flags uint32) (rErrors []DomainDiskError, rNerrors int32, err error) { var buf bytes.Buffer @@ -12146,6 +13052,7 @@ func (l *Libvirt) DomainGetDiskErrors(Dom NonnullDomain, Maxerrors uint32, Flags return } +// DomainSetMetadata is the go wrapper for REMOTE_PROC_DOMAIN_SET_METADATA. func (l *Libvirt) DomainSetMetadata(Dom NonnullDomain, Type int32, Metadata OptString, Key OptString, Uri OptString, Flags uint32) (err error) { var buf bytes.Buffer @@ -12178,6 +13085,7 @@ func (l *Libvirt) DomainSetMetadata(Dom NonnullDomain, Type int32, Metadata OptS return } +// DomainGetMetadata is the go wrapper for REMOTE_PROC_DOMAIN_GET_METADATA. func (l *Libvirt) DomainGetMetadata(Dom NonnullDomain, Type int32, Uri OptString, Flags uint32) (rMetadata string, err error) { var buf bytes.Buffer @@ -12217,6 +13125,7 @@ func (l *Libvirt) DomainGetMetadata(Dom NonnullDomain, Type int32, Uri OptString return } +// DomainBlockRebase is the go wrapper for REMOTE_PROC_DOMAIN_BLOCK_REBASE. func (l *Libvirt) DomainBlockRebase(Dom NonnullDomain, Path string, Base OptString, Bandwidth uint64, Flags uint32) (err error) { var buf bytes.Buffer @@ -12248,6 +13157,7 @@ func (l *Libvirt) DomainBlockRebase(Dom NonnullDomain, Path string, Base OptStri return } +// DomainPmWakeup is the go wrapper for REMOTE_PROC_DOMAIN_PM_WAKEUP. func (l *Libvirt) DomainPmWakeup(Dom NonnullDomain, Flags uint32) (err error) { var buf bytes.Buffer @@ -12276,6 +13186,7 @@ func (l *Libvirt) DomainPmWakeup(Dom NonnullDomain, Flags uint32) (err error) { return } +// DomainEventTrayChange is the go wrapper for REMOTE_PROC_DOMAIN_EVENT_TRAY_CHANGE. func (l *Libvirt) DomainEventTrayChange() (err error) { var buf bytes.Buffer @@ -12294,6 +13205,7 @@ func (l *Libvirt) DomainEventTrayChange() (err error) { return } +// DomainEventPmwakeup is the go wrapper for REMOTE_PROC_DOMAIN_EVENT_PMWAKEUP. func (l *Libvirt) DomainEventPmwakeup() (err error) { var buf bytes.Buffer @@ -12312,6 +13224,7 @@ func (l *Libvirt) DomainEventPmwakeup() (err error) { return } +// DomainEventPmsuspend is the go wrapper for REMOTE_PROC_DOMAIN_EVENT_PMSUSPEND. func (l *Libvirt) DomainEventPmsuspend() (err error) { var buf bytes.Buffer @@ -12330,6 +13243,7 @@ func (l *Libvirt) DomainEventPmsuspend() (err error) { return } +// DomainSnapshotIsCurrent is the go wrapper for REMOTE_PROC_DOMAIN_SNAPSHOT_IS_CURRENT. func (l *Libvirt) DomainSnapshotIsCurrent(Snap NonnullDomainSnapshot, Flags uint32) (rCurrent int32, err error) { var buf bytes.Buffer @@ -12367,6 +13281,7 @@ func (l *Libvirt) DomainSnapshotIsCurrent(Snap NonnullDomainSnapshot, Flags uint return } +// DomainSnapshotHasMetadata is the go wrapper for REMOTE_PROC_DOMAIN_SNAPSHOT_HAS_METADATA. func (l *Libvirt) DomainSnapshotHasMetadata(Snap NonnullDomainSnapshot, Flags uint32) (rMetadata int32, err error) { var buf bytes.Buffer @@ -12404,6 +13319,7 @@ func (l *Libvirt) DomainSnapshotHasMetadata(Snap NonnullDomainSnapshot, Flags ui return } +// ConnectListAllDomains is the go wrapper for REMOTE_PROC_CONNECT_LIST_ALL_DOMAINS. func (l *Libvirt) ConnectListAllDomains(NeedResults int32, Flags uint32) (rDomains []NonnullDomain, rRet uint32, err error) { var buf bytes.Buffer @@ -12446,6 +13362,7 @@ func (l *Libvirt) ConnectListAllDomains(NeedResults int32, Flags uint32) (rDomai return } +// DomainListAllSnapshots is the go wrapper for REMOTE_PROC_DOMAIN_LIST_ALL_SNAPSHOTS. func (l *Libvirt) DomainListAllSnapshots(Dom NonnullDomain, NeedResults int32, Flags uint32) (rSnapshots []NonnullDomainSnapshot, rRet int32, err error) { var buf bytes.Buffer @@ -12489,6 +13406,7 @@ func (l *Libvirt) DomainListAllSnapshots(Dom NonnullDomain, NeedResults int32, F return } +// DomainSnapshotListAllChildren is the go wrapper for REMOTE_PROC_DOMAIN_SNAPSHOT_LIST_ALL_CHILDREN. func (l *Libvirt) DomainSnapshotListAllChildren(Snapshot NonnullDomainSnapshot, NeedResults int32, Flags uint32) (rSnapshots []NonnullDomainSnapshot, rRet int32, err error) { var buf bytes.Buffer @@ -12532,6 +13450,7 @@ func (l *Libvirt) DomainSnapshotListAllChildren(Snapshot NonnullDomainSnapshot, return } +// DomainEventBalloonChange is the go wrapper for REMOTE_PROC_DOMAIN_EVENT_BALLOON_CHANGE. func (l *Libvirt) DomainEventBalloonChange() (err error) { var buf bytes.Buffer @@ -12550,6 +13469,7 @@ func (l *Libvirt) DomainEventBalloonChange() (err error) { return } +// DomainGetHostname is the go wrapper for REMOTE_PROC_DOMAIN_GET_HOSTNAME. func (l *Libvirt) DomainGetHostname(Dom NonnullDomain, Flags uint32) (rHostname string, err error) { var buf bytes.Buffer @@ -12587,6 +13507,7 @@ func (l *Libvirt) DomainGetHostname(Dom NonnullDomain, Flags uint32) (rHostname return } +// DomainGetSecurityLabelList is the go wrapper for REMOTE_PROC_DOMAIN_GET_SECURITY_LABEL_LIST. func (l *Libvirt) DomainGetSecurityLabelList(Dom NonnullDomain) (rLabels []DomainGetSecurityLabelRet, rRet int32, err error) { var buf bytes.Buffer @@ -12628,6 +13549,7 @@ func (l *Libvirt) DomainGetSecurityLabelList(Dom NonnullDomain) (rLabels []Domai return } +// DomainPinEmulator is the go wrapper for REMOTE_PROC_DOMAIN_PIN_EMULATOR. func (l *Libvirt) DomainPinEmulator(Dom NonnullDomain, Cpumap []byte, Flags uint32) (err error) { var buf bytes.Buffer @@ -12657,6 +13579,7 @@ func (l *Libvirt) DomainPinEmulator(Dom NonnullDomain, Cpumap []byte, Flags uint return } +// DomainGetEmulatorPinInfo is the go wrapper for REMOTE_PROC_DOMAIN_GET_EMULATOR_PIN_INFO. func (l *Libvirt) DomainGetEmulatorPinInfo(Dom NonnullDomain, Maplen int32, Flags uint32) (rCpumaps []byte, rRet int32, err error) { var buf bytes.Buffer @@ -12700,6 +13623,7 @@ func (l *Libvirt) DomainGetEmulatorPinInfo(Dom NonnullDomain, Maplen int32, Flag return } +// ConnectListAllStoragePools is the go wrapper for REMOTE_PROC_CONNECT_LIST_ALL_STORAGE_POOLS. func (l *Libvirt) ConnectListAllStoragePools(NeedResults int32, Flags uint32) (rPools []NonnullStoragePool, rRet uint32, err error) { var buf bytes.Buffer @@ -12742,6 +13666,7 @@ func (l *Libvirt) ConnectListAllStoragePools(NeedResults int32, Flags uint32) (r return } +// StoragePoolListAllVolumes is the go wrapper for REMOTE_PROC_STORAGE_POOL_LIST_ALL_VOLUMES. func (l *Libvirt) StoragePoolListAllVolumes(Pool NonnullStoragePool, NeedResults int32, Flags uint32) (rVols []NonnullStorageVol, rRet uint32, err error) { var buf bytes.Buffer @@ -12785,6 +13710,7 @@ func (l *Libvirt) StoragePoolListAllVolumes(Pool NonnullStoragePool, NeedResults return } +// ConnectListAllNetworks is the go wrapper for REMOTE_PROC_CONNECT_LIST_ALL_NETWORKS. func (l *Libvirt) ConnectListAllNetworks(NeedResults int32, Flags uint32) (rNets []NonnullNetwork, rRet uint32, err error) { var buf bytes.Buffer @@ -12827,6 +13753,7 @@ func (l *Libvirt) ConnectListAllNetworks(NeedResults int32, Flags uint32) (rNets return } +// ConnectListAllInterfaces is the go wrapper for REMOTE_PROC_CONNECT_LIST_ALL_INTERFACES. func (l *Libvirt) ConnectListAllInterfaces(NeedResults int32, Flags uint32) (rIfaces []NonnullInterface, rRet uint32, err error) { var buf bytes.Buffer @@ -12869,6 +13796,7 @@ func (l *Libvirt) ConnectListAllInterfaces(NeedResults int32, Flags uint32) (rIf return } +// ConnectListAllNodeDevices is the go wrapper for REMOTE_PROC_CONNECT_LIST_ALL_NODE_DEVICES. func (l *Libvirt) ConnectListAllNodeDevices(NeedResults int32, Flags uint32) (rDevices []NonnullNodeDevice, rRet uint32, err error) { var buf bytes.Buffer @@ -12911,6 +13839,7 @@ func (l *Libvirt) ConnectListAllNodeDevices(NeedResults int32, Flags uint32) (rD return } +// ConnectListAllNwfilters is the go wrapper for REMOTE_PROC_CONNECT_LIST_ALL_NWFILTERS. func (l *Libvirt) ConnectListAllNwfilters(NeedResults int32, Flags uint32) (rFilters []NonnullNwfilter, rRet uint32, err error) { var buf bytes.Buffer @@ -12953,6 +13882,7 @@ func (l *Libvirt) ConnectListAllNwfilters(NeedResults int32, Flags uint32) (rFil return } +// ConnectListAllSecrets is the go wrapper for REMOTE_PROC_CONNECT_LIST_ALL_SECRETS. func (l *Libvirt) ConnectListAllSecrets(NeedResults int32, Flags uint32) (rSecrets []NonnullSecret, rRet uint32, err error) { var buf bytes.Buffer @@ -12995,6 +13925,7 @@ func (l *Libvirt) ConnectListAllSecrets(NeedResults int32, Flags uint32) (rSecre return } +// NodeSetMemoryParameters is the go wrapper for REMOTE_PROC_NODE_SET_MEMORY_PARAMETERS. func (l *Libvirt) NodeSetMemoryParameters(Params []TypedParam, Flags uint32) (err error) { var buf bytes.Buffer @@ -13023,6 +13954,7 @@ func (l *Libvirt) NodeSetMemoryParameters(Params []TypedParam, Flags uint32) (er return } +// NodeGetMemoryParameters is the go wrapper for REMOTE_PROC_NODE_GET_MEMORY_PARAMETERS. func (l *Libvirt) NodeGetMemoryParameters(Nparams int32, Flags uint32) (rParams []TypedParam, rNparams int32, err error) { var buf bytes.Buffer @@ -13066,6 +13998,7 @@ func (l *Libvirt) NodeGetMemoryParameters(Nparams int32, Flags uint32) (rParams return } +// DomainBlockCommit is the go wrapper for REMOTE_PROC_DOMAIN_BLOCK_COMMIT. func (l *Libvirt) DomainBlockCommit(Dom NonnullDomain, Disk string, Base OptString, Top OptString, Bandwidth uint64, Flags uint32) (err error) { var buf bytes.Buffer @@ -13098,6 +14031,7 @@ func (l *Libvirt) DomainBlockCommit(Dom NonnullDomain, Disk string, Base OptStri return } +// NetworkUpdate is the go wrapper for REMOTE_PROC_NETWORK_UPDATE. func (l *Libvirt) NetworkUpdate(Net NonnullNetwork, Command uint32, Section uint32, ParentIndex int32, XML string, Flags uint32) (err error) { var buf bytes.Buffer @@ -13130,6 +14064,7 @@ func (l *Libvirt) NetworkUpdate(Net NonnullNetwork, Command uint32, Section uint return } +// DomainEventPmsuspendDisk is the go wrapper for REMOTE_PROC_DOMAIN_EVENT_PMSUSPEND_DISK. func (l *Libvirt) DomainEventPmsuspendDisk() (err error) { var buf bytes.Buffer @@ -13148,6 +14083,7 @@ func (l *Libvirt) DomainEventPmsuspendDisk() (err error) { return } +// NodeGetCPUMap is the go wrapper for REMOTE_PROC_NODE_GET_CPU_MAP. func (l *Libvirt) NodeGetCPUMap(NeedMap int32, NeedOnline int32, Flags uint32) (rCpumap []byte, rOnline uint32, rRet int32, err error) { var buf bytes.Buffer @@ -13196,6 +14132,7 @@ func (l *Libvirt) NodeGetCPUMap(NeedMap int32, NeedOnline int32, Flags uint32) ( return } +// DomainFstrim is the go wrapper for REMOTE_PROC_DOMAIN_FSTRIM. func (l *Libvirt) DomainFstrim(Dom NonnullDomain, MountPoint OptString, Minimum uint64, Flags uint32) (err error) { var buf bytes.Buffer @@ -13226,6 +14163,7 @@ func (l *Libvirt) DomainFstrim(Dom NonnullDomain, MountPoint OptString, Minimum return } +// DomainSendProcessSignal is the go wrapper for REMOTE_PROC_DOMAIN_SEND_PROCESS_SIGNAL. func (l *Libvirt) DomainSendProcessSignal(Dom NonnullDomain, PidValue int64, Signum uint32, Flags uint32) (err error) { var buf bytes.Buffer @@ -13256,6 +14194,7 @@ func (l *Libvirt) DomainSendProcessSignal(Dom NonnullDomain, PidValue int64, Sig return } +// DomainOpenChannel is the go wrapper for REMOTE_PROC_DOMAIN_OPEN_CHANNEL. func (l *Libvirt) DomainOpenChannel(Dom NonnullDomain, Name OptString, Flags uint32) (err error) { var buf bytes.Buffer @@ -13285,6 +14224,7 @@ func (l *Libvirt) DomainOpenChannel(Dom NonnullDomain, Name OptString, Flags uin return } +// NodeDeviceLookupScsiHostByWwn is the go wrapper for REMOTE_PROC_NODE_DEVICE_LOOKUP_SCSI_HOST_BY_WWN. func (l *Libvirt) NodeDeviceLookupScsiHostByWwn(Wwnn string, Wwpn string, Flags uint32) (rDev NonnullNodeDevice, err error) { var buf bytes.Buffer @@ -13323,6 +14263,7 @@ func (l *Libvirt) NodeDeviceLookupScsiHostByWwn(Wwnn string, Wwpn string, Flags return } +// DomainGetJobStats is the go wrapper for REMOTE_PROC_DOMAIN_GET_JOB_STATS. func (l *Libvirt) DomainGetJobStats(Dom NonnullDomain, Flags uint32) (rType int32, rParams []TypedParam, err error) { var buf bytes.Buffer @@ -13366,6 +14307,7 @@ func (l *Libvirt) DomainGetJobStats(Dom NonnullDomain, Flags uint32) (rType int3 return } +// DomainMigrateGetCompressionCache is the go wrapper for REMOTE_PROC_DOMAIN_MIGRATE_GET_COMPRESSION_CACHE. func (l *Libvirt) DomainMigrateGetCompressionCache(Dom NonnullDomain, Flags uint32) (rCacheSize uint64, err error) { var buf bytes.Buffer @@ -13403,6 +14345,7 @@ func (l *Libvirt) DomainMigrateGetCompressionCache(Dom NonnullDomain, Flags uint return } +// DomainMigrateSetCompressionCache is the go wrapper for REMOTE_PROC_DOMAIN_MIGRATE_SET_COMPRESSION_CACHE. func (l *Libvirt) DomainMigrateSetCompressionCache(Dom NonnullDomain, CacheSize uint64, Flags uint32) (err error) { var buf bytes.Buffer @@ -13432,6 +14375,7 @@ func (l *Libvirt) DomainMigrateSetCompressionCache(Dom NonnullDomain, CacheSize return } +// NodeDeviceDetachFlags is the go wrapper for REMOTE_PROC_NODE_DEVICE_DETACH_FLAGS. func (l *Libvirt) NodeDeviceDetachFlags(Name string, DriverName OptString, Flags uint32) (err error) { var buf bytes.Buffer @@ -13461,6 +14405,7 @@ func (l *Libvirt) NodeDeviceDetachFlags(Name string, DriverName OptString, Flags return } +// DomainMigrateBegin3Params is the go wrapper for REMOTE_PROC_DOMAIN_MIGRATE_BEGIN3_PARAMS. func (l *Libvirt) DomainMigrateBegin3Params(Dom NonnullDomain, Params []TypedParam, Flags uint32) (rCookieOut []byte, rXML string, err error) { var buf bytes.Buffer @@ -13504,6 +14449,7 @@ func (l *Libvirt) DomainMigrateBegin3Params(Dom NonnullDomain, Params []TypedPar return } +// DomainMigratePrepare3Params is the go wrapper for REMOTE_PROC_DOMAIN_MIGRATE_PREPARE3_PARAMS. func (l *Libvirt) DomainMigratePrepare3Params(Params []TypedParam, CookieIn []byte, Flags uint32) (rCookieOut []byte, rUriOut OptString, err error) { var buf bytes.Buffer @@ -13547,6 +14493,7 @@ func (l *Libvirt) DomainMigratePrepare3Params(Params []TypedParam, CookieIn []by return } +// DomainMigratePrepareTunnel3Params is the go wrapper for REMOTE_PROC_DOMAIN_MIGRATE_PREPARE_TUNNEL3_PARAMS. func (l *Libvirt) DomainMigratePrepareTunnel3Params(Params []TypedParam, CookieIn []byte, Flags uint32) (rCookieOut []byte, err error) { var buf bytes.Buffer @@ -13585,6 +14532,7 @@ func (l *Libvirt) DomainMigratePrepareTunnel3Params(Params []TypedParam, CookieI return } +// DomainMigratePerform3Params is the go wrapper for REMOTE_PROC_DOMAIN_MIGRATE_PERFORM3_PARAMS. func (l *Libvirt) DomainMigratePerform3Params(Dom NonnullDomain, Dconnuri OptString, Params []TypedParam, CookieIn []byte, Flags uint32) (rCookieOut []byte, err error) { var buf bytes.Buffer @@ -13625,6 +14573,7 @@ func (l *Libvirt) DomainMigratePerform3Params(Dom NonnullDomain, Dconnuri OptStr return } +// DomainMigrateFinish3Params is the go wrapper for REMOTE_PROC_DOMAIN_MIGRATE_FINISH3_PARAMS. func (l *Libvirt) DomainMigrateFinish3Params(Params []TypedParam, CookieIn []byte, Flags uint32, Cancelled int32) (rDom NonnullDomain, rCookieOut []byte, err error) { var buf bytes.Buffer @@ -13669,6 +14618,7 @@ func (l *Libvirt) DomainMigrateFinish3Params(Params []TypedParam, CookieIn []byt return } +// DomainMigrateConfirm3Params is the go wrapper for REMOTE_PROC_DOMAIN_MIGRATE_CONFIRM3_PARAMS. func (l *Libvirt) DomainMigrateConfirm3Params(Dom NonnullDomain, Params []TypedParam, CookieIn []byte, Flags uint32, Cancelled int32) (err error) { var buf bytes.Buffer @@ -13700,6 +14650,7 @@ func (l *Libvirt) DomainMigrateConfirm3Params(Dom NonnullDomain, Params []TypedP return } +// DomainSetMemoryStatsPeriod is the go wrapper for REMOTE_PROC_DOMAIN_SET_MEMORY_STATS_PERIOD. func (l *Libvirt) DomainSetMemoryStatsPeriod(Dom NonnullDomain, Period int32, Flags uint32) (err error) { var buf bytes.Buffer @@ -13729,6 +14680,7 @@ func (l *Libvirt) DomainSetMemoryStatsPeriod(Dom NonnullDomain, Period int32, Fl return } +// DomainCreateXMLWithFiles is the go wrapper for REMOTE_PROC_DOMAIN_CREATE_XML_WITH_FILES. func (l *Libvirt) DomainCreateXMLWithFiles(XMLDesc string, Flags uint32) (rDom NonnullDomain, err error) { var buf bytes.Buffer @@ -13766,6 +14718,7 @@ func (l *Libvirt) DomainCreateXMLWithFiles(XMLDesc string, Flags uint32) (rDom N return } +// DomainCreateWithFiles is the go wrapper for REMOTE_PROC_DOMAIN_CREATE_WITH_FILES. func (l *Libvirt) DomainCreateWithFiles(Dom NonnullDomain, Flags uint32) (rDom NonnullDomain, err error) { var buf bytes.Buffer @@ -13803,6 +14756,7 @@ func (l *Libvirt) DomainCreateWithFiles(Dom NonnullDomain, Flags uint32) (rDom N return } +// DomainEventDeviceRemoved is the go wrapper for REMOTE_PROC_DOMAIN_EVENT_DEVICE_REMOVED. func (l *Libvirt) DomainEventDeviceRemoved() (err error) { var buf bytes.Buffer @@ -13821,6 +14775,7 @@ func (l *Libvirt) DomainEventDeviceRemoved() (err error) { return } +// ConnectGetCPUModelNames is the go wrapper for REMOTE_PROC_CONNECT_GET_CPU_MODEL_NAMES. func (l *Libvirt) ConnectGetCPUModelNames(Arch string, NeedResults int32, Flags uint32) (rModels []string, rRet int32, err error) { var buf bytes.Buffer @@ -13864,6 +14819,7 @@ func (l *Libvirt) ConnectGetCPUModelNames(Arch string, NeedResults int32, Flags return } +// ConnectNetworkEventRegisterAny is the go wrapper for REMOTE_PROC_CONNECT_NETWORK_EVENT_REGISTER_ANY. func (l *Libvirt) ConnectNetworkEventRegisterAny(EventID int32, Net Network) (rCallbackID int32, err error) { var buf bytes.Buffer @@ -13901,6 +14857,7 @@ func (l *Libvirt) ConnectNetworkEventRegisterAny(EventID int32, Net Network) (rC return } +// ConnectNetworkEventDeregisterAny is the go wrapper for REMOTE_PROC_CONNECT_NETWORK_EVENT_DEREGISTER_ANY. func (l *Libvirt) ConnectNetworkEventDeregisterAny(CallbackID int32) (err error) { var buf bytes.Buffer @@ -13928,6 +14885,7 @@ func (l *Libvirt) ConnectNetworkEventDeregisterAny(CallbackID int32) (err error) return } +// NetworkEventLifecycle is the go wrapper for REMOTE_PROC_NETWORK_EVENT_LIFECYCLE. func (l *Libvirt) NetworkEventLifecycle() (err error) { var buf bytes.Buffer @@ -13946,6 +14904,7 @@ func (l *Libvirt) NetworkEventLifecycle() (err error) { return } +// ConnectDomainEventCallbackRegisterAny is the go wrapper for REMOTE_PROC_CONNECT_DOMAIN_EVENT_CALLBACK_REGISTER_ANY. func (l *Libvirt) ConnectDomainEventCallbackRegisterAny(EventID int32, Dom Domain) (rCallbackID int32, err error) { var buf bytes.Buffer @@ -13983,6 +14942,7 @@ func (l *Libvirt) ConnectDomainEventCallbackRegisterAny(EventID int32, Dom Domai return } +// ConnectDomainEventCallbackDeregisterAny is the go wrapper for REMOTE_PROC_CONNECT_DOMAIN_EVENT_CALLBACK_DEREGISTER_ANY. func (l *Libvirt) ConnectDomainEventCallbackDeregisterAny(CallbackID int32) (err error) { var buf bytes.Buffer @@ -14010,6 +14970,7 @@ func (l *Libvirt) ConnectDomainEventCallbackDeregisterAny(CallbackID int32) (err return } +// DomainEventCallbackLifecycle is the go wrapper for REMOTE_PROC_DOMAIN_EVENT_CALLBACK_LIFECYCLE. func (l *Libvirt) DomainEventCallbackLifecycle() (err error) { var buf bytes.Buffer @@ -14028,6 +14989,7 @@ func (l *Libvirt) DomainEventCallbackLifecycle() (err error) { return } +// DomainEventCallbackReboot is the go wrapper for REMOTE_PROC_DOMAIN_EVENT_CALLBACK_REBOOT. func (l *Libvirt) DomainEventCallbackReboot() (err error) { var buf bytes.Buffer @@ -14046,6 +15008,7 @@ func (l *Libvirt) DomainEventCallbackReboot() (err error) { return } +// DomainEventCallbackRtcChange is the go wrapper for REMOTE_PROC_DOMAIN_EVENT_CALLBACK_RTC_CHANGE. func (l *Libvirt) DomainEventCallbackRtcChange() (err error) { var buf bytes.Buffer @@ -14064,6 +15027,7 @@ func (l *Libvirt) DomainEventCallbackRtcChange() (err error) { return } +// DomainEventCallbackWatchdog is the go wrapper for REMOTE_PROC_DOMAIN_EVENT_CALLBACK_WATCHDOG. func (l *Libvirt) DomainEventCallbackWatchdog() (err error) { var buf bytes.Buffer @@ -14082,6 +15046,7 @@ func (l *Libvirt) DomainEventCallbackWatchdog() (err error) { return } +// DomainEventCallbackIOError is the go wrapper for REMOTE_PROC_DOMAIN_EVENT_CALLBACK_IO_ERROR. func (l *Libvirt) DomainEventCallbackIOError() (err error) { var buf bytes.Buffer @@ -14100,6 +15065,7 @@ func (l *Libvirt) DomainEventCallbackIOError() (err error) { return } +// DomainEventCallbackGraphics is the go wrapper for REMOTE_PROC_DOMAIN_EVENT_CALLBACK_GRAPHICS. func (l *Libvirt) DomainEventCallbackGraphics() (err error) { var buf bytes.Buffer @@ -14118,6 +15084,7 @@ func (l *Libvirt) DomainEventCallbackGraphics() (err error) { return } +// DomainEventCallbackIOErrorReason is the go wrapper for REMOTE_PROC_DOMAIN_EVENT_CALLBACK_IO_ERROR_REASON. func (l *Libvirt) DomainEventCallbackIOErrorReason() (err error) { var buf bytes.Buffer @@ -14136,6 +15103,7 @@ func (l *Libvirt) DomainEventCallbackIOErrorReason() (err error) { return } +// DomainEventCallbackControlError is the go wrapper for REMOTE_PROC_DOMAIN_EVENT_CALLBACK_CONTROL_ERROR. func (l *Libvirt) DomainEventCallbackControlError() (err error) { var buf bytes.Buffer @@ -14154,6 +15122,7 @@ func (l *Libvirt) DomainEventCallbackControlError() (err error) { return } +// DomainEventCallbackBlockJob is the go wrapper for REMOTE_PROC_DOMAIN_EVENT_CALLBACK_BLOCK_JOB. func (l *Libvirt) DomainEventCallbackBlockJob() (err error) { var buf bytes.Buffer @@ -14172,6 +15141,7 @@ func (l *Libvirt) DomainEventCallbackBlockJob() (err error) { return } +// DomainEventCallbackDiskChange is the go wrapper for REMOTE_PROC_DOMAIN_EVENT_CALLBACK_DISK_CHANGE. func (l *Libvirt) DomainEventCallbackDiskChange() (err error) { var buf bytes.Buffer @@ -14190,6 +15160,7 @@ func (l *Libvirt) DomainEventCallbackDiskChange() (err error) { return } +// DomainEventCallbackTrayChange is the go wrapper for REMOTE_PROC_DOMAIN_EVENT_CALLBACK_TRAY_CHANGE. func (l *Libvirt) DomainEventCallbackTrayChange() (err error) { var buf bytes.Buffer @@ -14208,6 +15179,7 @@ func (l *Libvirt) DomainEventCallbackTrayChange() (err error) { return } +// DomainEventCallbackPmwakeup is the go wrapper for REMOTE_PROC_DOMAIN_EVENT_CALLBACK_PMWAKEUP. func (l *Libvirt) DomainEventCallbackPmwakeup() (err error) { var buf bytes.Buffer @@ -14226,6 +15198,7 @@ func (l *Libvirt) DomainEventCallbackPmwakeup() (err error) { return } +// DomainEventCallbackPmsuspend is the go wrapper for REMOTE_PROC_DOMAIN_EVENT_CALLBACK_PMSUSPEND. func (l *Libvirt) DomainEventCallbackPmsuspend() (err error) { var buf bytes.Buffer @@ -14244,6 +15217,7 @@ func (l *Libvirt) DomainEventCallbackPmsuspend() (err error) { return } +// DomainEventCallbackBalloonChange is the go wrapper for REMOTE_PROC_DOMAIN_EVENT_CALLBACK_BALLOON_CHANGE. func (l *Libvirt) DomainEventCallbackBalloonChange() (err error) { var buf bytes.Buffer @@ -14262,6 +15236,7 @@ func (l *Libvirt) DomainEventCallbackBalloonChange() (err error) { return } +// DomainEventCallbackPmsuspendDisk is the go wrapper for REMOTE_PROC_DOMAIN_EVENT_CALLBACK_PMSUSPEND_DISK. func (l *Libvirt) DomainEventCallbackPmsuspendDisk() (err error) { var buf bytes.Buffer @@ -14280,6 +15255,7 @@ func (l *Libvirt) DomainEventCallbackPmsuspendDisk() (err error) { return } +// DomainEventCallbackDeviceRemoved is the go wrapper for REMOTE_PROC_DOMAIN_EVENT_CALLBACK_DEVICE_REMOVED. func (l *Libvirt) DomainEventCallbackDeviceRemoved() (err error) { var buf bytes.Buffer @@ -14298,6 +15274,7 @@ func (l *Libvirt) DomainEventCallbackDeviceRemoved() (err error) { return } +// DomainCoreDumpWithFormat is the go wrapper for REMOTE_PROC_DOMAIN_CORE_DUMP_WITH_FORMAT. func (l *Libvirt) DomainCoreDumpWithFormat(Dom NonnullDomain, To string, Dumpformat uint32, Flags uint32) (err error) { var buf bytes.Buffer @@ -14328,6 +15305,7 @@ func (l *Libvirt) DomainCoreDumpWithFormat(Dom NonnullDomain, To string, Dumpfor return } +// DomainFsfreeze is the go wrapper for REMOTE_PROC_DOMAIN_FSFREEZE. func (l *Libvirt) DomainFsfreeze(Dom NonnullDomain, Mountpoints []string, Flags uint32) (rFilesystems int32, err error) { var buf bytes.Buffer @@ -14366,6 +15344,7 @@ func (l *Libvirt) DomainFsfreeze(Dom NonnullDomain, Mountpoints []string, Flags return } +// DomainFsthaw is the go wrapper for REMOTE_PROC_DOMAIN_FSTHAW. func (l *Libvirt) DomainFsthaw(Dom NonnullDomain, Mountpoints []string, Flags uint32) (rFilesystems int32, err error) { var buf bytes.Buffer @@ -14404,6 +15383,7 @@ func (l *Libvirt) DomainFsthaw(Dom NonnullDomain, Mountpoints []string, Flags ui return } +// DomainGetTime is the go wrapper for REMOTE_PROC_DOMAIN_GET_TIME. func (l *Libvirt) DomainGetTime(Dom NonnullDomain, Flags uint32) (rSeconds int64, rNseconds uint32, err error) { var buf bytes.Buffer @@ -14446,6 +15426,7 @@ func (l *Libvirt) DomainGetTime(Dom NonnullDomain, Flags uint32) (rSeconds int64 return } +// DomainSetTime is the go wrapper for REMOTE_PROC_DOMAIN_SET_TIME. func (l *Libvirt) DomainSetTime(Dom NonnullDomain, Seconds int64, Nseconds uint32, Flags uint32) (err error) { var buf bytes.Buffer @@ -14476,6 +15457,7 @@ func (l *Libvirt) DomainSetTime(Dom NonnullDomain, Seconds int64, Nseconds uint3 return } +// DomainEventBlockJob2 is the go wrapper for REMOTE_PROC_DOMAIN_EVENT_BLOCK_JOB_2. func (l *Libvirt) DomainEventBlockJob2() (err error) { var buf bytes.Buffer @@ -14494,6 +15476,7 @@ func (l *Libvirt) DomainEventBlockJob2() (err error) { return } +// NodeGetFreePages is the go wrapper for REMOTE_PROC_NODE_GET_FREE_PAGES. func (l *Libvirt) NodeGetFreePages(Pages []uint32, StartCell int32, CellCount uint32, Flags uint32) (rCounts []uint64, err error) { var buf bytes.Buffer @@ -14533,6 +15516,7 @@ func (l *Libvirt) NodeGetFreePages(Pages []uint32, StartCell int32, CellCount ui return } +// NetworkGetDhcpLeases is the go wrapper for REMOTE_PROC_NETWORK_GET_DHCP_LEASES. func (l *Libvirt) NetworkGetDhcpLeases(Net NonnullNetwork, Mac OptString, NeedResults int32, Flags uint32) (rLeases []NetworkDhcpLease, rRet uint32, err error) { var buf bytes.Buffer @@ -14577,6 +15561,7 @@ func (l *Libvirt) NetworkGetDhcpLeases(Net NonnullNetwork, Mac OptString, NeedRe return } +// ConnectGetDomainCapabilities is the go wrapper for REMOTE_PROC_CONNECT_GET_DOMAIN_CAPABILITIES. func (l *Libvirt) ConnectGetDomainCapabilities(Emulatorbin OptString, Arch OptString, Machine OptString, Virttype OptString, Flags uint32) (rCapabilities string, err error) { var buf bytes.Buffer @@ -14617,6 +15602,7 @@ func (l *Libvirt) ConnectGetDomainCapabilities(Emulatorbin OptString, Arch OptSt return } +// DomainOpenGraphicsFd is the go wrapper for REMOTE_PROC_DOMAIN_OPEN_GRAPHICS_FD. func (l *Libvirt) DomainOpenGraphicsFd(Dom NonnullDomain, Idx uint32, Flags uint32) (err error) { var buf bytes.Buffer @@ -14646,6 +15632,7 @@ func (l *Libvirt) DomainOpenGraphicsFd(Dom NonnullDomain, Idx uint32, Flags uint return } +// ConnectGetAllDomainStats is the go wrapper for REMOTE_PROC_CONNECT_GET_ALL_DOMAIN_STATS. func (l *Libvirt) ConnectGetAllDomainStats(Doms []NonnullDomain, Stats uint32, Flags uint32) (rRetStats []DomainStatsRecord, err error) { var buf bytes.Buffer @@ -14684,6 +15671,7 @@ func (l *Libvirt) ConnectGetAllDomainStats(Doms []NonnullDomain, Stats uint32, F return } +// DomainBlockCopy is the go wrapper for REMOTE_PROC_DOMAIN_BLOCK_COPY. func (l *Libvirt) DomainBlockCopy(Dom NonnullDomain, Path string, Destxml string, Params []TypedParam, Flags uint32) (err error) { var buf bytes.Buffer @@ -14715,6 +15703,7 @@ func (l *Libvirt) DomainBlockCopy(Dom NonnullDomain, Path string, Destxml string return } +// DomainEventCallbackTunable is the go wrapper for REMOTE_PROC_DOMAIN_EVENT_CALLBACK_TUNABLE. func (l *Libvirt) DomainEventCallbackTunable() (err error) { var buf bytes.Buffer @@ -14733,6 +15722,7 @@ func (l *Libvirt) DomainEventCallbackTunable() (err error) { return } +// NodeAllocPages is the go wrapper for REMOTE_PROC_NODE_ALLOC_PAGES. func (l *Libvirt) NodeAllocPages(PageSizes []uint32, PageCounts []uint64, StartCell int32, CellCount uint32, Flags uint32) (rRet int32, err error) { var buf bytes.Buffer @@ -14773,6 +15763,7 @@ func (l *Libvirt) NodeAllocPages(PageSizes []uint32, PageCounts []uint64, StartC return } +// DomainEventCallbackAgentLifecycle is the go wrapper for REMOTE_PROC_DOMAIN_EVENT_CALLBACK_AGENT_LIFECYCLE. func (l *Libvirt) DomainEventCallbackAgentLifecycle() (err error) { var buf bytes.Buffer @@ -14791,6 +15782,7 @@ func (l *Libvirt) DomainEventCallbackAgentLifecycle() (err error) { return } +// DomainGetFsinfo is the go wrapper for REMOTE_PROC_DOMAIN_GET_FSINFO. func (l *Libvirt) DomainGetFsinfo(Dom NonnullDomain, Flags uint32) (rInfo []DomainFsinfo, rRet uint32, err error) { var buf bytes.Buffer @@ -14833,6 +15825,7 @@ func (l *Libvirt) DomainGetFsinfo(Dom NonnullDomain, Flags uint32) (rInfo []Doma return } +// DomainDefineXMLFlags is the go wrapper for REMOTE_PROC_DOMAIN_DEFINE_XML_FLAGS. func (l *Libvirt) DomainDefineXMLFlags(XML string, Flags uint32) (rDom NonnullDomain, err error) { var buf bytes.Buffer @@ -14870,6 +15863,7 @@ func (l *Libvirt) DomainDefineXMLFlags(XML string, Flags uint32) (rDom NonnullDo return } +// DomainGetIothreadInfo is the go wrapper for REMOTE_PROC_DOMAIN_GET_IOTHREAD_INFO. func (l *Libvirt) DomainGetIothreadInfo(Dom NonnullDomain, Flags uint32) (rInfo []DomainIothreadInfo, rRet uint32, err error) { var buf bytes.Buffer @@ -14912,6 +15906,7 @@ func (l *Libvirt) DomainGetIothreadInfo(Dom NonnullDomain, Flags uint32) (rInfo return } +// DomainPinIothread is the go wrapper for REMOTE_PROC_DOMAIN_PIN_IOTHREAD. func (l *Libvirt) DomainPinIothread(Dom NonnullDomain, IothreadsID uint32, Cpumap []byte, Flags uint32) (err error) { var buf bytes.Buffer @@ -14942,6 +15937,7 @@ func (l *Libvirt) DomainPinIothread(Dom NonnullDomain, IothreadsID uint32, Cpuma return } +// DomainInterfaceAddresses is the go wrapper for REMOTE_PROC_DOMAIN_INTERFACE_ADDRESSES. func (l *Libvirt) DomainInterfaceAddresses(Dom NonnullDomain, Source uint32, Flags uint32) (rIfaces []DomainInterface, err error) { var buf bytes.Buffer @@ -14980,6 +15976,7 @@ func (l *Libvirt) DomainInterfaceAddresses(Dom NonnullDomain, Source uint32, Fla return } +// DomainEventCallbackDeviceAdded is the go wrapper for REMOTE_PROC_DOMAIN_EVENT_CALLBACK_DEVICE_ADDED. func (l *Libvirt) DomainEventCallbackDeviceAdded() (err error) { var buf bytes.Buffer @@ -14998,6 +15995,7 @@ func (l *Libvirt) DomainEventCallbackDeviceAdded() (err error) { return } +// DomainAddIothread is the go wrapper for REMOTE_PROC_DOMAIN_ADD_IOTHREAD. func (l *Libvirt) DomainAddIothread(Dom NonnullDomain, IothreadID uint32, Flags uint32) (err error) { var buf bytes.Buffer @@ -15027,6 +16025,7 @@ func (l *Libvirt) DomainAddIothread(Dom NonnullDomain, IothreadID uint32, Flags return } +// DomainDelIothread is the go wrapper for REMOTE_PROC_DOMAIN_DEL_IOTHREAD. func (l *Libvirt) DomainDelIothread(Dom NonnullDomain, IothreadID uint32, Flags uint32) (err error) { var buf bytes.Buffer @@ -15056,6 +16055,7 @@ func (l *Libvirt) DomainDelIothread(Dom NonnullDomain, IothreadID uint32, Flags return } +// DomainSetUserPassword is the go wrapper for REMOTE_PROC_DOMAIN_SET_USER_PASSWORD. func (l *Libvirt) DomainSetUserPassword(Dom NonnullDomain, User OptString, Password OptString, Flags uint32) (err error) { var buf bytes.Buffer @@ -15086,6 +16086,7 @@ func (l *Libvirt) DomainSetUserPassword(Dom NonnullDomain, User OptString, Passw return } +// DomainRename is the go wrapper for REMOTE_PROC_DOMAIN_RENAME. func (l *Libvirt) DomainRename(Dom NonnullDomain, NewName OptString, Flags uint32) (rRetcode int32, err error) { var buf bytes.Buffer @@ -15124,6 +16125,7 @@ func (l *Libvirt) DomainRename(Dom NonnullDomain, NewName OptString, Flags uint3 return } +// DomainEventCallbackMigrationIteration is the go wrapper for REMOTE_PROC_DOMAIN_EVENT_CALLBACK_MIGRATION_ITERATION. func (l *Libvirt) DomainEventCallbackMigrationIteration() (err error) { var buf bytes.Buffer @@ -15142,6 +16144,7 @@ func (l *Libvirt) DomainEventCallbackMigrationIteration() (err error) { return } +// ConnectRegisterCloseCallback is the go wrapper for REMOTE_PROC_CONNECT_REGISTER_CLOSE_CALLBACK. func (l *Libvirt) ConnectRegisterCloseCallback() (err error) { var buf bytes.Buffer @@ -15160,6 +16163,7 @@ func (l *Libvirt) ConnectRegisterCloseCallback() (err error) { return } +// ConnectUnregisterCloseCallback is the go wrapper for REMOTE_PROC_CONNECT_UNREGISTER_CLOSE_CALLBACK. func (l *Libvirt) ConnectUnregisterCloseCallback() (err error) { var buf bytes.Buffer @@ -15178,6 +16182,7 @@ func (l *Libvirt) ConnectUnregisterCloseCallback() (err error) { return } +// ConnectEventConnectionClosed is the go wrapper for REMOTE_PROC_CONNECT_EVENT_CONNECTION_CLOSED. func (l *Libvirt) ConnectEventConnectionClosed() (err error) { var buf bytes.Buffer @@ -15196,6 +16201,7 @@ func (l *Libvirt) ConnectEventConnectionClosed() (err error) { return } +// DomainEventCallbackJobCompleted is the go wrapper for REMOTE_PROC_DOMAIN_EVENT_CALLBACK_JOB_COMPLETED. func (l *Libvirt) DomainEventCallbackJobCompleted() (err error) { var buf bytes.Buffer @@ -15214,6 +16220,7 @@ func (l *Libvirt) DomainEventCallbackJobCompleted() (err error) { return } +// DomainMigrateStartPostCopy is the go wrapper for REMOTE_PROC_DOMAIN_MIGRATE_START_POST_COPY. func (l *Libvirt) DomainMigrateStartPostCopy(Dom NonnullDomain, Flags uint32) (err error) { var buf bytes.Buffer @@ -15242,6 +16249,7 @@ func (l *Libvirt) DomainMigrateStartPostCopy(Dom NonnullDomain, Flags uint32) (e return } +// DomainGetPerfEvents is the go wrapper for REMOTE_PROC_DOMAIN_GET_PERF_EVENTS. func (l *Libvirt) DomainGetPerfEvents(Dom NonnullDomain, Flags uint32) (rParams []TypedParam, err error) { var buf bytes.Buffer @@ -15280,6 +16288,7 @@ func (l *Libvirt) DomainGetPerfEvents(Dom NonnullDomain, Flags uint32) (rParams return } +// DomainSetPerfEvents is the go wrapper for REMOTE_PROC_DOMAIN_SET_PERF_EVENTS. func (l *Libvirt) DomainSetPerfEvents(Dom NonnullDomain, Params []TypedParam, Flags uint32) (err error) { var buf bytes.Buffer @@ -15309,6 +16318,7 @@ func (l *Libvirt) DomainSetPerfEvents(Dom NonnullDomain, Params []TypedParam, Fl return } +// DomainEventCallbackDeviceRemovalFailed is the go wrapper for REMOTE_PROC_DOMAIN_EVENT_CALLBACK_DEVICE_REMOVAL_FAILED. func (l *Libvirt) DomainEventCallbackDeviceRemovalFailed() (err error) { var buf bytes.Buffer @@ -15327,6 +16337,7 @@ func (l *Libvirt) DomainEventCallbackDeviceRemovalFailed() (err error) { return } +// ConnectStoragePoolEventRegisterAny is the go wrapper for REMOTE_PROC_CONNECT_STORAGE_POOL_EVENT_REGISTER_ANY. func (l *Libvirt) ConnectStoragePoolEventRegisterAny(EventID int32, Pool StoragePool) (rCallbackID int32, err error) { var buf bytes.Buffer @@ -15364,6 +16375,7 @@ func (l *Libvirt) ConnectStoragePoolEventRegisterAny(EventID int32, Pool Storage return } +// ConnectStoragePoolEventDeregisterAny is the go wrapper for REMOTE_PROC_CONNECT_STORAGE_POOL_EVENT_DEREGISTER_ANY. func (l *Libvirt) ConnectStoragePoolEventDeregisterAny(CallbackID int32) (err error) { var buf bytes.Buffer @@ -15391,6 +16403,7 @@ func (l *Libvirt) ConnectStoragePoolEventDeregisterAny(CallbackID int32) (err er return } +// StoragePoolEventLifecycle is the go wrapper for REMOTE_PROC_STORAGE_POOL_EVENT_LIFECYCLE. func (l *Libvirt) StoragePoolEventLifecycle() (err error) { var buf bytes.Buffer @@ -15409,6 +16422,7 @@ func (l *Libvirt) StoragePoolEventLifecycle() (err error) { return } +// DomainGetGuestVcpus is the go wrapper for REMOTE_PROC_DOMAIN_GET_GUEST_VCPUS. func (l *Libvirt) DomainGetGuestVcpus(Dom NonnullDomain, Flags uint32) (rParams []TypedParam, err error) { var buf bytes.Buffer @@ -15447,6 +16461,7 @@ func (l *Libvirt) DomainGetGuestVcpus(Dom NonnullDomain, Flags uint32) (rParams return } +// DomainSetGuestVcpus is the go wrapper for REMOTE_PROC_DOMAIN_SET_GUEST_VCPUS. func (l *Libvirt) DomainSetGuestVcpus(Dom NonnullDomain, Cpumap string, State int32, Flags uint32) (err error) { var buf bytes.Buffer @@ -15477,6 +16492,7 @@ func (l *Libvirt) DomainSetGuestVcpus(Dom NonnullDomain, Cpumap string, State in return } +// StoragePoolEventRefresh is the go wrapper for REMOTE_PROC_STORAGE_POOL_EVENT_REFRESH. func (l *Libvirt) StoragePoolEventRefresh() (err error) { var buf bytes.Buffer @@ -15495,6 +16511,7 @@ func (l *Libvirt) StoragePoolEventRefresh() (err error) { return } +// ConnectNodeDeviceEventRegisterAny is the go wrapper for REMOTE_PROC_CONNECT_NODE_DEVICE_EVENT_REGISTER_ANY. func (l *Libvirt) ConnectNodeDeviceEventRegisterAny(EventID int32, Dev NodeDevice) (rCallbackID int32, err error) { var buf bytes.Buffer @@ -15532,6 +16549,7 @@ func (l *Libvirt) ConnectNodeDeviceEventRegisterAny(EventID int32, Dev NodeDevic return } +// ConnectNodeDeviceEventDeregisterAny is the go wrapper for REMOTE_PROC_CONNECT_NODE_DEVICE_EVENT_DEREGISTER_ANY. func (l *Libvirt) ConnectNodeDeviceEventDeregisterAny(CallbackID int32) (err error) { var buf bytes.Buffer @@ -15559,6 +16577,7 @@ func (l *Libvirt) ConnectNodeDeviceEventDeregisterAny(CallbackID int32) (err err return } +// NodeDeviceEventLifecycle is the go wrapper for REMOTE_PROC_NODE_DEVICE_EVENT_LIFECYCLE. func (l *Libvirt) NodeDeviceEventLifecycle() (err error) { var buf bytes.Buffer @@ -15577,6 +16596,7 @@ func (l *Libvirt) NodeDeviceEventLifecycle() (err error) { return } +// NodeDeviceEventUpdate is the go wrapper for REMOTE_PROC_NODE_DEVICE_EVENT_UPDATE. func (l *Libvirt) NodeDeviceEventUpdate() (err error) { var buf bytes.Buffer @@ -15595,6 +16615,7 @@ func (l *Libvirt) NodeDeviceEventUpdate() (err error) { return } +// StorageVolGetInfoFlags is the go wrapper for REMOTE_PROC_STORAGE_VOL_GET_INFO_FLAGS. func (l *Libvirt) StorageVolGetInfoFlags(Vol NonnullStorageVol, Flags uint32) (rType int8, rCapacity uint64, rAllocation uint64, err error) { var buf bytes.Buffer @@ -15642,6 +16663,7 @@ func (l *Libvirt) StorageVolGetInfoFlags(Vol NonnullStorageVol, Flags uint32) (r return } +// DomainEventCallbackMetadataChange is the go wrapper for REMOTE_PROC_DOMAIN_EVENT_CALLBACK_METADATA_CHANGE. func (l *Libvirt) DomainEventCallbackMetadataChange() (err error) { var buf bytes.Buffer @@ -15660,6 +16682,7 @@ func (l *Libvirt) DomainEventCallbackMetadataChange() (err error) { return } +// ConnectSecretEventRegisterAny is the go wrapper for REMOTE_PROC_CONNECT_SECRET_EVENT_REGISTER_ANY. func (l *Libvirt) ConnectSecretEventRegisterAny(EventID int32, Secret Secret) (rCallbackID int32, err error) { var buf bytes.Buffer @@ -15697,6 +16720,7 @@ func (l *Libvirt) ConnectSecretEventRegisterAny(EventID int32, Secret Secret) (r return } +// ConnectSecretEventDeregisterAny is the go wrapper for REMOTE_PROC_CONNECT_SECRET_EVENT_DEREGISTER_ANY. func (l *Libvirt) ConnectSecretEventDeregisterAny(CallbackID int32) (err error) { var buf bytes.Buffer @@ -15724,6 +16748,7 @@ func (l *Libvirt) ConnectSecretEventDeregisterAny(CallbackID int32) (err error) return } +// SecretEventLifecycle is the go wrapper for REMOTE_PROC_SECRET_EVENT_LIFECYCLE. func (l *Libvirt) SecretEventLifecycle() (err error) { var buf bytes.Buffer @@ -15742,6 +16767,7 @@ func (l *Libvirt) SecretEventLifecycle() (err error) { return } +// SecretEventValueChanged is the go wrapper for REMOTE_PROC_SECRET_EVENT_VALUE_CHANGED. func (l *Libvirt) SecretEventValueChanged() (err error) { var buf bytes.Buffer @@ -15760,6 +16786,7 @@ func (l *Libvirt) SecretEventValueChanged() (err error) { return } +// DomainSetVcpu is the go wrapper for REMOTE_PROC_DOMAIN_SET_VCPU. func (l *Libvirt) DomainSetVcpu(Dom NonnullDomain, Cpumap string, State int32, Flags uint32) (err error) { var buf bytes.Buffer @@ -15790,6 +16817,7 @@ func (l *Libvirt) DomainSetVcpu(Dom NonnullDomain, Cpumap string, State int32, F return } +// DomainEventBlockThreshold is the go wrapper for REMOTE_PROC_DOMAIN_EVENT_BLOCK_THRESHOLD. func (l *Libvirt) DomainEventBlockThreshold() (err error) { var buf bytes.Buffer @@ -15808,6 +16836,7 @@ func (l *Libvirt) DomainEventBlockThreshold() (err error) { return } +// DomainSetBlockThreshold is the go wrapper for REMOTE_PROC_DOMAIN_SET_BLOCK_THRESHOLD. func (l *Libvirt) DomainSetBlockThreshold(Dom NonnullDomain, Dev string, Threshold uint64, Flags uint32) (err error) { var buf bytes.Buffer @@ -15838,6 +16867,7 @@ func (l *Libvirt) DomainSetBlockThreshold(Dom NonnullDomain, Dev string, Thresho return } +// DomainMigrateGetMaxDowntime is the go wrapper for REMOTE_PROC_DOMAIN_MIGRATE_GET_MAX_DOWNTIME. func (l *Libvirt) DomainMigrateGetMaxDowntime(Dom NonnullDomain, Flags uint32) (rDowntime uint64, err error) { var buf bytes.Buffer @@ -15875,6 +16905,7 @@ func (l *Libvirt) DomainMigrateGetMaxDowntime(Dom NonnullDomain, Flags uint32) ( return } +// DomainManagedSaveGetXMLDesc is the go wrapper for REMOTE_PROC_DOMAIN_MANAGED_SAVE_GET_XML_DESC. func (l *Libvirt) DomainManagedSaveGetXMLDesc(Dom NonnullDomain, Flags uint32) (rXML string, err error) { var buf bytes.Buffer @@ -15912,6 +16943,7 @@ func (l *Libvirt) DomainManagedSaveGetXMLDesc(Dom NonnullDomain, Flags uint32) ( return } +// DomainManagedSaveDefineXML is the go wrapper for REMOTE_PROC_DOMAIN_MANAGED_SAVE_DEFINE_XML. func (l *Libvirt) DomainManagedSaveDefineXML(Dom NonnullDomain, Dxml OptString, Flags uint32) (err error) { var buf bytes.Buffer @@ -15941,6 +16973,7 @@ func (l *Libvirt) DomainManagedSaveDefineXML(Dom NonnullDomain, Dxml OptString, return } +// DomainSetLifecycleAction is the go wrapper for REMOTE_PROC_DOMAIN_SET_LIFECYCLE_ACTION. func (l *Libvirt) DomainSetLifecycleAction(Dom NonnullDomain, Type uint32, Action uint32, Flags uint32) (err error) { var buf bytes.Buffer diff --git a/libvirt.go b/libvirt.go index 37c6546..662536e 100644 --- a/libvirt.go +++ b/libvirt.go @@ -568,41 +568,8 @@ func (l *Libvirt) Run(dom string, cmd []byte) ([]byte, error) { // Secrets returns all secrets managed by the libvirt daemon. func (l *Libvirt) Secrets() ([]NonnullSecret, error) { - req := struct { - NeedResults uint32 - Flags uint32 - }{ - NeedResults: 1, - Flags: 0, // unused per libvirt source, callers should pass 0 - } - - buf, err := encode(&req) - if err != nil { - return nil, err - } - - resp, err := l.request(constants.ProcConnectListAllSecrets, constants.Program, &buf) - if err != nil { - return nil, err - } - - r := <-resp - if r.Status != StatusOK { - return nil, decodeError(r.Payload) - } - - result := struct { - Secrets []NonnullSecret - Count uint32 - }{} - - dec := xdr.NewDecoder(bytes.NewReader(r.Payload)) - _, err = dec.Decode(&result) - if err != nil { - return nil, err - } - - return result.Secrets, nil + secrets, _, err := l.ConnectListAllSecrets(1, 0) + return secrets, err } // StoragePool returns the storage pool associated with the provided name. @@ -809,35 +776,7 @@ func (l *Libvirt) GetBlockIOTune(dom string, disk string) ([]BlockLimit, error) // lookup returns a domain as seen by libvirt. func (l *Libvirt) lookup(name string) (NonnullDomain, error) { - var d NonnullDomain - payload := struct { - Name string - }{name} - - buf, err := encode(&payload) - if err != nil { - return d, err - } - - resp, err := l.request(constants.ProcDomainLookupByName, constants.Program, &buf) - if err != nil { - return d, err - } - - r := <-resp - if r.Status != StatusOK { - return d, decodeError(r.Payload) - } - - dec := xdr.NewDecoder(bytes.NewReader(r.Payload)) - - // var d Domain - _, err = dec.Decode(&d) - if err != nil { - return d, err - } - - return d, nil + return l.DomainLookupByName(name) } // getQEMUError checks the provided response for QEMU process errors. diff --git a/libvirt_integration_test.go b/libvirt_integration_test.go index d8d2e41..b4e582a 100644 --- a/libvirt_integration_test.go +++ b/libvirt_integration_test.go @@ -94,7 +94,7 @@ func TestSecretsIntegration(t *testing.T) { s := secrets[0] wantType := SecretUsageTypeVolume - if s.UsageType != wantType { + if s.UsageType != int32(wantType) { t.Errorf("expected usage type: %d, got %d", wantType, s.UsageType) } @@ -201,7 +201,12 @@ func TestStoragePoolRefreshIntegration(t *testing.T) { t.Fatal(err) } - err := l.StoragePoolRefresh("test") + pool, err := l.StoragePool("default") + if err != nil { + t.Error(err) + } + + err = l.StoragePoolRefresh(pool, 0) if err != nil { t.Error(err) } @@ -215,7 +220,12 @@ func TestStoragePoolRefreshInvalidIntegration(t *testing.T) { t.Fatal(err) } - err := l.StoragePoolRefresh("test-does-not-exist") + pool, err := l.StoragePool("test-does-not-exist") + if err == nil { + t.Error(err) + } + + err := l.StoragePoolRefresh(pool, 0) if err == nil { t.Error("expected non-existent storage pool to fail refresh") } From 45342c3080cc11d26298c733b5dd3ecf08102ceb Mon Sep 17 00:00:00 2001 From: Geoff Hickey Date: Thu, 16 Nov 2017 17:16:10 -0500 Subject: [PATCH 12/20] fix another integration test problem. --- libvirt_integration_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libvirt_integration_test.go b/libvirt_integration_test.go index b4e582a..0309787 100644 --- a/libvirt_integration_test.go +++ b/libvirt_integration_test.go @@ -225,7 +225,7 @@ func TestStoragePoolRefreshInvalidIntegration(t *testing.T) { t.Error(err) } - err := l.StoragePoolRefresh(pool, 0) + err = l.StoragePoolRefresh(pool, 0) if err == nil { t.Error("expected non-existent storage pool to fail refresh") } From c73820057a47ca2cfd1cc541ae015579b6b7a0f7 Mon Sep 17 00:00:00 2001 From: Geoff Hickey Date: Thu, 16 Nov 2017 17:28:40 -0500 Subject: [PATCH 13/20] fix an integration test failure. --- libvirt_integration_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libvirt_integration_test.go b/libvirt_integration_test.go index 0309787..f161637 100644 --- a/libvirt_integration_test.go +++ b/libvirt_integration_test.go @@ -201,7 +201,7 @@ func TestStoragePoolRefreshIntegration(t *testing.T) { t.Fatal(err) } - pool, err := l.StoragePool("default") + pool, err := l.StoragePool("test") if err != nil { t.Error(err) } From 94eb6fad0303a2c7ec5d54e79e83398c1e2dc16b Mon Sep 17 00:00:00 2001 From: Geoff Hickey Date: Thu, 16 Nov 2017 17:29:58 -0500 Subject: [PATCH 14/20] travis build changes - Update go version to 1.9. - add go generate step. --- .travis.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 71cc210..f117dde 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,7 +4,7 @@ dist: trusty sudo: require go: - - 1.7 + - 1.9 env: - LIBVIRT=1.2.2 EXT=gz @@ -41,9 +41,11 @@ before_script: - sudo virsh start test - sudo virsh pool-create .travis/test-pool.xml - sudo virsh secret-define .travis/test-secret.xml + - go get github.com/golang/x/tools/cmd/goyacc script: - ./scripts/licensecheck.sh + - LIBVIRT_SOURCE=/usr/src/libvirt-${LIBVIRT} go generate ./... - go build ./... - golint -set_exit_status ./... - go vet ./... From e6dc7bd464c8b91e642ee55b52107ec8d9c1f8cd Mon Sep 17 00:00:00 2001 From: Geoff Hickey Date: Thu, 16 Nov 2017 17:41:26 -0500 Subject: [PATCH 15/20] travis: move goyacc install to before-install section --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index f117dde..f34e001 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,6 +13,7 @@ env: before_install: - go get github.com/golang/lint/golint + - go get github.com/golang/x/tools/cmd/goyacc install: # credit here goes to the go-libvirt authors, @@ -41,7 +42,6 @@ before_script: - sudo virsh start test - sudo virsh pool-create .travis/test-pool.xml - sudo virsh secret-define .travis/test-secret.xml - - go get github.com/golang/x/tools/cmd/goyacc script: - ./scripts/licensecheck.sh From 53846d5d14c3f67f41b217b3a734c17c929a115a Mon Sep 17 00:00:00 2001 From: Geoff Hickey Date: Thu, 16 Nov 2017 17:53:31 -0500 Subject: [PATCH 16/20] oops. Fix the goyacc import URI. --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index f34e001..3e599db 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,7 +13,7 @@ env: before_install: - go get github.com/golang/lint/golint - - go get github.com/golang/x/tools/cmd/goyacc + - go get golang.org/x/tools/cmd/goyacc install: # credit here goes to the go-libvirt authors, From 57b9cae05d9e5bce502f448d5677d802083959e5 Mon Sep 17 00:00:00 2001 From: Geoff Hickey Date: Thu, 16 Nov 2017 18:44:11 -0500 Subject: [PATCH 17/20] add licenses and fix the license checking script. --- internal/constants/constants.gen.go | 14 +++ internal/lvgen/constants.tmpl | 14 +++ internal/lvgen/lv-gen.go | 14 +++ internal/lvgen/procedures.tmpl | 14 +++ internal/lvgen/sunrpc.y | 13 +++ internal/lvgen/y.go | 77 +++++++++------ internal/lvgen/y.output | 146 ++++++++++++++-------------- libvirt.gen.go | 14 +++ scripts/licensecheck.sh | 13 ++- 9 files changed, 208 insertions(+), 111 deletions(-) diff --git a/internal/constants/constants.gen.go b/internal/constants/constants.gen.go index bd14cfe..e27b5ed 100644 --- a/internal/constants/constants.gen.go +++ b/internal/constants/constants.gen.go @@ -1,3 +1,17 @@ +// Copyright 2017 The go-libvirt Authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + /* * This file generated by internal/lvgen/generate.go. DO NOT EDIT BY HAND! * diff --git a/internal/lvgen/constants.tmpl b/internal/lvgen/constants.tmpl index 75da0ef..876c40f 100644 --- a/internal/lvgen/constants.tmpl +++ b/internal/lvgen/constants.tmpl @@ -1,3 +1,17 @@ +// Copyright 2017 The go-libvirt Authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + /* * This file generated by internal/lvgen/generate.go. DO NOT EDIT BY HAND! * diff --git a/internal/lvgen/lv-gen.go b/internal/lvgen/lv-gen.go index 5b8af82..e99b9b5 100644 --- a/internal/lvgen/lv-gen.go +++ b/internal/lvgen/lv-gen.go @@ -1,3 +1,17 @@ +// Copyright 2017 The go-libvirt Authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + // Package lvgen contains the instructions for regenerating the libvirt // bindings. We do this by parsing the remote_protocol.x file included in the // libvirt sources. Bindings will be generated if you run `go generate` in this diff --git a/internal/lvgen/procedures.tmpl b/internal/lvgen/procedures.tmpl index e8f7383..c39b3e4 100644 --- a/internal/lvgen/procedures.tmpl +++ b/internal/lvgen/procedures.tmpl @@ -1,3 +1,17 @@ +// Copyright 2017 The go-libvirt Authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + /* * This file generated by internal/lvgen/generate.go. DO NOT EDIT BY HAND! * diff --git a/internal/lvgen/sunrpc.y b/internal/lvgen/sunrpc.y index 2deea0d..ea1be41 100644 --- a/internal/lvgen/sunrpc.y +++ b/internal/lvgen/sunrpc.y @@ -1,4 +1,17 @@ %{ +// Copyright 2017 The go-libvirt Authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. package lvgen diff --git a/internal/lvgen/y.go b/internal/lvgen/y.go index 4554414..c201e78 100644 --- a/internal/lvgen/y.go +++ b/internal/lvgen/y.go @@ -1,14 +1,29 @@ //line sunrpc.y:2 + +// Copyright 2017 The go-libvirt Authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package lvgen import __yyfmt__ "fmt" -//line sunrpc.y:3 +//line sunrpc.y:16 import ( //"fmt" ) -//line sunrpc.y:12 +//line sunrpc.y:25 type yySymType struct { yys int val string @@ -87,7 +102,7 @@ const yyEofCode = 1 const yyErrCode = 2 const yyInitialStackSize = 16 -//line sunrpc.y:222 +//line sunrpc.y:235 //line yacctab:1 var yyExca = [...]int{ @@ -564,13 +579,13 @@ yydefault: case 12: yyDollar = yyS[yypt-5 : yypt+1] - //line sunrpc.y:49 + //line sunrpc.y:62 { StartEnum(yyDollar[2].val) } case 15: yyDollar = yyS[yypt-1 : yypt+1] - //line sunrpc.y:58 + //line sunrpc.y:71 { err := AddEnumAutoVal(yyDollar[1].val) if err != nil { @@ -580,7 +595,7 @@ yydefault: } case 16: yyDollar = yyS[yypt-3 : yypt+1] - //line sunrpc.y:65 + //line sunrpc.y:78 { err := AddEnumVal(yyDollar[1].val, yyDollar[3].val) if err != nil { @@ -590,7 +605,7 @@ yydefault: } case 20: yyDollar = yyS[yypt-4 : yypt+1] - //line sunrpc.y:87 + //line sunrpc.y:100 { err := AddConst(yyDollar[2].val, yyDollar[4].val) if err != nil { @@ -600,145 +615,145 @@ yydefault: } case 22: yyDollar = yyS[yypt-1 : yypt+1] - //line sunrpc.y:101 + //line sunrpc.y:114 { StartTypedef() } case 28: yyDollar = yyS[yypt-2 : yypt+1] - //line sunrpc.y:112 + //line sunrpc.y:125 { AddDeclaration(yyDollar[2].val, yyDollar[1].val) } case 30: yyDollar = yyS[yypt-2 : yypt+1] - //line sunrpc.y:117 + //line sunrpc.y:130 { yyVAL.val = "u" + yyDollar[2].val } case 31: yyDollar = yyS[yypt-1 : yypt+1] - //line sunrpc.y:118 + //line sunrpc.y:131 { yyVAL.val = "float32" } case 32: yyDollar = yyS[yypt-1 : yypt+1] - //line sunrpc.y:119 + //line sunrpc.y:132 { yyVAL.val = "float64" } case 33: yyDollar = yyS[yypt-1 : yypt+1] - //line sunrpc.y:120 + //line sunrpc.y:133 { yyVAL.val = "bool" } case 34: yyDollar = yyS[yypt-1 : yypt+1] - //line sunrpc.y:121 + //line sunrpc.y:134 { yyVAL.val = "string" } case 35: yyDollar = yyS[yypt-1 : yypt+1] - //line sunrpc.y:122 + //line sunrpc.y:135 { yyVAL.val = "byte" } case 40: yyDollar = yyS[yypt-1 : yypt+1] - //line sunrpc.y:130 + //line sunrpc.y:143 { yyVAL.val = "int64" } case 41: yyDollar = yyS[yypt-1 : yypt+1] - //line sunrpc.y:131 + //line sunrpc.y:144 { yyVAL.val = "int32" } case 42: yyDollar = yyS[yypt-1 : yypt+1] - //line sunrpc.y:132 + //line sunrpc.y:145 { yyVAL.val = "int16" } case 43: yyDollar = yyS[yypt-1 : yypt+1] - //line sunrpc.y:133 + //line sunrpc.y:146 { yyVAL.val = "int8" } case 45: yyDollar = yyS[yypt-5 : yypt+1] - //line sunrpc.y:141 + //line sunrpc.y:154 { AddFixedArray(yyDollar[2].val, yyDollar[1].val, yyDollar[4].val) } case 46: yyDollar = yyS[yypt-5 : yypt+1] - //line sunrpc.y:145 + //line sunrpc.y:158 { AddVariableArray(yyDollar[2].val, yyDollar[1].val, yyDollar[4].val) } case 47: yyDollar = yyS[yypt-4 : yypt+1] - //line sunrpc.y:146 + //line sunrpc.y:159 { AddVariableArray(yyDollar[2].val, yyDollar[1].val, "") } case 48: yyDollar = yyS[yypt-3 : yypt+1] - //line sunrpc.y:154 + //line sunrpc.y:167 { AddVariableArray(yyDollar[3].val, yyDollar[1].val, "1") } case 49: yyDollar = yyS[yypt-3 : yypt+1] - //line sunrpc.y:158 + //line sunrpc.y:171 { StartStruct(yyDollar[2].val) } case 50: yyDollar = yyS[yypt-6 : yypt+1] - //line sunrpc.y:158 + //line sunrpc.y:171 { AddStruct() } case 54: yyDollar = yyS[yypt-2 : yypt+1] - //line sunrpc.y:171 + //line sunrpc.y:184 { StartUnion(yyDollar[2].val) } case 55: yyDollar = yyS[yypt-10 : yypt+1] - //line sunrpc.y:171 + //line sunrpc.y:184 { AddUnion() } case 59: yyDollar = yyS[yypt-2 : yypt+1] - //line sunrpc.y:184 + //line sunrpc.y:197 { StartCase(yyDollar[2].val) } case 60: yyDollar = yyS[yypt-5 : yypt+1] - //line sunrpc.y:184 + //line sunrpc.y:197 { AddCase() } case 61: yyDollar = yyS[yypt-1 : yypt+1] - //line sunrpc.y:185 + //line sunrpc.y:198 { StartCase("default") } case 62: yyDollar = yyS[yypt-4 : yypt+1] - //line sunrpc.y:185 + //line sunrpc.y:198 { AddCase() } diff --git a/internal/lvgen/y.output b/internal/lvgen/y.output index 45552f6..e26528d 100644 --- a/internal/lvgen/y.output +++ b/internal/lvgen/y.output @@ -30,7 +30,7 @@ state 1 state 2 specification: definition_list. (1) - . reduce 1 (src line 25) + . reduce 1 (src line 38) state 3 @@ -44,37 +44,37 @@ state 3 state 4 definition: enum_definition. (6) - . reduce 6 (src line 39) + . reduce 6 (src line 52) state 5 definition: const_definition. (7) - . reduce 7 (src line 41) + . reduce 7 (src line 54) state 6 definition: typedef_definition. (8) - . reduce 8 (src line 42) + . reduce 8 (src line 55) state 7 definition: struct_definition. (9) - . reduce 9 (src line 43) + . reduce 9 (src line 56) state 8 definition: union_definition. (10) - . reduce 10 (src line 44) + . reduce 10 (src line 57) state 9 definition: program_definition. (11) - . reduce 11 (src line 45) + . reduce 11 (src line 58) state 10 @@ -98,7 +98,7 @@ state 12 typedef_definition: TYPEDEF.$$22 declaration $$22: . (22) - . reduce 22 (src line 100) + . reduce 22 (src line 113) $$22 goto 21 @@ -136,7 +136,7 @@ state 16 TYPEDEF shift 12 UNION shift 14 PROGRAM shift 15 - . reduce 4 (src line 34) + . reduce 4 (src line 47) definition_list goto 28 definition goto 3 @@ -157,7 +157,7 @@ state 17 state 18 enum_ident: IDENTIFIER. (17) - . reduce 17 (src line 74) + . reduce 17 (src line 87) state 19 @@ -171,7 +171,7 @@ state 19 state 20 const_ident: IDENTIFIER. (21) - . reduce 21 (src line 96) + . reduce 21 (src line 109) state 21 @@ -214,21 +214,21 @@ state 22 state 23 struct_ident: IDENTIFIER. (51) - . reduce 51 (src line 161) + . reduce 51 (src line 174) state 24 union_definition: UNION union_ident.$$54 SWITCH '(' simple_declaration ')' '{' case_list '}' $$54: . (54) - . reduce 54 (src line 170) + . reduce 54 (src line 183) $$54 goto 53 state 25 union_ident: IDENTIFIER. (56) - . reduce 56 (src line 174) + . reduce 56 (src line 187) state 26 @@ -241,13 +241,13 @@ state 26 state 27 program_ident: IDENTIFIER. (64) - . reduce 64 (src line 192) + . reduce 64 (src line 205) state 28 definition_list: definition ';' definition_list. (5) - . reduce 5 (src line 36) + . reduce 5 (src line 49) state 29 @@ -272,31 +272,31 @@ state 30 state 31 typedef_definition: TYPEDEF $$22 declaration. (23) - . reduce 23 (src line 101) + . reduce 23 (src line 114) state 32 declaration: simple_declaration. (24) - . reduce 24 (src line 104) + . reduce 24 (src line 117) state 33 declaration: fixed_array_declaration. (25) - . reduce 25 (src line 106) + . reduce 25 (src line 119) state 34 declaration: variable_array_declaration. (26) - . reduce 26 (src line 107) + . reduce 26 (src line 120) state 35 declaration: pointer_declaration. (27) - . reduce 27 (src line 108) + . reduce 27 (src line 121) state 36 @@ -315,7 +315,7 @@ state 36 state 37 type_specifier: int_spec. (29) - . reduce 29 (src line 115) + . reduce 29 (src line 128) state 38 @@ -332,86 +332,86 @@ state 38 state 39 type_specifier: FLOAT. (31) - . reduce 31 (src line 118) + . reduce 31 (src line 131) state 40 type_specifier: DOUBLE. (32) - . reduce 32 (src line 119) + . reduce 32 (src line 132) state 41 type_specifier: BOOL. (33) - . reduce 33 (src line 120) + . reduce 33 (src line 133) state 42 type_specifier: STRING. (34) - . reduce 34 (src line 121) + . reduce 34 (src line 134) state 43 type_specifier: OPAQUE. (35) - . reduce 35 (src line 122) + . reduce 35 (src line 135) state 44 type_specifier: enum_definition. (36) - . reduce 36 (src line 123) + . reduce 36 (src line 136) state 45 type_specifier: struct_definition. (37) - . reduce 37 (src line 124) + . reduce 37 (src line 137) state 46 type_specifier: union_definition. (38) - . reduce 38 (src line 125) + . reduce 38 (src line 138) state 47 type_specifier: IDENTIFIER. (39) - . reduce 39 (src line 126) + . reduce 39 (src line 139) state 48 int_spec: HYPER. (40) - . reduce 40 (src line 129) + . reduce 40 (src line 142) state 49 int_spec: INT. (41) - . reduce 41 (src line 131) + . reduce 41 (src line 144) state 50 int_spec: SHORT. (42) - . reduce 42 (src line 132) + . reduce 42 (src line 145) state 51 int_spec: CHAR. (43) - . reduce 43 (src line 133) + . reduce 43 (src line 146) state 52 struct_definition: STRUCT struct_ident '{'.$$49 declaration_list '}' $$49: . (49) - . reduce 49 (src line 157) + . reduce 49 (src line 170) $$49 goto 65 @@ -443,7 +443,7 @@ state 56 enum_value_list: enum_value.',' enum_value_list ',' shift 71 - . reduce 13 (src line 52) + . reduce 13 (src line 65) state 57 @@ -451,25 +451,25 @@ state 57 enum_value: enum_value_ident.'=' value '=' shift 72 - . reduce 15 (src line 57) + . reduce 15 (src line 70) state 58 enum_value_ident: IDENTIFIER. (18) - . reduce 18 (src line 78) + . reduce 18 (src line 91) state 59 const_definition: CONST const_ident '=' IDENTIFIER. (19) - . reduce 19 (src line 85) + . reduce 19 (src line 98) state 60 const_definition: CONST const_ident '=' CONSTANT. (20) - . reduce 20 (src line 87) + . reduce 20 (src line 100) state 61 @@ -480,7 +480,7 @@ state 61 '[' shift 73 '<' shift 74 - . reduce 28 (src line 111) + . reduce 28 (src line 124) state 62 @@ -494,13 +494,13 @@ state 62 state 63 variable_ident: IDENTIFIER. (44) - . reduce 44 (src line 136) + . reduce 44 (src line 149) state 64 type_specifier: UNSIGNED int_spec. (30) - . reduce 30 (src line 117) + . reduce 30 (src line 130) state 65 @@ -567,7 +567,7 @@ state 69 state 70 enum_definition: ENUM enum_ident '{' enum_value_list '}'. (12) - . reduce 12 (src line 48) + . reduce 12 (src line 61) state 71 @@ -612,7 +612,7 @@ state 74 state 75 pointer_declaration: type_specifier '*' variable_ident. (48) - . reduce 48 (src line 153) + . reduce 48 (src line 166) state 76 @@ -668,7 +668,7 @@ state 80 version_list: version ';'.version_list VERSION shift 69 - . reduce 65 (src line 196) + . reduce 65 (src line 209) version_list goto 95 version goto 68 @@ -683,31 +683,31 @@ state 81 state 82 version_ident: IDENTIFIER. (68) - . reduce 68 (src line 205) + . reduce 68 (src line 218) state 83 enum_value_list: enum_value ',' enum_value_list. (14) - . reduce 14 (src line 54) + . reduce 14 (src line 67) state 84 enum_value: enum_value_ident '=' value. (16) - . reduce 16 (src line 65) + . reduce 16 (src line 78) state 85 value: IDENTIFIER. (2) - . reduce 2 (src line 29) + . reduce 2 (src line 42) state 86 value: CONSTANT. (3) - . reduce 3 (src line 31) + . reduce 3 (src line 44) state 87 @@ -727,13 +727,13 @@ state 88 state 89 variable_array_declaration: type_specifier variable_ident '<' '>'. (47) - . reduce 47 (src line 146) + . reduce 47 (src line 159) state 90 struct_definition: STRUCT struct_ident '{' $$49 declaration_list '}'. (50) - . reduce 50 (src line 158) + . reduce 50 (src line 171) state 91 @@ -754,7 +754,7 @@ state 91 SHORT shift 50 CHAR shift 51 IDENTIFIER shift 47 - . reduce 52 (src line 165) + . reduce 52 (src line 178) enum_definition goto 44 struct_definition goto 45 @@ -795,7 +795,7 @@ state 94 state 95 version_list: version ';' version_list. (66) - . reduce 66 (src line 198) + . reduce 66 (src line 211) state 96 @@ -828,19 +828,19 @@ state 96 state 97 fixed_array_declaration: type_specifier variable_ident '[' value ']'. (45) - . reduce 45 (src line 140) + . reduce 45 (src line 153) state 98 variable_array_declaration: type_specifier variable_ident '<' value '>'. (46) - . reduce 46 (src line 144) + . reduce 46 (src line 157) state 99 declaration_list: declaration ';' declaration_list. (53) - . reduce 53 (src line 167) + . reduce 53 (src line 180) state 100 @@ -853,13 +853,13 @@ state 100 state 101 simple_declaration: type_specifier variable_ident. (28) - . reduce 28 (src line 111) + . reduce 28 (src line 124) state 102 program_definition: PROGRAM program_ident '{' version_list '}' '=' value. (63) - . reduce 63 (src line 188) + . reduce 63 (src line 201) state 103 @@ -920,7 +920,7 @@ state 108 SHORT shift 50 CHAR shift 51 IDENTIFIER shift 47 - . reduce 69 (src line 209) + . reduce 69 (src line 222) enum_definition goto 44 struct_definition goto 45 @@ -940,7 +940,7 @@ state 109 state 110 procedure_ident: IDENTIFIER. (72) - . reduce 72 (src line 218) + . reduce 72 (src line 231) state 111 @@ -971,7 +971,7 @@ state 114 case: DEFAULT.$$61 ':' declaration $$61: . (61) - . reduce 61 (src line 185) + . reduce 61 (src line 198) $$61 goto 121 @@ -987,7 +987,7 @@ state 115 state 116 procedure_list: procedure ';' procedure_list. (70) - . reduce 70 (src line 211) + . reduce 70 (src line 224) state 117 @@ -1018,7 +1018,7 @@ state 117 state 118 union_definition: UNION union_ident $$54 SWITCH '(' simple_declaration ')' '{' case_list '}'. (55) - . reduce 55 (src line 171) + . reduce 55 (src line 184) state 119 @@ -1027,7 +1027,7 @@ state 119 CASE shift 113 DEFAULT shift 114 - . reduce 57 (src line 178) + . reduce 57 (src line 191) case_list goto 124 case goto 112 @@ -1036,7 +1036,7 @@ state 120 case: CASE value.$$59 ':' declaration $$59: . (59) - . reduce 59 (src line 183) + . reduce 59 (src line 196) $$59 goto 125 @@ -1064,7 +1064,7 @@ state 123 state 124 case_list: case ';' case_list. (58) - . reduce 58 (src line 180) + . reduce 58 (src line 193) state 125 @@ -1107,7 +1107,7 @@ state 126 state 127 version: VERSION version_ident '{' procedure_list '}' '=' value ';'. (67) - . reduce 67 (src line 201) + . reduce 67 (src line 214) state 128 @@ -1150,7 +1150,7 @@ state 129 state 130 case: DEFAULT $$61 ':' declaration. (62) - . reduce 62 (src line 185) + . reduce 62 (src line 198) state 131 @@ -1165,7 +1165,7 @@ state 131 state 132 case: CASE value $$59 ':' declaration. (60) - . reduce 60 (src line 184) + . reduce 60 (src line 197) state 133 @@ -1178,7 +1178,7 @@ state 133 state 134 procedure: type_specifier procedure_ident '(' type_specifier ')' '=' value ';'. (71) - . reduce 71 (src line 214) + . reduce 71 (src line 227) 40 terminals, 41 nonterminals diff --git a/libvirt.gen.go b/libvirt.gen.go index d44b486..af0279e 100644 --- a/libvirt.gen.go +++ b/libvirt.gen.go @@ -1,3 +1,17 @@ +// Copyright 2017 The go-libvirt Authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + /* * This file generated by internal/lvgen/generate.go. DO NOT EDIT BY HAND! * diff --git a/scripts/licensecheck.sh b/scripts/licensecheck.sh index 917baec..8f93171 100755 --- a/scripts/licensecheck.sh +++ b/scripts/licensecheck.sh @@ -3,9 +3,9 @@ # Verify that the correct license block is present in all Go source # files. read -r -d '' EXPECTED < Date: Thu, 16 Nov 2017 19:14:34 -0500 Subject: [PATCH 18/20] 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. --- .travis.yml | 2 +- internal/constants/constants.gen.go | 10 +- internal/constants/constants.go | 1 + internal/lvgen/constants.tmpl | 10 +- internal/lvgen/procedures.tmpl | 10 +- internal/lvgen/sunrpc.y | 24 +++++ internal/lvgen/y.go | 70 +++++++------ internal/lvgen/y.output | 146 ++++++++++++++-------------- libvirt.gen.go | 10 +- 9 files changed, 157 insertions(+), 126 deletions(-) diff --git a/.travis.yml b/.travis.yml index 3e599db..bf1d346 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,7 +7,7 @@ go: - 1.9 env: - - LIBVIRT=1.2.2 EXT=gz + - LIBVIRT=1.2.12 EXT=gz - LIBVIRT=2.3.0 EXT=xz - LIBVIRT=3.1.0 EXT=xz diff --git a/internal/constants/constants.gen.go b/internal/constants/constants.gen.go index e27b5ed..afbab13 100644 --- a/internal/constants/constants.gen.go +++ b/internal/constants/constants.gen.go @@ -12,11 +12,11 @@ // See the License for the specific language governing permissions and // limitations under the License. -/* - * This file generated by internal/lvgen/generate.go. DO NOT EDIT BY HAND! - * - * To regenerate, run 'go generate' in internal/lvgen. - */ +// +// Code generated by internal/lvgen/generate.go. DO NOT EDIT. +// +// To regenerate, run 'go generate' in internal/lvgen. +// // Package constants contains libvirt procedure identifiers and other enums and // constants. diff --git a/internal/constants/constants.go b/internal/constants/constants.go index 4b7a90c..da94c25 100644 --- a/internal/constants/constants.go +++ b/internal/constants/constants.go @@ -18,6 +18,7 @@ // definitions. package constants +// qemu constants const ( ProgramQEMU = 0x20008087 ProgramKeepAlive = 0x6b656570 diff --git a/internal/lvgen/constants.tmpl b/internal/lvgen/constants.tmpl index 876c40f..2e3abe0 100644 --- a/internal/lvgen/constants.tmpl +++ b/internal/lvgen/constants.tmpl @@ -12,11 +12,11 @@ // See the License for the specific language governing permissions and // limitations under the License. -/* - * This file generated by internal/lvgen/generate.go. DO NOT EDIT BY HAND! - * - * To regenerate, run 'go generate' in internal/lvgen. - */ +// +// Code generated by internal/lvgen/generate.go. DO NOT EDIT. +// +// To regenerate, run 'go generate' in internal/lvgen. +// // Package constants contains libvirt procedure identifiers and other enums and // constants. diff --git a/internal/lvgen/procedures.tmpl b/internal/lvgen/procedures.tmpl index c39b3e4..b4047fd 100644 --- a/internal/lvgen/procedures.tmpl +++ b/internal/lvgen/procedures.tmpl @@ -12,11 +12,11 @@ // See the License for the specific language governing permissions and // limitations under the License. -/* - * This file generated by internal/lvgen/generate.go. DO NOT EDIT BY HAND! - * - * To regenerate, run 'go generate' in internal/lvgen. - */ +// +// Code generated by internal/lvgen/generate.go. DO NOT EDIT. +// +// To regenerate, run 'go generate' in internal/lvgen. +// package libvirt diff --git a/internal/lvgen/sunrpc.y b/internal/lvgen/sunrpc.y index ea1be41..d7b71ff 100644 --- a/internal/lvgen/sunrpc.y +++ b/internal/lvgen/sunrpc.y @@ -1,3 +1,21 @@ +// Copyright 2017 The go-libvirt Authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// The generated code notice below is output to the generated file. *This* file, +// (sunrpc.y) is the yacc grammar for the sunrpc protocol language, and is *not* +// generated. + %{ // Copyright 2017 The go-libvirt Authors. // @@ -13,6 +31,12 @@ // See the License for the specific language governing permissions and // limitations under the License. +// +// Code generated by goyacc. DO NOT EDIT. +// +// To regenerate, run 'go generate' in internal/lvgen. +// + package lvgen import ( diff --git a/internal/lvgen/y.go b/internal/lvgen/y.go index c201e78..ce6e698 100644 --- a/internal/lvgen/y.go +++ b/internal/lvgen/y.go @@ -1,4 +1,4 @@ -//line sunrpc.y:2 +//line sunrpc.y:20 // Copyright 2017 The go-libvirt Authors. // @@ -14,16 +14,22 @@ // See the License for the specific language governing permissions and // limitations under the License. +// +// Code generated by goyacc. DO NOT EDIT. +// +// To regenerate, run 'go generate' in internal/lvgen. +// + package lvgen import __yyfmt__ "fmt" -//line sunrpc.y:16 +//line sunrpc.y:40 import ( //"fmt" ) -//line sunrpc.y:25 +//line sunrpc.y:49 type yySymType struct { yys int val string @@ -102,7 +108,7 @@ const yyEofCode = 1 const yyErrCode = 2 const yyInitialStackSize = 16 -//line sunrpc.y:235 +//line sunrpc.y:259 //line yacctab:1 var yyExca = [...]int{ @@ -579,13 +585,13 @@ yydefault: case 12: yyDollar = yyS[yypt-5 : yypt+1] - //line sunrpc.y:62 + //line sunrpc.y:86 { StartEnum(yyDollar[2].val) } case 15: yyDollar = yyS[yypt-1 : yypt+1] - //line sunrpc.y:71 + //line sunrpc.y:95 { err := AddEnumAutoVal(yyDollar[1].val) if err != nil { @@ -595,7 +601,7 @@ yydefault: } case 16: yyDollar = yyS[yypt-3 : yypt+1] - //line sunrpc.y:78 + //line sunrpc.y:102 { err := AddEnumVal(yyDollar[1].val, yyDollar[3].val) if err != nil { @@ -605,7 +611,7 @@ yydefault: } case 20: yyDollar = yyS[yypt-4 : yypt+1] - //line sunrpc.y:100 + //line sunrpc.y:124 { err := AddConst(yyDollar[2].val, yyDollar[4].val) if err != nil { @@ -615,145 +621,145 @@ yydefault: } case 22: yyDollar = yyS[yypt-1 : yypt+1] - //line sunrpc.y:114 + //line sunrpc.y:138 { StartTypedef() } case 28: yyDollar = yyS[yypt-2 : yypt+1] - //line sunrpc.y:125 + //line sunrpc.y:149 { AddDeclaration(yyDollar[2].val, yyDollar[1].val) } case 30: yyDollar = yyS[yypt-2 : yypt+1] - //line sunrpc.y:130 + //line sunrpc.y:154 { yyVAL.val = "u" + yyDollar[2].val } case 31: yyDollar = yyS[yypt-1 : yypt+1] - //line sunrpc.y:131 + //line sunrpc.y:155 { yyVAL.val = "float32" } case 32: yyDollar = yyS[yypt-1 : yypt+1] - //line sunrpc.y:132 + //line sunrpc.y:156 { yyVAL.val = "float64" } case 33: yyDollar = yyS[yypt-1 : yypt+1] - //line sunrpc.y:133 + //line sunrpc.y:157 { yyVAL.val = "bool" } case 34: yyDollar = yyS[yypt-1 : yypt+1] - //line sunrpc.y:134 + //line sunrpc.y:158 { yyVAL.val = "string" } case 35: yyDollar = yyS[yypt-1 : yypt+1] - //line sunrpc.y:135 + //line sunrpc.y:159 { yyVAL.val = "byte" } case 40: yyDollar = yyS[yypt-1 : yypt+1] - //line sunrpc.y:143 + //line sunrpc.y:167 { yyVAL.val = "int64" } case 41: yyDollar = yyS[yypt-1 : yypt+1] - //line sunrpc.y:144 + //line sunrpc.y:168 { yyVAL.val = "int32" } case 42: yyDollar = yyS[yypt-1 : yypt+1] - //line sunrpc.y:145 + //line sunrpc.y:169 { yyVAL.val = "int16" } case 43: yyDollar = yyS[yypt-1 : yypt+1] - //line sunrpc.y:146 + //line sunrpc.y:170 { yyVAL.val = "int8" } case 45: yyDollar = yyS[yypt-5 : yypt+1] - //line sunrpc.y:154 + //line sunrpc.y:178 { AddFixedArray(yyDollar[2].val, yyDollar[1].val, yyDollar[4].val) } case 46: yyDollar = yyS[yypt-5 : yypt+1] - //line sunrpc.y:158 + //line sunrpc.y:182 { AddVariableArray(yyDollar[2].val, yyDollar[1].val, yyDollar[4].val) } case 47: yyDollar = yyS[yypt-4 : yypt+1] - //line sunrpc.y:159 + //line sunrpc.y:183 { AddVariableArray(yyDollar[2].val, yyDollar[1].val, "") } case 48: yyDollar = yyS[yypt-3 : yypt+1] - //line sunrpc.y:167 + //line sunrpc.y:191 { AddVariableArray(yyDollar[3].val, yyDollar[1].val, "1") } case 49: yyDollar = yyS[yypt-3 : yypt+1] - //line sunrpc.y:171 + //line sunrpc.y:195 { StartStruct(yyDollar[2].val) } case 50: yyDollar = yyS[yypt-6 : yypt+1] - //line sunrpc.y:171 + //line sunrpc.y:195 { AddStruct() } case 54: yyDollar = yyS[yypt-2 : yypt+1] - //line sunrpc.y:184 + //line sunrpc.y:208 { StartUnion(yyDollar[2].val) } case 55: yyDollar = yyS[yypt-10 : yypt+1] - //line sunrpc.y:184 + //line sunrpc.y:208 { AddUnion() } case 59: yyDollar = yyS[yypt-2 : yypt+1] - //line sunrpc.y:197 + //line sunrpc.y:221 { StartCase(yyDollar[2].val) } case 60: yyDollar = yyS[yypt-5 : yypt+1] - //line sunrpc.y:197 + //line sunrpc.y:221 { AddCase() } case 61: yyDollar = yyS[yypt-1 : yypt+1] - //line sunrpc.y:198 + //line sunrpc.y:222 { StartCase("default") } case 62: yyDollar = yyS[yypt-4 : yypt+1] - //line sunrpc.y:198 + //line sunrpc.y:222 { AddCase() } diff --git a/internal/lvgen/y.output b/internal/lvgen/y.output index e26528d..f23bce4 100644 --- a/internal/lvgen/y.output +++ b/internal/lvgen/y.output @@ -30,7 +30,7 @@ state 1 state 2 specification: definition_list. (1) - . reduce 1 (src line 38) + . reduce 1 (src line 62) state 3 @@ -44,37 +44,37 @@ state 3 state 4 definition: enum_definition. (6) - . reduce 6 (src line 52) + . reduce 6 (src line 76) state 5 definition: const_definition. (7) - . reduce 7 (src line 54) + . reduce 7 (src line 78) state 6 definition: typedef_definition. (8) - . reduce 8 (src line 55) + . reduce 8 (src line 79) state 7 definition: struct_definition. (9) - . reduce 9 (src line 56) + . reduce 9 (src line 80) state 8 definition: union_definition. (10) - . reduce 10 (src line 57) + . reduce 10 (src line 81) state 9 definition: program_definition. (11) - . reduce 11 (src line 58) + . reduce 11 (src line 82) state 10 @@ -98,7 +98,7 @@ state 12 typedef_definition: TYPEDEF.$$22 declaration $$22: . (22) - . reduce 22 (src line 113) + . reduce 22 (src line 137) $$22 goto 21 @@ -136,7 +136,7 @@ state 16 TYPEDEF shift 12 UNION shift 14 PROGRAM shift 15 - . reduce 4 (src line 47) + . reduce 4 (src line 71) definition_list goto 28 definition goto 3 @@ -157,7 +157,7 @@ state 17 state 18 enum_ident: IDENTIFIER. (17) - . reduce 17 (src line 87) + . reduce 17 (src line 111) state 19 @@ -171,7 +171,7 @@ state 19 state 20 const_ident: IDENTIFIER. (21) - . reduce 21 (src line 109) + . reduce 21 (src line 133) state 21 @@ -214,21 +214,21 @@ state 22 state 23 struct_ident: IDENTIFIER. (51) - . reduce 51 (src line 174) + . reduce 51 (src line 198) state 24 union_definition: UNION union_ident.$$54 SWITCH '(' simple_declaration ')' '{' case_list '}' $$54: . (54) - . reduce 54 (src line 183) + . reduce 54 (src line 207) $$54 goto 53 state 25 union_ident: IDENTIFIER. (56) - . reduce 56 (src line 187) + . reduce 56 (src line 211) state 26 @@ -241,13 +241,13 @@ state 26 state 27 program_ident: IDENTIFIER. (64) - . reduce 64 (src line 205) + . reduce 64 (src line 229) state 28 definition_list: definition ';' definition_list. (5) - . reduce 5 (src line 49) + . reduce 5 (src line 73) state 29 @@ -272,31 +272,31 @@ state 30 state 31 typedef_definition: TYPEDEF $$22 declaration. (23) - . reduce 23 (src line 114) + . reduce 23 (src line 138) state 32 declaration: simple_declaration. (24) - . reduce 24 (src line 117) + . reduce 24 (src line 141) state 33 declaration: fixed_array_declaration. (25) - . reduce 25 (src line 119) + . reduce 25 (src line 143) state 34 declaration: variable_array_declaration. (26) - . reduce 26 (src line 120) + . reduce 26 (src line 144) state 35 declaration: pointer_declaration. (27) - . reduce 27 (src line 121) + . reduce 27 (src line 145) state 36 @@ -315,7 +315,7 @@ state 36 state 37 type_specifier: int_spec. (29) - . reduce 29 (src line 128) + . reduce 29 (src line 152) state 38 @@ -332,86 +332,86 @@ state 38 state 39 type_specifier: FLOAT. (31) - . reduce 31 (src line 131) + . reduce 31 (src line 155) state 40 type_specifier: DOUBLE. (32) - . reduce 32 (src line 132) + . reduce 32 (src line 156) state 41 type_specifier: BOOL. (33) - . reduce 33 (src line 133) + . reduce 33 (src line 157) state 42 type_specifier: STRING. (34) - . reduce 34 (src line 134) + . reduce 34 (src line 158) state 43 type_specifier: OPAQUE. (35) - . reduce 35 (src line 135) + . reduce 35 (src line 159) state 44 type_specifier: enum_definition. (36) - . reduce 36 (src line 136) + . reduce 36 (src line 160) state 45 type_specifier: struct_definition. (37) - . reduce 37 (src line 137) + . reduce 37 (src line 161) state 46 type_specifier: union_definition. (38) - . reduce 38 (src line 138) + . reduce 38 (src line 162) state 47 type_specifier: IDENTIFIER. (39) - . reduce 39 (src line 139) + . reduce 39 (src line 163) state 48 int_spec: HYPER. (40) - . reduce 40 (src line 142) + . reduce 40 (src line 166) state 49 int_spec: INT. (41) - . reduce 41 (src line 144) + . reduce 41 (src line 168) state 50 int_spec: SHORT. (42) - . reduce 42 (src line 145) + . reduce 42 (src line 169) state 51 int_spec: CHAR. (43) - . reduce 43 (src line 146) + . reduce 43 (src line 170) state 52 struct_definition: STRUCT struct_ident '{'.$$49 declaration_list '}' $$49: . (49) - . reduce 49 (src line 170) + . reduce 49 (src line 194) $$49 goto 65 @@ -443,7 +443,7 @@ state 56 enum_value_list: enum_value.',' enum_value_list ',' shift 71 - . reduce 13 (src line 65) + . reduce 13 (src line 89) state 57 @@ -451,25 +451,25 @@ state 57 enum_value: enum_value_ident.'=' value '=' shift 72 - . reduce 15 (src line 70) + . reduce 15 (src line 94) state 58 enum_value_ident: IDENTIFIER. (18) - . reduce 18 (src line 91) + . reduce 18 (src line 115) state 59 const_definition: CONST const_ident '=' IDENTIFIER. (19) - . reduce 19 (src line 98) + . reduce 19 (src line 122) state 60 const_definition: CONST const_ident '=' CONSTANT. (20) - . reduce 20 (src line 100) + . reduce 20 (src line 124) state 61 @@ -480,7 +480,7 @@ state 61 '[' shift 73 '<' shift 74 - . reduce 28 (src line 124) + . reduce 28 (src line 148) state 62 @@ -494,13 +494,13 @@ state 62 state 63 variable_ident: IDENTIFIER. (44) - . reduce 44 (src line 149) + . reduce 44 (src line 173) state 64 type_specifier: UNSIGNED int_spec. (30) - . reduce 30 (src line 130) + . reduce 30 (src line 154) state 65 @@ -567,7 +567,7 @@ state 69 state 70 enum_definition: ENUM enum_ident '{' enum_value_list '}'. (12) - . reduce 12 (src line 61) + . reduce 12 (src line 85) state 71 @@ -612,7 +612,7 @@ state 74 state 75 pointer_declaration: type_specifier '*' variable_ident. (48) - . reduce 48 (src line 166) + . reduce 48 (src line 190) state 76 @@ -668,7 +668,7 @@ state 80 version_list: version ';'.version_list VERSION shift 69 - . reduce 65 (src line 209) + . reduce 65 (src line 233) version_list goto 95 version goto 68 @@ -683,31 +683,31 @@ state 81 state 82 version_ident: IDENTIFIER. (68) - . reduce 68 (src line 218) + . reduce 68 (src line 242) state 83 enum_value_list: enum_value ',' enum_value_list. (14) - . reduce 14 (src line 67) + . reduce 14 (src line 91) state 84 enum_value: enum_value_ident '=' value. (16) - . reduce 16 (src line 78) + . reduce 16 (src line 102) state 85 value: IDENTIFIER. (2) - . reduce 2 (src line 42) + . reduce 2 (src line 66) state 86 value: CONSTANT. (3) - . reduce 3 (src line 44) + . reduce 3 (src line 68) state 87 @@ -727,13 +727,13 @@ state 88 state 89 variable_array_declaration: type_specifier variable_ident '<' '>'. (47) - . reduce 47 (src line 159) + . reduce 47 (src line 183) state 90 struct_definition: STRUCT struct_ident '{' $$49 declaration_list '}'. (50) - . reduce 50 (src line 171) + . reduce 50 (src line 195) state 91 @@ -754,7 +754,7 @@ state 91 SHORT shift 50 CHAR shift 51 IDENTIFIER shift 47 - . reduce 52 (src line 178) + . reduce 52 (src line 202) enum_definition goto 44 struct_definition goto 45 @@ -795,7 +795,7 @@ state 94 state 95 version_list: version ';' version_list. (66) - . reduce 66 (src line 211) + . reduce 66 (src line 235) state 96 @@ -828,19 +828,19 @@ state 96 state 97 fixed_array_declaration: type_specifier variable_ident '[' value ']'. (45) - . reduce 45 (src line 153) + . reduce 45 (src line 177) state 98 variable_array_declaration: type_specifier variable_ident '<' value '>'. (46) - . reduce 46 (src line 157) + . reduce 46 (src line 181) state 99 declaration_list: declaration ';' declaration_list. (53) - . reduce 53 (src line 180) + . reduce 53 (src line 204) state 100 @@ -853,13 +853,13 @@ state 100 state 101 simple_declaration: type_specifier variable_ident. (28) - . reduce 28 (src line 124) + . reduce 28 (src line 148) state 102 program_definition: PROGRAM program_ident '{' version_list '}' '=' value. (63) - . reduce 63 (src line 201) + . reduce 63 (src line 225) state 103 @@ -920,7 +920,7 @@ state 108 SHORT shift 50 CHAR shift 51 IDENTIFIER shift 47 - . reduce 69 (src line 222) + . reduce 69 (src line 246) enum_definition goto 44 struct_definition goto 45 @@ -940,7 +940,7 @@ state 109 state 110 procedure_ident: IDENTIFIER. (72) - . reduce 72 (src line 231) + . reduce 72 (src line 255) state 111 @@ -971,7 +971,7 @@ state 114 case: DEFAULT.$$61 ':' declaration $$61: . (61) - . reduce 61 (src line 198) + . reduce 61 (src line 222) $$61 goto 121 @@ -987,7 +987,7 @@ state 115 state 116 procedure_list: procedure ';' procedure_list. (70) - . reduce 70 (src line 224) + . reduce 70 (src line 248) state 117 @@ -1018,7 +1018,7 @@ state 117 state 118 union_definition: UNION union_ident $$54 SWITCH '(' simple_declaration ')' '{' case_list '}'. (55) - . reduce 55 (src line 184) + . reduce 55 (src line 208) state 119 @@ -1027,7 +1027,7 @@ state 119 CASE shift 113 DEFAULT shift 114 - . reduce 57 (src line 191) + . reduce 57 (src line 215) case_list goto 124 case goto 112 @@ -1036,7 +1036,7 @@ state 120 case: CASE value.$$59 ':' declaration $$59: . (59) - . reduce 59 (src line 196) + . reduce 59 (src line 220) $$59 goto 125 @@ -1064,7 +1064,7 @@ state 123 state 124 case_list: case ';' case_list. (58) - . reduce 58 (src line 193) + . reduce 58 (src line 217) state 125 @@ -1107,7 +1107,7 @@ state 126 state 127 version: VERSION version_ident '{' procedure_list '}' '=' value ';'. (67) - . reduce 67 (src line 214) + . reduce 67 (src line 238) state 128 @@ -1150,7 +1150,7 @@ state 129 state 130 case: DEFAULT $$61 ':' declaration. (62) - . reduce 62 (src line 198) + . reduce 62 (src line 222) state 131 @@ -1165,7 +1165,7 @@ state 131 state 132 case: CASE value $$59 ':' declaration. (60) - . reduce 60 (src line 197) + . reduce 60 (src line 221) state 133 @@ -1178,7 +1178,7 @@ state 133 state 134 procedure: type_specifier procedure_ident '(' type_specifier ')' '=' value ';'. (71) - . reduce 71 (src line 227) + . reduce 71 (src line 251) 40 terminals, 41 nonterminals diff --git a/libvirt.gen.go b/libvirt.gen.go index af0279e..6e3b365 100644 --- a/libvirt.gen.go +++ b/libvirt.gen.go @@ -12,11 +12,11 @@ // See the License for the specific language governing permissions and // limitations under the License. -/* - * This file generated by internal/lvgen/generate.go. DO NOT EDIT BY HAND! - * - * To regenerate, run 'go generate' in internal/lvgen. - */ +// +// Code generated by internal/lvgen/generate.go. DO NOT EDIT. +// +// To regenerate, run 'go generate' in internal/lvgen. +// package libvirt From 1e71d0e45ed12544e4a043fe2fa3056d84660223 Mon Sep 17 00:00:00 2001 From: Geoff Hickey Date: Thu, 16 Nov 2017 19:27:00 -0500 Subject: [PATCH 19/20] Shorten an error path --- internal/lvgen/generate.go | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/internal/lvgen/generate.go b/internal/lvgen/generate.go index 5eb6c3d..acc5048 100644 --- a/internal/lvgen/generate.go +++ b/internal/lvgen/generate.go @@ -260,11 +260,7 @@ func genGo(constFile, procFile io.Writer) error { if err != nil { return err } - if err := t.Execute(procFile, Gen); err != nil { - return err - } - - return nil + return t.Execute(procFile, Gen) } // constNameTransform changes an upcased, snake-style name like From 382425aa72c22948a361833ed37d1c657d273402 Mon Sep 17 00:00:00 2001 From: Geoff Hickey Date: Thu, 16 Nov 2017 19:56:41 -0500 Subject: [PATCH 20/20] Update the README. --- README.md | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 9fa052b..685ff33 100644 --- a/README.md +++ b/README.md @@ -8,9 +8,15 @@ Libvirt's RPC interface, as documented [here](https://libvirt.org/internals/rpc. Connections to the libvirt server may be local, or remote. RPC packets are encoded using the XDR standard as defined by [RFC 4506](https://tools.ietf.org/html/rfc4506.html). -This should be considered a work in progress. Most functionaly provided by the C -bindings have not yet made their way into this library. [Pull requests are welcome](https://github.com/digitalocean/go-libvirt/blob/master/CONTRIBUTING.md)! -The definition of the RPC protocol is in the libvirt source tree under [src/rpc/virnetprotocol.x](https://github.com/libvirt/libvirt/blob/master/src/rpc/virnetprotocol.x). +Libvirt's RPC interface is quite extensive, and changes from one version to the next, so +this project uses a code generator to build the go bindings. The code generator should +be run whenever you want to build go-libvirt for a new version of libvirt. To do this, +you'll need to set an environment variable `LIBVIRT_SOURCE` to the directory containing +the untarred libvirt sources, and then run `go generate ./...` from the go-libvirt directory. +The code generator consumes [src/remote/remote_protocol.x](https://github.com/libvirt/libvirt/blob/master/src/remote/remote_protocol.x) +and produces go bindings for all the remote procedures defined there. + +[Pull requests are welcome](https://github.com/digitalocean/go-libvirt/blob/master/CONTRIBUTING.md)! Feel free to join us in [`#go-qemu` on freenode](https://webchat.freenode.net/) if you'd like to discuss the project.