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

Method ConnectFindStoragePoolSources

remote_protocol.gen.go:6623–6655  ·  view source on GitHub ↗

ConnectFindStoragePoolSources is the go wrapper for REMOTE_PROC_CONNECT_FIND_STORAGE_POOL_SOURCES.

(Type string, SrcSpec OptString, Flags uint32)

Source from the content-addressed store, hash-verified

6621
6622// ConnectFindStoragePoolSources is the go wrapper for REMOTE_PROC_CONNECT_FIND_STORAGE_POOL_SOURCES.
6623func (l *Libvirt) ConnectFindStoragePoolSources(Type string, SrcSpec OptString, Flags uint32) (rXML string, err error) {
6624 var buf []byte
6625
6626 args := ConnectFindStoragePoolSourcesArgs {
6627 Type: Type,
6628 SrcSpec: SrcSpec,
6629 Flags: Flags,
6630 }
6631
6632 buf, err = encode(&args)
6633 if err != nil {
6634 return
6635 }
6636
6637 var r response
6638 r, err = l.requestStream(75, constants.Program, buf, nil, nil)
6639 if err != nil {
6640 return
6641 }
6642
6643 // Return value unmarshaling
6644 tpd := typedParamDecoder{}
6645 ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
6646 rdr := bytes.NewReader(r.Payload)
6647 dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
6648 // XML: string
6649 _, err = dec.Decode(&rXML)
6650 if err != nil {
6651 return
6652 }
6653
6654 return
6655}
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) {

Callers

nothing calls this directly

Calls 3

requestStreamMethod · 0.95
encodeFunction · 0.85
DecodeMethod · 0.65

Tested by

no test coverage detected