This driver creates instances with a single network interface.
|
NetworkInterfaces: oxide.InstanceNetworkInterfaceAttachment{ |
|
Params: []oxide.InstanceNetworkInterfaceCreate{ |
|
{ |
|
Description: defaultDescription, |
|
Name: oxide.Name("nic-" + d.GetMachineName()), |
|
SubnetName: oxide.Name(d.Subnet), |
|
VpcName: oxide.Name(d.VPC), |
|
}, |
|
}, |
|
Type: oxide.InstanceNetworkInterfaceAttachmentTypeCreate, |
|
}, |
Then it uses the IP address of the first, and only, network interface as the IP address for Rancher to connect to.
|
if len(networkInterfaces) == 0 { |
|
return errors.New("no valid network interfaces found") |
|
} |
|
d.IPAddress = networkInterfaces[0].Ip |
Update the driver to support the creation of multiple network interfaces and allow the operator to specify which network interface should be used to populate the IP address used by Rancher.
This driver creates instances with a single network interface.
rancher-machine-driver-oxide/oxide.go
Lines 183 to 193 in 8e3b6df
Then it uses the IP address of the first, and only, network interface as the IP address for Rancher to connect to.
rancher-machine-driver-oxide/oxide.go
Lines 214 to 217 in 8e3b6df
Update the driver to support the creation of multiple network interfaces and allow the operator to specify which network interface should be used to populate the IP address used by Rancher.