Skip to content

Commit

Permalink
Merge pull request #4308 from josedonizetti/validate-kvm-network-exist
Browse files Browse the repository at this point in the history
Validate kvm network exists
  • Loading branch information
tstromberg authored May 21, 2019
2 parents 28edca2 + e9a450d commit 5e42017
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pkg/drivers/kvm/network.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,11 @@ func (d *Driver) createNetwork() error {

// network: default
// It is assumed that the libvirt/kvm installation has already created this network
if _, err := conn.LookupNetworkByName(d.Network); err != nil {
return errors.Wrapf(err, "network %s doesn't exist", d.Network)
}

// network: private

// Only create the private network if it does not already exist
if _, err := conn.LookupNetworkByName(d.PrivateNetwork); err != nil {
// create the XML for the private network from our networkTmpl
Expand Down

0 comments on commit 5e42017

Please sign in to comment.