Skip to content

Commit

Permalink
API, VMI.Status.Interface: Add LinkState
Browse files Browse the repository at this point in the history
Add the `LinkState` field to `VirtualMachineInstanceNetworkInterface` to
enable reporting the interfaces' operational [1] link state.

This field could have the following values:
- empty string - link state unknown
- `up`
- `down`

[1] https://docs.kernel.org/networking/operstates.html

Signed-off-by: Orel Misan <[email protected]>
  • Loading branch information
orelmisan committed Jan 22, 2025
1 parent 7c9bd00 commit e377e18
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 1 deletion.
4 changes: 4 additions & 0 deletions api/openapi-spec/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -16898,6 +16898,10 @@
"default": ""
}
},
"linkState": {
"description": "LinkState Reports the current operational link state`. values: up, down.",
"type": "string"
},
"mac": {
"description": "Hardware address of a Virtual Machine interface",
"type": "string"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13314,6 +13314,10 @@ var CRDsValidation map[string]string = map[string]string{
items:
type: string
type: array
linkState:
description: 'LinkState Reports the current operational link state''.
values: up, down.'
type: string
mac:
description: Hardware address of a Virtual Machine interface
type: string
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -902,7 +902,8 @@
"podInterfaceName": "podInterfaceNameValue",
"interfaceName": "interfaceNameValue",
"infoSource": "infoSourceValue",
"queueCount": -10
"queueCount": -10,
"linkState": "linkStateValue"
}
],
"guestOSInfo": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -609,6 +609,7 @@ status:
ipAddress: ipAddressValue
ipAddresses:
- ipAddressesValue
linkState: linkStateValue
mac: macValue
name: nameValue
podInterfaceName: podInterfaceNameValue
Expand Down
2 changes: 2 additions & 0 deletions staging/src/kubevirt.io/api/core/v1/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -704,6 +704,8 @@ type VirtualMachineInstanceNetworkInterface struct {
InfoSource string `json:"infoSource,omitempty"`
// Specifies how many queues are allocated by MultiQueue
QueueCount int32 `json:"queueCount,omitempty"`
// LinkState Reports the current operational link state`. values: up, down.
LinkState string `json:"linkState,omitempty"`
}

type VirtualMachineInstanceGuestOSInfo struct {
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions staging/src/kubevirt.io/client-go/api/openapi_generated.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit e377e18

Please sign in to comment.