openstack: update for new driver interface

Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
This commit is contained in:
Evan Hazlett 2015-03-09 23:27:17 -04:00
parent 7e362cf4a3
commit 6c931dadde
No known key found for this signature in database
GPG Key ID: A519480096146526
2 changed files with 35 additions and 1 deletions

View File

@ -21,7 +21,7 @@ import (
_ "github.com/docker/machine/drivers/google"
_ "github.com/docker/machine/drivers/hyperv"
_ "github.com/docker/machine/drivers/none"
//_ "github.com/docker/machine/drivers/openstack"
_ "github.com/docker/machine/drivers/openstack"
//_ "github.com/docker/machine/drivers/rackspace"
//_ "github.com/docker/machine/drivers/softlayer"
_ "github.com/docker/machine/drivers/virtualbox"

View File

@ -5,6 +5,7 @@ import (
"io/ioutil"
"os/exec"
"path"
"path/filepath"
"strings"
"time"
@ -12,6 +13,7 @@ import (
"github.com/codegangsta/cli"
"github.com/docker/docker/utils"
"github.com/docker/machine/drivers"
"github.com/docker/machine/provider"
"github.com/docker/machine/ssh"
"github.com/docker/machine/state"
)
@ -203,6 +205,38 @@ func NewDerivedDriver(machineName string, storePath string, client Client, caCer
}, nil
}
func (d *Driver) AuthorizePort(ports []*drivers.Port) error {
return nil
}
func (d *Driver) DeauthorizePort(ports []*drivers.Port) error {
return nil
}
func (d *Driver) GetMachineName() string {
return d.MachineName
}
func (d *Driver) GetSSHHostname() (string, error) {
return d.GetIP()
}
func (d *Driver) GetSSHKeyPath() string {
return filepath.Join(d.storePath, "id_rsa")
}
func (d *Driver) GetSSHPort() (int, error) {
return d.SSHPort, nil
}
func (d *Driver) GetSSHUsername() string {
return d.SSHUser
}
func (d *Driver) GetProviderType() provider.ProviderType {
return provider.Remote
}
func (d *Driver) DriverName() string {
return "openstack"
}