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

Method InterfaceLookupByMacString

remote_protocol.gen.go:8280–8310  ·  view source on GitHub ↗

InterfaceLookupByMacString is the go wrapper for REMOTE_PROC_INTERFACE_LOOKUP_BY_MAC_STRING.

(Mac string)

Source from the content-addressed store, hash-verified

8278
8279// InterfaceLookupByMacString is the go wrapper for REMOTE_PROC_INTERFACE_LOOKUP_BY_MAC_STRING.
8280func (l *Libvirt) InterfaceLookupByMacString(Mac string) (rIface Interface, err error) {
8281 var buf []byte
8282
8283 args := InterfaceLookupByMacStringArgs {
8284 Mac: Mac,
8285 }
8286
8287 buf, err = encode(&args)
8288 if err != nil {
8289 return
8290 }
8291
8292 var r response
8293 r, err = l.requestStream(129, constants.Program, buf, nil, nil)
8294 if err != nil {
8295 return
8296 }
8297
8298 // Return value unmarshaling
8299 tpd := typedParamDecoder{}
8300 ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
8301 rdr := bytes.NewReader(r.Payload)
8302 dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
8303 // Iface: Interface
8304 _, err = dec.Decode(&rIface)
8305 if err != nil {
8306 return
8307 }
8308
8309 return
8310}
8311
8312// InterfaceGetXMLDesc is the go wrapper for REMOTE_PROC_INTERFACE_GET_XML_DESC.
8313func (l *Libvirt) InterfaceGetXMLDesc(Iface Interface, Flags uint32) (rXML string, err error) {

Callers

nothing calls this directly

Calls 3

requestStreamMethod · 0.95
encodeFunction · 0.85
DecodeMethod · 0.65

Tested by

no test coverage detected