User Tools

Site Tools


ceph:s3_wrapper

S3 wrapper in python

Documentation
Name: S3 wrapper in python
Description: S3 object storage wrapper (client) written in python
Modification date :23/10/2018
Owner:dodger@ciberterminal.net
Notify changes to: dodger@ciberterminal.net & warlock86@gmail.com
Tags: object storage, ceph

PRE-Requirements

  • Python v3

Modules of python that are used:

  • import sys
  • import getopt
  • import string
  • import os
  • import configparser

Code

Available in salt-master:

/home/bofher/scripts/ceph

Config file

acces_key and secret_key without quote!!!!

s3_wrapper_v2.pycfg
[CEPH]
storage_server = s3_ip_address
server_port = 80
access_key = <personal_key>
secret_key = <personal_secret>
# if there's no bucket created (you'll use wrapper to create a new one), leave this option empty
bucket_name = <bucket_to_use>

Usage

python s3_wrapper.py
wrapper.py --list|--put|--get|--delete|--public|--private [optional filename]wrapper.py --list
wrapper.py --put filename [--destination alternative/key/of/the_object]
wrapper.py --get filename
wrapper.py --delete filename
wrapper.py --public filename
wrapper.py --private filename
wrapper.py --createbucket filename
wrapper.py --dropbucket filename
ceph/s3_wrapper.txt · Last modified: 2019/07/18 09:17 (external edit)