Ejemplo n.º 1
0
 def before_execution(self, context):
   try:
     from apache.aurora.kerberos.auth_module import KerberosAuthModule
     register_auth_module(KerberosAuthModule())
   except ImportError:
     # Use default auth implementation if kerberos is not available.
     pass
Ejemplo n.º 2
0
from apache.aurora.admin import admin, help as help_commands, maintenance
from apache.aurora.common.auth.auth_module_manager import register_auth_module

from .help import add_verbosity_options, generate_terse_usage

app.register_commands_from(admin, help_commands, maintenance)
add_verbosity_options()


def main():
    app.help()


try:
    from apache.aurora.kerberos.auth_module import KerberosAuthModule
    register_auth_module(KerberosAuthModule())
except ImportError:
    # Use default auth implementation if kerberos is not available.
    pass

LogOptions.set_stderr_log_level('INFO')
LogOptions.disable_disk_logging()
app.set_name('aurora-admin')
app.set_usage(generate_terse_usage())

app.add_option('--bypass-leader-redirect',
               action='store_true',
               default=False,
               dest='bypass_leader_redirect',
               help='Bypass the scheduler\'s leader redirect filter')