Ejemplo n.º 1
0
def resetPasswordCache(editor):
    context = grt.fromgrt(editor.customData["adminContext"])
    if context:
        handler = PasswordHandler(context.server_profile)
        if context.ctrl_be and context.ctrl_be.password_handler:
            context.ctrl_be.password_handler.pwd_store = {}

        for service_type in ["ssh", "sshkey", "file", "service.startstop", "remoteshell"]:
            details = handler.get_password_parameters(service_type)
            if details and details != "UAC":
                title, service, account = details
                mforms.Utilities.forget_password(service, account)

    mforms.Utilities.show_message("Reset Saved Passwords", "Saved passwords for this connection were deleted.", "OK", "", "")
Ejemplo n.º 2
0
def handleReconnect(name, sender, args):
    context = grt.fromgrt(sender.customData["adminContext"])
    if context and args['connected']:
        context.handle_reconnect()
Ejemplo n.º 3
0
 def openAdminSectionSE(editor, section):
     context = grt.fromgrt(editor.customData["adminContext"])
     if context:
         context.open_into_section(section, True)
Ejemplo n.º 4
0
def openConnectionSettings(editor):
    grt.modules.Workbench.showInstanceManagerFor(editor.connection)
    context = grt.fromgrt(editor.customData["adminContext"])
    if context:
        context.refresh_admin_links()
Ejemplo n.º 5
0
 def openAdminSectionSE(editor, section):
     context = grt.fromgrt(editor.customData["adminContext"])
     if context:
         context.open_into_section(section, True)
     else:
         log_error("No context found for editor in call to openAdminSection\n")
Ejemplo n.º 6
0
def openAdminSection(editor, section):
    context = grt.fromgrt(editor.customData["adminContext"])
    if context:
        context.open_into_section(section, True)
    else:
        log_error("No context found for editor in call to openAdminSection\n")
Ejemplo n.º 7
0
def handleReconnect(name, sender, args):
    context = grt.fromgrt(sender.customData["adminContext"])
    if context and args['connected']:
        context.handle_reconnect()
Ejemplo n.º 8
0
def openConnectionSettings(editor):
    grt.modules.Workbench.showInstanceManagerFor(editor.connection)
    context = grt.fromgrt(editor.customData["adminContext"])
    if context:
        context.refresh_admin_links()