Skip to content

Commit d40a9e3

Browse files
authored
refactor: bump github.com/digitalocean/go-libvirt to drop go-xdr dependency (#40254)
* refactor: bump github.com/digitalocean/go-libvirt to drop go-xdr dep we're using an old version of github.com/digitalocean/go-libvirt. Bump to latest to drop go-xdr dependency * lint: update method names and remove deprecated methods * lint: fix linter issues
1 parent 1a6318d commit d40a9e3

File tree

7 files changed

+72
-78
lines changed

7 files changed

+72
-78
lines changed

NOTICE.txt

Lines changed: 14 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -11095,11 +11095,11 @@ Contents of probable licence file $GOMODCACHE/github.com/dgraph-io/badger/v3@v3.
1109511095

1109611096
--------------------------------------------------------------------------------
1109711097
Dependency : github.com/digitalocean/go-libvirt
11098-
Version: v0.0.0-20180301200012-6075ea3c39a1
11098+
Version: v0.0.0-20240709142323-d8406205c752
1109911099
Licence type (autodetected): Apache-2.0
1110011100
--------------------------------------------------------------------------------
1110111101

11102-
Contents of probable licence file $GOMODCACHE/github.com/digitalocean/go-libvirt@v0.0.0-20180301200012-6075ea3c39a1/LICENSE.md:
11102+
Contents of probable licence file $GOMODCACHE/github.com/digitalocean/go-libvirt@v0.0.0-20240709142323-d8406205c752/LICENSE.md:
1110311103

1110411104
Apache License
1110511105
==============
@@ -24425,11 +24425,11 @@ THE SOFTWARE.
2442524425

2442624426
--------------------------------------------------------------------------------
2442724427
Dependency : golang.org/x/crypto
24428-
Version: v0.24.0
24428+
Version: v0.25.0
2442924429
Licence type (autodetected): BSD-3-Clause
2443024430
--------------------------------------------------------------------------------
2443124431

24432-
Contents of probable licence file $GOMODCACHE/golang.org/x/crypto@v0.24.0/LICENSE:
24432+
Contents of probable licence file $GOMODCACHE/golang.org/x/crypto@v0.25.0/LICENSE:
2443324433

2443424434
Copyright (c) 2009 The Go Authors. All rights reserved.
2443524435

@@ -24462,11 +24462,11 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2446224462

2446324463
--------------------------------------------------------------------------------
2446424464
Dependency : golang.org/x/mod
24465-
Version: v0.18.0
24465+
Version: v0.19.0
2446624466
Licence type (autodetected): BSD-3-Clause
2446724467
--------------------------------------------------------------------------------
2446824468

24469-
Contents of probable licence file $GOMODCACHE/golang.org/x/mod@v0.18.0/LICENSE:
24469+
Contents of probable licence file $GOMODCACHE/golang.org/x/mod@v0.19.0/LICENSE:
2447024470

2447124471
Copyright (c) 2009 The Go Authors. All rights reserved.
2447224472

@@ -24499,11 +24499,11 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2449924499

2450024500
--------------------------------------------------------------------------------
2450124501
Dependency : golang.org/x/net
24502-
Version: v0.26.0
24502+
Version: v0.27.0
2450324503
Licence type (autodetected): BSD-3-Clause
2450424504
--------------------------------------------------------------------------------
2450524505

24506-
Contents of probable licence file $GOMODCACHE/golang.org/x/net@v0.26.0/LICENSE:
24506+
Contents of probable licence file $GOMODCACHE/golang.org/x/net@v0.27.0/LICENSE:
2450724507

2450824508
Copyright (c) 2009 The Go Authors. All rights reserved.
2450924509

@@ -24610,11 +24610,11 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2461024610

2461124611
--------------------------------------------------------------------------------
2461224612
Dependency : golang.org/x/sys
24613-
Version: v0.21.0
24613+
Version: v0.22.0
2461424614
Licence type (autodetected): BSD-3-Clause
2461524615
--------------------------------------------------------------------------------
2461624616

24617-
Contents of probable licence file $GOMODCACHE/golang.org/x/sys@v0.21.0/LICENSE:
24617+
Contents of probable licence file $GOMODCACHE/golang.org/x/sys@v0.22.0/LICENSE:
2461824618

2461924619
Copyright (c) 2009 The Go Authors. All rights reserved.
2462024620

@@ -24721,11 +24721,11 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2472124721

2472224722
--------------------------------------------------------------------------------
2472324723
Dependency : golang.org/x/tools
24724-
Version: v0.21.1-0.20240508182429-e35e4ccd0d2d
24724+
Version: v0.23.0
2472524725
Licence type (autodetected): BSD-3-Clause
2472624726
--------------------------------------------------------------------------------
2472724727

24728-
Contents of probable licence file $GOMODCACHE/golang.org/x/tools@v0.21.1-0.20240508182429-e35e4ccd0d2d/LICENSE:
24728+
Contents of probable licence file $GOMODCACHE/golang.org/x/tools@v0.23.0/LICENSE:
2472924729

2473024730
Copyright (c) 2009 The Go Authors. All rights reserved.
2473124731

@@ -36334,28 +36334,6 @@ ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
3633436334
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
3633536335

3633636336

36337-
--------------------------------------------------------------------------------
36338-
Dependency : github.com/davecgh/go-xdr
36339-
Version: v0.0.0-20161123171359-e6a2ba005892
36340-
Licence type (autodetected): ISC
36341-
--------------------------------------------------------------------------------
36342-
36343-
Contents of probable licence file $GOMODCACHE/github.com/davecgh/go-xdr@v0.0.0-20161123171359-e6a2ba005892/LICENSE:
36344-
36345-
Copyright (c) 2012-2014 Dave Collins <dave@davec.name>
36346-
36347-
Permission to use, copy, modify, and distribute this software for any
36348-
purpose with or without fee is hereby granted, provided that the above
36349-
copyright notice and this permission notice appear in all copies.
36350-
36351-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
36352-
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
36353-
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
36354-
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
36355-
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
36356-
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
36357-
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
36358-
3635936337
--------------------------------------------------------------------------------
3636036338
Dependency : github.com/devigned/tab
3636136339
Version: v0.1.2-0.20190607222403-0c15cf42f9a2
@@ -52692,11 +52670,11 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
5269252670

5269352671
--------------------------------------------------------------------------------
5269452672
Dependency : golang.org/x/term
52695-
Version: v0.21.0
52673+
Version: v0.22.0
5269652674
Licence type (autodetected): BSD-3-Clause
5269752675
--------------------------------------------------------------------------------
5269852676

52699-
Contents of probable licence file $GOMODCACHE/golang.org/x/term@v0.21.0/LICENSE:
52677+
Contents of probable licence file $GOMODCACHE/golang.org/x/term@v0.22.0/LICENSE:
5270052678

5270152679
Copyright (c) 2009 The Go Authors. All rights reserved.
5270252680

go.mod

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,10 @@ require (
5454
github.com/containerd/fifo v1.0.0
5555
github.com/coreos/go-systemd/v22 v22.3.2
5656
github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f
57-
github.com/davecgh/go-xdr v0.0.0-20161123171359-e6a2ba005892 // indirect
5857
github.com/denisenkom/go-mssqldb v0.12.3
5958
github.com/devigned/tab v0.1.2-0.20190607222403-0c15cf42f9a2 // indirect
6059
github.com/dgraph-io/badger/v3 v3.2103.1
61-
github.com/digitalocean/go-libvirt v0.0.0-20180301200012-6075ea3c39a1
60+
github.com/digitalocean/go-libvirt v0.0.0-20240709142323-d8406205c752
6261
github.com/docker/docker v24.0.9+incompatible
6362
github.com/docker/go-connections v0.4.0
6463
github.com/docker/go-plugins-helpers v0.0.0-20181025120712-1e6269c305b8
@@ -144,15 +143,15 @@ require (
144143
go.uber.org/atomic v1.11.0 // indirect
145144
go.uber.org/multierr v1.11.0
146145
go.uber.org/zap v1.27.0
147-
golang.org/x/crypto v0.24.0
148-
golang.org/x/mod v0.18.0
149-
golang.org/x/net v0.26.0
146+
golang.org/x/crypto v0.25.0
147+
golang.org/x/mod v0.19.0
148+
golang.org/x/net v0.27.0
150149
golang.org/x/oauth2 v0.10.0
151150
golang.org/x/sync v0.7.0
152-
golang.org/x/sys v0.21.0
151+
golang.org/x/sys v0.22.0
153152
golang.org/x/text v0.16.0
154153
golang.org/x/time v0.5.0
155-
golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d
154+
golang.org/x/tools v0.23.0
156155
google.golang.org/api v0.128.0
157156
google.golang.org/genproto v0.0.0-20230920204549-e6e6cdab5c13 // indirect
158157
google.golang.org/grpc v1.58.3
@@ -364,7 +363,7 @@ require (
364363
go.opentelemetry.io/otel/metric v1.24.0 // indirect
365364
go.opentelemetry.io/otel/trace v1.24.0 // indirect
366365
golang.org/x/exp v0.0.0-20231127185646-65229373498e // indirect
367-
golang.org/x/term v0.21.0 // indirect
366+
golang.org/x/term v0.22.0 // indirect
368367
golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect
369368
google.golang.org/appengine v1.6.7 // indirect
370369
google.golang.org/genproto/googleapis/rpc v0.0.0-20231002182017-d307bd883b97 // indirect

go.sum

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -469,8 +469,6 @@ github.com/dave/jennifer v1.2.0/go.mod h1:fIb+770HOpJ2fmN9EPPKOqm1vMGhB+TwXKMZhr
469469
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
470470
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
471471
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
472-
github.com/davecgh/go-xdr v0.0.0-20161123171359-e6a2ba005892 h1:qg9VbHo1TlL0KDM0vYvBG9EY0X0Yku5WYIPoFWt8f6o=
473-
github.com/davecgh/go-xdr v0.0.0-20161123171359-e6a2ba005892/go.mod h1:CTDl0pzVzE5DEzZhPfvhY/9sPFMQIxaJ9VAMs9AagrE=
474472
github.com/denisenkom/go-mssqldb v0.0.0-20200428022330-06a60b6afbbc/go.mod h1:xbL0rPBG9cCiLr28tMa8zpbdarY27NDyej4t/EjAShU=
475473
github.com/denisenkom/go-mssqldb v0.12.3 h1:pBSGx9Tq67pBOTLmxNuirNTeB8Vjmf886Kx+8Y+8shw=
476474
github.com/denisenkom/go-mssqldb v0.12.3/go.mod h1:k0mtMFOnU+AihqFxPMiF05rtiDrorD1Vrm1KEz5hxDo=
@@ -485,8 +483,8 @@ github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2 h1:tdlZCpZ/P9DhczC
485483
github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw=
486484
github.com/dgryski/go-sip13 v0.0.0-20190329191031-25c5027a8c7b/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no=
487485
github.com/dgryski/go-sip13 v0.0.0-20200911182023-62edffca9245/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no=
488-
github.com/digitalocean/go-libvirt v0.0.0-20180301200012-6075ea3c39a1 h1:eG5K5GNAAHvQlFmfIuy0Ocjg5dvyX22g/KknwTpmBko=
489-
github.com/digitalocean/go-libvirt v0.0.0-20180301200012-6075ea3c39a1/go.mod h1:PRcPVAAma6zcLpFd4GZrjR/MRpood3TamjKI2m/z/Uw=
486+
github.com/digitalocean/go-libvirt v0.0.0-20240709142323-d8406205c752 h1:NI7XEcHzWVvBfVjSVK6Qk4wmrUfoyQxCNpBjrHelZFk=
487+
github.com/digitalocean/go-libvirt v0.0.0-20240709142323-d8406205c752/go.mod h1:/Ok8PA2qi/ve0Py38+oL+VxoYmlowigYRyLEODRYdgc=
490488
github.com/digitalocean/godo v1.62.0/go.mod h1:p7dOjjtSBqCTUksqtA5Fd3uaKs9kyTq2xcz76ulEJRU=
491489
github.com/dimchansky/utfbom v1.1.0 h1:FcM3g+nofKgUteL8dm/UpdRXNC9KmADgTpLKsu0TRo4=
492490
github.com/dimchansky/utfbom v1.1.0/go.mod h1:rO41eb7gLfo8SF1jd9F8HplJm1Fewwi4mQvIirEdv+8=
@@ -1782,8 +1780,8 @@ golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU
17821780
golang.org/x/crypto v0.13.0/go.mod h1:y6Z2r+Rw4iayiXXAIxJIDAJ1zMW4yaTpebo8fPOliYc=
17831781
golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU=
17841782
golang.org/x/crypto v0.22.0/go.mod h1:vr6Su+7cTlO45qkww3VDJlzDn0ctJvRgYbC2NvXHt+M=
1785-
golang.org/x/crypto v0.24.0 h1:mnl8DM0o513X8fdIkmyFE/5hTYxbwYOjDS/+rK6qpRI=
1786-
golang.org/x/crypto v0.24.0/go.mod h1:Z1PMYSOR5nyMcyAVAIQSKCDwalqy85Aqn1x3Ws4L5DM=
1783+
golang.org/x/crypto v0.25.0 h1:ypSNr+bnYL2YhwoMt2zPxHFmbAN1KZs/njMG3hxUp30=
1784+
golang.org/x/crypto v0.25.0/go.mod h1:T+wALwcMOSE0kXgUAnPAHqTLW+XHgcELELW8VaDgm/M=
17871785
golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
17881786
golang.org/x/exp v0.0.0-20180807140117-3d87b88a115f/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
17891787
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
@@ -1841,8 +1839,9 @@ golang.org/x/mod v0.5.1/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro=
18411839
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
18421840
golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
18431841
golang.org/x/mod v0.12.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
1844-
golang.org/x/mod v0.18.0 h1:5+9lSbEzPSdWkH32vYPBwEpX8KwDbM52Ud9xBUvNlb0=
18451842
golang.org/x/mod v0.18.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=
1843+
golang.org/x/mod v0.19.0 h1:fEdghXQSo20giMthA7cd28ZC+jts4amQ3YMXiP5oMQ8=
1844+
golang.org/x/mod v0.19.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=
18461845
golang.org/x/net v0.0.0-20170114055629-f2499483f923/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
18471846
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
18481847
golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
@@ -1919,8 +1918,8 @@ golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc=
19191918
golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg=
19201919
golang.org/x/net v0.15.0/go.mod h1:idbUs1IY1+zTqbi8yxTbhexhEEk5ur9LInksu6HrEpk=
19211920
golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44=
1922-
golang.org/x/net v0.26.0 h1:soB7SVo0PWrY4vPW/+ay0jKDNScG2X9wFeYlXIvJsOQ=
1923-
golang.org/x/net v0.26.0/go.mod h1:5YKkiSynbBIh3p6iOc/vibscux0x38BZDkn8sCUPxHE=
1921+
golang.org/x/net v0.27.0 h1:5K3Njcw06/l2y9vpGCSdcxWOYHOUk3dVNGDXN+FvAys=
1922+
golang.org/x/net v0.27.0/go.mod h1:dDi0PyhWNoiUOrAS8uXv/vnScO4wnHQO4mj9fn/RytE=
19241923
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
19251924
golang.org/x/oauth2 v0.0.0-20190130055435-99b60b757ec1/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
19261925
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
@@ -2070,8 +2069,8 @@ golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
20702069
golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
20712070
golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
20722071
golang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
2073-
golang.org/x/sys v0.21.0 h1:rF+pYz3DAGSQAxAu1CbC7catZg4ebC4UIeIhKxBZvws=
2074-
golang.org/x/sys v0.21.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
2072+
golang.org/x/sys v0.22.0 h1:RI27ohtqKCnwULzJLqkv897zojh5/DwS/ENaMzUOaWI=
2073+
golang.org/x/sys v0.22.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
20752074
golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw=
20762075
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
20772076
golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
@@ -2082,8 +2081,8 @@ golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo=
20822081
golang.org/x/term v0.12.0/go.mod h1:owVbMEjm3cBLCHdkQu9b1opXd4ETQWc3BhuQGKgXgvU=
20832082
golang.org/x/term v0.17.0/go.mod h1:lLRBjIVuehSbZlaOtGMbcMncT+aqLLLmKrsjNrUguwk=
20842083
golang.org/x/term v0.19.0/go.mod h1:2CuTdWZ7KHSQwUzKva0cbMg6q2DMI3Mmxp+gKJbskEk=
2085-
golang.org/x/term v0.21.0 h1:WVXCp+/EBEHOj53Rvu+7KiT/iElMrO8ACK16SMZ3jaA=
2086-
golang.org/x/term v0.21.0/go.mod h1:ooXLefLobQVslOqselCNF4SxFAaoS6KujMbsGzSDmX0=
2084+
golang.org/x/term v0.22.0 h1:BbsgPEJULsl2fV/AT3v15Mjva5yXKQDyKf+TbDz7QJk=
2085+
golang.org/x/term v0.22.0/go.mod h1:F3qCibpT5AMpCRfhfT53vVJwhLtIVHhB9XDjfFvnMI4=
20872086
golang.org/x/text v0.0.0-20160726164857-2910a502d2bf/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
20882087
golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
20892088
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
@@ -2199,8 +2198,8 @@ golang.org/x/tools v0.1.9/go.mod h1:nABZi5QlRsZVlzPpHl034qft6wpY4eDcsTt5AaioBiU=
21992198
golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
22002199
golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU=
22012200
golang.org/x/tools v0.13.0/go.mod h1:HvlwmtVNQAhOuCjW7xxvovg8wbNq7LwfXh/k7wXUl58=
2202-
golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d h1:vU5i/LfpvrRCpgM/VPfJLg5KjxD3E+hfT1SH+d9zLwg=
2203-
golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d/go.mod h1:aiJjzUbINMkxbQROHiO6hDPo2LHcIPhhQsa9DLh0yGk=
2201+
golang.org/x/tools v0.23.0 h1:SGsXPZ+2l4JsgaCKkx+FQ9YZ5XEtA1GZYuoDjenLjvg=
2202+
golang.org/x/tools v0.23.0/go.mod h1:pnu6ufv6vQkll6szChhK3C3L/ruaIv5eBeztNG8wtsI=
22042203
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
22052204
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
22062205
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=

metricbeat/module/kvm/dommemstat/dommemstat.go

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ import (
2929

3030
"github.com/digitalocean/go-libvirt"
3131
"github.com/digitalocean/go-libvirt/libvirttest"
32+
"github.com/digitalocean/go-libvirt/socket"
33+
"github.com/digitalocean/go-libvirt/socket/dialers"
3234

3335
"github.com/elastic/beats/v7/metricbeat/mb"
3436
)
@@ -84,30 +86,31 @@ func New(base mb.BaseMetricSet) (mb.MetricSet, error) {
8486
// of an error set the Error field of mb.Event or simply call report.Error().
8587
func (m *MetricSet) Fetch(report mb.ReporterV2) error {
8688
var (
87-
c net.Conn
89+
d socket.Dialer
8890
err error
8991
)
9092

9193
u := m.HostURL
9294

9395
if u.Scheme == "test" {
9496
// when running tests, a mock Libvirt server is used
95-
c = libvirttest.New()
97+
d = libvirttest.New()
9698
} else {
9799
address := u.Host
98100
if u.Host == "" {
99101
address = u.Path
100102
}
101103

102-
c, err = net.DialTimeout(u.Scheme, address, m.Timeout)
104+
c, err := net.DialTimeout(u.Scheme, address, m.Timeout)
103105
if err != nil {
104106
return fmt.Errorf("cannot connect to %v: %w", u, err)
105107
}
106-
}
107108

108-
defer c.Close()
109+
d = dialers.NewAlreadyConnected(c)
110+
defer c.Close()
111+
}
109112

110-
l := libvirt.New(c)
113+
l := libvirt.NewWithDialer(d)
111114
if err = l.Connect(); err != nil {
112115
return fmt.Errorf("error connecting to libvirtd: %w", err)
113116
}
@@ -119,7 +122,7 @@ func (m *MetricSet) Fetch(report mb.ReporterV2) error {
119122
}
120123
}()
121124

122-
domains, err := l.Domains()
125+
domains, _, err := l.ConnectListAllDomains(1, libvirt.ConnectListDomainsActive|libvirt.ConnectListDomainsInactive)
123126
if err != nil {
124127
return fmt.Errorf("error listing domains: %w", err)
125128
}

metricbeat/module/kvm/dommemstat/dommemstat_test.go

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,21 @@
1818
package dommemstat
1919

2020
import (
21+
"net"
2122
"testing"
2223

2324
"github.com/stretchr/testify/assert"
25+
"github.com/stretchr/testify/require"
2426

2527
mbtest "github.com/elastic/beats/v7/metricbeat/mb/testing"
2628

2729
"github.com/digitalocean/go-libvirt/libvirttest"
2830
)
2931

3032
func TestFetchEventContents(t *testing.T) {
31-
conn := libvirttest.New()
33+
dialer := libvirttest.New()
34+
conn, err := dialer.Dial()
35+
require.NoError(t, err)
3236

3337
f := mbtest.NewReportingMetricSetV2Error(t, getConfig(conn))
3438

@@ -68,7 +72,7 @@ func TestFetchEventContents(t *testing.T) {
6872
}
6973
}
7074

71-
func getConfig(conn *libvirttest.MockLibvirt) map[string]interface{} {
75+
func getConfig(conn net.Conn) map[string]interface{} {
7276
return map[string]interface{}{
7377
"module": "kvm",
7478
"metricsets": []string{"dommemstat"},

0 commit comments

Comments
 (0)