Skip to content

Commit

Permalink
go.mod: Switch to libvirt.org/go/libvirt@v1.8000.0
Browse files Browse the repository at this point in the history
The upstream bindings have been moved/renamed from
github.com/libvirt/libvirt-go to libvirt.org/go/libvirt

This raises the minimum libvirt version needed to 8.0.0 as it's been in
RHEL8 for a few releases, which is the older releases crc supports.
  • Loading branch information
cfergeau authored and anjannath committed Dec 21, 2023
1 parent 160615f commit bd62139
Show file tree
Hide file tree
Showing 107 changed files with 2,219 additions and 403 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ module github.com/crc-org/machine-driver-libvirt

require (
github.com/crc-org/machine v0.0.0-20221028075518-f9b43442196b
github.com/libvirt/libvirt-go v6.0.0+incompatible
github.com/sirupsen/logrus v1.9.3
github.com/stretchr/testify v1.8.4
libvirt.org/go/libvirt v1.8000.0
libvirt.org/go/libvirtxml v1.9004.0
)

Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
github.com/libvirt/libvirt-go v6.0.0+incompatible h1:zGL0R7xG+9yGvRNlNbJtMugA0wn6WRLqY4coGuRE+GU=
github.com/libvirt/libvirt-go v6.0.0+incompatible/go.mod h1:34zsnB4iGeOv7Byj6qotuW8Ya4v4Tr43ttjz/F0wjLE=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ=
Expand All @@ -29,5 +27,7 @@ gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EV
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
libvirt.org/go/libvirt v1.8000.0 h1:1sOyBCZA7t0xHrih3lF3h3CFDAlZFaulIzFtNDVtnW0=
libvirt.org/go/libvirt v1.8000.0/go.mod h1:1WiFE8EjZfq+FCVog+rvr1yatKbKZ9FaFMZgEqxEJqQ=
libvirt.org/go/libvirtxml v1.9004.0 h1:h+nhEZCABCnK4go0GLRN2WZhIhRrLAqsz84t553oiM4=
libvirt.org/go/libvirtxml v1.9004.0/go.mod h1:7Oq2BLDstLr/XtoQD8Fr3mfDNrzlI3utYKySXF2xkng=
2 changes: 1 addition & 1 deletion pkg/libvirt/domain.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package libvirt
import (
"fmt"

"github.com/libvirt/libvirt-go"
"libvirt.org/go/libvirt"
"libvirt.org/go/libvirtxml"

"github.com/crc-org/machine/libmachine/drivers"
Expand Down
4 changes: 2 additions & 2 deletions pkg/libvirt/libvirt.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ import (
libvirtdriver "github.com/crc-org/machine/drivers/libvirt"
"github.com/crc-org/machine/libmachine/drivers"
"github.com/crc-org/machine/libmachine/state"
"github.com/libvirt/libvirt-go"
log "github.com/sirupsen/logrus"
"libvirt.org/go/libvirt"
"libvirt.org/go/libvirtxml"
)

Expand Down Expand Up @@ -525,7 +525,7 @@ func (d *Driver) GetIP() (string, error) {
for _, iface := range ifaces {
if iface.Hwaddr == macAddress {
for _, addr := range iface.Addrs {
if addr.Type == int(libvirt.IP_ADDR_TYPE_IPV4) { // ipv4
if addr.Type == libvirt.IP_ADDR_TYPE_IPV4 { // ipv4
log.Debugf("IP address: %s", addr.Addr)
return addr.Addr, nil
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/libvirt/storage.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"fmt"
"os"

"github.com/libvirt/libvirt-go"
log "github.com/sirupsen/logrus"
"libvirt.org/go/libvirt"
"libvirt.org/go/libvirtxml"
)

Expand Down
4 changes: 0 additions & 4 deletions vendor/github.com/libvirt/libvirt-go/.gitpublish

This file was deleted.

44 changes: 0 additions & 44 deletions vendor/github.com/libvirt/libvirt-go/.travis.yml

This file was deleted.

19 changes: 0 additions & 19 deletions vendor/github.com/libvirt/libvirt-go/FAQ.md

This file was deleted.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

53 changes: 53 additions & 0 deletions vendor/libvirt.org/go/libvirt/.gitlab-ci.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

28 changes: 28 additions & 0 deletions vendor/libvirt.org/go/libvirt/CONTRIBUTING.rst

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

File renamed without changes.

0 comments on commit bd62139

Please sign in to comment.