Statistics
| Branch: | Tag: | Revision:

root / scripts / gnt-os @ cc5b94db

History | View | Annotate | Download (5.6 kB)

# Date Author Comment
429ae766 03/09/2010 02:27 pm René Nussbaumer

Add “gnt-os modify” for per-os-hypervisor parameters

Introduce “gnt-os modify” command to make it possible to set the
per-os-hypervisor parameters.

Signed-off-by: René Nussbaumer <>
Signed-off-by: Michael Hanselmann <>
Reviewed-by: Michael Hanselmann <>

400ca2f7 02/11/2010 01:49 pm Iustin Pop

Update scripts to pass 'opts' to SubmitOpCode

Signed-off-by: Iustin Pop <>
Reviewed-by: Michael Hanselmann <>

30e4e741 01/04/2010 11:20 am Iustin Pop

Fix unused imports or add silences where needed

In some cases pylint doesn't parse the import correctly, so we add
silences; but there are also many cases of unused imports, which we
simply remove.

Signed-off-by: Iustin Pop <>
Reviewed-by: Olivier Tharan <>

2d54e29c 01/04/2010 11:17 am Iustin Pop

Further pylint disables, mostly for Unused args

Many of our functions have to follow a given API, and thus we have to
keep a given signature, but pylint doesn't understand this. Therefore,
we silence this warning.

The patch does a few other cleanups.

Signed-off-by: Iustin Pop <>...

f4ad2ef0 01/04/2010 11:15 am Iustin Pop

Remove more unused variables

This removes unused variables in the rest of the code (outside lib/).

Signed-off-by: Iustin Pop <>
Reviewed-by: Olivier Tharan <>

7260cfbe 01/04/2010 11:15 am Iustin Pop

Add targeted pylint disables

This patch should have only:

- pylint disables
- docstring changes
- whitespace changes

Signed-off-by: Iustin Pop <>
Reviewed-by: Olivier Tharan <>

1f864b60 11/25/2009 04:30 pm Iustin Pop

Remove quotes from CommaJoin and convert to it

This patch removes the quotes from CommaJoin and converts most of the
callers (that I could find) to it. Since CommaJoin does str(i) for i in
param, we can remove these, thus simplifying slightly a few calls....

e3ac208c 10/05/2009 12:46 pm Guido Trotter

Update client os lists to name+variant format

List of OSes are displayed by gnt-os list, rapi, and gnt-instance
reinstall --select-os, and checked by burnin. In all of these show the
list with name+variant, if the os has variants.

Signed-off-by: Guido Trotter <>...

ba00557a 10/05/2009 12:39 pm Guido Trotter

Add per-node variants list to OS diagnose output

Signed-off-by: Guido Trotter <>
Reviewed-by: Olivier Tharan <>

e16dfb5b 10/05/2009 12:39 pm Guido Trotter

gnt-os diagnose: show os variants

We already show the per-node os variants, also show the global ones.

Signed-off-by: Guido Trotter <>
Reviewed-by: Olivier Tharan <>

6ea815cf 09/18/2009 01:53 pm Iustin Pop

Change indentation style in commands definitions

Currently, the indentation level for a command's definition depends on
the command name length, and this makes the commands dict unpleasant to
the eye. This patch changes it so that a new line begins right after the...

064c21f8 09/18/2009 01:53 pm Iustin Pop

Remove explicit DEBUG_OPT and add it by default

Since >90% of the commands take the “--debug” option, and all should
actually take it (the gnt-job command is currently missing it), it makes
sense to simply remove this and add it by default in cli.py.

Signed-off-by: Iustin Pop <>...

4a265c08 08/24/2009 06:01 pm Michael Hanselmann

Re-introduce constants for most often used arguments

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Iustin Pop <>

c38c44ad 08/24/2009 04:53 pm Michael Hanselmann

Make all options use cli_option

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Iustin Pop <>

a8005e17 08/24/2009 04:52 pm Michael Hanselmann

Change scripts to use new argument definitions

This can be used to generate the bash completion script automatically.
In the future it may allow for better command line validation as well.

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Iustin Pop <>

255dcebd 06/15/2009 08:08 pm Iustin Pop

Big rewrite of the OS-related functions

Currently the OSes have a special, customized error handling: the OS
object can represent either a valid OS, or an invalid OS. The associated
function, instead of raising other exception or failing, create custom
OS objects representing failed OSes....

9fbfbb7b 11/23/2008 05:34 pm Iustin Pop

Enable auto-unit formatting in script output

This patch enables by default the old 'human-readable' option, but in a
slightly different model.

The option is now called "units" and takes either:
- 'h' for automatic formatting
- 'm', 'g' or 't' for mebi/gibi/tebibytes...

6099bfcf 10/28/2008 01:20 am Iustin Pop

Documentation updates for gnt-debug and gnt-os

Reviewed-by: imsnah

2f79bd34 10/20/2008 03:33 pm Iustin Pop

Fix some pylint-detected issues on the scripts

Some names were wrong, and similar stuff detected by pylint.
gnt-debug.GenericOpCode is still broken.

Reviewed-by: imsnah

3a24c527 10/20/2008 03:33 pm Iustin Pop

Convert the gnt scripts to ToStdout/err

Currently the gnt-* scripts are using a mix of print, logger.ToStd* and
sys.stderr.write. We convert them all to using cli.ToStdout/err. This
way, we can easily change the implementation for all at once.

Reviewed-by: imsnah

9a033156 05/13/2008 04:04 pm Iustin Pop

Revert "CLI: remove command opts/args in "gnt-X""

This reverts commit 976.

Reviewed-by: ultrotter

57d0151e 05/13/2008 03:24 pm Iustin Pop

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 to
uniformize the output, currently only some parameters are shown and they...

1f9430d6 04/10/2008 07:38 pm Iustin Pop

Rework the results of OpDiagnoseOS opcode

Currently, the opcode DiagnoseOS is the only opcode that return a
structure of objects.OS (which is a custom class, and not a simple
python object) and furthermore all the processing of OS validity across
nodes is left to the clients of this opcode....

8fa42c7c 11/05/2007 02:43 am Guido Trotter

Make DiagnoseOS use the modified OS objects

Modify backend.py so that DiagnoseOS only returns OS objects rather than
InvalidOS errors, and make sure gnt-os understands the new objects. Also delete
the deprecated helper functions from gnt-os.

Reviewed-By: iustinp

d06565e0 11/01/2007 07:51 pm Guido Trotter

Remove two trailing whitespaces

Ok, I've been battling with those for a while but it seems
in the end I forgot to get rid of them! :( Doing it explicitely now.

Reviewed-By: iustinp

2527691a 11/01/2007 07:48 pm Guido Trotter

Move blank lines inside function messages

This patch changes whitespace only. It fixes all the functions in script/gnt-os
by putting a white line at the end of all the function descriptions and
removing it from just before the code.

Reviewed-By: iustinp

dd96409a 11/01/2007 07:48 pm Guido Trotter

Add empty line after each diagnose OS-Node set

Reviewed-By: imsnah

107b0ccb 11/01/2007 07:46 pm Guido Trotter

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)...

48f85f75 11/01/2007 07:44 pm Guido Trotter

Change the way to compute the first os status message

Use both _DiagnoseOSStatus and _DiagnoseOSPath to calculate the message
associated with the first entry found on a node for an OS. Also call the rename
the relevant variables to _msg rather than just _status to reflect that they...

5efc50fc 11/01/2007 07:44 pm Guido Trotter

Separate OS status and path

Make _DiagnoseOSStatus only return a status message for the OS diagnose object
and create a new _DiagnoseOSPath function to get the path out. This will let us
be more flexible in the messages we display to the user.

Reviewed-By: imsnah

cc0451f3 10/29/2007 05:20 pm Guido Trotter

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

a2656173 10/15/2007 02:45 pm Michael Hanselmann

Make “gnt-os diagnose” exit 1 if not all OSes are valid.

Reviewed-by: iustinp

fbdb07b9 10/12/2007 03:26 pm Guido Trotter

Reorder gnt-os simplify _GetAllOS and call it _DiagnoseByOS

Put some order in gnt-os putting helper functions above and command functions
below. Also add a new _DiagnoseOSName() function and use it to make _GetAllOS
simplier to understand. Change its name to _DiagnoseByOS which makes more clear...

216fe2f3 10/12/2007 02:19 pm Guido Trotter

Fix ListOS which was broken

To do this we abstract the creation of the all_os dictionary, which was
produced in DiagnoseOS and use it both for listing and diagnosing.

Reviewed-by: iustinp

b07a9f05 10/09/2007 02:15 pm Guido Trotter

Refactor DiagnoseOS

The new version debugs Hidden OSes as well.

Reviewed-by: iustinp

305a7297 10/04/2007 02:51 pm Guido Trotter

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

694e2444 10/04/2007 01:41 pm Guido Trotter

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 by
storing them all and displaying for now only the first. Also display the source
path for valid OSes.

Reviewed-by: imsnah

16be8703 08/17/2007 12:14 pm Iustin Pop

Change cli.OutputTable to cli.GenerateTable

Since the table generation might be useful elsewhere, let's change it to
return the data instead of directly printing it.

Its callers have also been updated.

Reviewed-by: imsnah

3ecf6786 08/14/2007 06:17 pm Iustin Pop

Style changes for pep-8 and python-3000 compliance.

This changes the raising of exceptions from:
raise Exception, value
to
raise Exception(value)

as the first form will be removed in python-3000 and the second form is
preferred now.

The changes also involve a few cases of changing from raising standard...

606d909d 07/27/2007 04:26 pm Michael Hanselmann

Use OutputTable for “gnt-os list”.

Reviewed-by: iustinp

a8083063 07/16/2007 04:39 pm Iustin Pop

Initial commit.