merge lbaasv2, portsbinding, volumes v2; remove 'rackspace' refs; update docs
diff --git a/openstack/compute/v2/extensions/diskconfig/results.go b/openstack/compute/v2/extensions/diskconfig/results.go
index 1957e12..3ba66f5 100644
--- a/openstack/compute/v2/extensions/diskconfig/results.go
+++ b/openstack/compute/v2/extensions/diskconfig/results.go
@@ -6,3 +6,12 @@
servers.Server
DiskConfig DiskConfig `json:"OS-DCF:diskConfig"`
}
+
+func (s ServerWithDiskConfig) ToServerCreateResult() (m map[string]interface{}) {
+ m["OS-DCF:diskConfig"] = s.DiskConfig
+ return
+}
+
+type CreateServerResultBuilder interface {
+ ToServerCreateResult() map[string]interface{}
+}
diff --git a/openstack/compute/v2/images/results.go b/openstack/compute/v2/images/results.go
index f38466b..a55b8f1 100644
--- a/openstack/compute/v2/images/results.go
+++ b/openstack/compute/v2/images/results.go
@@ -45,6 +45,8 @@
Status string
Updated string
+
+ Metadata map[string]string
}
// ImagePage contains a single page of results from a List operation.
diff --git a/openstack/compute/v2/images/testing/requests_test.go b/openstack/compute/v2/images/testing/requests_test.go
index a13b086..e2d64d3 100644
--- a/openstack/compute/v2/images/testing/requests_test.go
+++ b/openstack/compute/v2/images/testing/requests_test.go
@@ -38,8 +38,7 @@
"created": "2014-09-23T12:54:52Z",
"minDisk": 0,
"progress": 100,
- "minRam": 0,
- "metadata": {}
+ "minRam": 0
},
{
"status": "ACTIVE",
@@ -50,8 +49,7 @@
"created": "2014-09-23T12:51:42Z",
"minDisk": 0,
"progress": 100,
- "minRam": 0,
- "metadata": {}
+ "minRam": 0
}
]
}
@@ -131,8 +129,7 @@
"created": "2014-09-23T12:54:52Z",
"minDisk": 0,
"progress": 100,
- "minRam": 0,
- "metadata": {}
+ "minRam": 0
}
}
`)
diff --git a/openstack/compute/v2/servers/testing/results_test.go b/openstack/compute/v2/servers/testing/results_test.go
index e5334f0..5866957 100644
--- a/openstack/compute/v2/servers/testing/results_test.go
+++ b/openstack/compute/v2/servers/testing/results_test.go
@@ -9,6 +9,7 @@
"github.com/gophercloud/gophercloud"
"github.com/gophercloud/gophercloud/openstack/compute/v2/servers"
th "github.com/gophercloud/gophercloud/testhelper"
+ "github.com/gophercloud/gophercloud/testhelper/client"
"golang.org/x/crypto/ssh"
)
@@ -96,3 +97,14 @@
th.AssertNoErr(t, err)
th.AssertEquals(t, "ruZKK0tqxRfYm5t7lSJq", pwd)
}
+
+func TestListAddressesAllPages(t *testing.T) {
+ th.SetupHTTP()
+ defer th.TeardownHTTP()
+ HandleAddressListSuccessfully(t)
+
+ allPages, err := servers.ListAddresses(client.ServiceClient(), "asdfasdfasdf").AllPages()
+ th.AssertNoErr(t, err)
+ _, err = servers.ExtractAddresses(allPages)
+ th.AssertNoErr(t, err)
+}