Skip to content

Commit

Permalink
Merge pull request #772 from ajeddeloh/stablize
Browse files Browse the repository at this point in the history
Stablize spec 3.0.0
  • Loading branch information
jlebon authored Mar 26, 2019
2 parents 0fac334 + 9bd1f0f commit b79a5f1
Show file tree
Hide file tree
Showing 115 changed files with 227 additions and 241 deletions.
6 changes: 3 additions & 3 deletions config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ package config
import (
"github.com/coreos/ignition/config/shared/errors"
"github.com/coreos/ignition/config/util"
"github.com/coreos/ignition/config/v3_0_experimental"
"github.com/coreos/ignition/config/v3_0_experimental/types"
"github.com/coreos/ignition/config/v3_0"
"github.com/coreos/ignition/config/v3_0/types"
"github.com/coreos/ignition/config/validate/report"

"github.com/coreos/go-semver/semver"
Expand Down Expand Up @@ -50,7 +50,7 @@ func Parse(raw []byte) (types.Config, report.Report, error) {

switch *version {
case types.MaxVersion:
return v3_0_experimental.Parse(raw)
return v3_0.Parse(raw)
default:
return types.Config{}, report.Report{}, errors.ErrUnknownVersion
}
Expand Down
4 changes: 2 additions & 2 deletions config/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (
"testing"

"github.com/coreos/ignition/config/util"
v3_0_experimental "github.com/coreos/ignition/config/v3_0_experimental/types"
v3_0 "github.com/coreos/ignition/config/v3_0/types"
)

func testConfigType(t reflect.Type) error {
Expand Down Expand Up @@ -83,7 +83,7 @@ func testConfigType(t reflect.Type) error {
// anything the merge, translation, or validation logic doesn't know how to handle
func TestConfigStructure(t *testing.T) {
configs := []reflect.Type{
reflect.TypeOf(v3_0_experimental.Config{}),
reflect.TypeOf(v3_0.Config{}),
}

for _, configType := range configs {
Expand Down
2 changes: 1 addition & 1 deletion config/merge/merge_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import (
"testing"

"github.com/coreos/ignition/config/util"
"github.com/coreos/ignition/config/v3_0_experimental/types"
"github.com/coreos/ignition/config/v3_0/types"

"github.com/stretchr/testify/assert"
)
Expand Down
4 changes: 2 additions & 2 deletions config/v3_0_experimental/config.go → config/v3_0/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package v3_0_experimental
package v3_0

import (
"reflect"

"github.com/coreos/ignition/config/merge"
"github.com/coreos/ignition/config/shared/errors"
"github.com/coreos/ignition/config/util"
"github.com/coreos/ignition/config/v3_0_experimental/types"
"github.com/coreos/ignition/config/v3_0/types"
"github.com/coreos/ignition/config/validate"
"github.com/coreos/ignition/config/validate/report"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package v3_0_experimental
package v3_0

import (
"testing"

"github.com/coreos/ignition/config/shared/errors"
"github.com/coreos/ignition/config/v3_0_experimental/types"
"github.com/coreos/ignition/config/v3_0/types"
"github.com/stretchr/testify/assert"
)

Expand Down Expand Up @@ -81,7 +81,7 @@ func TestParse(t *testing.T) {
out: out{err: errors.ErrUnknownVersion},
},
{
in: in{config: []byte(`{"ignition": {"version": "3.0.0-experimental"}}`)},
in: in{config: []byte(`{"ignition": {"version": "3.0.0"}}`)},
out: out{config: types.Config{Ignition: types.Ignition{Version: types.MaxVersion.String()}}},
},
{
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,8 @@ import (

var (
MaxVersion = semver.Version{
Major: 3,
Minor: 0,
PreRelease: "experimental",
Major: 3,
Minor: 0,
}
)

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package types

// generated by "schematyper --package=types config/v3_0_experimental/schema/ignition.json -o config/v3_0_experimental/types/schema.go --root-type=Config" -- DO NOT EDIT
// generated by "schematyper --package=types config/v3_0/schema/ignition.json -o config/v3_0/types/schema.go --root-type=Config" -- DO NOT EDIT

type CaReference struct {
Source string `json:"source"`
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
18 changes: 9 additions & 9 deletions config/validate/validate_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import (
"github.com/coreos/ignition/config/validate/astjson"
"github.com/coreos/ignition/config/validate/report"
// Import into the same namespace to keep config definitions clean
. "github.com/coreos/ignition/config/v3_0_experimental/types"
. "github.com/coreos/ignition/config/v3_0/types"
)

func TestValidate(t *testing.T) {
Expand Down Expand Up @@ -61,7 +61,7 @@ func TestValidate(t *testing.T) {
out: out{err: errors.ErrUnknownVersion},
},
{
in: in{cfg: Config{Ignition: Ignition{Version: "3.0.0"}}},
in: in{cfg: Config{Ignition: Ignition{Version: "2.0.0"}}},
out: out{err: errors.ErrUnknownVersion},
},
{
Expand All @@ -71,7 +71,7 @@ func TestValidate(t *testing.T) {
{
in: in{cfg: Config{
Ignition: Ignition{
Version: "3.0.0-experimental",
Version: "3.0.0",
Config: IgnitionConfig{
Replace: ConfigReference{
Verification: Verification{
Expand All @@ -85,7 +85,7 @@ func TestValidate(t *testing.T) {
},
{
in: in{cfg: Config{
Ignition: Ignition{Version: "3.0.0-experimental"},
Ignition: Ignition{Version: "3.0.0"},
Storage: Storage{
Filesystems: []Filesystem{
{
Expand All @@ -100,7 +100,7 @@ func TestValidate(t *testing.T) {
},
{
in: in{cfg: Config{
Ignition: Ignition{Version: "3.0.0-experimental"},
Ignition: Ignition{Version: "3.0.0"},
Storage: Storage{
Filesystems: []Filesystem{
{
Expand All @@ -120,7 +120,7 @@ func TestValidate(t *testing.T) {
},
{
in: in{cfg: Config{
Ignition: Ignition{Version: "3.0.0-experimental"},
Ignition: Ignition{Version: "3.0.0"},
Storage: Storage{
Files: []File{
{
Expand Down Expand Up @@ -148,7 +148,7 @@ func TestValidate(t *testing.T) {
},
{
in: in{cfg: Config{
Ignition: Ignition{Version: "3.0.0-experimental"},
Ignition: Ignition{Version: "3.0.0"},
Storage: Storage{
Files: []File{
{
Expand All @@ -174,14 +174,14 @@ func TestValidate(t *testing.T) {
},
{
in: in{cfg: Config{
Ignition: Ignition{Version: "3.0.0-experimental"},
Ignition: Ignition{Version: "3.0.0"},
Systemd: Systemd{Units: []Unit{{Name: "foo.bar", Contents: util.StrToPtr("[Foo]\nfoo=qux")}}},
}},
out: out{err: fmt.Errorf("invalid systemd unit extension")},
},
{
in: in{cfg: Config{
Ignition: Ignition{Version: "3.0.0-experimental"},
Ignition: Ignition{Version: "3.0.0"},
Systemd: Systemd{Units: []Unit{{Name: "enable-but-no-install.service", Enabled: util.BoolToPtr(true), Contents: util.StrToPtr("[Foo]\nlemon=lime")}}},
}},
out: out{warning: errors.NewNoInstallSectionError("enable-but-no-install.service")},
Expand Down
2 changes: 1 addition & 1 deletion generate
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ hash schematyper 2>/dev/null || {
exit 1
}

specs="v3_0_experimental"
specs="v3_0"

for spec in $specs
do
Expand Down
4 changes: 2 additions & 2 deletions internal/exec/engine.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ import (
"time"

"github.com/coreos/ignition/config/shared/errors"
config "github.com/coreos/ignition/config/v3_0_experimental"
"github.com/coreos/ignition/config/v3_0_experimental/types"
config "github.com/coreos/ignition/config/v3_0"
"github.com/coreos/ignition/config/v3_0/types"
"github.com/coreos/ignition/config/validate"
"github.com/coreos/ignition/config/validate/report"
"github.com/coreos/ignition/internal/exec/stages"
Expand Down
2 changes: 1 addition & 1 deletion internal/exec/stages/disks/disks.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (
"fmt"
"os/exec"

"github.com/coreos/ignition/config/v3_0_experimental/types"
"github.com/coreos/ignition/config/v3_0/types"
"github.com/coreos/ignition/internal/distro"
"github.com/coreos/ignition/internal/exec/stages"
"github.com/coreos/ignition/internal/exec/util"
Expand Down
2 changes: 1 addition & 1 deletion internal/exec/stages/disks/filesystems.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import (
"runtime"
"strings"

"github.com/coreos/ignition/config/v3_0_experimental/types"
"github.com/coreos/ignition/config/v3_0/types"
"github.com/coreos/ignition/internal/distro"
"github.com/coreos/ignition/internal/exec/util"
)
Expand Down
2 changes: 1 addition & 1 deletion internal/exec/stages/disks/partitions.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import (
"strconv"
"strings"

"github.com/coreos/ignition/config/v3_0_experimental/types"
"github.com/coreos/ignition/config/v3_0/types"
"github.com/coreos/ignition/internal/exec/util"
"github.com/coreos/ignition/internal/sgdisk"
)
Expand Down
2 changes: 1 addition & 1 deletion internal/exec/stages/disks/raid.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (
"fmt"
"os/exec"

"github.com/coreos/ignition/config/v3_0_experimental/types"
"github.com/coreos/ignition/config/v3_0/types"
"github.com/coreos/ignition/internal/distro"
"github.com/coreos/ignition/internal/exec/util"
)
Expand Down
2 changes: 1 addition & 1 deletion internal/exec/stages/files/files.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (
"os"
"strings"

"github.com/coreos/ignition/config/v3_0_experimental/types"
"github.com/coreos/ignition/config/v3_0/types"
"github.com/coreos/ignition/internal/distro"
"github.com/coreos/ignition/internal/exec/stages"
"github.com/coreos/ignition/internal/exec/util"
Expand Down
2 changes: 1 addition & 1 deletion internal/exec/stages/files/filesystemEntries.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (
"strings"

configUtil "github.com/coreos/ignition/config/util"
"github.com/coreos/ignition/config/v3_0_experimental/types"
"github.com/coreos/ignition/config/v3_0/types"
"github.com/coreos/ignition/internal/exec/util"
"github.com/coreos/ignition/internal/log"
)
Expand Down
2 changes: 1 addition & 1 deletion internal/exec/stages/files/passwd.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ package files
import (
"fmt"

"github.com/coreos/ignition/config/v3_0_experimental/types"
"github.com/coreos/ignition/config/v3_0/types"
)

// createPasswd creates the users and groups as described in config.Passwd.
Expand Down
2 changes: 1 addition & 1 deletion internal/exec/stages/files/units.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ package files
import (
"path/filepath"

"github.com/coreos/ignition/config/v3_0_experimental/types"
"github.com/coreos/ignition/config/v3_0/types"
"github.com/coreos/ignition/internal/distro"
"github.com/coreos/ignition/internal/exec/util"
)
Expand Down
2 changes: 1 addition & 1 deletion internal/exec/stages/mount/mount.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import (
"sort"
"syscall"

"github.com/coreos/ignition/config/v3_0_experimental/types"
"github.com/coreos/ignition/config/v3_0/types"
"github.com/coreos/ignition/internal/exec/stages"
"github.com/coreos/ignition/internal/exec/util"
"github.com/coreos/ignition/internal/log"
Expand Down
2 changes: 1 addition & 1 deletion internal/exec/stages/stages.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
package stages

import (
"github.com/coreos/ignition/config/v3_0_experimental/types"
"github.com/coreos/ignition/config/v3_0/types"
"github.com/coreos/ignition/internal/log"
"github.com/coreos/ignition/internal/registry"
"github.com/coreos/ignition/internal/resource"
Expand Down
2 changes: 1 addition & 1 deletion internal/exec/stages/umount/umount.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (
"sort"
"syscall"

"github.com/coreos/ignition/config/v3_0_experimental/types"
"github.com/coreos/ignition/config/v3_0/types"
"github.com/coreos/ignition/internal/exec/stages"
"github.com/coreos/ignition/internal/exec/util"
"github.com/coreos/ignition/internal/log"
Expand Down
2 changes: 1 addition & 1 deletion internal/exec/util/blkid.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ import (
"unsafe"

"github.com/coreos/ignition/config/util"
"github.com/coreos/ignition/config/v3_0_experimental/types"
"github.com/coreos/ignition/config/v3_0/types"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion internal/exec/util/file.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import (
"strconv"
"syscall"

"github.com/coreos/ignition/config/v3_0_experimental/types"
"github.com/coreos/ignition/config/v3_0/types"
"github.com/coreos/ignition/internal/log"
"github.com/coreos/ignition/internal/resource"
"github.com/coreos/ignition/internal/util"
Expand Down
2 changes: 1 addition & 1 deletion internal/exec/util/passwd.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (
"strings"
"syscall"

"github.com/coreos/ignition/config/v3_0_experimental/types"
"github.com/coreos/ignition/config/v3_0/types"
"github.com/coreos/ignition/internal/as_user"
"github.com/coreos/ignition/internal/distro"
"github.com/coreos/ignition/internal/log"
Expand Down
2 changes: 1 addition & 1 deletion internal/exec/util/unit.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import (
"net/url"
"os"

"github.com/coreos/ignition/config/v3_0_experimental/types"
"github.com/coreos/ignition/config/v3_0/types"
"github.com/coreos/ignition/internal/distro"

"github.com/vincent-petithory/dataurl"
Expand Down
2 changes: 1 addition & 1 deletion internal/exec/validate.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (
"io/ioutil"
"os"

config "github.com/coreos/ignition/config/v3_0_experimental"
config "github.com/coreos/ignition/config/v3_0"
"github.com/coreos/ignition/config/validate/report"
)

Expand Down
2 changes: 1 addition & 1 deletion internal/providers/aws/aws.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ package aws
import (
"net/url"

"github.com/coreos/ignition/config/v3_0_experimental/types"
"github.com/coreos/ignition/config/v3_0/types"
"github.com/coreos/ignition/config/validate/report"
"github.com/coreos/ignition/internal/log"
"github.com/coreos/ignition/internal/providers/util"
Expand Down
2 changes: 1 addition & 1 deletion internal/providers/azure/azure.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
"syscall"
"time"

"github.com/coreos/ignition/config/v3_0_experimental/types"
"github.com/coreos/ignition/config/v3_0/types"
"github.com/coreos/ignition/config/validate/report"
"github.com/coreos/ignition/internal/distro"
"github.com/coreos/ignition/internal/log"
Expand Down
2 changes: 1 addition & 1 deletion internal/providers/cloudstack/cloudstack.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ import (
"syscall"
"time"

"github.com/coreos/ignition/config/v3_0_experimental/types"
"github.com/coreos/ignition/config/v3_0/types"
"github.com/coreos/ignition/config/validate/report"
"github.com/coreos/ignition/internal/distro"
"github.com/coreos/ignition/internal/log"
Expand Down
2 changes: 1 addition & 1 deletion internal/providers/cmdline/cmdline.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (
"net/url"
"strings"

"github.com/coreos/ignition/config/v3_0_experimental/types"
"github.com/coreos/ignition/config/v3_0/types"
"github.com/coreos/ignition/config/validate/report"
"github.com/coreos/ignition/internal/distro"
"github.com/coreos/ignition/internal/log"
Expand Down
2 changes: 1 addition & 1 deletion internal/providers/digitalocean/digitalocean.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ package digitalocean
import (
"net/url"

"github.com/coreos/ignition/config/v3_0_experimental/types"
"github.com/coreos/ignition/config/v3_0/types"
"github.com/coreos/ignition/config/validate/report"
"github.com/coreos/ignition/internal/providers/util"
"github.com/coreos/ignition/internal/resource"
Expand Down
Loading

0 comments on commit b79a5f1

Please sign in to comment.