@@ -51,6 +51,7 @@ const (
51
51
Basic = "Basic"
52
52
JobObject = "JobObject"
53
53
COW = "COW" // Container on Windows
54
+ BackendNICNC = "BackendNICNC"
54
55
)
55
56
56
57
// Orchestrator Types
@@ -77,6 +78,8 @@ const (
77
78
InfraNIC NICType = "InfraNIC"
78
79
// Delegated VM NICs are projected from VM to container network namespace
79
80
DelegatedVMNIC NICType = "DelegatedVMNIC"
81
+ // BackendNIC NICs are used for infiniband nics on a VM
82
+ BackendNIC NICType = "BackendNIC"
80
83
)
81
84
82
85
// ChannelMode :- CNS channel modes
@@ -106,16 +109,18 @@ type CreateNetworkContainerRequest struct {
106
109
AllowNCToHostCommunication bool
107
110
EndpointPolicies []NetworkContainerRequestPolicies
108
111
NCStatus v1alpha.NCStatus
112
+ NetworkInterfaceInfo NetworkInterfaceInfo //nolint // introducing new field for backendnic, to be used later by cni code
109
113
}
110
114
111
115
// CreateNetworkContainerRequest implements fmt.Stringer for logging
112
116
func (req * CreateNetworkContainerRequest ) String () string {
113
117
return fmt .Sprintf ("CreateNetworkContainerRequest" +
114
118
"{Version: %s, NetworkContainerType: %s, NetworkContainerid: %s, PrimaryInterfaceIdentifier: %s, " +
115
119
"LocalIPConfiguration: %+v, IPConfiguration: %+v, SecondaryIPConfigs: %+v, MultitenancyInfo: %+v, " +
116
- "AllowHostToNCCommunication: %t, AllowNCToHostCommunication: %t, NCStatus: %s}" ,
120
+ "AllowHostToNCCommunication: %t, AllowNCToHostCommunication: %t, NCStatus: %s, NetworkInterfaceInfo: %+v }" ,
117
121
req .Version , req .NetworkContainerType , req .NetworkContainerid , req .PrimaryInterfaceIdentifier , req .LocalIPConfiguration ,
118
- req .IPConfiguration , req .SecondaryIPConfigs , req .MultiTenancyInfo , req .AllowHostToNCCommunication , req .AllowNCToHostCommunication , string (req .NCStatus ))
122
+ req .IPConfiguration , req .SecondaryIPConfigs , req .MultiTenancyInfo , req .AllowHostToNCCommunication , req .AllowNCToHostCommunication ,
123
+ string (req .NCStatus ), req .NetworkInterfaceInfo )
119
124
}
120
125
121
126
// NetworkContainerRequestPolicies - specifies policies associated with create network request
@@ -317,6 +322,11 @@ type MultiTenancyInfo struct {
317
322
ID int // This can be vlanid, vxlanid, gre-key etc. (depends on EnacapType).
318
323
}
319
324
325
+ type NetworkInterfaceInfo struct {
326
+ NICType NICType
327
+ MACAddress string
328
+ }
329
+
320
330
// IPConfiguration contains details about ip config to provision in the VM.
321
331
type IPConfiguration struct {
322
332
IPSubnet IPSubnet
@@ -409,13 +419,14 @@ type GetNetworkContainerResponse struct {
409
419
Response Response
410
420
AllowHostToNCCommunication bool
411
421
AllowNCToHostCommunication bool
422
+ NetworkInterfaceInfo NetworkInterfaceInfo
412
423
}
413
424
414
425
type PodIpInfo struct {
415
426
PodIPConfig IPSubnet
416
427
NetworkContainerPrimaryIPConfig IPConfiguration
417
428
HostPrimaryIPInfo HostIPInfo
418
- // NICType defines whether NIC is InfraNIC or DelegatedVMNIC
429
+ // NICType defines whether NIC is InfraNIC or DelegatedVMNIC or BackendNIC
419
430
NICType NICType
420
431
InterfaceName string
421
432
// MacAddress of interface
0 commit comments