Clean up some remaining issues with libmachine merge

Signed-off-by: Nathan LeClaire <nathan.leclaire@gmail.com>
This commit is contained in:
Nathan LeClaire 2015-03-20 14:01:01 -07:00
parent 49feb33457
commit 7b5c8a023f
3 changed files with 17 additions and 19 deletions

View File

@ -407,20 +407,20 @@ func cmdCreate(c *cli.Context) {
hostConfig := &libmachine.HostOptions{ hostConfig := &libmachine.HostOptions{
AuthConfig: &auth.AuthOptions{ AuthConfig: &auth.AuthOptions{
CaCertPath: c.GlobalString("tls-ca-cert"), CaCertPath: certInfo.CaCertPath,
PrivateKeyPath: c.GlobalString("tls-ca-key"), PrivateKeyPath: certInfo.CaKeyPath,
ClientCertPath: c.GlobalString("tls-client-cert"), ClientCertPath: certInfo.ClientCertPath,
ClientKeyPath: filepath.Join(utils.GetMachineCertDir(), "key.pem"), ClientKeyPath: certInfo.ClientKeyPath,
ServerCertPath: filepath.Join(utils.GetMachineDir(), name, "server.pem"), ServerCertPath: filepath.Join(utils.GetMachineDir(), name, "server.pem"),
ServerKeyPath: filepath.Join(utils.GetMachineDir(), name, "server-key.pem"), ServerKeyPath: filepath.Join(utils.GetMachineDir(), name, "server-key.pem"),
}, },
EngineConfig: &engine.EngineOptions{}, EngineConfig: &engine.EngineOptions{},
SwarmConfig: &swarm.SwarmOptions{ SwarmConfig: &swarm.SwarmOptions{
IsSwarm: c.Bool("swarm"), IsSwarm: c.Bool("swarm"),
Master: c.GlobalBool("swarm-master"), Master: c.Bool("swarm-master"),
Discovery: c.GlobalString("swarm-discovery"), Discovery: c.String("swarm-discovery"),
Address: c.GlobalString("swarm-addr"), Address: c.String("swarm-addr"),
Host: c.GlobalString("swarm-host"), Host: c.String("swarm-host"),
}, },
} }

View File

@ -153,12 +153,12 @@ func (s Filestore) activePath() string {
// validates host config and modifies if needed // validates host config and modifies if needed
// this is used for configuration updates // this is used for configuration updates
func validateHost(host *Host) *Host { func validateHost(host *Host) *Host {
if host.EngineOptions == nil { if host.HostConfig.EngineConfig == nil {
host.EngineOptions = &engine.EngineOptions{} host.HostConfig.EngineConfig = &engine.EngineOptions{}
} }
if host.SwarmOptions == nil { if host.HostConfig.SwarmConfig == nil {
host.SwarmOptions = &swarm.SwarmOptions{ host.HostConfig.SwarmConfig = &swarm.SwarmOptions{
Address: "", Address: "",
Discovery: host.SwarmDiscovery, Discovery: host.SwarmDiscovery,
Host: host.SwarmHost, Host: host.SwarmHost,

View File

@ -30,8 +30,6 @@ type Host struct {
DriverName string DriverName string
Driver drivers.Driver Driver drivers.Driver
StorePath string StorePath string
EngineOptions *engine.EngineOptions
SwarmOptions *swarm.SwarmOptions
HostConfig HostOptions HostConfig HostOptions
// deprecated options; these are left to assist in config migrations // deprecated options; these are left to assist in config migrations