You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This will allow to implement a new flag --use-network in the vm deploy command, but it will pick up the first available network from the list in the network config file by default.
The text was updated successfully, but these errors were encountered:
yaroslav-gwit
changed the title
Fix network Cloud Init and VM config file to accept any network, not just internal
Fix VM config file (when vm deploy is executed) to accept any network, not just internal
Apr 28, 2023
yaroslav-gwit
changed the title
Fix VM config file (when vm deploy is executed) to accept any network, not just internal
Fix vm deploy to accept any network, not just internalMay 19, 2023
Fix has been implemented using --network-name flag. If it's not supplied vm deploy will still choose a first available network, but now using custom network is possible:
if len(networkName) < 1 {
c.NetworkName = networkInfo[0].Name
c.Subnet = networkInfo[0].Subnet
c.NakedSubnet = strings.Split(networkInfo[0].Subnet, "/")[1]
c.Gateway = networkInfo[0].Gateway
c.NetworkComment = networkInfo[0].Comment
} else {
for _, v := range networkInfo {
if networkName == v.Name {
c.NetworkName = v.Name
c.Subnet = v.Subnet
c.NakedSubnet = strings.Split(v.Subnet, "/")[1]
c.Gateway = v.Gateway
c.NetworkComment = v.Comment
}
}
if len(c.NetworkName) < 1 {
return errors.New("network name supplied doesn't exist")
}
}
There is a hardcoded value
internal
invm_deploy.go
, which needs to be changed to a dynamic value (line408
):This will allow to implement a new flag
--use-network
in thevm deploy
command, but it will pick up the first available network from the list in the network config file by default.The text was updated successfully, but these errors were encountered: