From 56ec0398d58b192c6870a636e91ecede7ce5943c Mon Sep 17 00:00:00 2001 From: "Paul C. Buetow (mars.fritz.box)" Date: Tue, 29 Apr 2014 08:11:47 +0200 Subject: rename ./-n to ./-d --- Makefile | 2 +- src/fapi | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index fcf76dd..dee5df6 100644 --- a/Makefile +++ b/Makefile @@ -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 diff --git a/src/fapi b/src/fapi index c4a848c..a316392 100755 --- a/src/fapi +++ b/src/fapi @@ -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') -- cgit v1.2.3