Moving compute resources into version dir
diff --git a/acceptance/openstack/compute/compute_test.go b/acceptance/openstack/compute/compute_test.go
index 7473f13..2310858 100644
--- a/acceptance/openstack/compute/compute_test.go
+++ b/acceptance/openstack/compute/compute_test.go
@@ -4,12 +4,13 @@
import (
"fmt"
- "github.com/rackspace/gophercloud/openstack/compute/flavors"
- "github.com/rackspace/gophercloud/openstack/compute/images"
- "github.com/rackspace/gophercloud/openstack/compute/servers"
"os"
"testing"
+
"github.com/rackspace/gophercloud/acceptance/tools"
+ "github.com/rackspace/gophercloud/openstack/compute/v2/flavors"
+ "github.com/rackspace/gophercloud/openstack/compute/v2/images"
+ "github.com/rackspace/gophercloud/openstack/compute/v2/servers"
)
var service = "compute"
@@ -226,7 +227,7 @@
t.Fatal(err)
}
- defer func(){
+ defer func() {
servers.Delete(ts.Client, ts.CreatedServer.Id)
}()
@@ -254,7 +255,7 @@
t.Fatal(err)
}
- defer func(){
+ defer func() {
servers.Delete(ts.Client, ts.CreatedServer.Id)
}()
@@ -287,7 +288,7 @@
t.Fatal(err)
}
- defer func(){
+ defer func() {
servers.Delete(ts.Client, ts.CreatedServer.Id)
}()
@@ -304,31 +305,31 @@
func TestActionResizeConfirm(t *testing.T) {
t.Parallel()
-
+
ts, err := tools.SetupForCRUD()
if err != nil {
t.Fatal(err)
}
-
+
err = tools.CreateServer(ts)
if err != nil {
t.Fatal(err)
}
-
- defer func(){
+
+ defer func() {
servers.Delete(ts.Client, ts.CreatedServer.Id)
}()
-
+
err = tools.WaitForStatus(ts, "ACTIVE")
if err != nil {
t.Fatal(err)
}
-
+
err = tools.ResizeServer(ts)
if err != nil {
t.Fatal(err)
}
-
+
err = tools.ConfirmResize(ts)
if err != nil {
t.Fatal(err)
@@ -337,31 +338,31 @@
func TestActionResizeRevert(t *testing.T) {
t.Parallel()
-
+
ts, err := tools.SetupForCRUD()
if err != nil {
t.Fatal(err)
}
-
+
err = tools.CreateServer(ts)
if err != nil {
t.Fatal(err)
}
-
- defer func(){
+
+ defer func() {
servers.Delete(ts.Client, ts.CreatedServer.Id)
}()
-
+
err = tools.WaitForStatus(ts, "ACTIVE")
if err != nil {
t.Fatal(err)
}
-
+
err = tools.ResizeServer(ts)
if err != nil {
t.Fatal(err)
}
-
+
err = tools.RevertResize(ts)
if err != nil {
t.Fatal(err)
diff --git a/acceptance/openstack/compute/tools_test.go b/acceptance/openstack/compute/tools_test.go
index 5140caf..100ea5e 100644
--- a/acceptance/openstack/compute/tools_test.go
+++ b/acceptance/openstack/compute/tools_test.go
@@ -5,12 +5,13 @@
import (
"crypto/rand"
"fmt"
- "github.com/rackspace/gophercloud/openstack/compute/servers"
- identity "github.com/rackspace/gophercloud/openstack/identity/v2"
- "github.com/rackspace/gophercloud/openstack/utils"
"os"
"text/tabwriter"
"time"
+
+ "github.com/rackspace/gophercloud/openstack/compute/v2/servers"
+ identity "github.com/rackspace/gophercloud/openstack/identity/v2"
+ "github.com/rackspace/gophercloud/openstack/utils"
)
var errTimeout = fmt.Errorf("Timeout.")