mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-09-15 05:49:05 +00:00
proto: Rename Interface.pciPath to devicePath
Field is being used for both PCI and CCW devices. Name it devicePath to avoid confusion when the device isn't a PCI device. Signed-off-by: Jakob Naucke <jakob.naucke@ibm.com>
This commit is contained in:
@@ -271,7 +271,7 @@ func generateVCNetworkStructures(ctx context.Context, endpoints []Endpoint) ([]*
|
||||
Type: string(endpoint.Type()),
|
||||
RawFlags: noarp,
|
||||
HwAddr: endpoint.HardwareAddr(),
|
||||
PciPath: endpoint.PciPath().String(),
|
||||
DevicePath: endpoint.PciPath().String(),
|
||||
}
|
||||
|
||||
ifaces = append(ifaces, &ifc)
|
||||
|
@@ -196,8 +196,10 @@ type Interface struct {
|
||||
IPAddresses []*IPAddress `protobuf:"bytes,3,rep,name=IPAddresses,proto3" json:"IPAddresses,omitempty"`
|
||||
Mtu uint64 `protobuf:"varint,4,opt,name=mtu,proto3" json:"mtu,omitempty"`
|
||||
HwAddr string `protobuf:"bytes,5,opt,name=hwAddr,proto3" json:"hwAddr,omitempty"`
|
||||
// PCI path for the device (see the pci::Path (Rust) or types.PciPath (Go) type for format details)
|
||||
PciPath string `protobuf:"bytes,6,opt,name=pciPath,proto3" json:"pciPath,omitempty"`
|
||||
// Path for the device (see the pci::Path (Rust) and types.PciPath
|
||||
// (Go) or ccw::Device (Rust) types for format details, depending on
|
||||
// architecture)
|
||||
DevicePath string `protobuf:"bytes,6,opt,name=devicePath,proto3" json:"devicePath,omitempty"`
|
||||
// Type defines the type of interface described by this structure.
|
||||
// The expected values are the one that are defined by the netlink
|
||||
// library, regarding each type of link. Here is a non exhaustive
|
||||
@@ -273,9 +275,9 @@ func (x *Interface) GetHwAddr() string {
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Interface) GetPciPath() string {
|
||||
func (x *Interface) GetDevicePath() string {
|
||||
if x != nil {
|
||||
return x.PciPath
|
||||
return x.DevicePath
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
@@ -1172,7 +1172,7 @@ func (s *Sandbox) AddInterface(ctx context.Context, inf *pbTypes.Interface) (*pb
|
||||
}()
|
||||
|
||||
// Add network for vm
|
||||
inf.PciPath = endpoints[0].PciPath().String()
|
||||
inf.DevicePath = endpoints[0].PciPath().String()
|
||||
result, err := s.agent.updateInterface(ctx, inf)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
Reference in New Issue
Block a user