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

Method StoragePoolCreateXML

remote_protocol.gen.go:6658–6689  ·  view source on GitHub ↗

StoragePoolCreateXML is the go wrapper for REMOTE_PROC_STORAGE_POOL_CREATE_XML.

(XML string, Flags StoragePoolCreateFlags)

Source from the content-addressed store, hash-verified

6656
6657// StoragePoolCreateXML is the go wrapper for REMOTE_PROC_STORAGE_POOL_CREATE_XML.
6658func (l *Libvirt) StoragePoolCreateXML(XML string, Flags StoragePoolCreateFlags) (rPool StoragePool, err error) {
6659 var buf []byte
6660
6661 args := StoragePoolCreateXMLArgs {
6662 XML: XML,
6663 Flags: Flags,
6664 }
6665
6666 buf, err = encode(&args)
6667 if err != nil {
6668 return
6669 }
6670
6671 var r response
6672 r, err = l.requestStream(76, constants.Program, buf, nil, nil)
6673 if err != nil {
6674 return
6675 }
6676
6677 // Return value unmarshaling
6678 tpd := typedParamDecoder{}
6679 ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
6680 rdr := bytes.NewReader(r.Payload)
6681 dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
6682 // Pool: StoragePool
6683 _, err = dec.Decode(&rPool)
6684 if err != nil {
6685 return
6686 }
6687
6688 return
6689}
6690
6691// StoragePoolDefineXML is the go wrapper for REMOTE_PROC_STORAGE_POOL_DEFINE_XML.
6692func (l *Libvirt) StoragePoolDefineXML(XML string, Flags uint32) (rPool StoragePool, err error) {

Callers

nothing calls this directly

Calls 3

requestStreamMethod · 0.95
encodeFunction · 0.85
DecodeMethod · 0.65

Tested by

no test coverage detected