File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -882,6 +882,13 @@ func (c *criContainer) GetScheduler() *api.LinuxScheduler {
882882 return api .FromOCILinuxScheduler (c .spec .Process .Scheduler )
883883}
884884
885+ func (c * criContainer ) GetNetDevices () map [string ]* api.LinuxNetDevice {
886+ if c .spec .Linux == nil {
887+ return nil
888+ }
889+ return api .FromOCILinuxNetDevices (c .spec .Linux .NetDevices )
890+ }
891+
885892func (c * criContainer ) GetPid () uint32 {
886893 return c .pid
887894}
Original file line number Diff line number Diff line change @@ -47,6 +47,7 @@ type LinuxContainer interface {
4747 GetCgroupsPath () string
4848 GetIOPriority () * nri.LinuxIOPriority
4949 GetScheduler () * nri.LinuxScheduler
50+ GetNetDevices () map [string ]* nri.LinuxNetDevice
5051}
5152
5253func commonContainerToNRI (ctr Container ) * nri.Container {
Original file line number Diff line number Diff line change @@ -33,6 +33,7 @@ func containerToNRI(ctr Container) *nri.Container {
3333 CgroupsPath : lnxCtr .GetCgroupsPath (),
3434 IoPriority : lnxCtr .GetIOPriority (),
3535 Scheduler : lnxCtr .GetScheduler (),
36+ NetDevices : lnxCtr .GetNetDevices (),
3637 }
3738 return nriCtr
3839}
You can’t perform that action at this time.
0 commit comments