Merge lp:~reynolds.chin/glance/adaptive_index_listing into lp:glance/diablo
Status: | Needs review |
---|---|
Proposed branch: | lp:~reynolds.chin/glance/adaptive_index_listing |
Merge into: | lp:glance/diablo |
Diff against target: |
126 lines (+77/-4) 1 file modified
bin/glance (+77/-4) |
To merge this branch: | bzr merge lp:~reynolds.chin/glance/adaptive_index_listing |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Glance Drivers | Pending | ||
Brian Waldon | Pending | ||
Review via email: mp+74067@code.launchpad.net |
Description of the change
the "glance index" provides a more style of listing images.
1. the number of image indexes is "adapted" to the size of the console, while you still can customize the number of output per page through the parameter --limit
2. users "need not" to press the "enter key" to confirm YES or NO.
3. seamless output, you will never see the prompt message by scrolling the console's bar upward.
usage: glance index (for adaptive listing)
glance index --limit 15 (for customized listing)
Unmerged revisions
- 215. By Reynolds Chin
-
bin/glance get a clean bill of health from PEP8
- 214. By Reynolds Chin
-
compensation for row while the header is false
- 213. By Reynolds Chin
-
remove wrong if-statement
- 212. By Reynolds Chin
-
improvement:
1. you never see prompt message by scrolling the screen upward
2. fully use of rows in listing - 211. By Reynolds Chin
-
the "glance index" provides a more style of listing images.
1. the number of image indexes is "adapted" to the size of the console,
while you still can customize the number of output per page through the parameter --limit
2. users need not to press the "enter key" to confirm YES or NO.
3. the prompt "Fetch next page?" wouldn't be concatenated to the output
First, you should be aware that merging is now done through Gerrit; you should review the workflow at http:// wiki.openstack. org/GerritWorkf low for information on that.
Now, on to your patch. My first major concern is that the constructs you use may not be 100% portable. I see that, in most places, you've used try/except blocks to try to mitigate that, but you use termios in getch() without a try/except, and termios is UNIX-specific. I also see some style problems—for instance, you removed a blank line (line 8), so there is only one line between the DEFAULT_COL_LIMIT assignment and the def catch_error(). Also, I think you assign to the wrong variable on line 34 of the patch, and your indentation in the blocks starting at line 40 seems off. The space before the comma on line 72 should probably be removed, and you don't have enough blank lines between def getch() and def user_response().
Have you run this through PEP8? That will highlight certain style problems I may not be seeing here. You should also run the test suite and make sure all the tests pass, particularly the functional tests that hit "glance index". (The test suite also, incidentally, runs PEP8; your patch has to get a clean bill of health from PEP8 before the automated system will allow it to be merged.)