Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tools: monstore: add 'show-versions' command. #7073

Merged
merged 1 commit into from Jan 7, 2016

Conversation

dllgzcl
Copy link
Contributor

@dllgzcl dllgzcl commented Dec 29, 2015

Use this tool, we can list the first/last committed version of maps.

Signed-off-by: Cilang Zhao zhao.cilang@h3c.com

@dllgzcl
Copy link
Contributor Author

dllgzcl commented Dec 29, 2015

Would you take a look and merge it ?@jecluis

@dllgzcl dllgzcl closed this Jan 5, 2016
@dllgzcl dllgzcl reopened this Jan 5, 2016
@dllgzcl dllgzcl mentioned this pull request Jan 5, 2016
@dllgzcl dllgzcl changed the title Tools:add feature about list version of map。 tools: monstore: add 'show-versions' command. Jan 5, 2016
@dllgzcl
Copy link
Contributor Author

dllgzcl commented Jan 5, 2016

I have revised the commit, would you take a look?@jecluis @tchaikov

po::options_description op_desc("Allowed 'show-versions' options");
op_desc.add_options()
("help,h", "produce this help message")
("map-type",po::value<string>(&map_type),"map_type");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add a space after the comma ",",

Using this tool, the first/last committed version of maps will be shown.

Signed-off-by: Cilang Zhao <zhao.cilang@h3c.com>
@dllgzcl
Copy link
Contributor Author

dllgzcl commented Jan 6, 2016

I have revised the commit! Please take a look and merge it! @jecluis @tchaikov

@dllgzcl
Copy link
Contributor Author

dllgzcl commented Jan 7, 2016

Would you merge it ? :) @tchaikov @jecluis

@jecluis
Copy link
Member

jecluis commented Jan 7, 2016

I've tested this and it works in its current form.

I noticed two things I think you should consider addressing on a later pull request though:

  1. the tool will return success even if the map type does not exist (i.e., if <map_type>:first_committed does not exist, for instance); and
  2. the output format is less than parseable. Granted it's not that difficult, but I'm sure a better format could be found. For instance, just writing out 'first_committed' or 'last_committed', instead of adding the extra space in-between words.

Anyway, I'll take it. :) Thanks!

jecluis added a commit that referenced this pull request Jan 7, 2016
tools: monstore: add 'show-versions' command.

Reviewed-by: Kefu Chai <kchai@redhat.com>
Reviewed-by: Joao Eduardo Luis <joao@suse.de>
@jecluis jecluis merged commit 202d136 into ceph:master Jan 7, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants