Use rackspace's specialized client

`openstack.NewDerivedDriver` sets client to `openstack.GenericClient`
therefore `rackspace.Client` is getting ignored.

`rackspace.Client.Authenticate` has different semantics than
`openstack.GenericClient.Authenticate`, thus almost all operations with
`rackspace` driver fail at the moment.

Signed-off-by: Amir Mohammad Saied <amirsaied@gmail.com>
This commit is contained in:
Amir Mohammad Saied 2015-11-06 18:16:15 +00:00
parent 9775f9ec04
commit a6c44f5d4e
2 changed files with 10 additions and 2 deletions

View File

@ -218,6 +218,10 @@ func (d *Driver) GetSSHHostname() (string, error) {
return d.GetIP()
}
func (d *Driver) SetClient(client Client) {
d.client = client
}
func (d *Driver) DriverName() string {
return "openstack"
}

View File

@ -87,10 +87,14 @@ func NewDriver(machineName, storePath string) drivers.Driver {
}).Debug("Instantiating Rackspace driver.")
inner := openstack.NewDerivedDriver(machineName, storePath)
return &Driver{
driver := &Driver{
Driver: inner,
}
inner.SetClient(&Client{
driver: driver,
})
return driver
}
// DriverName is the user-visible name of this driver.