Skip to content

Commit 3b0b89b

Browse files
committed
config/v3_5: stabilize
1 parent e98dd18 commit 3b0b89b

File tree

5 files changed

+21
-18
lines changed

5 files changed

+21
-18
lines changed

config/v3_5/config.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,15 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
package v3_5_experimental
15+
package v3_5
1616

1717
import (
1818
"github.com/coreos/ignition/v2/config/merge"
1919
"github.com/coreos/ignition/v2/config/shared/errors"
2020
"github.com/coreos/ignition/v2/config/util"
2121
prev "github.com/coreos/ignition/v2/config/v3_4"
22-
"github.com/coreos/ignition/v2/config/v3_5_experimental/translate"
23-
"github.com/coreos/ignition/v2/config/v3_5_experimental/types"
22+
"github.com/coreos/ignition/v2/config/v3_5/translate"
23+
"github.com/coreos/ignition/v2/config/v3_5/types"
2424
"github.com/coreos/ignition/v2/config/validate"
2525

2626
"github.com/coreos/go-semver/semver"
@@ -58,8 +58,8 @@ func Parse(rawConfig []byte) (types.Config, report.Report, error) {
5858
return config, rpt, nil
5959
}
6060

61-
// ParseCompatibleVersion parses the raw config of version 3.5.0-experimental or
62-
// lesser into a 3.5-exp types.Config struct and generates a report of any errors,
61+
// ParseCompatibleVersion parses the raw config of version 3.5.0 or
62+
// lesser into a 3.5 types.Config struct and generates a report of any errors,
6363
// warnings, info, and deprecations it encountered
6464
func ParseCompatibleVersion(raw []byte) (types.Config, report.Report, error) {
6565
version, rpt, err := util.GetConfigVersion(raw)

config/v3_5/config_test.go

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
package v3_5_experimental
15+
package v3_5
1616

1717
import (
1818
"testing"
1919

2020
"github.com/coreos/ignition/v2/config/shared/errors"
21-
"github.com/coreos/ignition/v2/config/v3_5_experimental/types"
21+
"github.com/coreos/ignition/v2/config/v3_5/types"
2222
"github.com/stretchr/testify/assert"
2323
)
2424

@@ -83,6 +83,10 @@ func TestParse(t *testing.T) {
8383
in: in{config: []byte(`{"ignition": {"version": "3.4.0"}}`)},
8484
out: out{err: errors.ErrUnknownVersion},
8585
},
86+
{
87+
in: in{config: []byte(`{"ignition": {"version": "3.5.0"}}`)},
88+
out: out{config: types.Config{Ignition: types.Ignition{Version: types.MaxVersion.String()}}},
89+
},
8690
{
8791
in: in{config: []byte(`{"ignition": {"version": "2.0.0-experimental"}}`)},
8892
out: out{err: errors.ErrUnknownVersion},
@@ -129,7 +133,7 @@ func TestParse(t *testing.T) {
129133
},
130134
{
131135
in: in{config: []byte(`{"ignition": {"version": "3.5.0-experimental"}}`)},
132-
out: out{config: types.Config{Ignition: types.Ignition{Version: types.MaxVersion.String()}}},
136+
out: out{err: errors.ErrUnknownVersion},
133137
},
134138
{
135139
in: in{config: []byte(`{"ignition": {"version": "2.0.0"},}`)},
@@ -148,7 +152,7 @@ func TestParse(t *testing.T) {
148152
out: out{err: errors.ErrEmpty},
149153
},
150154
{
151-
in: in{config: []byte(`{"ignition": {"version": "3.5.0-experimental"}, "storage": {"filesystems": [{"format": "ext4", "label": "zzzzzzzzzzzzzzzzzzzzzzzzzzz"}]}}`)},
155+
in: in{config: []byte(`{"ignition": {"version": "3.5.0"}, "storage": {"filesystems": [{"format": "ext4", "label": "zzzzzzzzzzzzzzzzzzzzzzzzzzz"}]}}`)},
152156
out: out{err: errors.ErrInvalid},
153157
},
154158
}
@@ -178,15 +182,15 @@ func TestParse(t *testing.T) {
178182
out: out{config: types.Config{Ignition: types.Ignition{Version: types.MaxVersion.String()}}},
179183
},
180184
{
181-
in: in{config: []byte(`{"ignition": {"version": "3.5.0-experimental"}}`)},
185+
in: in{config: []byte(`{"ignition": {"version": "3.5.0"}}`)},
182186
out: out{config: types.Config{Ignition: types.Ignition{Version: types.MaxVersion.String()}}},
183187
},
184188
{
185-
in: in{config: []byte(`{"ignition": {"version": "3.5.0"}}`)},
189+
in: in{config: []byte(`{"ignition": {"version": "3.6.0-experimental"}}`)},
186190
out: out{err: errors.ErrUnknownVersion},
187191
},
188192
{
189-
in: in{config: []byte(`{"ignition": {"version": "3.6.0"}}`)},
193+
in: in{config: []byte(`{"ignition": {"version": "3.7.0"}}`)},
190194
out: out{err: errors.ErrUnknownVersion},
191195
},
192196
{
@@ -198,7 +202,7 @@ func TestParse(t *testing.T) {
198202
out: out{err: errors.ErrInvalid},
199203
},
200204
{
201-
in: in{config: []byte(`{"ignition": {"version": "3.5.0-experimental"}, "storage": {"filesystems": [{"format": "ext4", "label": "zzzzzzzzzzzzzzzzzzzzzzzzzzz"}]}}`)},
205+
in: in{config: []byte(`{"ignition": {"version": "3.5.0"}, "storage": {"filesystems": [{"format": "ext4", "label": "zzzzzzzzzzzzzzzzzzzzzzzzzzz"}]}}`)},
202206
out: out{err: errors.ErrInvalid},
203207
},
204208
}

config/v3_5/translate/translate.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ package translate
1717
import (
1818
"github.com/coreos/ignition/v2/config/translate"
1919
old_types "github.com/coreos/ignition/v2/config/v3_4/types"
20-
"github.com/coreos/ignition/v2/config/v3_5_experimental/types"
20+
"github.com/coreos/ignition/v2/config/v3_5/types"
2121
)
2222

2323
func translateIgnition(old old_types.Ignition) (ret types.Ignition) {

config/v3_5/types/config.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,8 @@ import (
2525

2626
var (
2727
MaxVersion = semver.Version{
28-
Major: 3,
29-
Minor: 5,
30-
PreRelease: "experimental",
28+
Major: 3,
29+
Minor: 5,
3130
}
3231
)
3332

config/v3_5/types/schema.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package types
22

3-
// generated by "schematyper --package=types config/v3_5_experimental/schema/ignition.json -o config/v3_5_experimental/types/schema.go --root-type=Config" -- DO NOT EDIT
3+
// generated by "schematyper --package=types config/v3_5/schema/ignition.json -o config/v3_5/types/schema.go --root-type=Config" -- DO NOT EDIT
44

55
type Cex struct {
66
Enabled *bool `json:"enabled,omitempty"`

0 commit comments

Comments
 (0)