StoragePoolLookupByUUID is the go wrapper for REMOTE_PROC_STORAGE_POOL_LOOKUP_BY_UUID.
(UUID UUID)
| 6893 | |
| 6894 | // StoragePoolLookupByUUID is the go wrapper for REMOTE_PROC_STORAGE_POOL_LOOKUP_BY_UUID. |
| 6895 | func (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. |
| 6928 | func (l *Libvirt) StoragePoolLookupByVolume(Vol StorageVol) (rPool StoragePool, err error) { |
nothing calls this directly
no test coverage detected