Skip to content

Commit

Permalink
Delete all commented code
Browse files Browse the repository at this point in the history
Signed-off-by: David Cassany <[email protected]>
  • Loading branch information
davidcassany committed Jul 15, 2022
1 parent 65ea043 commit c538efc
Show file tree
Hide file tree
Showing 6 changed files with 1 addition and 309 deletions.
102 changes: 0 additions & 102 deletions pkg/config/coerce.go

This file was deleted.

14 changes: 0 additions & 14 deletions pkg/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,20 +76,6 @@ type Config struct {
Data map[string]interface{} `yaml:"data,omitempty" json:"data,omitempty"`
}

type YipConfig struct {
Stages map[string][]Stage `json:"stages,omitempty"`
}

type Stage struct {
Users map[string]User `json:"users,omitempty"`
}

type User struct {
Name string `json:"name,omitempty"`
PasswordHash string `json:"passwd,omitempty"`
SSHAuthorizedKeys []string `json:"ssh_authorized_keys,omitempty"`
}

func (in *Config) DeepCopyInto(out *Config) {
*out = *in
}
Expand Down
22 changes: 1 addition & 21 deletions pkg/config/read.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,28 +23,7 @@ import (
"github.com/rancher/wrangler/pkg/data/convert"
)

/*const authorizedKeysKey = "ssh_authorized_keys"
var (
defaultMappers = schemas2.Mappers{
NewToMap(),
NewToSlice(),
NewToBool(),
&FuzzyNames{},
}
schemas = schemas2.EmptySchemas().Init(func(s *schemas2.Schemas) *schemas2.Schemas {
s.AddMapper("config", defaultMappers)
s.AddMapper("elemental", defaultMappers)
s.AddMapper("install", defaultMappers)
return s
}).MustImport(Config{})
schema = schemas.Schema("config")
)*/

// ToEnv converts the config into a slice env.
// The configuration fields are prefixed with "_COS"
// to allow installation parameters to be set in the cos.sh script:
// e.g. https://github.com/rancher-sandbox/cOS-toolkit/blob/affc831b76d50298bbbbe637f31c81c52c5489b8/packages/backports/installer/cos.sh#L698
func ToEnv(cfg Config) ([]string, error) {
// Pass only the elemental values, as those are the ones used by the installer/cli
// Ignore the Data as that is cloud-config stuff
Expand All @@ -60,6 +39,7 @@ func ToEnv(cfg Config) ([]string, error) {
var defaultOverrides = map[string]string{
"ELEMENTAL_INSTALL_CONFIG_URL": "ELEMENTAL_INSTALL_CLOUD_INIT",
"ELEMENTAL_INSTALL_POWEROFF": "ELEMENTAL_POWEROFF",
"ELEMENTAL_INSTALL_REBOOT": "ELEMENTAL_REBOOT",
"ELEMENTAL_INSTALL_DEVICE": "ELEMENTAL_INSTALL_TARGET",
"ELEMENTAL_INSTALL_SYSTEM_URI": "ELEMENTAL_INSTALL_SYSTEM",
"ELEMENTAL_INSTALL_DEBUG": "ELEMENTAL_DEBUG",
Expand Down
67 changes: 0 additions & 67 deletions pkg/config/rename.go

This file was deleted.

57 changes: 0 additions & 57 deletions pkg/config/tftpget.go

This file was deleted.

48 changes: 0 additions & 48 deletions pkg/config/write.go

This file was deleted.

0 comments on commit c538efc

Please sign in to comment.