Exemple #1
0
def handle(cmd):
    if cmd == ":disable":
        setMode(Mode.disabled)
    elif cmd == ":enable":
        setMode(Mode.normal)
    elif cmd == ":getMode":
        return getMode().name
    elif cmd == ":getConfigDir":
        return config.getConfigDir()
    elif ":clipboard:" in cmd:
        return handlePendingClipboard(cmd)
    else:
        logger.error("Not a valid command: {cmd}".format(cmd))
        # TODO: Raise InvalidCommandError and catch in caller.
    return None
Exemple #2
0
            'del /f /q %s\\ox*' % (tomcatWebapps),  # remove wars
            'rmdir /s /q %s\\oxauth' % (tomcatWebapps),  # remove dirs
            'rmdir /s /q %s\\oxTrust' % (tomcatWebapps)  # remove dirs
        ]
    else:
        actions = [
            '%s/shutdown.sh' % (tomcatBin),  # shutdown tomcat
            'rm -f %s/ox*' % (tomcatConf),  # remove OX configs
            'rm -f %s/ox*' % (tomcatWebapps)  # remove OX configs
        ]
    util.call(actions)


def cleanUpPreviousRun(d):
    if d['platform'] == "windows":
        actions = [
            'del /f /q %s' %
            d['dataGeneratedFile'],  # remove dataGeneratedFile.ldif
            'del /f /q %s' % d['schemaFN'],  # remove schemaFN.ldif
        ]
    else:
        actions = [
            'rm -f %s' %
            d['dataGeneratedFile'],  # remove dataGeneratedFile.ldif
            'rm -f %s' % d['schemaFN'],  # remove schemaFN.ldif
        ]
    util.call(actions)


cleanUp(config.getConfigDir())
Exemple #3
0
__author__ = 'yuriy'

import schema, config, random

d = config.getConfigDir()

# These will be used to print sample attr metadata
sampleMetaDataObjectclasses = {'gluuPerson': schema.gluuPerson,
                               'inetOrgPerson': schema.inetOrgPerson,
                               'eduPerson': schema.eduPerson}

# read this "key" extends "value"
ocExtensions = {'inetOrgPerson': 'gluuPerson'}

maceNamespace = ['eduCourseMember', 'eduPersonEntitlement', 'eduPersonAffiliation', 'eduPersonNickname',
                 'eduPersonOrgDN', 'eduPersonOrgUnitDN', 'eduPersonPrimaryAffiliation', 'eduPersonPrimaryOrgUnitDN',
                 'eduPersonPrincipalName', 'eduPersonScopedAffiliation', 'eduPersonTargetedID', 'labeledURI',
                 'carLicense', 'departmentNumber', 'displayName', 'employeeNumber', 'employeeType', 'preferredLanguage',
                 'cn', 'sn', 'telephoneNumber', 'seeAlso', 'description', 'title', 'registeredAddress',
                 'facsimileTelephoneNumber', 'street', 'postOfficeBox', 'postalCode', 'postalAddress',
                 'physicalDeliveryOfficeName', 'ou', 'o', 'st', 'l', 'givenName', 'businessCategory', 'initials',
                 'homePostalAddress', 'roomNumber', 'mail', 'manager', 'uid', 'homePhone', 'mobile', 'pager']

# yuriyz : be careful if you want to change scopes inum, this inum is used by oxTrust Demo client
# it seems that it's possible to generate also client LDIF but unfortunately client id and secret is
# "hardcoded" in oxTrust properties, we don't want to generate oxTrust properties right now (maybe it will be changed in future)
scopes = {
    'openid': {
        'inum': '@!1111!0009!E4B4',
        'description': 'Obtain an ID Token associated with the authentication session.',
        'claims': ['uid']
Exemple #4
0
            '%s\\shutdown.bat' % (tomcatBin), # shutdown tomcat
            'del /f /q %s\\ox*' % (tomcatConf), # remove OX configs
            'del /f /q %s\\ox*' % (tomcatWebapps), # remove wars
            'rmdir /s /q %s\\oxauth' % (tomcatWebapps), # remove dirs
            'rmdir /s /q %s\\oxTrust' % (tomcatWebapps) # remove dirs
        ]
    else:
        actions = [
            '%s/shutdown.sh' % (tomcatBin), # shutdown tomcat
            'rm -f %s/ox*' % (tomcatConf), # remove OX configs
            'rm -f %s/ox*' % (tomcatWebapps) # remove OX configs
        ]
    util.call(actions)


def cleanUpPreviousRun(d):
    if d['platform'] == "windows":
        actions = [
            'del /f /q %s' % d['dataGeneratedFile'], # remove dataGeneratedFile.ldif
            'del /f /q %s' % d['schemaFN'], # remove schemaFN.ldif

        ]
    else:
        actions = [
            'rm -f %s' % d['dataGeneratedFile'], # remove dataGeneratedFile.ldif
            'rm -f %s' % d['schemaFN'], # remove schemaFN.ldif
        ]
    util.call(actions)

cleanUp(config.getConfigDir())