History | View | Annotate | Download (3.6 kB)
Revert "CLI: remove command opts/args in "gnt-X""
This reverts commit 976.
Reviewed-by: ultrotter
CLI: remove command opts/args in "gnt-X"
[Forward-port of the 1.2 branch patch]
This patch removes all the parameters and options from the output"gnt-X" (i.e. the subcommand list for command). This is done in order touniformize the output, currently only some parameters are shown and they...
Rework the results of OpDiagnoseOS opcode
Currently, the opcode DiagnoseOS is the only opcode that return astructure of objects.OS (which is a custom class, and not a simplepython object) and furthermore all the processing of OS validity acrossnodes is left to the clients of this opcode....
Make DiagnoseOS use the modified OS objects
Modify backend.py so that DiagnoseOS only returns OS objects rather thanInvalidOS errors, and make sure gnt-os understands the new objects. Also deletethe deprecated helper functions from gnt-os.
Reviewed-By: iustinp
Remove two trailing whitespaces
Ok, I've been battling with those for a while but it seemsin the end I forgot to get rid of them! :( Doing it explicitely now.
Move blank lines inside function messages
This patch changes whitespace only. It fixes all the functions in script/gnt-osby putting a white line at the end of all the function descriptions andremoving it from just before the code.
Add empty line after each diagnose OS-Node set
Reviewed-By: imsnah
Modify the displayed format for gnt-os diagnose
Get rid of the tabulated form and create a simplier indented structure.Now a valid OS looks something like:
OS: foo [global status: partial valid] Node: gsdtest4.euw.corp.google.com, status: valid (path: /usr/local/lib/ganeti/os/foo)...
Change the way to compute the first os status message
Use both _DiagnoseOSStatus and _DiagnoseOSPath to calculate the messageassociated with the first entry found on a node for an OS. Also call the renamethe relevant variables to _msg rather than just _status to reflect that they...
Separate OS status and path
Make _DiagnoseOSStatus only return a status message for the OS diagnose objectand create a new _DiagnoseOSPath function to get the path out. This will let usbe more flexible in the messages we display to the user.
Convert ListOS to use the all helper function.
The predicate function gets build by a lambda function.Also add a bit of debugging information to the 'unknown OS diagnose type'.
Reviewed-by: iustinp
Make “gnt-os diagnose” exit 1 if not all OSes are valid.
Reorder gnt-os simplify _GetAllOS and call it _DiagnoseByOS
Put some order in gnt-os putting helper functions above and command functionsbelow. Also add a new _DiagnoseOSName() function and use it to make _GetAllOSsimplier to understand. Change its name to _DiagnoseByOS which makes more clear...
Fix ListOS which was broken
To do this we abstract the creation of the all_os dictionary, which wasproduced in DiagnoseOS and use it both for listing and diagnosing.
Refactor DiagnoseOS
The new version debugs Hidden OSes as well.
Ship (and display) path for InvalidOS errors too.
- Document the expected change to errors.InvalidOS- Always pass the additional argument- Modify DiagnoseOS output to show the path
Reviewed-by: iustinp, imsnah
Fix OS Diagnose in light of the new OS Search path (Part One).
As of now only the last OS was taken into consideration by diagnose, fix bystoring them all and displaying for now only the first. Also display the sourcepath for valid OSes.
Reviewed-by: imsnah
Change cli.OutputTable to cli.GenerateTable
Since the table generation might be useful elsewhere, let's change it toreturn the data instead of directly printing it.
Its callers have also been updated.
Style changes for pep-8 and python-3000 compliance.
This changes the raising of exceptions from: raise Exception, valueto raise Exception(value)
as the first form will be removed in python-3000 and the second form ispreferred now.
The changes also involve a few cases of changing from raising standard...
Use OutputTable for “gnt-os list”.
Initial commit.