mirror of https://github.com/docker/docs.git
openstack: update for new driver interface
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
This commit is contained in:
parent
7e362cf4a3
commit
6c931dadde
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue