Пример #1
0
    def getTinyUrlChannel(self, tinyurl, system_id):
        """ Gets channel information for this tinyurl"""
        log_debug(5, tinyurl)
        # authenticate that this request is initiated from a proxy
        self.auth_system(system_id)
        ret = rhnChannel.getChannelInfoForTinyUrl(tinyurl)
        if not ret or not 'url' in ret or len(ret['url'].split('/')) != 6:
            raise rhnFault(
                40, "could not find any data on tiny url '%s'" % tinyurl)

        # tiny urls are always for kickstart sessions
        args = ret['url'].split('/')
        return self.__getKickstartSessionChannel(args[-1], args[-2])
Пример #2
0
    def getTinyUrlChannel(self, tinyurl, system_id):
        """ Gets channel information for this tinyurl"""
        log_debug(5, tinyurl)
        # authenticate that this request is initiated from a proxy
        self.auth_system(system_id)
        ret = rhnChannel.getChannelInfoForTinyUrl(tinyurl)
        if not ret or not 'url' in ret or len(ret['url'].split('/')) != 6:
            raise rhnFault(40,
                    "could not find any data on tiny url '%s'" % tinyurl)

        # tiny urls are always for kickstart sessions
        args = ret['url'].split('/')
        return self.__getKickstartSessionChannel(args[-1], args[-2])