Skip to content
Snippets Groups Projects
Commit 24495145 authored by Daniel P. Berrangé's avatar Daniel P. Berrangé :speech_balloon:
Browse files

Expose node device XML flags

parent 9dc17b27
No related branches found
No related tags found
1 merge request!52Update for new node device APIs in 10.1.0 release
...@@ -67,6 +67,12 @@ const ( ...@@ -67,6 +67,12 @@ const (
NODE_DEVICE_DEFINE_XML_VALIDATE = NodeDeviceDefineXMLFlags(C.VIR_NODE_DEVICE_DEFINE_XML_VALIDATE) NODE_DEVICE_DEFINE_XML_VALIDATE = NodeDeviceDefineXMLFlags(C.VIR_NODE_DEVICE_DEFINE_XML_VALIDATE)
) )
type NodeDeviceXMLFlags int
const (
NODE_DEVICE_XML_INACTIVE = NodeDeviceXMLFlags(C.VIR_NODE_DEVICE_XML_INACTIVE)
)
type NodeDevice struct { type NodeDevice struct {
ptr C.virNodeDevicePtr ptr C.virNodeDevicePtr
} }
...@@ -154,7 +160,7 @@ func (n *NodeDevice) GetName() (string, error) { ...@@ -154,7 +160,7 @@ func (n *NodeDevice) GetName() (string, error) {
} }
// See also https://libvirt.org/html/libvirt-libvirt-nodedev.html#virNodeDeviceGetXMLDesc // See also https://libvirt.org/html/libvirt-libvirt-nodedev.html#virNodeDeviceGetXMLDesc
func (n *NodeDevice) GetXMLDesc(flags uint32) (string, error) { func (n *NodeDevice) GetXMLDesc(flags NodeDeviceXMLFlags) (string, error) {
var err C.virError var err C.virError
result := C.virNodeDeviceGetXMLDescWrapper(n.ptr, C.uint(flags), &err) result := C.virNodeDeviceGetXMLDescWrapper(n.ptr, C.uint(flags), &err)
if result == nil { if result == nil {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment