This repository has been archived by the owner on Mar 3, 2023. It is now read-only.
forked from thecodeteam/libstorage
/
vbox_soap.go
99 lines (82 loc) · 3.22 KB
/
vbox_soap.go
1
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
package client
import "encoding/xml"
type envelope struct {
XMLName xml.Name `xml:"http://schemas.xmlsoap.org/soap/envelope/ Envelope,omniempty"`
Body struct {
XMLName xml.Name `xml:"http://schemas.xmlsoap.org/soap/envelope/ Body,omniempty"`
Payload []byte `xml:",innerxml"`
Fault *fault `xml:",omitempty"`
}
}
type fault struct {
XMLName xml.Name `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault"`
Code string `xml:"faultcode,omitempty"`
String string `xml:"faultstring,omitempty"`
Actor string `xml:"faultactor,omitempty"`
Detail string `xml:"detail,omitempty"`
}
type logonRequest struct {
XMLName xml.Name `xml:"http://www.virtualbox.org/ IWebsessionManager_logon"`
Username string `xml:"username,omitempty"`
Password string `xml:"password,omitempty"`
}
type logonResponse struct {
XMLName xml.Name `xml:"IWebsessionManager_logonResponse"`
Returnval string `xml:"returnval,omitempty"`
}
type findMachineRequest struct {
XMLName xml.Name `xml:"http://www.virtualbox.org/ IVirtualBox_findMachine"`
VbID string `xml:"_this,omitempty"`
NameOrID string `xml:"nameOrId,omitempty"`
}
type findMachineResponse struct {
XMLName xml.Name `xml:"IVirtualBox_findMachineResponse"`
Returnval string `xml:"returnval,omitempty"`
}
type getMachineIDRequest struct {
XMLName xml.Name `xml:"http://www.virtualbox.org/ IMachine_getId"`
Mobref string `xml:"_this,omitempty"`
}
type getMachineIDResponse struct {
XMLName xml.Name `xml:"IMachine_getIdResponse"`
Returnval string `xml:"returnval,omitempty"`
}
type getMachineNameRequest struct {
XMLName xml.Name `xml:"http://www.virtualbox.org/ IMachine_getName"`
Mobref string `xml:"_this,omitempty"`
}
type getMachineNameResponse struct {
XMLName xml.Name `xml:"IMachine_getNameResponse"`
Returnval string `xml:"returnval,omitempty"`
}
type getMachinesRequest struct {
XMLName xml.Name `xml:"http://www.virtualbox.org/ IVirtualBox_getMachines"`
MobRef string `xml:"_this,omitempty"`
}
type getMachinesResponse struct {
XMLName xml.Name `xml:"http://www.virtualbox.org/ IVirtualBox_getMachinesResponse"`
Returnval []string `xml:"returnval,omitempty"`
}
type mediumAttachment struct {
XMLName xml.Name `xml:"http://www.virtualbox.org/ IMediumAttachment"`
Medium string `xml:"medium,omitempty"`
Controller string `xml:"controller,omitempty"`
Port int32 `xml:"port,omitempty"`
Device int32 `xml:"device,omitempty"`
Type string `xml:"type,omitempty"`
Passthrough bool `xml:"passthrough,omitempty"`
TemporaryEject bool `xml:"temporaryEject,omitempty"`
IsEjected bool `xml:"isEjected,omitempty"`
NonRotational bool `xml:"nonRotational,omitempty"`
Discard bool `xml:"discard,omitempty"`
HotPluggable bool `xml:"hotPluggable,omitempty"`
BandwidthGroup string `xml:"bandwidthGroup,omitempty"`
}
type getMediumAttachmentsRequest struct {
XMLName xml.Name `xml:"http://www.virtualbox.org/ IMachine_getMediumAttachments"`
Mobref string `xml:"_this,omitempty"`
}
type getMediumAttachmentsResponse struct {
XMLName xml.Name `xml:"IMachine_getMediumAttachmentsResponse"`
Returnval []*mediumAttachment `xml:"returnval,omitempty"`
}