Merge lp://staging/~styluseater/swift/lp610583 into lp://staging/~hudson-openstack/swift/trunk

Proposed by Adam M Dutko
Status: Work in progress
Proposed branch: lp://staging/~styluseater/swift/lp610583
Merge into: lp://staging/~hudson-openstack/swift/trunk
Diff against target: 159 lines (+36/-29)
3 files modified
bin/swift-account-audit (+18/-13)
bin/swift-account-replicator (+9/-8)
bin/swift-container-replicator (+9/-8)
To merge this branch: bzr merge lp://staging/~styluseater/swift/lp610583
Reviewer Review Type Date Requested Status
Chuck Thier (community) Needs Fixing
Review via email: mp+31222@code.staging.launchpad.net

Description of the change

Found three files using getopt:

bin/swift-account-audit
bin/swift-account-replicator
bin/swift-container-replicator

I removed the getopt import and replaced it with optparse (OptionParser). I also replaced the usage of options values passed on the command line instead of using the arg array. I tested the -h and --help options worked but don't have a full swift environment so I've not "tested" the true functionality.

To post a comment you must log in.
Revision history for this message
Chuck Thier (cthier) wrote :

Hi Adam,

There are a couple of things that should be changed so that we don't change the options for the commans:

For bin/swift-account-audit:

The original version used a -e to set the error file, but your version uses -f

for bin/swift-account-replicator and bin/swift-container-replicator:

The original version used the first argument as the path to the config not -c

Please make the above changes, and resubmit the proposal.

Thanks!

review: Needs Fixing
Revision history for this message
Chuck Thier (cthier) wrote :

There are still a couple of things that need to be changed,

All of the commands should display their usage if no arguments are given. swift-account-audit just runs, and the replicators give tracebacks.

For compatibility reasons with older scripts, we need to be able to support using the [once] keyword after config file is given in the replicator scripts.

If the replication section in the config can't be found, it should print out the error message, not a stacktrace.

It would also be useful for you to get a dev VM running, and try the changes before submitting them.

Thanks!

review: Needs Fixing

Unmerged revisions

45. By Adam M Dutko

Fix -f option and use first arg for config.

44. By Adam M Dutko

Changed getopt to optparse for three scripts.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.