diff --git a/acceptance/openstack/compute_test.go b/acceptance/openstack/compute_test.go
index 4c487c7..8d5fe28 100644
--- a/acceptance/openstack/compute_test.go
+++ b/acceptance/openstack/compute_test.go
@@ -11,8 +11,10 @@
 	"testing"
 )
 
+var service = "compute"
+
 func TestListServers(t *testing.T) {
-	ts, err := setupForList()
+	ts, err := setupForList(service)
 	if err != nil {
 		t.Error(err)
 		return
@@ -52,7 +54,7 @@
 }
 
 func TestListImages(t *testing.T) {
-	ts, err := setupForList()
+	ts, err := setupForList(service)
 	if err != nil {
 		t.Error(err)
 		return
@@ -92,7 +94,7 @@
 }
 
 func TestListFlavors(t *testing.T) {
-	ts, err := setupForList()
+	ts, err := setupForList(service)
 	if err != nil {
 		t.Error(err)
 		return
diff --git a/acceptance/openstack/storage_test.go b/acceptance/openstack/storage_test.go
new file mode 100644
index 0000000..faabf6a
--- /dev/null
+++ b/acceptance/openstack/storage_test.go
@@ -0,0 +1,352 @@
+// +build acceptance
+
+package openstack
+
+import (
+	"bytes"
+	"github.com/rackspace/gophercloud/openstack/storage"
+	"github.com/rackspace/gophercloud/openstack/storage/accounts"
+	"github.com/rackspace/gophercloud/openstack/storage/containers"
+	"github.com/rackspace/gophercloud/openstack/storage/objects"
+	"os"
+	"strings"
+	"testing"
+)
+
+var objectStorage = "object-store"
+var metadata = map[string]string{"gopher": "cloud"}
+var numContainers = 2
+var numObjects = 2
+
+func TestAccount(t *testing.T) {
+	ts, err := setupForList(objectStorage)
+	if err != nil {
+		t.Error(err)
+		return
+	}
+
+	region := os.Getenv("OS_REGION_NAME")
+	for _, ep := range ts.eps {
+		if (region != "") && (region != ep.Region) {
+			continue
+		}
+
+		client := storage.NewClient(ep.PublicURL, ts.a, ts.o)
+
+		err := accounts.Update(client, accounts.UpdateOpts{
+			Metadata: metadata,
+		})
+		if err != nil {
+			t.Error(err)
+			return
+		}
+		defer func() {
+			tempMap := make(map[string]string)
+			for k := range metadata {
+				tempMap[k] = ""
+			}
+			err = accounts.Update(client, accounts.UpdateOpts{
+				Metadata: tempMap,
+			})
+			if err != nil {
+				t.Error(err)
+				return
+			}
+		}()
+
+		gr, err := accounts.Get(client, accounts.GetOpts{})
+		if err != nil {
+			t.Error(err)
+			return
+		}
+		am := accounts.GetMetadata(gr)
+		for k := range metadata {
+			if am[k] != metadata[strings.Title(k)] {
+				t.Errorf("Expected custom metadata with key: %s", k)
+				return
+			}
+		}
+	}
+}
+
+func TestContainers(t *testing.T) {
+	ts, err := setupForList(objectStorage)
+	if err != nil {
+		t.Error(err)
+		return
+	}
+
+	region := os.Getenv("OS_REGION_NAME")
+	for _, ep := range ts.eps {
+		if (region != "") && (region != ep.Region) {
+			continue
+		}
+
+		client := storage.NewClient(ep.PublicURL, ts.a, ts.o)
+
+		cNames := make([]string, numContainers)
+		for i := 0; i < numContainers; i++ {
+			cNames[i] = randomString("test-container-", 8)
+		}
+
+		for i := 0; i < len(cNames); i++ {
+			_, err := containers.Create(client, containers.CreateOpts{
+				Name: cNames[i],
+			})
+			if err != nil {
+				t.Error(err)
+				return
+			}
+		}
+		defer func() {
+			for i := 0; i < len(cNames); i++ {
+				err = containers.Delete(client, containers.DeleteOpts{
+					Name: cNames[i],
+				})
+				if err != nil {
+					t.Error(err)
+					return
+				}
+			}
+		}()
+
+		lr, err := containers.List(client, containers.ListOpts{
+			Full: false,
+		})
+		if err != nil {
+			t.Error(err)
+			return
+		}
+		cns, err := containers.GetNames(lr)
+		if err != nil {
+			t.Error(err)
+			return
+		}
+		if len(cns) != len(cNames) {
+			t.Errorf("Expected %d names and got %d", len(cNames), len(cns))
+			return
+		}
+
+		lr, err = containers.List(client, containers.ListOpts{
+			Full: true,
+		})
+		if err != nil {
+			t.Error(err)
+			return
+		}
+		cis, err := containers.GetInfo(lr)
+		if err != nil {
+			t.Error(err)
+			return
+		}
+		if len(cis) != len(cNames) {
+			t.Errorf("Expected %d containers and got %d", len(cNames), len(cis))
+			return
+		}
+
+		err = containers.Update(client, containers.UpdateOpts{
+			Name:     cNames[0],
+			Metadata: metadata,
+		})
+		if err != nil {
+			t.Error(err)
+			return
+		}
+		defer func() {
+			tempMap := make(map[string]string)
+			for k := range metadata {
+				tempMap[k] = ""
+			}
+			err = containers.Update(client, containers.UpdateOpts{
+				Name:     cNames[0],
+				Metadata: tempMap,
+			})
+			if err != nil {
+				t.Error(err)
+				return
+			}
+		}()
+
+		gr, err := containers.Get(client, containers.GetOpts{})
+		if err != nil {
+			t.Error(err)
+			return
+		}
+		cm := containers.GetMetadata(gr)
+		for k := range metadata {
+			if cm[k] != metadata[strings.Title(k)] {
+				t.Errorf("Expected custom metadata with key: %s", k)
+				return
+			}
+		}
+	}
+}
+
+func TestObjects(t *testing.T) {
+	ts, err := setupForList(objectStorage)
+	if err != nil {
+		t.Error(err)
+		return
+	}
+
+	region := os.Getenv("OS_REGION_NAME")
+
+	for _, ep := range ts.eps {
+		if (region != "") && (region != ep.Region) {
+			continue
+		}
+
+		client := storage.NewClient(ep.PublicURL, ts.a, ts.o)
+
+		oNames := make([]string, numObjects)
+		for i := 0; i < len(oNames); i++ {
+			oNames[i] = randomString("test-object-", 8)
+		}
+
+		cName := randomString("test-container-", 8)
+		_, err := containers.Create(client, containers.CreateOpts{
+			Name: cName,
+		})
+		if err != nil {
+			t.Error(err)
+			return
+		}
+		defer func() {
+			err = containers.Delete(client, containers.DeleteOpts{
+				Name: cName,
+			})
+			if err != nil {
+				t.Error(err)
+				return
+			}
+		}()
+
+		oContents := make([]*bytes.Buffer, numObjects)
+		for i := 0; i < numObjects; i++ {
+			oContents[i] = bytes.NewBuffer([]byte(randomString("", 10)))
+			err = objects.Create(client, objects.CreateOpts{
+				Container: cName,
+				Name:      oNames[i],
+				Content:   oContents[i],
+			})
+			if err != nil {
+				t.Error(err)
+				return
+			}
+		}
+		defer func() {
+			for i := 0; i < numObjects; i++ {
+				err = objects.Delete(client, objects.DeleteOpts{
+					Container: cName,
+					Name:      oNames[i],
+				})
+			}
+		}()
+
+		lr, err := objects.List(client, objects.ListOpts{
+			Full:      false,
+			Container: cName,
+		})
+		if err != nil {
+			t.Error(err)
+			return
+		}
+		ons := objects.GetNames(lr)
+		if len(ons) != len(oNames) {
+			t.Errorf("Expected %d names and got %d", len(oNames), len(ons))
+			return
+		}
+
+		lr, err = objects.List(client, objects.ListOpts{
+			Full:      true,
+			Container: cName,
+		})
+		if err != nil {
+			t.Error(err)
+			return
+		}
+		ois, err := objects.GetInfo(lr)
+		if err != nil {
+			t.Error(err)
+			return
+		}
+		if len(ois) != len(oNames) {
+			t.Errorf("Expected %d containers and got %d", len(oNames), len(ois))
+			return
+		}
+
+		err = objects.Copy(client, objects.CopyOpts{
+			Container:    cName,
+			Name:         oNames[0],
+			NewContainer: cName,
+			NewName:      oNames[1],
+		})
+		if err != nil {
+			t.Error(err)
+			return
+		}
+
+		dr, err := objects.Download(client, objects.DownloadOpts{
+			Container: cName,
+			Name:      oNames[1],
+		})
+		if err != nil {
+			t.Error(err)
+			return
+		}
+		o2Content := objects.GetContent(dr)
+
+		dr, err = objects.Download(client, objects.DownloadOpts{
+			Container: cName,
+			Name:      oNames[0],
+		})
+		if err != nil {
+			t.Error(err)
+			return
+		}
+		o1Content := objects.GetContent(dr)
+
+		if string(o2Content) != string(o1Content) {
+			t.Errorf("Copy failed. Expected\n%s\nand got\n%s", string(o1Content), string(o2Content))
+			return
+		}
+
+		err = objects.Update(client, objects.UpdateOpts{
+			Container: cName,
+			Name:      oNames[0],
+			Metadata:  metadata,
+		})
+		if err != nil {
+			t.Error(err)
+			return
+		}
+		defer func() {
+			tempMap := make(map[string]string)
+			for k := range metadata {
+				tempMap[k] = ""
+			}
+			err = objects.Update(client, objects.UpdateOpts{
+				Container: cName,
+				Name:      oNames[0],
+				Metadata:  tempMap,
+			})
+			if err != nil {
+				t.Error(err)
+				return
+			}
+		}()
+
+		gr, err := objects.Get(client, objects.GetOpts{})
+		if err != nil {
+			t.Error(err)
+			return
+		}
+		om := objects.GetMetadata(gr)
+		for k := range metadata {
+			if om[k] != metadata[strings.Title(k)] {
+				t.Errorf("Expected custom metadata with key: %s", k)
+				return
+			}
+		}
+	}
+}
diff --git a/acceptance/openstack/tools_test.go b/acceptance/openstack/tools_test.go
index c9a004f..d27ab0a 100644
--- a/acceptance/openstack/tools_test.go
+++ b/acceptance/openstack/tools_test.go
@@ -33,7 +33,7 @@
 	alternateName string
 }
 
-func setupForList() (*testState, error) {
+func setupForList(service string) (*testState, error) {
 	var err error
 
 	ts := new(testState)
@@ -53,7 +53,7 @@
 		return ts, err
 	}
 
-	ts.eps, err = findAllComputeEndpoints(ts.sc)
+	ts.eps, err = findAllEndpoints(ts.sc, service)
 	if err != nil {
 		return ts, err
 	}
@@ -65,7 +65,7 @@
 }
 
 func setupForCRUD() (*testState, error) {
-	ts, err := setupForList()
+	ts, err := setupForList("compute")
 	if err != nil {
 		return ts, err
 	}
@@ -93,19 +93,19 @@
 	return ts, err
 }
 
-func findAllComputeEndpoints(sc *identity.ServiceCatalog) ([]identity.Endpoint, error) {
+func findAllEndpoints(sc *identity.ServiceCatalog, service string) ([]identity.Endpoint, error) {
 	ces, err := sc.CatalogEntries()
 	if err != nil {
 		return nil, err
 	}
 
 	for _, ce := range ces {
-		if ce.Type == "compute" {
+		if ce.Type == service {
 			return ce.Endpoints, nil
 		}
 	}
 
-	return nil, fmt.Errorf("Compute endpoint not found.")
+	return nil, fmt.Errorf(service + " endpoint not found.")
 }
 
 func findEndpointForRegion(eps []identity.Endpoint, r string) (string, error) {
diff --git a/api_fetch.go b/api_fetch.go
new file mode 100644
index 0000000..493f61e
--- /dev/null
+++ b/api_fetch.go
@@ -0,0 +1,41 @@
+package gophercloud
+
+import (
+	"github.com/mitchellh/mapstructure"
+)
+
+//The default generic openstack api
+var OpenstackApi = map[string]interface{}{
+	"UrlChoice": PublicURL,
+}
+
+// Api for use with rackspace
+var RackspaceApi = map[string]interface{}{
+	"Name":      "cloudServersOpenStack",
+	"VersionId": "2",
+	"UrlChoice": PublicURL,
+}
+
+//Populates an ApiCriteria struct with the api values
+//from one of the api maps
+func PopulateApi(variant string) (ApiCriteria, error) {
+	var Api ApiCriteria
+	var variantMap map[string]interface{}
+
+	switch variant {
+	case "":
+		variantMap = OpenstackApi
+
+	case "openstack":
+		variantMap = OpenstackApi
+
+	case "rackspace":
+		variantMap = RackspaceApi
+	}
+
+	err := mapstructure.Decode(variantMap, &Api)
+	if err != nil {
+		return Api, err
+	}
+	return Api, err
+}
diff --git a/floating_ips.go b/floating_ips.go
index 4c27347..1163667 100644
--- a/floating_ips.go
+++ b/floating_ips.go
@@ -1,6 +1,7 @@
 package gophercloud
 
 import (
+	"errors"
 	"fmt"
 	"github.com/racker/perigee"
 )
@@ -24,7 +25,7 @@
 }
 
 func (gsp *genericServersProvider) CreateFloatingIp(pool string) (FloatingIp, error) {
-	var fip *FloatingIp
+	fip := new(FloatingIp)
 
 	err := gsp.context.WithReauth(gsp.access, func() error {
 		url := gsp.endpoint + "/os-floating-ips"
@@ -42,6 +43,10 @@
 		})
 	})
 
+	if fip.Ip == "" {
+		return *fip, errors.New("Error creating floating IP")
+	}
+
 	return *fip, err
 }
 
@@ -63,7 +68,7 @@
 
 func (gsp *genericServersProvider) DeleteFloatingIp(ip FloatingIp) error {
 	return gsp.context.WithReauth(gsp.access, func() error {
-		ep := fmt.Sprintf("%s/os-floating-ips/%s", gsp.endpoint, ip.Id)
+		ep := fmt.Sprintf("%s/os-floating-ips/%d", gsp.endpoint, ip.Id)
 		return perigee.Delete(ep, perigee.Options{
 			CustomClient: gsp.context.httpClient,
 			MoreHeaders: map[string]string{
@@ -75,7 +80,7 @@
 }
 
 type FloatingIp struct {
-	Id         string `json:"id"`
+	Id         int    `json:"id"`
 	Pool       string `json:"pool"`
 	Ip         string `json:"ip"`
 	FixedIp    string `json:"fixed_ip"`
diff --git a/interfaces.go b/interfaces.go
index 6340c1c..b038aa7 100644
--- a/interfaces.go
+++ b/interfaces.go
@@ -193,4 +193,25 @@
 
 	// ShowKeyPair will yield the named keypair.
 	ShowKeyPair(name string) (KeyPair, error)
+
+	// ListSecurityGroups provides a listing of security groups for the tenant.
+	// This method works only if the provider supports the os-security-groups extension.
+	ListSecurityGroups() ([]SecurityGroup, error)
+
+	// CreateSecurityGroup lets a tenant create a new security group.
+	// Only the SecurityGroup fields which are specified will be marshalled to the API.
+	// This method works only if the provider supports the os-security-groups extension.
+	CreateSecurityGroup(desired SecurityGroup) (*SecurityGroup, error)
+
+	// ListSecurityGroupsByServerId provides a list of security groups which apply to the indicated server.
+	// This method works only if the provider supports the os-security-groups extension.
+	ListSecurityGroupsByServerId(id string) ([]SecurityGroup, error)
+
+	// SecurityGroupById returns a security group corresponding to the provided ID number.
+	// This method works only if the provider supports the os-security-groups extension.
+	SecurityGroupById(id int) (*SecurityGroup, error)
+
+	// DeleteSecurityGroupById disposes of a security group corresponding to the provided ID number.
+	// This method works only if the provider supports the os-security-groups extension.
+	DeleteSecurityGroupById(id int) error
 }
diff --git a/openstack/storage/accounts/accounts.go b/openstack/storage/accounts/accounts.go
new file mode 100644
index 0000000..cb72072
--- /dev/null
+++ b/openstack/storage/accounts/accounts.go
@@ -0,0 +1,27 @@
+package accounts
+
+import (
+	"strings"
+)
+
+type UpdateOpts struct {
+	Metadata map[string]string
+	Headers  map[string]string
+}
+
+type GetOpts struct {
+	Headers map[string]string
+}
+
+// GetMetadata is a function that takes a GetResult (of type *perigee.Response)
+// and returns the custom metatdata associated with the account.
+func GetMetadata(gr GetResult) map[string]string {
+	metadata := make(map[string]string)
+	for k, v := range gr.HttpResponse.Header {
+		if strings.HasPrefix(k, "X-Account-Meta-") {
+			key := strings.TrimPrefix(k, "X-Account-Meta-")
+			metadata[key] = v[0]
+		}
+	}
+	return metadata
+}
diff --git a/openstack/storage/accounts/requests.go b/openstack/storage/accounts/requests.go
new file mode 100644
index 0000000..5c658d7
--- /dev/null
+++ b/openstack/storage/accounts/requests.go
@@ -0,0 +1,50 @@
+package accounts
+
+import (
+	"github.com/racker/perigee"
+	"github.com/rackspace/gophercloud/openstack/storage"
+)
+
+type GetResult *perigee.Response
+
+// Update is a function that creates, updates, or deletes an account's metadata.
+func Update(c *storage.Client, opts UpdateOpts) error {
+	h, err := c.GetHeaders()
+	if err != nil {
+		return err
+	}
+	for k, v := range opts.Headers {
+		h[k] = v
+	}
+
+	for k, v := range opts.Metadata {
+		h["X-Account-Meta-"+k] = v
+	}
+
+	url := c.GetAccountURL()
+	_, err = perigee.Request("POST", url, perigee.Options{
+		MoreHeaders: h,
+		OkCodes:     []int{204},
+	})
+	return err
+}
+
+// Get is a function that retrieves an account's metadata. To extract just the custom
+// metadata, pass the GetResult response to the GetMetadata function.
+func Get(c *storage.Client, opts GetOpts) (GetResult, error) {
+	h, err := c.GetHeaders()
+	if err != nil {
+		return nil, err
+	}
+
+	for k, v := range opts.Headers {
+		h[k] = v
+	}
+
+	url := c.GetAccountURL()
+	resp, err := perigee.Request("HEAD", url, perigee.Options{
+		MoreHeaders: h,
+		OkCodes:     []int{204},
+	})
+	return resp, err
+}
diff --git a/openstack/storage/client.go b/openstack/storage/client.go
new file mode 100644
index 0000000..94307b0
--- /dev/null
+++ b/openstack/storage/client.go
@@ -0,0 +1,60 @@
+package storage
+
+import (
+	"fmt"
+	"github.com/rackspace/gophercloud/openstack/identity"
+)
+
+// Client is a structure that contains information for communicating with a provider.
+type Client struct {
+	endpoint  string
+	authority identity.AuthResults
+	options   identity.AuthOptions
+	token     *identity.Token
+}
+
+func NewClient(e string, a identity.AuthResults, o identity.AuthOptions) *Client {
+	return &Client{
+		endpoint:  e,
+		authority: a,
+		options:   o,
+	}
+}
+
+func (c *Client) GetAccountURL() string {
+	return fmt.Sprintf("%s", c.endpoint)
+}
+
+func (c *Client) GetContainerURL(container string) string {
+	return fmt.Sprintf("%s/%s", c.endpoint, container)
+}
+
+func (c *Client) GetObjectURL(container, object string) string {
+	return fmt.Sprintf("%s/%s/%s", c.endpoint, container, object)
+}
+
+// GetHeaders is a function that sets the header for token authentication against a client's endpoint.
+func (c *Client) GetHeaders() (map[string]string, error) {
+	t, err := c.getAuthToken()
+	if err != nil {
+		return map[string]string{}, err
+	}
+
+	return map[string]string{
+		"X-Auth-Token": t,
+	}, nil
+}
+
+// getAuthToken is a function that tries to retrieve an authentication token from a client's endpoint.
+func (c *Client) getAuthToken() (string, error) {
+	var err error
+
+	if c.token == nil {
+		c.token, err = identity.GetToken(c.authority)
+		if err != nil {
+			return "", err
+		}
+	}
+
+	return c.token.Id, err
+}
diff --git a/openstack/storage/containers/containers.go b/openstack/storage/containers/containers.go
new file mode 100644
index 0000000..b3fb921
--- /dev/null
+++ b/openstack/storage/containers/containers.go
@@ -0,0 +1,69 @@
+package containers
+
+import (
+	"encoding/json"
+	"strings"
+)
+
+type Container struct {
+	Bytes int
+	Count int
+	Name  string
+}
+
+type ListOpts struct {
+	Full   bool
+	Params map[string]string
+}
+
+type CreateOpts struct {
+	Name     string
+	Metadata map[string]string
+	Headers  map[string]string
+}
+
+type DeleteOpts struct {
+	Name   string
+	Params map[string]string
+}
+
+type UpdateOpts struct {
+	Name     string
+	Metadata map[string]string
+	Headers  map[string]string
+}
+
+type GetOpts struct {
+	Name     string
+	Metadata map[string]string
+}
+
+// GetInfo is a function that takes a ListResult (of type *perigee.Response)
+// and returns the containers' information.
+func GetInfo(lr ListResult) ([]Container, error) {
+	var ci []Container
+	err := json.Unmarshal(lr.JsonResult, &ci)
+	return ci, err
+}
+
+// GetNames is a function that takes a ListResult (of type *perigee.Response)
+// and returns the containers' names.
+func GetNames(lr ListResult) ([]string, error) {
+	jr := string(lr.JsonResult)
+	cns := strings.Split(jr, "\n")
+	cns = cns[:len(cns)-1]
+	return cns, nil
+}
+
+// GetMetadata is a function that takes a GetResult (of type *perigee.Response)
+// and returns the custom metadata associated with the container.
+func GetMetadata(gr GetResult) map[string]string {
+	metadata := make(map[string]string)
+	for k, v := range gr.HttpResponse.Header {
+		if strings.HasPrefix(k, "X-Container-Meta-") {
+			key := strings.TrimPrefix(k, "X-Container-Meta-")
+			metadata[key] = v[0]
+		}
+	}
+	return metadata
+}
diff --git a/openstack/storage/containers/requests.go b/openstack/storage/containers/requests.go
new file mode 100644
index 0000000..6cdd7c7
--- /dev/null
+++ b/openstack/storage/containers/requests.go
@@ -0,0 +1,127 @@
+package containers
+
+import (
+	"github.com/racker/perigee"
+	"github.com/rackspace/gophercloud/openstack/storage"
+	"github.com/rackspace/gophercloud/openstack/utils"
+)
+
+type ListResult *perigee.Response
+type GetResult *perigee.Response
+
+// List is a function that retrieves all objects in a container. It also returns the details
+// for the account. To extract just the container information or names, pass the ListResult
+// response to the GetInfo or GetNames function, respectively.
+func List(c *storage.Client, opts ListOpts) (ListResult, error) {
+	contentType := ""
+
+	h, err := c.GetHeaders()
+	if err != nil {
+		return nil, err
+	}
+
+	query := utils.BuildQuery(opts.Params)
+
+	if !opts.Full {
+		contentType = "text/plain"
+	}
+
+	url := c.GetAccountURL() + query
+	resp, err := perigee.Request("GET", url, perigee.Options{
+		Results:     true,
+		MoreHeaders: h,
+		OkCodes:     []int{200, 204},
+		Accept:      contentType,
+	})
+	return resp, err
+}
+
+// Create is a function that creates a new container.
+func Create(c *storage.Client, opts CreateOpts) (*Container, error) {
+	var ci *Container
+
+	h, err := c.GetHeaders()
+	if err != nil {
+		return new(Container), err
+	}
+
+	for k, v := range opts.Headers {
+		h[k] = v
+	}
+
+	for k, v := range opts.Metadata {
+		h["X-Container-Meta-"+k] = v
+	}
+
+	url := c.GetContainerURL(opts.Name)
+	_, err = perigee.Request("PUT", url, perigee.Options{
+		MoreHeaders: h,
+		OkCodes:     []int{201, 204},
+	})
+	if err == nil {
+		ci = &Container{
+			Name: opts.Name,
+		}
+	}
+	return ci, err
+}
+
+// Delete is a function that deletes a container.
+func Delete(c *storage.Client, opts DeleteOpts) error {
+	h, err := c.GetHeaders()
+	if err != nil {
+		return err
+	}
+
+	query := utils.BuildQuery(opts.Params)
+
+	url := c.GetContainerURL(opts.Name) + query
+	_, err = perigee.Request("DELETE", url, perigee.Options{
+		MoreHeaders: h,
+		OkCodes:     []int{204},
+	})
+	return err
+}
+
+// Update is a function that creates, updates, or deletes a container's metadata.
+func Update(c *storage.Client, opts UpdateOpts) error {
+	h, err := c.GetHeaders()
+	if err != nil {
+		return err
+	}
+
+	for k, v := range opts.Headers {
+		h[k] = v
+	}
+
+	for k, v := range opts.Metadata {
+		h["X-Container-Meta-"+k] = v
+	}
+
+	url := c.GetContainerURL(opts.Name)
+	_, err = perigee.Request("POST", url, perigee.Options{
+		MoreHeaders: h,
+		OkCodes:     []int{204},
+	})
+	return err
+}
+
+// Get is a function that retrieves the metadata of a container. To extract just the custom
+// metadata, pass the GetResult response to the GetMetadata function.
+func Get(c *storage.Client, opts GetOpts) (GetResult, error) {
+	h, err := c.GetHeaders()
+	if err != nil {
+		return nil, err
+	}
+
+	for k, v := range opts.Metadata {
+		h["X-Container-Meta-"+k] = v
+	}
+
+	url := c.GetContainerURL(opts.Name)
+	resp, err := perigee.Request("HEAD", url, perigee.Options{
+		MoreHeaders: h,
+		OkCodes:     []int{204},
+	})
+	return resp, err
+}
diff --git a/openstack/storage/objects/objects.go b/openstack/storage/objects/objects.go
new file mode 100644
index 0000000..20228e5
--- /dev/null
+++ b/openstack/storage/objects/objects.go
@@ -0,0 +1,102 @@
+package objects
+
+import (
+	"bytes"
+	"encoding/json"
+	"strings"
+)
+
+type Object struct {
+	Name          string
+	Hash          string
+	Bytes         int
+	Content_type  string
+	Last_modified string
+}
+
+type ListOpts struct {
+	Container string
+	Full      bool
+	Params    map[string]string
+}
+
+type DownloadOpts struct {
+	Container string
+	Name      string
+	Headers   map[string]string
+	Params    map[string]string
+}
+
+type CreateOpts struct {
+	Container string
+	Name      string
+	Content   *bytes.Buffer
+	Metadata  map[string]string
+	Headers   map[string]string
+	Params    map[string]string
+}
+
+type CopyOpts struct {
+	Container    string
+	Name         string
+	NewContainer string
+	NewName      string
+	Metadata     map[string]string
+	Headers      map[string]string
+}
+
+type DeleteOpts struct {
+	Container string
+	Name      string
+	Params    map[string]string
+}
+
+type GetOpts struct {
+	Container string
+	Name      string
+	Headers   map[string]string
+	Params    map[string]string
+}
+
+type UpdateOpts struct {
+	Container string
+	Name      string
+	Metadata  map[string]string
+	Headers   map[string]string
+}
+
+// GetInfo is a function that takes a ListResult (of type *perigee.Response)
+// and returns the objects' information.
+func GetInfo(lr ListResult) ([]Object, error) {
+	var oi []Object
+	err := json.Unmarshal(lr.JsonResult, &oi)
+	return oi, err
+}
+
+// GetNames is a function that takes a ListResult (of type *perigee.Response)
+// and returns the objects' names.
+func GetNames(lr ListResult) []string {
+	jr := string(lr.JsonResult)
+	ons := strings.Split(jr, "\n")
+	ons = ons[:len(ons)-1]
+	return ons
+}
+
+// GetContent is a function that takes a DownloadResult (of type *perigee.Response)
+// and returns the object's content.
+func GetContent(dr DownloadResult) []byte {
+	return dr.JsonResult
+}
+
+// GetMetadata is a function that takes a GetResult (of type *perifee.Response)
+// and returns the custom metadata associated with the object.
+func GetMetadata(gr GetResult) map[string]string {
+	metadata := make(map[string]string)
+	for k, v := range gr.HttpResponse.Header {
+		if strings.HasPrefix(k, "X-Object-Meta-") {
+			key := strings.TrimPrefix(k, "X-Object-Meta-")
+			metadata[key] = v[0]
+		}
+	}
+	return metadata
+}
diff --git a/openstack/storage/objects/requests.go b/openstack/storage/objects/requests.go
new file mode 100644
index 0000000..8f645fc
--- /dev/null
+++ b/openstack/storage/objects/requests.go
@@ -0,0 +1,182 @@
+package objects
+
+import (
+	"fmt"
+
+	"github.com/racker/perigee"
+	"github.com/rackspace/gophercloud/openstack/storage"
+	"github.com/rackspace/gophercloud/openstack/utils"
+)
+
+type ListResult *perigee.Response
+type DownloadResult *perigee.Response
+type GetResult *perigee.Response
+
+// List is a function that retrieves all objects in a container. It also returns the details
+// for the container. To extract only the object information or names, pass the ListResult
+// response to the GetInfo or GetNames function, respectively.
+func List(c *storage.Client, opts ListOpts) (ListResult, error) {
+	contentType := ""
+
+	h, err := c.GetHeaders()
+	if err != nil {
+		return nil, err
+	}
+
+	query := utils.BuildQuery(opts.Params)
+
+	if !opts.Full {
+		contentType = "text/plain"
+	}
+
+	url := c.GetContainerURL(opts.Container) + query
+	resp, err := perigee.Request("GET", url, perigee.Options{
+		Results:     true,
+		MoreHeaders: h,
+		OkCodes:     []int{200, 204},
+		Accept:      contentType,
+	})
+	return resp, err
+}
+
+// Download is a function that retrieves the content and metadata for an object.
+// To extract just the content, pass the DownloadResult response to the GetContent
+// function.
+func Download(c *storage.Client, opts DownloadOpts) (DownloadResult, error) {
+	h, err := c.GetHeaders()
+	if err != nil {
+		return nil, err
+	}
+
+	for k, v := range opts.Headers {
+		h[k] = v
+	}
+
+	query := utils.BuildQuery(opts.Params)
+
+	url := c.GetObjectURL(opts.Container, opts.Name) + query
+	resp, err := perigee.Request("GET", url, perigee.Options{
+		Results:     true,
+		MoreHeaders: h,
+		OkCodes:     []int{200},
+	})
+	return resp, err
+}
+
+// Create is a function that creates a new object or replaces an existing object.
+func Create(c *storage.Client, opts CreateOpts) error {
+	var reqBody []byte
+
+	h, err := c.GetHeaders()
+	if err != nil {
+		return err
+	}
+
+	for k, v := range opts.Headers {
+		h[k] = v
+	}
+
+	for k, v := range opts.Metadata {
+		h["X-Object-Meta-"+k] = v
+	}
+
+	query := utils.BuildQuery(opts.Params)
+
+	content := opts.Content
+	if content != nil {
+		reqBody = make([]byte, content.Len())
+		_, err = content.Read(reqBody)
+		if err != nil {
+			return err
+		}
+	}
+
+	url := c.GetObjectURL(opts.Container, opts.Name) + query
+	_, err = perigee.Request("PUT", url, perigee.Options{
+		ReqBody:     reqBody,
+		MoreHeaders: h,
+		OkCodes:     []int{201},
+	})
+	return err
+}
+
+// Copy is a function that copies one object to another.
+func Copy(c *storage.Client, opts CopyOpts) error {
+	h, err := c.GetHeaders()
+	if err != nil {
+		return err
+	}
+
+	for k, v := range opts.Metadata {
+		h["X-Object-Meta-"+k] = v
+	}
+
+	h["Destination"] = fmt.Sprintf("/%s/%s", opts.NewContainer, opts.NewName)
+
+	url := c.GetObjectURL(opts.Container, opts.Name)
+	_, err = perigee.Request("COPY", url, perigee.Options{
+		MoreHeaders: h,
+		OkCodes:     []int{201},
+	})
+	return err
+}
+
+// Delete is a function that deletes an object.
+func Delete(c *storage.Client, opts DeleteOpts) error {
+	h, err := c.GetHeaders()
+	if err != nil {
+		return err
+	}
+
+	query := utils.BuildQuery(opts.Params)
+
+	url := c.GetObjectURL(opts.Container, opts.Name) + query
+	_, err = perigee.Request("DELETE", url, perigee.Options{
+		MoreHeaders: h,
+		OkCodes:     []int{204},
+	})
+	return err
+}
+
+// Get is a function that retrieves the metadata of an object. To extract just the custom
+// metadata, pass the GetResult response to the GetMetadata function.
+func Get(c *storage.Client, opts GetOpts) (GetResult, error) {
+	h, err := c.GetHeaders()
+	if err != nil {
+		return nil, err
+	}
+
+	for k, v := range opts.Headers {
+		h[k] = v
+	}
+
+	url := c.GetObjectURL(opts.Container, opts.Name)
+	resp, err := perigee.Request("HEAD", url, perigee.Options{
+		MoreHeaders: h,
+		OkCodes:     []int{204},
+	})
+	return resp, err
+}
+
+// Update is a function that creates, updates, or deletes an object's metadata.
+func Update(c *storage.Client, opts UpdateOpts) error {
+	h, err := c.GetHeaders()
+	if err != nil {
+		return err
+	}
+
+	for k, v := range opts.Headers {
+		h[k] = v
+	}
+
+	for k, v := range opts.Metadata {
+		h["X-Object-Meta-"+k] = v
+	}
+
+	url := c.GetObjectURL(opts.Container, opts.Name)
+	_, err = perigee.Request("POST", url, perigee.Options{
+		MoreHeaders: h,
+		OkCodes:     []int{202, 204},
+	})
+	return err
+}
diff --git a/openstack/utils/utils.go b/openstack/utils/utils.go
index 0d4c05c..a814c7e 100644
--- a/openstack/utils/utils.go
+++ b/openstack/utils/utils.go
@@ -50,3 +50,12 @@
 
 	return ao, nil
 }
+
+func BuildQuery(params map[string]string) string {
+	query := "?"
+	for k, v := range params {
+		query += k + "=" + v + "&"
+	}
+	query = query[:len(query)-1]
+	return query
+}
diff --git a/servers.go b/servers.go
index fc5925d..57f1532 100644
--- a/servers.go
+++ b/servers.go
@@ -369,6 +369,114 @@
 	return locationArr[len(locationArr)-1], err
 }
 
+// See the CloudServersProvider interface for details.
+func (gsp *genericServersProvider) ListSecurityGroups() ([]SecurityGroup, error) {
+	var sgs []SecurityGroup
+
+	err := gsp.context.WithReauth(gsp.access, func() error {
+		ep := fmt.Sprintf("%s/os-security-groups", gsp.endpoint)
+		return perigee.Get(ep, perigee.Options{
+			MoreHeaders: map[string]string{
+				"X-Auth-Token": gsp.access.AuthToken(),
+			},
+			Results: &struct {
+				SecurityGroups *[]SecurityGroup `json:"security_groups"`
+			}{&sgs},
+		})
+	})
+	return sgs, err
+}
+
+// See the CloudServersProvider interface for details.
+func (gsp *genericServersProvider) CreateSecurityGroup(desired SecurityGroup) (*SecurityGroup, error) {
+	var actual *SecurityGroup
+
+	err := gsp.context.WithReauth(gsp.access, func() error {
+		ep := fmt.Sprintf("%s/os-security-groups", gsp.endpoint)
+		return perigee.Post(ep, perigee.Options{
+			ReqBody: struct {
+				AddSecurityGroup SecurityGroup `json:"security_group"`
+			}{desired},
+			MoreHeaders: map[string]string{
+				"X-Auth-Token": gsp.access.AuthToken(),
+			},
+			Results: &struct {
+				SecurityGroup **SecurityGroup `json:"security_group"`
+			}{&actual},
+		})
+	})
+	return actual, err
+}
+
+// See the CloudServersProvider interface for details.
+func (gsp *genericServersProvider) ListSecurityGroupsByServerId(id string) ([]SecurityGroup, error) {
+	var sgs []SecurityGroup
+
+	err := gsp.context.WithReauth(gsp.access, func() error {
+		ep := fmt.Sprintf("%s/servers/%s/os-security-groups", gsp.endpoint, id)
+		return perigee.Get(ep, perigee.Options{
+			MoreHeaders: map[string]string{
+				"X-Auth-Token": gsp.access.AuthToken(),
+			},
+			Results: &struct {
+				SecurityGroups *[]SecurityGroup `json:"security_groups"`
+			}{&sgs},
+		})
+	})
+	return sgs, err
+}
+
+// See the CloudServersProvider interface for details.
+func (gsp *genericServersProvider) SecurityGroupById(id int) (*SecurityGroup, error) {
+	var actual *SecurityGroup
+
+	err := gsp.context.WithReauth(gsp.access, func() error {
+		ep := fmt.Sprintf("%s/os-security-groups/%d", gsp.endpoint, id)
+		return perigee.Get(ep, perigee.Options{
+			MoreHeaders: map[string]string{
+				"X-Auth-Token": gsp.access.AuthToken(),
+			},
+			Results: &struct {
+				SecurityGroup **SecurityGroup `json:"security_group"`
+			}{&actual},
+		})
+	})
+	return actual, err
+}
+
+// See the CloudServersProvider interface for details.
+func (gsp *genericServersProvider) DeleteSecurityGroupById(id int) error {
+	err := gsp.context.WithReauth(gsp.access, func() error {
+		ep := fmt.Sprintf("%s/os-security-groups/%d", gsp.endpoint, id)
+		return perigee.Delete(ep, perigee.Options{
+			MoreHeaders: map[string]string{
+				"X-Auth-Token": gsp.access.AuthToken(),
+			},
+			OkCodes: []int{202},
+		})
+	})
+	return err
+}
+
+// SecurityGroup provides a description of a security group, including all its rules.
+type SecurityGroup struct {
+	Description string   `json:"description,omitempty"`
+	Id          int      `json:"id,omitempty"`
+	Name        string   `json:"name,omitempty"`
+	Rules       []SGRule `json:"rules,omitempty"`
+	TenantId    string   `json:"tenant_id,omitempty"`
+}
+
+// SGRule encapsulates a single rule which applies to a security group.
+// This definition is just a guess, based on the documentation found in another extension here: http://docs.openstack.org/api/openstack-compute/2/content/GET_os-security-group-default-rules-v2_listSecGroupDefaultRules_v2__tenant_id__os-security-group-rules_ext-os-security-group-default-rules.html
+type SGRule struct {
+	FromPort   int                    `json:"from_port,omitempty"`
+	Id         int                    `json:"id,omitempty"`
+	IpProtocol string                 `json:"ip_protocol,omitempty"`
+	IpRange    map[string]interface{} `json:"ip_range,omitempty"`
+	ToPort     int                    `json:"to_port,omitempty"`
+}
+
 // RaxBandwidth provides measurement of server bandwidth consumed over a given audit interval.
 type RaxBandwidth struct {
 	AuditPeriodEnd    string `json:"audit_period_end"`
