ExtractHeaders is no more.
diff --git a/acceptance/rackspace/objectstorage/v1/accounts_test.go b/acceptance/rackspace/objectstorage/v1/accounts_test.go
index 3a05646..e5c75fc 100644
--- a/acceptance/rackspace/objectstorage/v1/accounts_test.go
+++ b/acceptance/rackspace/objectstorage/v1/accounts_test.go
@@ -13,11 +13,11 @@
c, err := createClient(t, false)
th.AssertNoErr(t, err)
- headers, err := raxAccounts.Update(c, raxAccounts.UpdateOpts{Metadata: map[string]string{"white": "mountains"}}).ExtractHeaders()
+ headers, err := raxAccounts.Update(c, raxAccounts.UpdateOpts{Metadata: map[string]string{"white": "mountains"}}).Extract()
th.AssertNoErr(t, err)
t.Logf("Headers from Update Account request: %+v\n", headers)
defer func() {
- _, err := raxAccounts.Update(c, raxAccounts.UpdateOpts{Metadata: map[string]string{"white": ""}}).ExtractHeaders()
+ _, err := raxAccounts.Update(c, raxAccounts.UpdateOpts{Metadata: map[string]string{"white": ""}}).Extract()
th.AssertNoErr(t, err)
metadata, err := raxAccounts.Get(c).ExtractMetadata()
th.AssertNoErr(t, err)
@@ -25,11 +25,7 @@
th.CheckEquals(t, metadata["White"], "")
}()
- getResult := raxAccounts.Get(c)
- headers, err = getResult.ExtractHeaders()
- th.AssertNoErr(t, err)
- t.Logf("Headers from Get Account request (after update): %+v\n", headers)
- metadata, err := getResult.ExtractMetadata()
+ metadata, err := raxAccounts.Get(c).ExtractMetadata()
th.AssertNoErr(t, err)
t.Logf("Metadata from Get Account request (after update): %+v\n", metadata)
diff --git a/acceptance/rackspace/objectstorage/v1/cdncontainers_test.go b/acceptance/rackspace/objectstorage/v1/cdncontainers_test.go
index 2765f00..4530a5b 100644
--- a/acceptance/rackspace/objectstorage/v1/cdncontainers_test.go
+++ b/acceptance/rackspace/objectstorage/v1/cdncontainers_test.go
@@ -16,20 +16,20 @@
raxClient, err := createClient(t, false)
th.AssertNoErr(t, err)
- headers, err := raxContainers.Create(raxClient, "gophercloud-test", nil).ExtractHeaders()
+ headers, err := raxContainers.Create(raxClient, "gophercloud-test", nil).Extract()
th.AssertNoErr(t, err)
t.Logf("Headers from Create Container request: %+v\n", headers)
defer func() {
- _, err := raxContainers.Delete(raxClient, "gophercloud-test").ExtractHeaders()
+ _, err := raxContainers.Delete(raxClient, "gophercloud-test").Extract()
th.AssertNoErr(t, err)
}()
raxCDNClient, err := createClient(t, true)
th.AssertNoErr(t, err)
- headers, err = raxCDNContainers.Enable(raxCDNClient, "gophercloud-test", raxCDNContainers.EnableOpts{CDNEnabled: true, TTL: 900}).ExtractHeaders()
- th.AssertNoErr(t, err)
- t.Logf("Headers from Enable CDN Container request: %+v\n", headers)
+ r := raxCDNContainers.Enable(raxCDNClient, "gophercloud-test", raxCDNContainers.EnableOpts{CDNEnabled: true, TTL: 900})
+ th.AssertNoErr(t, r.Err)
+ t.Logf("Headers from Enable CDN Container request: %+v\n", r.Header)
t.Logf("Container Names available to the currently issued token:")
count := 0
@@ -51,11 +51,11 @@
t.Errorf("No containers listed for your current token.")
}
- headers, err = raxCDNContainers.Update(raxCDNClient, "gophercloud-test", raxCDNContainers.UpdateOpts{CDNEnabled: false}).ExtractHeaders()
+ headers, err = raxCDNContainers.Update(raxCDNClient, "gophercloud-test", raxCDNContainers.UpdateOpts{CDNEnabled: false}).Extract()
th.AssertNoErr(t, err)
t.Logf("Headers from Update CDN Container request: %+v\n", headers)
- headers, err = raxCDNContainers.Get(raxCDNClient, "gophercloud-test").ExtractHeaders()
+ metadata, err := raxCDNContainers.Get(raxCDNClient, "gophercloud-test").ExtractMetadata()
th.AssertNoErr(t, err)
- t.Logf("Headers from Get CDN Container request (after update): %+v\n", headers)
+ t.Logf("Headers from Get CDN Container request (after update): %+v\n", metadata)
}
diff --git a/acceptance/rackspace/objectstorage/v1/cdnobjects_test.go b/acceptance/rackspace/objectstorage/v1/cdnobjects_test.go
index 2d816f0..dfc2dca 100644
--- a/acceptance/rackspace/objectstorage/v1/cdnobjects_test.go
+++ b/acceptance/rackspace/objectstorage/v1/cdnobjects_test.go
@@ -17,30 +17,30 @@
raxClient, err := createClient(t, false)
th.AssertNoErr(t, err)
- headers, err := raxContainers.Create(raxClient, "gophercloud-test", nil).ExtractHeaders()
- th.AssertNoErr(t, err)
- t.Logf("Headers from Create Container request: %+v\n", headers)
+ createContResult := raxContainers.Create(raxClient, "gophercloud-test", nil)
+ th.AssertNoErr(t, createContResult.Err)
+ t.Logf("Headers from Create Container request: %+v\n", createContResult.Header)
defer func() {
- _, err := raxContainers.Delete(raxClient, "gophercloud-test").ExtractHeaders()
- th.AssertNoErr(t, err)
+ deleteResult := raxContainers.Delete(raxClient, "gophercloud-test")
+ th.AssertNoErr(t, deleteResult.Err)
}()
- headers, err = raxObjects.Create(raxClient, "gophercloud-test", "test-object", bytes.NewBufferString("gophercloud cdn test"), nil).ExtractHeaders()
- th.AssertNoErr(t, err)
- t.Logf("Headers from Create Object request: %+v\n", headers)
+ createObjResult := raxObjects.Create(raxClient, "gophercloud-test", "test-object", bytes.NewBufferString("gophercloud cdn test"), nil)
+ th.AssertNoErr(t, createObjResult.Err)
+ t.Logf("Headers from Create Object request: %+v\n", createObjResult.Header)
defer func() {
- _, err := raxObjects.Delete(raxClient, "gophercloud-test", "test-object", nil).ExtractHeaders()
- th.AssertNoErr(t, err)
+ deleteResult := raxObjects.Delete(raxClient, "gophercloud-test", "test-object", nil)
+ th.AssertNoErr(t, deleteResult.Err)
}()
raxCDNClient, err := createClient(t, true)
th.AssertNoErr(t, err)
- headers, err = raxCDNContainers.Enable(raxCDNClient, "gophercloud-test", raxCDNContainers.EnableOpts{CDNEnabled: true, TTL: 900}).ExtractHeaders()
- th.AssertNoErr(t, err)
- t.Logf("Headers from Enable CDN Container request: %+v\n", headers)
+ enableResult := raxCDNContainers.Enable(raxCDNClient, "gophercloud-test", raxCDNContainers.EnableOpts{CDNEnabled: true, TTL: 900})
+ th.AssertNoErr(t, enableResult.Err)
+ t.Logf("Headers from Enable CDN Container request: %+v\n", enableResult.Header)
- headers, err = raxCDNObjects.Delete(raxCDNClient, "gophercloud-test", "test-object", nil).ExtractHeaders()
- th.AssertNoErr(t, err)
- t.Logf("Headers from Delete CDN Object request: %+v\n", headers)
+ deleteResult := raxCDNObjects.Delete(raxCDNClient, "gophercloud-test", "test-object", nil)
+ th.AssertNoErr(t, deleteResult.Err)
+ t.Logf("Headers from Delete CDN Object request: %+v\n", deleteResult.Err)
}