Struct updates

- Add `infinibandGUID` CNI runtime config
- Add `infiniband-guid` Network attachment attribute
- Reflect infiniband guid request in Delegate network config
This commit is contained in:
Adrian Chiris
2020-04-27 10:19:47 +03:00
committed by Tomofumi Hayashi
parent ecb79330c0
commit 46be700cb5

View File

@@ -61,6 +61,7 @@ type RuntimeConfig struct {
Bandwidth *BandwidthEntry `json:"bandwidth,omitempty"` Bandwidth *BandwidthEntry `json:"bandwidth,omitempty"`
IPs []string `json:"ips,omitempty"` IPs []string `json:"ips,omitempty"`
Mac string `json:"mac,omitempty"` Mac string `json:"mac,omitempty"`
InfinibandGUID string `json:"infinibandGUID,omitempty"`
} }
// PortMapEntry for CNI PortMapEntry // PortMapEntry for CNI PortMapEntry
@@ -97,6 +98,7 @@ type DelegateNetConf struct {
Name string Name string
IfnameRequest string `json:"ifnameRequest,omitempty"` IfnameRequest string `json:"ifnameRequest,omitempty"`
MacRequest string `json:"macRequest,omitempty"` MacRequest string `json:"macRequest,omitempty"`
InfinibandGUIDRequest string `json:"infinibandGUIDRequest,omitempty"`
IPRequest []string `json:"ipRequest,omitempty"` IPRequest []string `json:"ipRequest,omitempty"`
PortMappingsRequest []*PortMapEntry `json:"-"` PortMappingsRequest []*PortMapEntry `json:"-"`
BandwidthRequest *BandwidthEntry `json:"-"` BandwidthRequest *BandwidthEntry `json:"-"`
@@ -126,6 +128,9 @@ type NetworkSelectionElement struct {
// MacRequest contains an optional requested MAC address for this // MacRequest contains an optional requested MAC address for this
// network attachment // network attachment
MacRequest string `json:"mac,omitempty"` MacRequest string `json:"mac,omitempty"`
// InfinibandGUID request contains an optional requested Infiniband GUID address
// for this network attachment
InfinibandGUIDRequest string `json:"infiniband-guid,omitempty"`
// InterfaceRequest contains an optional requested name for the // InterfaceRequest contains an optional requested name for the
// network interface this attachment will create in the container // network interface this attachment will create in the container
InterfaceRequest string `json:"interface,omitempty"` InterfaceRequest string `json:"interface,omitempty"`