'Process the command line and do what the user asks.'

def run(self, args):

    self.token = self.remote.login('', self.shared_secret)
    object_type = self.get_object_type(args)
    object_action = self.get_object_action(object_type, args)
    direct_action = self.get_direct_action(object_type, args)
    try:
        if (object_type is not None):
            if (object_action is not None):
                self.object_command(object_type, object_action)
            else:
                self.print_object_help(object_type)
        elif (direct_action is not None):
            self.direct_command(direct_action)
        else:
            self.print_help()
    except xmlrpclib.Fault as err:
        if (err.faultString.find('cobbler.cexceptions.CX') != (-1)):
            print self.cleanup_fault_string(err.faultString)
        else:
            print '###    ERROR    ###'
            print 'Unexpected    remote    error,    check    the    server    side    logs    for    further    info'
            print err.faultString
            sys.exit(1)
