4.3. Manage Containers
OpenStack Object Storage (swift) stores its objects (data) in containers, which are similar to directories in a file system although they cannot be nested. Containers provide an easy way for users to store any kind of unstructured data; for example, objects might include photos, text files, or images. Stored objects are not encrypted nor are they compressed.
To help with organization, pseudo-folders are logical devices that can contain objects (and can be nested). For example, you might create an 'Images' folder in which to store pictures and a 'Media' folder in which to store videos.
You can create one or more containers in each project, and one or more objects or pseudo-folders in each container.
4.3.1. Create a Container
- In the dashboard, select Project > Object Store > Containers.
- Click .
- Specify the Container Name, and select one of the following in the Container Access field.
Type Description Private Limits access to a user in the current project. Public Permits API access to anyone with the public URL. However, in the dashboard, project users cannot see public containers and data from other projects. - Click .
4.3.2. Create Pseudo Folder for Container
- In the dashboard, select Project > Object Store > Containers.
- Click the name of the container to which you want to add the pseudo-folder.
- Click Create Pseudo-folder.
- Specify the name in the Pseudo-folder Name field, and click .
4.3.3. Upload an Object
If you do not upload an actual file, the object is still created (as placeholder) and can later be used to upload the file.
- In the dashboard, select Project > Object Store > Containers.
- Click the name of the container in which the uploaded object will be placed; if a pseudo-folder already exists in the container, you can click its name.
- Browse for your file, and click .
- Specify a name in the Object Name field:
- Pseudo-folders can be specified in the name using a '/' character (for example, 'Images/myImage.jpg'). If the specified folder does not already exist, it is created when the object is uploaded.
- A name that is not unique to the location (that is, the object already exists) overwrites the object's contents.
- Click .
4.3.4. Copy an Object
- In the dashboard, select Project > Object Store > Containers.
- Click the name of the object's container or folder (to display the object).
- Click Upload Object.
- Browse for the file to be copied, and select Copy in its arrow menu.
- Specify the following:
Field Description Destination container Target container for the new object. Path Pseudo-folder in the destination container; if the folder does not already exist, it is created. Destination object name New object's name. If you use a name that is not unique to the location (that is, the object already exists), it overwrites the object's previous contents. - Click .
4.3.5. Delete an Object
- In the dashboard, select Project > Object Store > Containers.
- Browse for the object, and select Delete Object in its arrow menu.
- Click to confirm the object's removal.
4.3.6. Delete a Container
- In the dashboard, select Project > Object Store > Containers.
- Browse for the container in the Containers section, and ensure all objects have been deleted (see Section 4.3.5, “Delete an Object”).
- Select Delete Container in the container's arrow menu.
- Click to confirm the container's removal.