forked from github/multus-cni
Add infinibandGUID runtime config to delegate netconf
This commit extend the various network conf methods to translate `infiniband-guid` network attachment configuration to `infinibandGUID` CNI runtime config. - Update relevant methods in types package - Update unit tests
This commit is contained in:
committed by
Tomofumi Hayashi
parent
46be700cb5
commit
2796202d8c
@@ -211,6 +211,12 @@ func parsePodNetworkAnnotation(podNetworks, defaultNamespace string) ([]*types.N
|
||||
return nil, logging.Errorf("parsePodNetworkAnnotation: failed to mac: %v", err)
|
||||
}
|
||||
}
|
||||
if n.InfinibandGUIDRequest != "" {
|
||||
// validate GUID address
|
||||
if _, err := net.ParseMAC(n.InfinibandGUIDRequest); err != nil {
|
||||
return nil, logging.Errorf("parsePodNetworkAnnotation: failed to validate infiniband GUID: %v", err)
|
||||
}
|
||||
}
|
||||
if n.IPRequest != nil {
|
||||
for _, ip := range n.IPRequest {
|
||||
// validate IP address
|
||||
|
Reference in New Issue
Block a user