diff options
Diffstat (limited to 'func/overlord/base_command.py')
-rw-r--r-- | func/overlord/base_command.py | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/func/overlord/base_command.py b/func/overlord/base_command.py new file mode 100644 index 0000000..d2f9a9f --- /dev/null +++ b/func/overlord/base_command.py @@ -0,0 +1,31 @@ +#!/usr/bin/python +""" +Copyright 2008, Red Hat, Inc +Adrian Likins <alikins@redhat.com> +also see AUTHORS + +This software may be freely redistributed under the terms of the GNU +general public license. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +""" + +import command +import client + +DEFAULT_PORT = 51234 +class BaseCommand(command.Command): + """ wrapper class for commands with some convience functions, namely + getOverlord() for getting a overlord client api handle""" + + interactive = False + verbose=0 + port=DEFAULT_PORT + def getOverlord(self): + self.overlord_obj = client.Overlord(self.server_spec, + port=self.port, + interactive=self.interactive, + verbose=self.verbose, + config=self.config) |