Skip to content

Add Transition to info cmd and add getlifecycle for full xml lifecycle#715

Open
kurtdavis wants to merge 1 commit intos3tools:masterfrom
performancematters:AddTransitionInfo
Open

Add Transition to info cmd and add getlifecycle for full xml lifecycle#715
kurtdavis wants to merge 1 commit intos3tools:masterfrom
performancematters:AddTransitionInfo

Conversation

@kurtdavis
Copy link
Copy Markdown

Added 'Transistion' line to 'info' cmd and created new 'getlifecycle' cmd for full xml output of lifecycle.
Example output for 'info' cmd:

$> s3cmd info s3://sample.bucket.backups
s3://sample.bucket.backups/ (bucket):
   Location:  us-east-1
   Payer:     BucketOwner
   Transition Rule: all objects in this bucket will transition to 'GLACIER' in '8' day(s) after creation
   Expiration Rule: all objects in this bucket will expire in '373' day(s) after creation
   policy:    none
   cors:      none
   ACL:      sampleUser: FULL_CONTROL

based on orig work of kuenishi: pull req. 393

@fviard
Copy link
Copy Markdown
Contributor

fviard commented Mar 14, 2016

@kurtdavis Thank you for trying to fix this patch, but there is still some issues with this patch:

  • "info cmd" : There could be multiple expiration or transition rules. Here only the first ones are displayed. It would probably be better to have a single line like "lifecycle rule: 3 expirations, 2 transitions"
  • There should not be a "200: Got Lifecycle Policy" text in the "getlifecycle" output, otherwise that prevents to easily use the output.
  • I don't know how, but having a way to pretty print the lifecycle rules with a "get" could be nice but is just a bonus.
  • There is not only Transition and Expiration rules, but also: NoncurrentVersionTransition and NoncurrentVersionExpiration
    (http://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketPUTlifecycle.html)
  • In the "getlifecycle", the condition for "dry-run" is not useful because the goal of dry-run is not to simulate a server but to ensure that no modification/write operation is done, so here even in dry run we would like to get the data.

That would be awesome if you would like to complete this patch.

@fviard
Copy link
Copy Markdown
Contributor

fviard commented Jun 27, 2016

@kurtdavis Would be great if you can find the time to fix this PR ^^

@fviard fviard mentioned this pull request Jul 16, 2016
@fviard
Copy link
Copy Markdown
Contributor

fviard commented Aug 2, 2016

Partially fixed with the merge of:
#763

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants