1
0
mirror of https://github.com/rancher/os.git synced 2025-09-01 23:04:41 +00:00

Move default hostname and network under common key

This commit is contained in:
Josh Curl
2016-05-03 08:55:15 -07:00
parent 97344cc535
commit e51c5409aa
5 changed files with 18 additions and 11 deletions

View File

@@ -78,7 +78,6 @@ type CloudConfig struct {
SSHAuthorizedKeys []string `yaml:"ssh_authorized_keys"`
WriteFiles []config.File `yaml:"write_files"`
Hostname string `yaml:"hostname"`
DefaultHostname string `yaml:"default_hostname"`
Rancher RancherConfig `yaml:"rancher,omitempty"`
}
@@ -105,6 +104,7 @@ type RancherConfig struct {
SystemDocker DockerConfig `yaml:"system_docker,omitempty"`
Upgrade UpgradeConfig `yaml:"upgrade,omitempty"`
Docker DockerConfig `yaml:"docker,omitempty"`
Defaults Defaults `yaml:"defaults,omitempty"`
}
type UpgradeConfig struct {
@@ -148,6 +148,11 @@ type CloudInit struct {
Datasources []string `yaml:"datasources,omitempty"`
}
type Defaults struct {
Hostname string `yaml:"hostname,omitempty"`
Network netconf.NetworkConfig `yaml:"network,omitempty"`
}
func (r Repositories) ToArray() []string {
result := make([]string, 0, len(r))
for _, repo := range r {