diff options
| author | Paul C. Buetow (mars.fritz.box) <paul@buetow.org> | 2014-04-29 08:11:47 +0200 |
|---|---|---|
| committer | Paul C. Buetow (mars.fritz.box) <paul@buetow.org> | 2014-04-29 08:11:47 +0200 |
| commit | 56ec0398d58b192c6870a636e91ecede7ce5943c (patch) | |
| tree | 42226e973f402b90b0639f2902ec0edf7451045d | |
| parent | 288742e561977c8af28365a61a2af2f39fd4dc39 (diff) | |
rename ./-n to ./-d
| -rw-r--r-- | Makefile | 2 | ||||
| -rwxr-xr-x | src/fapi | 9 |
2 files changed, 6 insertions, 5 deletions
@@ -28,7 +28,7 @@ documentation: --center="User Commands" ./docs/$(NAME).pod > ./docs/$(NAME).1 pod2text ./docs/$(NAME).pod > ./docs/$(NAME).txt cp ./docs/$(NAME).pod README.pod - ./bin/fapi -h -n > ./docs/synopsis.txt + ./bin/fapi -h -d > ./docs/synopsis.txt # Build a debian package (don't sign it, modify the arguments if you want to sign it) deb: all dpkg-buildpackage @@ -36,7 +36,7 @@ class FapiBase(object): def info(self, message, color=''): ''' Prints an informational message to stderr ''' - if self._args.n: + if self._args.d: color = reset = '' else: reset = '' if color == '' else Style.RESET_ALL @@ -57,7 +57,7 @@ class FapiBase(object): def print_synopsis(self): ''' Prints the full Synopsis string ''' - if self._args.n: + if self._args.d: style = reset = '' else: style = Style.DIM @@ -131,13 +131,13 @@ class ArgumentParser(FapiBase): self._parser = parser = argparse.ArgumentParser(add_help=False) parser.add_argument('-b', action='store', help='Forces to use the secified loadbalancer (overwrites -e)') + parser.add_argument('-d', action='store_true', help='Disable colorful output') parser.add_argument('-e', action='store', help='Env to use, e.g. dev,qa,live', default='qa') parser.add_argument('-f', action='store', help='Overwrite partition/folder from fapi.conf') parser.add_argument('-h', action='store_true', help='Print this help') parser.add_argument('-i', action='store_true', help='Interactive shell') parser.add_argument('-l', action='store_true', help='Use list output') - parser.add_argument('-n', action='store_true', help='No color (disable colorful output)') parser.add_argument('-v', action='store_true', help='Verbose') parser.add_argument('-V', action='store_true', help='Print program version') parser.add_argument('-C', action='store', help='Config file', @@ -681,13 +681,14 @@ class Fapi(FapiBase): elif a.what == 'folder': return self.__do_folder(lambda: self._f5.Management.Folder) - def run(self): ''' Do the actual stuff. We are doning some lazy evaluation stuff here. The command line tool does not do anything with the slow F5 API until it is clear what to do and that there is no semantic or syntax error. ''' a = self._args + if a.name == '_': + print "BULK" lazy = self._lazy() if isfunction(lazy): self.verbose('Doing some stuf via the API, it may take a while') |
