Skip to content
This repository has been archived by the owner on Sep 26, 2021. It is now read-only.

Commit

Permalink
Merge pull request #991 from exoscale/fix/fakedriver-interface
Browse files Browse the repository at this point in the history
fakedriver: remove useless methods
  • Loading branch information
ehazlett committed Apr 10, 2015
2 parents 0c64d05 + 91d12d0 commit 292e94e
Show file tree
Hide file tree
Showing 12 changed files with 5 additions and 63 deletions.
4 changes: 0 additions & 4 deletions drivers/azure/azure.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,6 @@ import (
"github.com/docker/machine/state"
)

const (
dockerConfigDir = "/etc/docker"
)

type Driver struct {
MachineName string
SubscriptionID string
Expand Down
8 changes: 0 additions & 8 deletions drivers/digitalocean/digitalocean.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,6 @@ import (
"github.com/docker/machine/state"
)

const (
dockerConfigDir = "/etc/docker"
)

type Driver struct {
AccessToken string
DropletID int
Expand Down Expand Up @@ -330,10 +326,6 @@ func (d *Driver) Kill() error {
return err
}

func (d *Driver) GetDockerConfigDir() string {
return dockerConfigDir
}

func (d *Driver) getClient() *godo.Client {
t := &oauth.Transport{
Token: &oauth.Token{AccessToken: d.AccessToken},
Expand Down
18 changes: 0 additions & 18 deletions drivers/fakedriver/fakedriver.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
package fakedriver

import (
"os/exec"

"github.com/docker/machine/drivers"
"github.com/docker/machine/provider"
"github.com/docker/machine/state"
Expand Down Expand Up @@ -97,19 +95,3 @@ func (d *FakeDriver) Kill() error {
func (d *FakeDriver) Upgrade() error {
return nil
}

func (d *FakeDriver) StartDocker() error {
return nil
}

func (d *FakeDriver) StopDocker() error {
return nil
}

func (d *FakeDriver) GetDockerConfigDir() string {
return ""
}

func (d *FakeDriver) GetSSHCommand(args ...string) (*exec.Cmd, error) {
return &exec.Cmd{}, nil
}
4 changes: 0 additions & 4 deletions drivers/google/google.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,6 @@ import (
"github.com/docker/machine/state"
)

const (
dockerConfigDir = "/etc/docker"
)

// Driver is a struct compatible with the docker.hosts.drivers.Driver interface.
type Driver struct {
MachineName string
Expand Down
4 changes: 0 additions & 4 deletions drivers/hyperv/hyperv_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,6 @@ import (
"github.com/docker/machine/utils"
)

const (
dockerConfigDir = "/var/lib/boot2docker"
)

type Driver struct {
SSHUser string
SSHPort int
Expand Down
4 changes: 0 additions & 4 deletions drivers/openstack/openstack.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,6 @@ import (
"github.com/docker/machine/state"
)

const (
dockerConfigDir = "/etc/docker"
)

type Driver struct {
AuthUrl string
Insecure bool
Expand Down
8 changes: 0 additions & 8 deletions drivers/rackspace/rackspace.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,6 @@ import (
"github.com/docker/machine/drivers/openstack"
)

const (
dockerConfigDir = "/etc/docker"
)

// Driver is a machine driver for Rackspace. It's a specialization of the generic OpenStack one.
type Driver struct {
*openstack.Driver
Expand Down Expand Up @@ -108,10 +104,6 @@ func (d *Driver) DriverName() string {
return "rackspace"
}

func (d *Driver) GetDockerConfigDir() string {
return dockerConfigDir
}

func missingEnvOrOption(setting, envVar, opt string) error {
return fmt.Errorf(
"%s must be specified either using the environment variable %s or the CLI option %s",
Expand Down
3 changes: 1 addition & 2 deletions drivers/softlayer/driver.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ import (
)

const (
dockerConfigDir = "/etc/docker"
ApiEndpoint = "https://api.softlayer.com/rest/v3"
ApiEndpoint = "https://api.softlayer.com/rest/v3"
)

type Driver struct {
Expand Down
3 changes: 1 addition & 2 deletions drivers/virtualbox/virtualbox.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@ import (
)

const (
dockerConfigDir = "/var/lib/boot2docker"
isoFilename = "boot2docker.iso"
isoFilename = "boot2docker.iso"
)

type Driver struct {
Expand Down
7 changes: 3 additions & 4 deletions drivers/vmwarefusion/fusion_darwin.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,9 @@ import (
)

const (
B2D_USER = "docker"
B2D_PASS = "tcuser"
dockerConfigDir = "/var/lib/boot2docker"
isoFilename = "boot2docker-1.5.0-GH747.iso"
B2D_USER = "docker"
B2D_PASS = "tcuser"
isoFilename = "boot2docker-1.5.0-GH747.iso"
)

// Driver for VMware Fusion
Expand Down
4 changes: 0 additions & 4 deletions drivers/vmwarevcloudair/vcloudair.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,6 @@ import (
"github.com/docker/machine/state"
)

const (
dockerConfigDir = "/etc/docker"
)

type Driver struct {
UserName string
UserPassword string
Expand Down
1 change: 0 additions & 1 deletion drivers/vmwarevsphere/vsphere.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ const (
isoFilename = "boot2docker-1.5.0-GH747.iso"
B2D_ISO_NAME = isoFilename
DEFAULT_CPU_NUMBER = 2
dockerConfigDir = "/var/lib/boot2docker"
B2D_USER = "docker"
B2D_PASS = "tcuser"
)
Expand Down

0 comments on commit 292e94e

Please sign in to comment.