clustvirt/main.go

23 lines
519 B
Go
Raw Normal View History

package main
import (
"log"
)
func main() {
log.Println("Starting clustvirt, the libvirt cluster manager")
// Try connecting to libvirt
doms, err := GetDomsInCluster("earth.staur.ca", "mars.staur.ca", "venus.staur.ca")
if err != nil {
log.Fatal(err)
}
log.Printf("Domains in cluster: %d", len(doms))
// Example of xmlns uri found in libvirt xml definition:
// xmlns:libosinfo="http://libosinfo.org/xmlns/libvirt/domain/1.0"
for _, d := range doms {
log.Println(d.GetMetadata(0, "", 0))
d.Free()
}
}