Skip to content

Commit

Permalink
Update types to support DeviceInfo spec to 1.1.0
Browse files Browse the repository at this point in the history
Signed-off-by: Yury Kulazhenkov <ykulazhenkov@nvidia.com>
  • Loading branch information
ykulazhenkov committed Nov 30, 2022
1 parent 9679314 commit 69cd588
Showing 1 changed file with 14 additions and 11 deletions.
25 changes: 14 additions & 11 deletions pkg/apis/k8s.cni.cncf.io/v1/types.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
package v1

import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"net"

metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)

// +genclient
Expand Down Expand Up @@ -43,7 +44,7 @@ const (
DeviceInfoTypeVHostUser = "vhost-user"
DeviceInfoTypeMemif = "memif"
DeviceInfoTypeVDPA = "vdpa"
DeviceInfoVersion = "1.0.0"
DeviceInfoVersion = "1.1.0"
)

// DeviceInfo contains the information of the device associated
Expand All @@ -58,18 +59,20 @@ type DeviceInfo struct {
}

type PciDevice struct {
PciAddress string `json:"pci-address,omitempty"`
Vhostnet string `json:"vhost-net,omitempty"`
RdmaDevice string `json:"rdma-device,omitempty"`
PfPciAddress string `json:"pf-pci-address,omitempty"`
PciAddress string `json:"pci-address,omitempty"`
Vhostnet string `json:"vhost-net,omitempty"`
RdmaDevice string `json:"rdma-device,omitempty"`
PfPciAddress string `json:"pf-pci-address,omitempty"`
RepresentorDevice string `json:"representor-device,omitempty"`
}

type VdpaDevice struct {
ParentDevice string `json:"parent-device,omitempty"`
Driver string `json:"driver,omitempty"`
Path string `json:"path,omitempty"`
PciAddress string `json:"pci-address,omitempty"`
PfPciAddress string `json:"pf-pci-address,omitempty"`
ParentDevice string `json:"parent-device,omitempty"`
Driver string `json:"driver,omitempty"`
Path string `json:"path,omitempty"`
PciAddress string `json:"pci-address,omitempty"`
PfPciAddress string `json:"pf-pci-address,omitempty"`
RepresentorDevice string `json:"representor-device,omitempty"`
}

const (
Expand Down

0 comments on commit 69cd588

Please sign in to comment.