Git Product home page Git Product logo

Comments (8)

EdLeafe avatar EdLeafe commented on July 29, 2024

This is a good addition. I will add it after I'm done with the 1.4 release, which should be out in the next day or two.

from pyrax.

behemphi avatar behemphi commented on July 29, 2024

Thanks for the quick response.

On Wed, May 29, 2013 at 8:15 AM, Ed Leafe [email protected] wrote:

This is a good addition. I will add it after I'm done with the 1.4
release, which should be out in the next day or two.


Reply to this email directly or view it on GitHubhttps://github.com//issues/76#issuecomment-18615280
.

Best Regards
Boyd Hemphill
Chief Systems Architect
www.feedmagnet.com
[email protected]
(512) 470-6146

from pyrax.

EdLeafe avatar EdLeafe commented on July 29, 2024

Added in 1.4.3; commit 5fb3ad8

from pyrax.

behemphi avatar behemphi commented on July 29, 2024

@EdLeafe

(Please do not read the below as complaining, it is an observation about a potential blind spot)

I have tested this in that I can run it with the code and don't get an error.

However I cannot find a way to read the headers of a file at all. Neither the classic control panel or the new one provide the header info. The new CP does not even seem to provide meta data.

I am not sure if it is relevant to you to that success is "untestable" for this change.

That said, thanks for work on this! I will know in 7 days if this worked or not.

from pyrax.

EdLeafe avatar EdLeafe commented on July 29, 2024

That information is not available via the API, so there is no way to expose it in pyrax.

To test, I created some small files with various TTLs, and tested how long it took for each to disappear from a listing. They all were deleted within a minute of the expected time. If you find out anything after your 7 days have elapsed, please let me know. ;-)

from pyrax.

queertypes avatar queertypes commented on July 29, 2024

It's possible to detect when an object will be deleted via the Cloud Files API. Just issue an HTTP HEAD on the object in question and look for the X-Delete-At header.

For example:

auth=my_auth_token
files=rackspace_cloud_files_endpoint_associated_with_my_account
http put $files/container/delete-me-soon x-auth-token:$auth x-delete-after:30
# some HTTPie output
http head $files/container/delete-me-soon x-auth-token:$auth
HTTP/1.1 200 OK
Accept-Ranges: bytes
Content-Length: 2109
Content-Type: application/json; charset=utf-8
Date: Thu, 06 Jun 2013 01:05:07 GMT
Etag: 6cbad8ca5dd0a5d0a2de722860b02855
Last-Modified: Thu, 06 Jun 2013 01:04:59 GMT
X-Delete-At: 1370480729
X-Timestamp: 1370480699.48837
X-Trans-Id: tx9734cfbb922c466e95340331c95b51c3

The X-Delete-After is converted to X-Delete-At internally.

from pyrax.

EdLeafe avatar EdLeafe commented on July 29, 2024

What I meant is that it is not exposed directly in python-swiftclient as a direct call that pyrax could wrap. I could hack the head_object() method of the connection class to look for that header, but I'm not sure how fragile that would be.

from pyrax.

queertypes avatar queertypes commented on July 29, 2024

Ah, thanks for clarifying! :)

I've not dived into the python-swiftclient sources, so I can't say either way. I'd love to hear from the project's maintainer on adding support for exposing that information.

from pyrax.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.