cup.storage package¶
Submodules¶
cup.storage.obj module¶
description: | Object related storage |
---|
-
class
cup.storage.obj.
AFSObjectSystem
(config)[source]¶ Bases:
cup.storage.obj.ObjectInterface
afs object
-
delete
(path)[source]¶ delete a file
Parameters: path – object path Returns: - {
- ‘returncode’: 0 for success, others for failure, ‘msg’: ‘if any’
}
-
get
(path, localpath)[source]¶ get the object into localpath :return:
- {
- ‘returncode’: 0 for success, others for failure, ‘msg’: ‘if any’
}
-
head
(path)[source]¶ get the object info :return:
- {
‘returncode’: 0 for success, others for failure, ‘msg’: ‘if any’ ‘objectinfo’: {
}
}
-
mkdir
(path)[source]¶ mkdir dir of a path :return:
- {
‘returncode’: 0 for success, others for failure, ‘msg’: ‘if any’ ‘objectinfo’: {
}
}
-
-
class
cup.storage.obj.
S3ObjectSystem
(config)[source]¶ Bases:
cup.storage.obj.ObjectInterface
s3 object system
-
delete
(path)[source]¶ delete a file
Parameters: path – object path Returns: - {
- ‘returncode’: 0 for success, others for failure, ‘msg’: ‘if any’
}
-
delete_bucket
(bucket_name, forcely=False)[source]¶ delete bucket
Parameters: forcely – - if forcely is True, the bucket will be delete no matter it has
- objects inside. Otherwise, you have to delete items inside, then delete the bucket
-
get
(path, localpath)[source]¶ get the object into localpath :return:
- {
- ‘returncode’: 0 for success, others for failure, ‘msg’: ‘if any’
}
-
head
(path)[source]¶ get the object info :return:
- {
‘returncode’: 0 for success, others for failure, ‘msg’: ‘if any’ ‘objectinfo’: {
}
}
-
mkdir
(path)[source]¶ mkdir dir of a path :return:
- {
‘returncode’: 0 for success, others for failure, ‘msg’: ‘if any’ ‘objectinfo’: {
}
}
-
-
class
cup.storage.obj.
FTPObjectSystem
(config)[source]¶ Bases:
cup.storage.obj.ObjectInterface
ftp object system
Module contents¶
init for cup.storage