Skip to content

Commit f687de6

Browse files
committed
nmstate-2.2.32
Signed-off-by: Enrique Llorente <[email protected]>
1 parent 8a08260 commit f687de6

File tree

7 files changed

+62
-5
lines changed

7 files changed

+62
-5
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
SHELL := /bin/bash
55
OUTPUT_DIR=${CURDIR}/.output
66

7-
NMSTATE_VERSION ?= 2.2.31
7+
NMSTATE_VERSION ?= 2.2.33
88
NMSTATE_REPO ?= https://github.com/nmstate/nmstate
99
NMSTATE_SOURCE_TARBALL_URL ?= https://github.com/nmstate/nmstate/archive/refs/tags/v${NMSTATE_VERSION}.tar.gz
1010
export NMSTATE_SOURCE_INSTALL_DIR ?= ${OUTPUT_DIR}/nmstate-${NMSTATE_VERSION}

test/api/types_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ func testUnmarshalDir(t *testing.T, dir string) {
9595
if info.IsDir() && info.Name() == "policy" {
9696
return filepath.SkipDir
9797
}
98-
if info.IsDir() || filepath.Ext(info.Name()) != ".yml" || strings.Contains(info.Name(), "rollback") {
98+
if info.IsDir() || filepath.Ext(info.Name()) != ".yml" || strings.Contains(info.Name(), "rollback") || strings.Contains(info.Name(), "test_ignore_unmanged_tap_as_bridge_port") {
9999
return nil
100100
}
101101
state, err := os.ReadFile(path)

test/crd/nmstate.io_clusternetworkstate.yaml

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,12 @@ spec:
6464
\ system-id: 176866c7-6dc8-400f-98ac-c658509ec09f\n\tother_config:
6565
{}\n\n\n```"
6666
properties:
67+
description:
68+
description: |-
69+
Description Description for the whole desire state. Currently it will not be
70+
persisted by network backend and will be ignored during applying or
71+
querying.
72+
type: string
6773
dns-resolver:
6874
description: DNS DNS resolver status, deserialize and serialize
6975
from/to `dns-resolver`.
@@ -692,6 +698,13 @@ spec:
692698
SrIov Single Root I/O Virtualization(SRIOV) configuration.
693699
Deserialize and serialize from/to `sr-iov`.
694700
properties:
701+
drivers-autoprobe:
702+
description: |-
703+
DriversAutoprobe Bind created VFs to their default kernel driver.
704+
This relates to sriov_drivers_autoprobe.
705+
More info here https://docs.kernel.org/PCI/pci-iov-howto.html#sr-iov-api
706+
Deserialize and serialize from/to `drivers-autoprobe`.
707+
type: boolean
695708
total-vfs:
696709
anyOf:
697710
- type: integer
@@ -2200,6 +2213,12 @@ spec:
22002213
peer:
22012214
type: string
22022215
type: object
2216+
permanent-mac-address:
2217+
description: |-
2218+
PermanentMacAddress MAC address never change after reboots(normally stored in firmware of
2219+
network interface). Using the same format as `mac_address` property.
2220+
Ignored during apply.
2221+
type: string
22032222
profile-name:
22042223
type: string
22052224
state:
@@ -2273,7 +2292,7 @@ spec:
22732292
type: string
22742293
reorder-headers:
22752294
description: ReorderHeaders reordering of output packet
2276-
headers
2295+
headers. Default to True if not defined.
22772296
type: boolean
22782297
required:
22792298
- base-iface

test/crd/types_test.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,11 @@ func testUnmarshalDir(t *testing.T, dir string) []ClusterNetworkState {
4242
if err != nil {
4343
return fmt.Errorf("failed reading state '%s': %v", info.Name(), err)
4444
}
45+
// the macsec test are wrongly passing offload: off as boolean instea of
46+
// offload: "off"
47+
if strings.Contains(info.Name(), "macsec") {
48+
state = []byte(strings.ReplaceAll(string(state), "offload: off", `offload: "off"`))
49+
}
4550
clusterNetworkState := ClusterNetworkState{
4651
ObjectMeta: metav1.ObjectMeta{
4752
Name: generateName("test"),

v2/encoding.go

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,13 +207,22 @@ func (o *LldpNeighborTlv) UnmarshalJSON(data []byte) error {
207207
}
208208
}
209209

210+
func (o MacSecOffload) MarshalJSON() ([]byte, error) {
211+
return []byte(o), nil
212+
}
213+
214+
func (o *MacSecOffload) UnmarshalJSON(data []byte) error {
215+
*o = MacSecOffload(data)
216+
return nil
217+
}
218+
210219
func strictDecoder(data []byte) *json.Decoder {
211220
decoder := json.NewDecoder(bytes.NewBuffer(data))
212221
decoder.DisallowUnknownFields()
213222
return decoder
214223
}
215224

216-
func (s NetworkState) String() string {
225+
func (s *NetworkState) String() string {
217226
raw, err := json.Marshal(&s)
218227
if err != nil {
219228
return ""

v2/zz_generated.deepcopy.go

Lines changed: 10 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

v2/zz_generated.types.go

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1757,7 +1757,7 @@ type VlanConfig struct {
17571757
Protocol *VlanProtocol `json:"protocol,omitempty"`
17581758
// RegistrationProtocol Could be `gvrp`, `mvrp` or `none`. Default to none if not defined.
17591759
RegistrationProtocol *VlanRegistrationProtocol `json:"registration-protocol,omitempty"`
1760-
// ReorderHeaders reordering of output packet headers
1760+
// ReorderHeaders reordering of output packet headers. Default to True if not defined.
17611761
ReorderHeaders *bool `json:"reorder-headers,omitempty"`
17621762
// LooseBinding loose binding of the interface to its master device's operating state
17631763
LooseBinding *bool `json:"loose-binding,omitempty"`
@@ -2054,6 +2054,7 @@ type LoopbackInterface struct {
20542054
// max-mtu: 9702
20552055
// ethernet:
20562056
// sr-iov:
2057+
// drivers-autoprobe: true
20572058
// total-vfs: 2
20582059
// vfs:
20592060
// - id: 0
@@ -2076,6 +2077,11 @@ type LoopbackInterface struct {
20762077
// ```
20772078
// +k8s:deepcopy-gen=true
20782079
type SrIovConfig struct {
2080+
// DriversAutoprobe Bind created VFs to their default kernel driver.
2081+
// This relates to sriov_drivers_autoprobe.
2082+
// More info here https://docs.kernel.org/PCI/pci-iov-howto.html#sr-iov-api
2083+
// Deserialize and serialize from/to `drivers-autoprobe`.
2084+
DriversAutoprobe *bool `json:"drivers-autoprobe,omitempty"`
20792085
// TotalVfs The number of VFs enabled on PF.
20802086
// Deserialize and serialize from/to `total-vfs`.
20812087
TotalVfs *intstr.IntOrString `json:"total-vfs,omitempty"`
@@ -2259,6 +2265,10 @@ type BaseInterface struct {
22592265
// every two characters. Case insensitive when applying.
22602266
// Serialize and deserialize to/from `mac-address`.
22612267
MacAddress *string `json:"mac-address,omitempty"`
2268+
// PermanentMacAddress MAC address never change after reboots(normally stored in firmware of
2269+
// network interface). Using the same format as `mac_address` property.
2270+
// Ignored during apply.
2271+
PermanentMacAddress *string `json:"permanent-mac-address,omitempty"`
22622272
// Mtu Maximum transmission unit.
22632273
Mtu *intstr.IntOrString `json:"mtu,omitempty"`
22642274
// MinMtu Minimum MTU allowed. Ignored during apply.
@@ -2656,6 +2666,10 @@ const HsrProtocolPrp = HsrProtocol("prp")
26562666
// ```
26572667
// +k8s:deepcopy-gen=true
26582668
type NetworkState struct {
2669+
// Description Description for the whole desire state. Currently it will not be
2670+
// persisted by network backend and will be ignored during applying or
2671+
// querying.
2672+
Description string `json:"description,omitempty"`
26592673
// Hostname Hostname of current host.
26602674
Hostname *HostNameState `json:"hostname,omitempty"`
26612675
// DNS DNS resolver status, deserialize and serialize from/to `dns-resolver`.

0 commit comments

Comments
 (0)