-
Notifications
You must be signed in to change notification settings - Fork 583
Support storage policy on container create #2074
Copy link
Copy link
Closed
Description
Add support for the X-Storage-Policy header in containers.CreateOpts. https://docs.openstack.org/api-ref/object-store/?expanded=create-container-detail#create-container
Example usage.
createOpts := containers.CreateOpts{
ContentType: "application/json",
StoragePolicy: "nz-hlz-1--o1--sr-r3",
}
result := containers.Create(swiftClient, "go-test-2", createOpts)Inspection of the StoragePolicy attribute of a container is already supported without modification via the containers.Get method
containerDetails := containers.Get(swiftClient, container.Name, nil)
fmt.Printf("%v+\n\n", containerDetails)
// {{{<nil> map[Accept-Ranges:[bytes] Content-Length:[0] Content-Type:[application/json; charset=utf-8] Date:[Thu, 17 Dec 2020 12:43:59 GMT] Server:[nginx/1.16.0] X-Container-Bytes-Used:[0] X-Container-Object-Count:[0] X-Storage-Policy:[nz-hlz-1--o1--sr-r3] X-Timestamp:[1608206959.71870] X-Trans-Id:[txcc5852ecf7134117bfdc4-005fdb528f]] <nil>}}}+Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels