Skip to content

Commit

Permalink
feat: disconnect extra. network from virt (#246)
Browse files Browse the repository at this point in the history
  • Loading branch information
anrs authored Aug 31, 2020
1 parent 7768da2 commit 6f0f1b2
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 43 deletions.
7 changes: 6 additions & 1 deletion engine/virt/virt.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,12 @@ func (v *Virt) NetworkConnect(ctx context.Context, network, target, ipv4, ipv6 s

// NetworkDisconnect disconnects from one network.
func (v *Virt) NetworkDisconnect(ctx context.Context, network, target string, force bool) (err error) {
log.Warnf("NetworkDisconnect does not implement")
var req virttypes.DisconnectNetworkReq
req.Network = network
req.ID = target

_, err = v.client.DisconnectNetwork(ctx, req)

return
}

Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ require (
github.com/opencontainers/runc v0.1.1 // indirect
github.com/patrickmn/go-cache v2.1.0+incompatible
github.com/pkg/errors v0.9.1
github.com/projecteru2/libyavirt v0.0.0-20200821065010-ea41aa314ef3
github.com/projecteru2/libyavirt v0.0.0-20200831030711-2bb3f2ba0cb7
github.com/prometheus/client_golang v1.7.1
github.com/sanity-io/litter v1.3.0
github.com/sirupsen/logrus v1.6.0
Expand Down
Loading

0 comments on commit 6f0f1b2

Please sign in to comment.