MCPcopy Create free account
hub / github.com/digitalocean/go-libvirt / DomainCreateXMLWithFiles

Method DomainCreateXMLWithFiles

remote_protocol.gen.go:13683–13714  ·  view source on GitHub ↗

DomainCreateXMLWithFiles is the go wrapper for REMOTE_PROC_DOMAIN_CREATE_XML_WITH_FILES.

(XMLDesc string, Flags DomainCreateFlags)

Source from the content-addressed store, hash-verified

13681
13682// DomainCreateXMLWithFiles is the go wrapper for REMOTE_PROC_DOMAIN_CREATE_XML_WITH_FILES.
13683func (l *Libvirt) DomainCreateXMLWithFiles(XMLDesc string, Flags DomainCreateFlags) (rDom Domain, err error) {
13684 var buf []byte
13685
13686 args := DomainCreateXMLWithFilesArgs {
13687 XMLDesc: XMLDesc,
13688 Flags: Flags,
13689 }
13690
13691 buf, err = encode(&args)
13692 if err != nil {
13693 return
13694 }
13695
13696 var r response
13697 r, err = l.requestStream(309, constants.Program, buf, nil, nil)
13698 if err != nil {
13699 return
13700 }
13701
13702 // Return value unmarshaling
13703 tpd := typedParamDecoder{}
13704 ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
13705 rdr := bytes.NewReader(r.Payload)
13706 dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
13707 // Dom: Domain
13708 _, err = dec.Decode(&rDom)
13709 if err != nil {
13710 return
13711 }
13712
13713 return
13714}
13715
13716// DomainCreateWithFiles is the go wrapper for REMOTE_PROC_DOMAIN_CREATE_WITH_FILES.
13717func (l *Libvirt) DomainCreateWithFiles(Dom Domain, Flags DomainCreateFlags) (rDom Domain, err error) {

Callers

nothing calls this directly

Calls 3

requestStreamMethod · 0.95
encodeFunction · 0.85
DecodeMethod · 0.65

Tested by

no test coverage detected