Compute v2: Extended Availability Zone Status (#282)
* Compute v2: Extended Availability Zone Status API
* Compute v2: Extended Availability Zone Status unit tests
* Compute v2: Extended Availability Zone Status acceptance tests
diff --git a/acceptance/openstack/compute/v2/servers_test.go b/acceptance/openstack/compute/v2/servers_test.go
index 22b6580..f43c94d 100644
--- a/acceptance/openstack/compute/v2/servers_test.go
+++ b/acceptance/openstack/compute/v2/servers_test.go
@@ -9,6 +9,7 @@
"github.com/gophercloud/gophercloud"
"github.com/gophercloud/gophercloud/acceptance/clients"
"github.com/gophercloud/gophercloud/acceptance/tools"
+ "github.com/gophercloud/gophercloud/openstack/compute/v2/extensions/availabilityzones"
"github.com/gophercloud/gophercloud/openstack/compute/v2/servers"
th "github.com/gophercloud/gophercloud/testhelper"
)
@@ -88,6 +89,30 @@
}
}
+func TestServersCreateDestroyWithExtensions(t *testing.T) {
+ var extendedServer struct {
+ servers.Server
+ availabilityzones.ServerExt
+ }
+
+ client, err := clients.NewComputeV2Client()
+ if err != nil {
+ t.Fatalf("Unable to create a compute client: %v", err)
+ }
+
+ server, err := CreateServer(t, client)
+ if err != nil {
+ t.Fatalf("Unable to create server: %v", err)
+ }
+ defer DeleteServer(t, client, server)
+
+ err = servers.Get(client, server.ID).ExtractInto(&extendedServer)
+ if err != nil {
+ t.Errorf("Unable to retrieve server: %v", err)
+ }
+ tools.PrintResource(t, extendedServer)
+}
+
func TestServersWithoutImageRef(t *testing.T) {
client, err := clients.NewComputeV2Client()
if err != nil {