Documentation ¶
Index ¶
- Constants
- func CreateHashedNetworkNameScheme(vmiNetworks []v1.Network) map[string]string
- func CreateNetworkNameSchemeByPodNetworkStatus(networks []v1.Network, networkStatus map[string]networkv1.NetworkStatus) map[string]string
- func CreateOrdinalNetworkNameScheme(vmiNetworks []v1.Network) map[string]string
- func GenerateHashedInterfaceName(networkName string) string
- func HashedPodInterfaceName(network v1.Network, ifaceStatuses []v1.VirtualMachineInstanceNetworkInterface) string
- func OrdinalPodInterfaceName(name string, networks []v1.Network) string
- func OrdinalSecondaryInterfaceName(name string) bool
- func PodHasOrdinalInterfaceName(podNetworkStatus map[string]networkv1.NetworkStatus) bool
- func PodHasOrdinalInterfaceName2(networkStatuses []networkv1.NetworkStatus) bool
- func UpdatePrimaryPodIfaceNameFromVMIStatus(podIfaceNamesByNetworkName map[string]string, networks []v1.Network, ...) map[string]string
Constants ¶
const ( HashedIfacePrefix = "pod" PrimaryPodInterfaceName = "eth0" )
Variables ¶
This section is empty.
Functions ¶
func CreateHashedNetworkNameScheme ¶ added in v1.0.0
CreateHashedNetworkNameScheme iterates over the VMI's Networks, and creates for each a pod interface name. The returned map associates between the network name and the generated pod interface name. Primary network will use "eth0" and the secondary ones will be named with the hashed network name.
func CreateNetworkNameSchemeByPodNetworkStatus ¶ added in v1.0.0
func CreateNetworkNameSchemeByPodNetworkStatus(networks []v1.Network, networkStatus map[string]networkv1.NetworkStatus) map[string]string
CreateNetworkNameSchemeByPodNetworkStatus create pod network name scheme according to the given VMI spec networks and pod network status. In case the pod network status has at least one interface with ordinal interface name it returns the ordinal network name-scheme, Otherwise, returns the hashed network name scheme.
func CreateOrdinalNetworkNameScheme ¶ added in v1.0.0
CreateOrdinalNetworkNameScheme iterates over the VMI's Networks, and creates for each a pod interface name. The returned map associates between the network name and the generated pod interface name. Primary network will use "eth0" and the secondary ones will use "net<id>" format, where id is an enumeration from 1 to n.
func GenerateHashedInterfaceName ¶ added in v1.0.0
func HashedPodInterfaceName ¶ added in v1.0.0
func HashedPodInterfaceName(network v1.Network, ifaceStatuses []v1.VirtualMachineInstanceNetworkInterface) string
func OrdinalPodInterfaceName ¶ added in v1.0.0
OrdinalPodInterfaceName returns the ordinal interface name for the given network name. Rereuse the `CreateOrdinalNetworkNameScheme` for various networks helps find the target interface name.
func OrdinalSecondaryInterfaceName ¶ added in v1.0.0
OrdinalSecondaryInterfaceName check if the given name is in form of the ordinal name scheme (e.g.: net1, net2..). Primary iface name (eth0) is treated as non-ordinal interface name.
func PodHasOrdinalInterfaceName ¶ added in v1.0.0
func PodHasOrdinalInterfaceName(podNetworkStatus map[string]networkv1.NetworkStatus) bool
PodHasOrdinalInterfaceName check if the given pod network status has at least one pod interface with ordinal name
func PodHasOrdinalInterfaceName2 ¶ added in v1.4.0
func PodHasOrdinalInterfaceName2(networkStatuses []networkv1.NetworkStatus) bool
PodHasOrdinalInterfaceName2 checks if the given pod network status has at least one pod interface with ordinal name
func UpdatePrimaryPodIfaceNameFromVMIStatus ¶ added in v1.4.0
Types ¶
This section is empty.