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

Method StoragePoolLookupByUUID

remote_protocol.gen.go:6895–6925  ·  view source on GitHub ↗

StoragePoolLookupByUUID is the go wrapper for REMOTE_PROC_STORAGE_POOL_LOOKUP_BY_UUID.

(UUID UUID)

Source from the content-addressed store, hash-verified

6893
6894// StoragePoolLookupByUUID is the go wrapper for REMOTE_PROC_STORAGE_POOL_LOOKUP_BY_UUID.
6895func (l *Libvirt) StoragePoolLookupByUUID(UUID UUID) (rPool StoragePool, err error) {
6896 var buf []byte
6897
6898 args := StoragePoolLookupByUUIDArgs {
6899 UUID: UUID,
6900 }
6901
6902 buf, err = encode(&args)
6903 if err != nil {
6904 return
6905 }
6906
6907 var r response
6908 r, err = l.requestStream(85, constants.Program, buf, nil, nil)
6909 if err != nil {
6910 return
6911 }
6912
6913 // Return value unmarshaling
6914 tpd := typedParamDecoder{}
6915 ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
6916 rdr := bytes.NewReader(r.Payload)
6917 dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
6918 // Pool: StoragePool
6919 _, err = dec.Decode(&rPool)
6920 if err != nil {
6921 return
6922 }
6923
6924 return
6925}
6926
6927// StoragePoolLookupByVolume is the go wrapper for REMOTE_PROC_STORAGE_POOL_LOOKUP_BY_VOLUME.
6928func (l *Libvirt) StoragePoolLookupByVolume(Vol StorageVol) (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