Пример #1
0
def get_ldap_user_from_yaml():
    me = ConfigDict(filename=config_file("/me.yaml"))
    d = {}
    for element in ["firstname",
                    "lastname",
                    "email",
                    "phone",
                    "address"]:
        d[element] = me.get("profile.{0}".format(element))
    d["cm_user_id"] = me.get("portalname")
    d["gidNumber"] = 0
    d["uidNumber"] = 0

    if "gidNumber" in me.keys():
        d["gidNumber"] = me.get("gidNumber")

    if "uidNumber" in me.keys():
        d["uidNumber"] = me.get("uidNumber")

    d["projects"] = me.get("projects")

    #
    # copy the keys
    #
    d['keys'] = me.get("keys.keylist")
    return d
Пример #2
0
print config


#hosts = []
# hosts.append("localhost")
# hosts.append("bigred2.uits.iu.edu")
# hosts.append("india.futuregrid.org")

def get_credentials(hosts):
    credential = {}
    for host in hosts:
        credential[host] = config[host]['username']
    return credential


hosts = config.keys()

credentials = get_credentials(hosts)


task = {}

watch = StopWatch()


for execute in [Sequential, Parallel]:
    # for execute in [Sequential]:
    # for execute in [Parallel]:

    name = execute.__name__
Пример #3
0
print config

#hosts = []
# hosts.append("localhost")
# hosts.append("bigred2.uits.iu.edu")
# hosts.append("india.futuregrid.org")


def get_credentials(hosts):
    credential = {}
    for host in hosts:
        credential[host] = config[host]['username']
    return credential


hosts = config.keys()

credentials = get_credentials(hosts)

task = {}

watch = StopWatch()

for execute in [Sequential, Parallel]:
    # for execute in [Sequential]:
    # for execute in [Parallel]:

    name = execute.__name__

    banner(name)
    watch.start(name)