Package backend :: Package server :: Module rhnRepository :: Class Repository
[hide private]
[frames] | no frames]

Class Repository

source code


Cache class to perform RHN server file system and DB actions.

This class gets all data from the file system and oracle. All the functions that are performed upon GET requests are here (and since proxies perform these functions as well, a good chunk of code is in common/rhnRepository.py)

The listall code is here too, because it performs a lot of disk caching and here's the appropriate location for it

The dependency solving code is not handled in this repository - all the code we need is already in xmlrpc/up2date

Instance Methods [hide private]
 
__init__(self, channelName=None, server_id=None, username=None)
Initialize the class, setting channel name and server
source code
 
getPackageHeader(self, pkgFilename)
Get rpm header.
source code
 
listChannels(self)
Clients v2+ returns a list of the channels the server is subscribed to, or could subscribe to.
source code
 
listPackages(self, version)
Clients v2+.
source code
 
getObsoletes(self, version)
Returns a list of packages that obsolete other packages
source code
 
getObsoletesBlacklist(self, version)
Returns a list of packages that obsolete other packages XXX Obsoleted
source code
 
listAllPackages(self, version)
Creates and/or serves up a cached copy of all the packages for this channel.
source code
 
listAllPackagesChecksum(self, version)
Creates and/or serves up a cached copy of all the packages for this channel, including checksum information.
source code
 
listAllPackagesComplete(self, version)
Creates and/or serves up a cached copy of all the packages for this channel including requires, obsoletes, conflicts, etc.
source code
 
_repodata_python(self, file_name) source code
 
_repodata_taskomatic(self, file_name) source code
 
repodata(self, file_name) source code
 
getPackagePath(self, pkgFilename, redirect_capable=0)
Retrieves package path Overloads getPackagePath in common/rhnRepository.
source code
 
_getFile(self, path)
overwrites the common/rhnRepository._getFile to check for redirect
source code
 
getAllPackagePaths(self, pkgFilename)
retrives the package location if edge network location available and its local path.
source code
 
getSourcePackagePath(self, pkgFilename)
Retrieves package source path Overloads getSourcePackagePath in common/rhnRepository.
source code
 
__check_channel(self, version)
check if the current channel version matches that of the client
source code
 
set_qos(self) source code
 
_getHeaderFromFile(self, filePath, stat_info=None)
Wraps around common.rhnRepository's method, adding a caching layer If stat_info was already passed, don't re-stat the file
source code

Inherited from spacewalk.common.rhnRepository.Repository: __del__, getPackage, getPackageSource, set_compress_headers

Inherited from spacewalk.common.RPC_Base.RPC_Base: get_function

Static Methods [hide private]

Inherited from spacewalk.common.rhnRepository.Repository: getPackagePathNVRA, i18n, media_1

Inherited from spacewalk.common.rhnRepository.Repository (private): _fileFeatures, _set_last_modified

Method Details [hide private]

__init__(self, channelName=None, server_id=None, username=None)
(Constructor)

source code 

Initialize the class, setting channel name and server

ID, that serial number (w/o ID-), if necessary. NOTE: server_id is a string.

Overrides: spacewalk.common.RPC_Base.RPC_Base.__init__

getPackageHeader(self, pkgFilename)

source code 

Get rpm header. XXX: stock 8.0 clients could not compress headers, we need to either change the function name, or version the protocol

Overrides: spacewalk.common.rhnRepository.Repository.getPackageHeader
(inherited documentation)

listPackages(self, version)

source code 

Clients v2+. Creates and/or serves up a cached copy of the package list for this channel.

getPackagePath(self, pkgFilename, redirect_capable=0)

source code 

Retrieves package path Overloads getPackagePath in common/rhnRepository. checks if redirect and hosted; makes a call to query the db for pkg_location

Overrides: spacewalk.common.rhnRepository.Repository.getPackagePath

_getFile(self, path)

source code 

overwrites the common/rhnRepository._getFile to check for redirect

Overrides: spacewalk.common.rhnRepository.Repository._getFile

getSourcePackagePath(self, pkgFilename)

source code 

Retrieves package source path Overloads getSourcePackagePath in common/rhnRepository.

Overrides: spacewalk.common.rhnRepository.Repository.getSourcePackagePath

_getHeaderFromFile(self, filePath, stat_info=None)

source code 

Wraps around common.rhnRepository's method, adding a caching layer If stat_info was already passed, don't re-stat the file

Overrides: spacewalk.common.rhnRepository.Repository._getHeaderFromFile