Example #1
0
def jars():
    """ List jars.

    A list of the jar names is returned if the query was successful, else the
    error dictionary from SpaceGDN is returned.

    """
    result = spacegdn.jars()

    if type(result) is not list:
        return result

    return [jar['name'] for jar in result]
Example #2
0
def jars():
    """ List jars.

    A list of the jar names is returned if the query was successful, else the
    error dictionary from SpaceGDN is returned.

    """
    result = spacegdn.jars()

    if type(result) is not list:
        return result

    return [jar['name'] for jar in result]
Example #3
0
def get_roots(build):
    """ Get the roots(server, channel, version and build) of this build.

    The returned value is a tuple of the server name, channel name, version
    name and build number.

    """
    server = spacegdn.jars(build['jar_id'])[0]['name']
    channel = spacegdn.channels(build['jar_id'],
                                build['channel_id'])[0]['name']
    version = spacegdn.versions(build['jar_id'], build['channel_id'],
                                build['version_id'])[0]['version']
    build = build['build']

    return server, channel, version, build
Example #4
0
def get_roots(build):
    """ Get the roots(server, channel, version and build) of this build.

    The returned value is a tuple of the server name, channel name, version
    name and build number.

    """
    server = spacegdn.jars(build['jar_id'])[0]['name']
    channel = spacegdn.channels(build['jar_id'],
                                build['channel_id'])[0]['name']
    version = spacegdn.versions(build['jar_id'], build['channel_id'],
                                build['version_id'])[0]['version']
    build = build['build']

    return server, channel, version, build