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

Method StoragePoolLookupByTargetPath

remote_protocol.gen.go:15565–15595  ·  view source on GitHub ↗

StoragePoolLookupByTargetPath is the go wrapper for REMOTE_PROC_STORAGE_POOL_LOOKUP_BY_TARGET_PATH.

(Path string)

Source from the content-addressed store, hash-verified

15563
15564// StoragePoolLookupByTargetPath is the go wrapper for REMOTE_PROC_STORAGE_POOL_LOOKUP_BY_TARGET_PATH.
15565func (l *Libvirt) StoragePoolLookupByTargetPath(Path string) (rPool StoragePool, err error) {
15566 var buf []byte
15567
15568 args := StoragePoolLookupByTargetPathArgs {
15569 Path: Path,
15570 }
15571
15572 buf, err = encode(&args)
15573 if err != nil {
15574 return
15575 }
15576
15577 var r response
15578 r, err = l.requestStream(391, constants.Program, buf, nil, nil)
15579 if err != nil {
15580 return
15581 }
15582
15583 // Return value unmarshaling
15584 tpd := typedParamDecoder{}
15585 ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
15586 rdr := bytes.NewReader(r.Payload)
15587 dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
15588 // Pool: StoragePool
15589 _, err = dec.Decode(&rPool)
15590 if err != nil {
15591 return
15592 }
15593
15594 return
15595}
15596
15597// DomainDetachDeviceAlias is the go wrapper for REMOTE_PROC_DOMAIN_DETACH_DEVICE_ALIAS.
15598func (l *Libvirt) DomainDetachDeviceAlias(Dom Domain, Alias string, Flags uint32) (err error) {

Callers

nothing calls this directly

Calls 3

requestStreamMethod · 0.95
encodeFunction · 0.85
DecodeMethod · 0.65

Tested by

no test coverage detected