Beispiel #1
0
def listAllAvailablePackages():
    serverSettings = ServerSettings()
    li = rhnAuth.getLoginInfo()

    channels = li.get('X-RHN-Auth-Channels')
    s = getGETServer(li, serverSettings)

    packagelist = []
    for channelInfo in channels:
        channelName = channelInfo[0]
        channelVersion = channelInfo[1]
        tmplist = s.listAllPackages(channelName, channelVersion)
        packagelist = packagelist + tmplist

    return packagelist
Beispiel #2
0
def listAllAvailablePackages():
    serverSettings = ServerSettings()
    li = rhnAuth.getLoginInfo()

    channels = li.get('X-RHN-Auth-Channels')
    s = getGETServer(li, serverSettings)

    packagelist = []
    for channelInfo in channels:
        channelName = channelInfo[0]
        channelVersion = channelInfo[1]
        tmplist = s.listAllPackages(channelName, channelVersion)
        packagelist = packagelist + tmplist

    return packagelist
Beispiel #3
0
def downloadPackage(channel, pkghash, localfile, serverUrl=None):
    cfg = config.initUp2dateConfig()

    serverSettings = ServerSettings()
    if serverUrl is not None:
        serverSettings.httpServerUrl = serverUrl
    li = rhnAuth.getLoginInfo()
    s = getGETServer(li, serverSettings)

    fd = rpcServer.doCall(s.getPackage, channel, pkghash)
    status = s.get_response_status()

    f2 = _readFD(fd, localfile)
    f2.close()
    fd.close()
Beispiel #4
0
def downloadPackage(channel, pkghash, localfile, serverUrl=None):
    cfg = config.initUp2dateConfig()

    serverSettings = ServerSettings()
    if serverUrl is not None:
        serverSettings.httpServerUrl = serverUrl
    li = rhnAuth.getLoginInfo()
    s = getGETServer(li, serverSettings)

    fd = rpcServer.doCall(s.getPackage, channel, pkghash)
    status = s.get_response_status()

    f2 = _readFD(fd, localfile)
    f2.close()
    fd.close()