libcsm.s3.s3object
module
Module contents
Submodule for interacting with s3 objects.
- exception libcsm.s3.s3object.RGWAdminException(message)
Bases:
Exception
An exception for problems running
radosgw-admin
commands.
- class libcsm.s3.s3object.S3Object(bucket, object_name)
Bases:
object
Class for getting s3 object information given a bucket and bisect name.
- get_creds()
Get the credentials to access the object based on the owner.
- Raises:
RGWAdminException – When the command fails.
- Return type:
None
- get_object(endpoint_url='http://rgw-vip')
Get the object from s3. Returns a
boto3.resource.Object
.- Parameters:
endpoint_url (
str
) – The endpoint URL to get objects from.- Return type:
Session
- Returns:
The S3 object.
- get_object_owner()
Get the owner of an object.
- Raises:
RGWAdminException – When the command fails.
- Return type:
None
- verify_bucket_exists()
Verify the bucket provided exists in s3. :raises RGWAdminException: When the command fails.
- Return type:
None