Associating containers with a unified file and object access storage policy

Use the following steps to associate a container with a unified file and object access storage policy.

  1. Run the following command to export common environment variables by sourcing the openrc file:
    source ~/openrc
  2. Run the following command to associate a container with a unified file and object access storage policy:
    swift post container1 --header "X-Storage-Policy: sof-policy1"

    In this swift post example, the storage policy is specified with the customized header X-Storage-Policy using the --header option.

  3. Run the following command to upload an object in the container that is associated with the unified file and object access storage policy:
    swift upload container1 imageA.JPG
Note: The steps that are done by using swift commands can also be by using curl commands. For more information, see curl commands for unified file and object access related user tasks.