cc1
v2.1
CC1 source code docs
Main Page
Related Pages
Packages
Classes
Files
File List
All
Classes
Namespaces
Files
Functions
Variables
Pages
s3bucket.py
Go to the documentation of this file.
1
# -*- coding: utf-8 -*-
2
# @COPYRIGHT_begin
3
#
4
# Copyright [2010-2014] Institute of Nuclear Physics PAN, Krakow, Poland
5
#
6
# Licensed under the Apache License, Version 2.0 (the "License");
7
# you may not use this file except in compliance with the License.
8
# You may obtain a copy of the License at
9
#
10
# http://www.apache.org/licenses/LICENSE-2.0
11
#
12
# Unless required by applicable law or agreed to in writing, software
13
# distributed under the License is distributed on an "AS IS" BASIS,
14
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
# See the License for the specific language governing permissions and
16
# limitations under the License.
17
#
18
# @COPYRIGHT_end
19
from
ec2.settings
import
BUCKETS_PATH
20
import
os
21
from
ec2.base.s3action
import
S3Action
22
from
ec2.helpers.auth
import
authenticate
23
from
ec2.helpers.utils
import
get_bucket_name
24
25
##
26
# @package src.s3bucket
27
# S3 base action
28
#
29
# @copyright Copyright (c) 2012 Institute of Nuclear Physics PAS <http://www.ifj.edu.pl/>
30
# @author Łukasz Chrząszcz <l.chrzaszcz@gmail.com>
31
#
32
33
class
ListBucket
(S3Action):
34
def
_execute(self):
35
print
'ListBucket'
36
37
# bucket = self.bucket_name
38
bucket =
get_bucket_name
(self.parameters[
'path_info'
])
39
print
self.path
40
if
not
os.path.exists(self.path):
41
os.mkdir(self.path)
42
43
return
{
'body'
: {
'bucket'
: bucket}}
44
45
ec2
s3
s3bucket.py
Generated on Wed Jun 18 2014 13:33:07 for cc1 by
1.8.1.2