+hrchu who did the existing expiration rules. On Sun, Apr 6, 2014 at 11:34 AM, Will McCown <w...@ross-mccown.com> wrote: > Trying the new features, I find what is either a bug or a > deficiency. I have a bucket that has 3 different expiration > rules in it. Doing a "info" on the bucket yields the following: > >> will@mail2:/usr> s3cmd info s3://ross-mccown.com.mailbackup/ >> s3://ross-mccown.com.mailbackup/ (bucket): >> Location: us-east-1 >> Expiration Rule: objects with key prefix 'will-2014/' will expire in ' >> policy: none >> ACL: will27509: FULL_CONTROL > > So notice that it only reported one rule, and for that rule failed to > get the expiration. > > Looking at the code it's clear why only the first rule is printed, > that's all it is looking for, and afraid it's not clear to me > how you might extend it -- is there a variation of the "getTextFromXml" > routine that could give you a list of all the "Rule" elements? > > As to why the expiration date isn't there, the Xml returned by S3 > looks like this: > >> <LifecycleConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/"> >> <Rule> >> <ID>Migrate</ID> >> <Prefix>will-2014/</Prefix> >> <Status>Enabled</Status> >> <Transition> >> <Days>90</Days> >> <StorageClass>GLACIER</StorageClass> >> </Transition> >> </Rule> > > With the <Rule> ... </Rule> repeated for every transition rule. Note > that the key for the transition is "Transition" not "Expiration" that > the code is looking for. I'm assuming that "Expiration" is the tag > used to delete objects rather than transition them to glacier. > > I'd be willing to tackle fixing this (but warning I normally write > perl code, I'm a novice at python). But some guidance on the available > xml parsing routines would be needed. > > -- > Will McCown, Rolling Hills Estates, CA > w...@ross-mccown.com > > ------------------------------------------------------------------------------ > _______________________________________________ > S3tools-general mailing list > S3tools-general@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/s3tools-general >
------------------------------------------------------------------------------ _______________________________________________ S3tools-general mailing list S3tools-general@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/s3tools-general