Statistics
| Branch: | Tag: | Revision:

root / Ganeti / HTools / CLI.hs @ 633e6bcb

History | View | Annotate | Download (12.8 kB)

# Date Author Comment
633e6bcb 08/26/2009 10:45 am Iustin Pop

Simplify the wrapIO function

This fixes one warning from hlint.

f723de38 08/19/2009 02:03 pm Iustin Pop

Improve the error message for command line errors

Instead of using ioError . userError, we format the error ourselves.
This is nicer - no ‘)’ at the end of the output.

b2278348 08/18/2009 07:11 pm Iustin Pop

Add a simulated cluster data loader

This is useful especially for hspace, where we might want to simulate a
hypothetical cluster to check allocation beforehand.

175cc337 07/15/2009 08:22 pm Iustin Pop

CLI: Handle error better

This patch adds an error handler for any exceptions that are raised
during the external data load phase. This can be improved further, but
it's a good start.

0427285d 07/15/2009 11:31 am Iustin Pop

Unify the command line options and structures

This patch moves all the command line options and their internal
representation into CLI.hs. This means that duplicated options between
any two binaries are no longer declared twice, and that we no longer
need the two *Option classes.

26d47cf5 07/14/2009 05:00 pm Iustin Pop

CLI: Prevent incompatible options to be selected

This patch makes CLI abort if more than one backend is selected.

8e445e6d 07/14/2009 04:06 pm Iustin Pop

Add support for luxi backend in CLI/hspace/hbal

This patch changes the backend selection method in CLI to prefer, in order:
- a RAPI specification
- a Luxi specification
- and finally the node/instance files

It also modifies hspace and hbal to provide a ‘-L’ command line option...

2795466b 07/07/2009 12:20 pm Iustin Pop

Show errors on stderr instead of stdout

Currently many of the exit and warning conditions mistakenly display error
messages on stdout, which makes parsing the output of programs harder. This
patch attempts to fix such occurrences.

9f6dcdea 07/06/2009 11:50 pm Iustin Pop

Fix hlint-generated warnings

This big patch cleans up the code per hlint indications. Many removals
of extra parentheses, replacements of concat . map with concabtMap,
extra dollar signs, eta reductions, etc. were performed.

The code still compiles and passes a couple of manual tests on sample...

78694255 06/12/2009 02:22 am Iustin Pop

Fix the various monomorphism warning

In a few places (e.g. tryRead or any printf call) it's a little bit hard
to add the correct type signatures, but in the it is possible to fix
these warnings (which can bite one in subtle cases).

e2fa2baf 06/01/2009 12:55 pm Iustin Pop

Add copyright/license information

This doc-patch adds copyright and license information to (hopefully) all
needed files.

9188aeef 06/01/2009 12:18 pm Iustin Pop

Lots of documentation updates

This patch does only doc build changes, doc changes and function move
around (for more logical documentation). It should have no impact at all
on the code.

262a08a2 05/27/2009 02:17 am Iustin Pop

Change the module import hierarchy

This patch makes the Types module a base module, and Node/Instance ones
import it, from the previous (opposite) situation. This will allow in
the future to use newtypes for the index and name types.

8472a321 05/24/2009 02:36 am Iustin Pop

Remove the ktn/kti from second half of loading

This removes the return of ktn/kti from Loader.mergeData and associated
functions.

dbd6700b 05/24/2009 02:05 am Iustin Pop

Remove some extraneous uses of ktn/kti

Since we have Node/Instance.name, we can now simplify a few constructs.

fae371cc 05/24/2009 01:22 am Iustin Pop

Move common loading sequence in CLI

This patch moves the common loading sequence to CLI, such that hbal/hn1
and possible future scripts that take the input from same sources can
use it.

75d1edf8 05/23/2009 03:34 am Iustin Pop

Introduce a class for CLI options

This patch generalizes a little the CLI handling by not passing in a
special function for help and such, but instead requiring that the
options object supports some common functionality.

8032b3b5 04/20/2009 02:07 pm Iustin Pop

Add reading the file names from env vars

This patch adds support for selecting the instance/node file names via
two environment variables (HTOOLS_NODES, HTOOLS_INSTANCES).

Unfortunately we still have lots of duplicated code, since the options
are not unified.

e0eb63f0 04/19/2009 01:17 am Iustin Pop

Implement writing the command list to a script

This patch adds support in hbal for writing the command list to a shell
script, with error checking and allowing for early exit.

6ef35e3c 03/23/2009 09:12 am Iustin Pop

More documentation updates

This removes most of the content of the README file (obsoleted by new
algorithm and man pages), modifies the Makefile to include the built
documentation in the source archive (so that haddock/hscolour are not
needed) and updates the haddock-prologue with current information.

209b3711 03/22/2009 11:52 am Iustin Pop

Split common CLI functionality into a module

This patch moves the common CLI functionality (as much as currently
possible) into a separate module. This means we only have one parseOpts
and that Utils.hs doesn't keep this kind of functions anymore.