Skip to content

Commit c43db71

Browse files
authored
Merge pull request #2163 from coreos/revert-2152-add-oem-scheme
Revert "Add `oem` to accepted url schemes"
2 parents c8d9841 + 8ece629 commit c43db71

File tree

23 files changed

+48
-134
lines changed

23 files changed

+48
-134
lines changed

config/doc/ignition.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
resource:
22
children:
33
- name: source
4-
desc: "the URL of the %TYPE%. Supported schemes are `http`, `https`, `tftp`, `s3`, `arn`, `gs`, `oem` (Flatcar only), and [`data`](https://tools.ietf.org/html/rfc2397). When using `http`, it is advisable to use the verification option to ensure the contents haven't been modified."
4+
desc: "the URL of the %TYPE%. Supported schemes are `http`, `https`, `tftp`, `s3`, `arn`, `gs`, and [`data`](https://tools.ietf.org/html/rfc2397). When using `http`, it is advisable to use the verification option to ensure the contents haven't been modified."
55
# source is typically required by validation, but some inclusion sites
66
# will override this
77
required: true

config/v3_0/types/url.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ func validateURL(s string) error {
3030
}
3131

3232
switch u.Scheme {
33-
case "http", "https", "tftp", "oem":
33+
case "http", "https", "tftp":
3434
return nil
3535
case "s3":
3636
if v, ok := u.Query()["versionId"]; ok {

config/v3_0/types/url_test.go

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -66,18 +66,6 @@ func TestURLValidate(t *testing.T) {
6666
util.StrToPtr("s3://bucket/key?versionId=aVersionHash"),
6767
nil,
6868
},
69-
{
70-
util.StrToPtr("oem:///example.txt"),
71-
nil,
72-
},
73-
{
74-
util.StrToPtr("oem:///scripts/setup.sh"),
75-
nil,
76-
},
77-
{
78-
util.StrToPtr("oem:///etc/custom.conf"),
79-
nil,
80-
},
8169
}
8270

8371
for i, test := range tests {

config/v3_1/types/url.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ func validateURL(s string) error {
3030
}
3131

3232
switch u.Scheme {
33-
case "http", "https", "tftp", "oem":
33+
case "http", "https", "tftp":
3434
return nil
3535
case "s3":
3636
if v, ok := u.Query()["versionId"]; ok {

config/v3_1/types/url_test.go

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -66,18 +66,6 @@ func TestURLValidate(t *testing.T) {
6666
util.StrToPtr("s3://bucket/key?versionId=aVersionHash"),
6767
nil,
6868
},
69-
{
70-
util.StrToPtr("oem:///example.txt"),
71-
nil,
72-
},
73-
{
74-
util.StrToPtr("oem:///scripts/setup.sh"),
75-
nil,
76-
},
77-
{
78-
util.StrToPtr("oem:///etc/custom.conf"),
79-
nil,
80-
},
8169
}
8270

8371
for i, test := range tests {

config/v3_2/types/url.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ func validateURL(s string) error {
3030
}
3131

3232
switch u.Scheme {
33-
case "http", "https", "tftp", "gs", "oem":
33+
case "http", "https", "tftp", "gs":
3434
return nil
3535
case "s3":
3636
if v, ok := u.Query()["versionId"]; ok {

config/v3_2/types/url_test.go

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -70,18 +70,6 @@ func TestURLValidate(t *testing.T) {
7070
util.StrToPtr("gs://bucket/object"),
7171
nil,
7272
},
73-
{
74-
util.StrToPtr("oem:///example.txt"),
75-
nil,
76-
},
77-
{
78-
util.StrToPtr("oem:///scripts/setup.sh"),
79-
nil,
80-
},
81-
{
82-
util.StrToPtr("oem:///etc/custom.conf"),
83-
nil,
84-
},
8573
}
8674

8775
for i, test := range tests {

config/v3_3/types/url.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ func validateURL(s string) error {
3030
}
3131

3232
switch u.Scheme {
33-
case "http", "https", "tftp", "gs", "oem":
33+
case "http", "https", "tftp", "gs":
3434
return nil
3535
case "s3":
3636
if v, ok := u.Query()["versionId"]; ok {

config/v3_3/types/url_test.go

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -70,18 +70,6 @@ func TestURLValidate(t *testing.T) {
7070
util.StrToPtr("gs://bucket/object"),
7171
nil,
7272
},
73-
{
74-
util.StrToPtr("oem:///example.txt"),
75-
nil,
76-
},
77-
{
78-
util.StrToPtr("oem:///scripts/setup.sh"),
79-
nil,
80-
},
81-
{
82-
util.StrToPtr("oem:///etc/custom.conf"),
83-
nil,
84-
},
8573
}
8674

8775
for i, test := range tests {

config/v3_4/types/url.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ func validateURL(s string) error {
3232
}
3333

3434
switch u.Scheme {
35-
case "http", "https", "tftp", "gs", "oem":
35+
case "http", "https", "tftp", "gs":
3636
return nil
3737
case "s3":
3838
if v, ok := u.Query()["versionId"]; ok {

0 commit comments

Comments
 (0)