forked from jdunck/python-cloudfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of github.com:rackspace/python-cloudfiles
- Loading branch information
Showing
66 changed files
with
779 additions
and
872 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,10 @@ | ||
2011-02-24 Conrad Weidenkeller <[email protected]> | ||
* 1.7.9: | ||
- Added Container Level and Object Level Edge purge functionality | ||
2011-02-16 Chmouel Boudjnah <[email protected]> | ||
* 1.7.8: | ||
- setup.py: call package python-cloudfiles for pypi. | ||
|
||
2011-01-27 Chmouel Boudjnah <[email protected]> | ||
* 1.7.7: | ||
- fixed error where get_objects with a delimiter would error (John). | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
include COPYING | ||
include ChangeLog | ||
include cloudfiles/*.py | ||
include COPYING | ||
graft docs | ||
include epydoc.conf | ||
include setup.py | ||
graft tests | ||
exclude python_cloudfiles.egg-info |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
This document describe how to make a release of python-cloudfiles. | ||
|
||
Prereq | ||
====== | ||
|
||
- To upload python-cloudfiles to pypi you would need the rackspace | ||
credentials account, please contact [email protected] if you don't | ||
have them. | ||
|
||
- Packages for releases needed on system : | ||
|
||
* python-nose | ||
* python-epydoc | ||
|
||
Steps | ||
====== | ||
|
||
|
||
1) Run tests with nosetests and be sure it ends with OK or something is broken! | ||
|
||
2) edit ChangeLog file and add an outline of the changes since the last release. | ||
|
||
3) edit cloudfiles/consts.py and increase the version, following these rules : | ||
|
||
- Bugfixes -- increase the minor version. | ||
- Major features -- increase the major version. | ||
|
||
4) Regenerate the docs with the command: epydoc --config=epydoc.conf | ||
|
||
5) make sure you have only the relevant changes staged: git st | ||
|
||
6) commit the changes: git commit -a | ||
|
||
6) tag it with the new version: git tag VERSION | ||
|
||
7) push it to github : git push --tags origin master | ||
|
||
8) upload it to pypi : python setup.py sdist register upload | ||
|
||
9) if new features has been added (ie: new major release) upload the | ||
documentation by going in the docs directory and zip everything to | ||
a file like docs.zip and go to : | ||
|
||
http://pypi.python.org/pypi?%3Aaction=pkg_edit&name=python-cloudfiles | ||
|
||
(using rackspace credentials) | ||
|
||
and click on "choose file"" to that docs.zip and "upload documentation". |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -145,6 +145,38 @@ def make_private(self): | |
if (response.status < 200) or (response.status >= 300): | ||
raise ResponseError(response.status, response.reason) | ||
|
||
@requires_name(InvalidContainerName) | ||
def purge_from_cdn(self, email=None): | ||
""" | ||
Purge Edge cache for all object inside of this container. | ||
You will be notified by email if one is provided when the | ||
job completes. | ||
>>> container.purge_from_cdn("[email protected]") | ||
or | ||
>>> container.purge_from_cdn("[email protected],[email protected]") | ||
or | ||
>>> container.purge_from_cdn() | ||
@param email: A Valid email address | ||
@type email: str | ||
""" | ||
if not self.conn.cdn_enabled: | ||
raise CDNNotEnabled() | ||
|
||
if email: | ||
hdrs = {"X-Purge-Email": email} | ||
response = self.conn.cdn_request('DELETE', [self.name], hdrs=hdrs) | ||
else: | ||
response = self.conn.cdn_request('DELETE', [self.name]) | ||
|
||
if (response.status < 200) or (response.status >= 300): | ||
raise ResponseError(response.status, response.reason) | ||
|
||
@requires_name(InvalidContainerName) | ||
def acl_user_agent(self, cdn_acl_user_agent=consts.cdn_acl_user_agent): | ||
""" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -547,6 +547,37 @@ def public_uri(self): | |
return "%s/%s" % (self.container.public_uri().rstrip('/'), | ||
quote(self.name)) | ||
|
||
def purge_from_cdn(self, email=None): | ||
""" | ||
Purge Edge cache for this object. | ||
You will be notified by email if one is provided when the | ||
job completes. | ||
>>> obj.purge_from_cdn("[email protected]") | ||
or | ||
>>> obj.purge_from_cdn("[email protected],[email protected]") | ||
or | ||
>>> obj.purge_from_cdn() | ||
@param email: A Valid email address | ||
@type email: str | ||
""" | ||
if not self.container.conn.cdn_enabled: | ||
raise CDNNotEnabled() | ||
|
||
if email: | ||
hdrs = {"X-Purge-Email": email} | ||
response = self.container.conn.cdn_request('DELETE', [self.container.name, self.name], hdrs=hdrs) | ||
else: | ||
response = self.container.conn.cdn_request('DELETE', [self.container.name, self.name]) | ||
|
||
if (response.status < 200) or (response.status >= 300): | ||
raise ResponseError(response.status, response.reason) | ||
|
||
|
||
class ObjectResults(object): | ||
""" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.