Update to gophercloud/gophercloud
Per https://github.com/rackspace/gophercloud, the git repo is frozen and work has moved to https://github.com/gophercloud/gophercloud. So let's switch over to the new repository Change-Id: I754b0a6e3b9a25745158fa1453aee48ca325d0f7
This commit is contained in:
parent
636cbc9909
commit
38fe101d63
@ -11,19 +11,19 @@ import (
|
||||
"github.com/docker/machine/libmachine/log"
|
||||
"github.com/docker/machine/libmachine/mcnutils"
|
||||
"github.com/docker/machine/libmachine/version"
|
||||
"github.com/rackspace/gophercloud"
|
||||
"github.com/rackspace/gophercloud/openstack"
|
||||
compute_ips "github.com/rackspace/gophercloud/openstack/compute/v2/extensions/floatingip"
|
||||
"github.com/rackspace/gophercloud/openstack/compute/v2/extensions/keypairs"
|
||||
"github.com/rackspace/gophercloud/openstack/compute/v2/extensions/startstop"
|
||||
"github.com/rackspace/gophercloud/openstack/compute/v2/flavors"
|
||||
"github.com/rackspace/gophercloud/openstack/compute/v2/images"
|
||||
"github.com/rackspace/gophercloud/openstack/compute/v2/servers"
|
||||
"github.com/rackspace/gophercloud/openstack/identity/v2/tenants"
|
||||
"github.com/rackspace/gophercloud/openstack/networking/v2/extensions/layer3/floatingips"
|
||||
"github.com/rackspace/gophercloud/openstack/networking/v2/networks"
|
||||
"github.com/rackspace/gophercloud/openstack/networking/v2/ports"
|
||||
"github.com/rackspace/gophercloud/pagination"
|
||||
"github.com/gophercloud/gophercloud"
|
||||
"github.com/gophercloud/gophercloud/openstack"
|
||||
compute_ips "github.com/gophercloud/gophercloud/openstack/compute/v2/extensions/floatingips"
|
||||
"github.com/gophercloud/gophercloud/openstack/compute/v2/extensions/keypairs"
|
||||
"github.com/gophercloud/gophercloud/openstack/compute/v2/extensions/startstop"
|
||||
"github.com/gophercloud/gophercloud/openstack/compute/v2/flavors"
|
||||
"github.com/gophercloud/gophercloud/openstack/compute/v2/images"
|
||||
"github.com/gophercloud/gophercloud/openstack/compute/v2/servers"
|
||||
"github.com/gophercloud/gophercloud/openstack/identity/v2/tenants"
|
||||
"github.com/gophercloud/gophercloud/openstack/networking/v2/extensions/layer3/floatingips"
|
||||
"github.com/gophercloud/gophercloud/openstack/networking/v2/networks"
|
||||
"github.com/gophercloud/gophercloud/openstack/networking/v2/ports"
|
||||
"github.com/gophercloud/gophercloud/pagination"
|
||||
)
|
||||
|
||||
type Client interface {
|
||||
@ -134,7 +134,8 @@ func (c *GenericClient) StopInstance(d *Driver) error {
|
||||
}
|
||||
|
||||
func (c *GenericClient) RestartInstance(d *Driver) error {
|
||||
if result := servers.Reboot(c.Compute, d.MachineId, servers.SoftReboot); result.Err != nil {
|
||||
opts := &servers.RebootOpts{Type: servers.SoftReboot}
|
||||
if result := servers.Reboot(c.Compute, d.MachineId, opts); result.Err != nil {
|
||||
return result.Err
|
||||
}
|
||||
return nil
|
||||
@ -356,7 +357,8 @@ func (c *GenericClient) assignNovaFloatingIP(d *Driver, floatingIP *FloatingIP)
|
||||
floatingIP.Ip = f.IP
|
||||
floatingIP.Pool = f.Pool
|
||||
}
|
||||
return compute_ips.Associate(c.Compute, d.MachineId, floatingIP.Ip).Err
|
||||
opts := &compute_ips.AssociateOpts{FloatingIP: floatingIP.Ip}
|
||||
return compute_ips.AssociateInstance(c.Compute, d.MachineId, opts).Err
|
||||
}
|
||||
|
||||
func (c *GenericClient) assignNeutronFloatingIP(d *Driver, floatingIP *FloatingIP) error {
|
||||
@ -379,7 +381,7 @@ func (c *GenericClient) assignNeutronFloatingIP(d *Driver, floatingIP *FloatingI
|
||||
return nil
|
||||
}
|
||||
_, err = floatingips.Update(c.Network, floatingIP.Id, floatingips.UpdateOpts{
|
||||
PortID: portID,
|
||||
PortID: &portID,
|
||||
}).Extract()
|
||||
if err != nil {
|
||||
return err
|
||||
@ -495,7 +497,13 @@ func (c *GenericClient) InitIdentityClient(d *Driver) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
identity := openstack.NewIdentityV2(c.Provider)
|
||||
identity, err := openstack.NewIdentityV2(c.Provider, gophercloud.EndpointOpts{
|
||||
Region: d.Region,
|
||||
Availability: c.getEndpointType(d),
|
||||
})
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
c.Identity = identity
|
||||
return nil
|
||||
}
|
||||
|
27
glide.lock
generated
27
glide.lock
generated
@ -1,5 +1,5 @@
|
||||
hash: 2ae414367804198c51ad47534bc4a00c8b68b2eddb850ffcfdf5f3a112b68b65
|
||||
updated: 2017-03-16T16:09:29.619642963-04:00
|
||||
hash: f0fdc617a0337ac35ef7e13ce83e231286bb4636974151ac8a57680af8d064f7
|
||||
updated: 2017-03-23T15:12:37.058586603-04:00
|
||||
imports:
|
||||
- name: github.com/docker/docker
|
||||
version: a8a31eff10544860d2188dddabdee4d727545796
|
||||
@ -9,9 +9,6 @@ imports:
|
||||
version: 0f08d3c510bc8c2a2c087cabd6614d8776ca8687
|
||||
subpackages:
|
||||
- libmachine/drivers
|
||||
- libmachine/drivers/plugin
|
||||
- libmachine/drivers/plugin/localbinary
|
||||
- libmachine/drivers/rpc
|
||||
- libmachine/log
|
||||
- libmachine/mcnflag
|
||||
- libmachine/mcnutils
|
||||
@ -19,13 +16,11 @@ imports:
|
||||
- libmachine/state
|
||||
- libmachine/version
|
||||
- version
|
||||
- name: github.com/mitchellh/mapstructure
|
||||
version: 740c764bc6149d3f1806231418adb9f52c11bcbf
|
||||
- name: github.com/rackspace/gophercloud
|
||||
version: ce0f487f6747ab43c4e4404722df25349385bebd
|
||||
- name: github.com/gophercloud/gophercloud
|
||||
version: 9a5595b8ffe429439c63781cdc312c254e4ad990
|
||||
subpackages:
|
||||
- openstack
|
||||
- openstack/compute/v2/extensions/floatingip
|
||||
- openstack/compute/v2/extensions/floatingips
|
||||
- openstack/compute/v2/extensions/keypairs
|
||||
- openstack/compute/v2/extensions/startstop
|
||||
- openstack/compute/v2/flavors
|
||||
@ -39,14 +34,6 @@ imports:
|
||||
- openstack/networking/v2/ports
|
||||
- openstack/utils
|
||||
- pagination
|
||||
- rackspace
|
||||
- rackspace/identity/v2/tokens
|
||||
- testhelper
|
||||
- testhelper/client
|
||||
- name: github.com/stretchr/testify
|
||||
version: 4d4bfba8f1d1027c4fdbe371823030df51419987
|
||||
subpackages:
|
||||
- assert
|
||||
- name: golang.org/x/crypto
|
||||
version: beef0f4390813b96e8e68fd78570396d0f4751fc
|
||||
subpackages:
|
||||
@ -62,3 +49,7 @@ testImports:
|
||||
version: 792786c7400a136282c1664665ae0a8db921c6c2
|
||||
subpackages:
|
||||
- difflib
|
||||
- name: github.com/stretchr/testify
|
||||
version: 4d4bfba8f1d1027c4fdbe371823030df51419987
|
||||
subpackages:
|
||||
- assert
|
||||
|
25
glide.yaml
25
glide.yaml
@ -1,4 +1,29 @@
|
||||
package: git.openstack.org/openstack/docker-machine-openstack
|
||||
import:
|
||||
- package: github.com/docker/machine
|
||||
subpackages:
|
||||
- libmachine/drivers
|
||||
- libmachine/log
|
||||
- libmachine/mcnflag
|
||||
- libmachine/mcnutils
|
||||
- libmachine/ssh
|
||||
- libmachine/state
|
||||
- libmachine/version
|
||||
- package: github.com/gophercloud/gophercloud
|
||||
subpackages:
|
||||
- openstack
|
||||
- openstack/compute/v2/extensions/floatingips
|
||||
- openstack/compute/v2/extensions/keypairs
|
||||
- openstack/compute/v2/extensions/startstop
|
||||
- openstack/compute/v2/flavors
|
||||
- openstack/compute/v2/images
|
||||
- openstack/compute/v2/servers
|
||||
- openstack/identity/v2/tenants
|
||||
- openstack/networking/v2/extensions/layer3/floatingips
|
||||
- openstack/networking/v2/networks
|
||||
- openstack/networking/v2/ports
|
||||
- pagination
|
||||
testImport:
|
||||
- package: github.com/stretchr/testify
|
||||
subpackages:
|
||||
- assert
|
||||
|
Loading…
Reference in New Issue
Block a user