def __init__(self): AbstractCommand.__init__(self) self.exclude = { 'access':[ 'unix_pass', 'ldap_pass', 'ldap_to_apply', ], 'mysql':[ 'mysql_apply', ], } self.conf = UWSAConfiguration(template=files.get_rel_path("data/site.conf.tpl"),exclude=self.exclude) self.t = ' ' self.tt = self.t + self.t self.domain_admin_user = None self.domain_admin_pass = None
def do(self, args=[]): completed = AbstractCommand.do(self,args) if not completed: if 'fix' in args: args.remove('fix') completed = self.do_fix_all(self.get_next_arg(args)) elif self.__class__ == SiteCommand: self.print_unsupported(args) return completed
def do(self, args=[]): completed = AbstractCommand.do(self,args) if not completed and len(args) == 0: self.print_unsupported(args) if not completed: if 'reset_root_pass' in args: completed = self.reset_pass(args) else: self.print_unsupported(args) return completed
def do(self, args=[]): completed = AbstractCommand.do(self, args) if not completed: if self.__class__ == InstallCommand: self.print_unsupported(args) elif len(args) == 0: completed = self.do_install() elif "check" in args or "fix" in args: failed, fixed = self.do_check_fix(args) completed = len(failed) - len(fixed) == 0 return completed
def do(self, args=[]): completed = AbstractCommand.do(self,args) if not completed and len(args) == 0: self.print_unsupported(args) if not completed: if 'is_admin' in args: completed = self.is_admin(args) if 'is_member' in args: completed = self.is_member(args) if 'search' in args: completed = self.search(args) return completed
def __init__(self): AbstractCommand.__init__(self) self.install_list = [] self.checker_lu = { self.T_FOLDER: self.check_folder, self.T_FILE: self.check_file, self.T_PACKAGE: self.check_package, self.T_PREREQ: self.check_prereq, } self.fixer_lu = { self.T_FOLDER: self.fix_folder, self.T_FILE: self.fix_file, self.T_PACKAGE: self.fix_package, self.T_PREREQ: self.fix_prereq, } self.install_lu = { self.T_FOLDER: self.install_folder, self.T_FILE: self.install_file, self.T_PACKAGE: self.install_package, self.T_PREREQ: self.install_prereq, }
def init_help(self): help = AbstractCommand.init_help(self) help["command"] = help["command"] % t("install %s") if len(self.install_list) != 0: help["command_detail"] = t("\nThis command will install or modify:") if len(self.get_packages()) != 0: help["command_detail"] = t("%(command)s\n\tThe following packages: %(param)s") % { "command", help["command_detail"], "package", self.get_packages(), } if len(self.get_folders()) != 0: help["command_detail"] = t("%(command)s\n\tThe following folders: %(param)s") % { "command", help["command_detail"], "package", self.get_folders(), } if len(self.get_files()) != 0: help["command_detail"] = t("%(command)s\n\tThe following files: %(param)s") % { "command", help["command_detail"], "package", self.get_files(), } if len(self.get_prereqs()) != 0: help["command_detail"] = t("%(command)s\n\tThe following prerequisites: %(param)s") % { "command", help["command_detail"], "package", self.get_prereqs(), } # help['param_detail'] = t("\np1: info\np2: info") return help
def init_help(self): help = AbstractCommand.init_help(self) help['command_detail'] = t("\n\nThe command %s is used interact with your LDAP/AD domain") % self.NAME help['param_detail'] = t("\n\tis_admin user: check if user is domain admin") return help
def __init__(self): AbstractCommand.__init__(self) self.add_param("is_admin") self.add_param("is_member")
def init_help(self): help = AbstractCommand.init_help(self) help['command_detail'] = t("\n\nThe command %s is used create, modify or update web site") % self.NAME return help
def init_help(self): help = AbstractCommand.init_help(self) help['command_detail'] = t("\n\nThe command %s allow to manage your mysql database.") % self.NAME help['param_detail'] = t("\n\treset_pass: will reset root password. WARNING: the database will be shutted down.") return help
def __init__(self): AbstractCommand.__init__(self) self.add_param("reset_root_pass")
def __init__(self): AbstractCommand.__init__(self) self.help = t(""" Usage: uwsa cmd param where cmd in %s """)