telemetry.page.cloud_storage
index
telemetry/page/cloud_storage.py

Wrappers for gsutil, for basic interaction with Google Cloud Storage.

 
Modules
       
cStringIO
hashlib
logging
os
subprocess
sys
tarfile
urllib2
telemetry.core.util

 
Classes
       
exceptions.Exception(exceptions.BaseException)
CloudStorageError
CredentialsError
NotFoundError
PermissionError

 
class CloudStorageError(exceptions.Exception)
    
Method resolution order:
CloudStorageError
exceptions.Exception
exceptions.BaseException
__builtin__.object

Data descriptors defined here:
__weakref__
list of weak references to the object (if defined)

Methods inherited from exceptions.Exception:
__init__(...)
x.__init__(...) initializes x; see help(type(x)) for signature

Data and other attributes inherited from exceptions.Exception:
__new__ = <built-in method __new__ of type object>
T.__new__(S, ...) -> a new object with type S, a subtype of T

Methods inherited from exceptions.BaseException:
__delattr__(...)
x.__delattr__('name') <==> del x.name
__getattribute__(...)
x.__getattribute__('name') <==> x.name
__getitem__(...)
x.__getitem__(y) <==> x[y]
__getslice__(...)
x.__getslice__(i, j) <==> x[i:j]
 
Use of negative indices is not supported.
__reduce__(...)
__repr__(...)
x.__repr__() <==> repr(x)
__setattr__(...)
x.__setattr__('name', value) <==> x.name = value
__setstate__(...)
__str__(...)
x.__str__() <==> str(x)
__unicode__(...)

Data descriptors inherited from exceptions.BaseException:
__dict__
args
message

 
class CredentialsError(CloudStorageError)
    
Method resolution order:
CredentialsError
CloudStorageError
exceptions.Exception
exceptions.BaseException
__builtin__.object

Methods defined here:
__init__(self, gsutil_path)

Data descriptors inherited from CloudStorageError:
__weakref__
list of weak references to the object (if defined)

Data and other attributes inherited from exceptions.Exception:
__new__ = <built-in method __new__ of type object>
T.__new__(S, ...) -> a new object with type S, a subtype of T

Methods inherited from exceptions.BaseException:
__delattr__(...)
x.__delattr__('name') <==> del x.name
__getattribute__(...)
x.__getattribute__('name') <==> x.name
__getitem__(...)
x.__getitem__(y) <==> x[y]
__getslice__(...)
x.__getslice__(i, j) <==> x[i:j]
 
Use of negative indices is not supported.
__reduce__(...)
__repr__(...)
x.__repr__() <==> repr(x)
__setattr__(...)
x.__setattr__('name', value) <==> x.name = value
__setstate__(...)
__str__(...)
x.__str__() <==> str(x)
__unicode__(...)

Data descriptors inherited from exceptions.BaseException:
__dict__
args
message

 
class NotFoundError(CloudStorageError)
    
Method resolution order:
NotFoundError
CloudStorageError
exceptions.Exception
exceptions.BaseException
__builtin__.object

Data descriptors inherited from CloudStorageError:
__weakref__
list of weak references to the object (if defined)

Methods inherited from exceptions.Exception:
__init__(...)
x.__init__(...) initializes x; see help(type(x)) for signature

Data and other attributes inherited from exceptions.Exception:
__new__ = <built-in method __new__ of type object>
T.__new__(S, ...) -> a new object with type S, a subtype of T

Methods inherited from exceptions.BaseException:
__delattr__(...)
x.__delattr__('name') <==> del x.name
__getattribute__(...)
x.__getattribute__('name') <==> x.name
__getitem__(...)
x.__getitem__(y) <==> x[y]
__getslice__(...)
x.__getslice__(i, j) <==> x[i:j]
 
Use of negative indices is not supported.
__reduce__(...)
__repr__(...)
x.__repr__() <==> repr(x)
__setattr__(...)
x.__setattr__('name', value) <==> x.name = value
__setstate__(...)
__str__(...)
x.__str__() <==> str(x)
__unicode__(...)

Data descriptors inherited from exceptions.BaseException:
__dict__
args
message

 
class PermissionError(CloudStorageError)
    
Method resolution order:
PermissionError
CloudStorageError
exceptions.Exception
exceptions.BaseException
__builtin__.object

Methods defined here:
__init__(self, gsutil_path)

Data descriptors inherited from CloudStorageError:
__weakref__
list of weak references to the object (if defined)

Data and other attributes inherited from exceptions.Exception:
__new__ = <built-in method __new__ of type object>
T.__new__(S, ...) -> a new object with type S, a subtype of T

Methods inherited from exceptions.BaseException:
__delattr__(...)
x.__delattr__('name') <==> del x.name
__getattribute__(...)
x.__getattribute__('name') <==> x.name
__getitem__(...)
x.__getitem__(y) <==> x[y]
__getslice__(...)
x.__getslice__(i, j) <==> x[i:j]
 
Use of negative indices is not supported.
__reduce__(...)
__repr__(...)
x.__repr__() <==> repr(x)
__setattr__(...)
x.__setattr__('name', value) <==> x.name = value
__setstate__(...)
__str__(...)
x.__str__() <==> str(x)
__unicode__(...)

Data descriptors inherited from exceptions.BaseException:
__dict__
args
message

 
Functions
       
Delete(bucket, remote_path)
Exists(bucket, remote_path)
FindGsutil()
Return the gsutil executable path. If we can't find it, download it.
Get(bucket, remote_path, local_path)
GetHash(file_path)
Calculates and returns the hash of the file at file_path.
GetIfChanged(file_path, bucket=None)
Gets the file at file_path if it has a hash file that doesn't match.
 
If the file is not in Cloud Storage, log a warning instead of raising an
exception. We assume that the user just hasn't uploaded the file yet.
 
Returns:
  True if the binary was changed.
Insert(bucket, remote_path, local_path, publicly_readable=False)
List(bucket)
Move(bucket1, bucket2, remote_path)
SupportsProdaccess(gsutil_path)

 
Data
        INTERNAL_BUCKET = 'chrome-telemetry'
PARTNER_BUCKET = 'chrome-partner-telemetry'
PUBLIC_BUCKET = 'chromium-telemetry'