Package backend :: Package server :: Module rhnChannel
[hide private]
[frames] | no frames]

Module rhnChannel

source code

Classes [hide private]
  NoBaseChannelError
  InvalidServerArchError
  BaseChannelDeniedError
  ChannelException
  ModifiedError
  IncompatibilityError
  InvalidDataError
  ChannelNotFoundError
  NoToolsChannel
  NoChildChannels
  InvalidChannel
  BaseDatabaseObject
  BaseChannelObject
  Channel
  ChannelFamily
  LiteServer
Functions [hide private]
 
_load_by_id(query, item_object, pattern=None) source code
 
list_channel_families(pattern=None) source code
 
list_channels(pattern=None) source code
 
__stringify(object) source code
 
channel_info(channel) source code
 
get_base_channel(server_id, none_ok=0) source code
 
channels_for_server(server_id)
channel info list for all channels accessible by this server.
source code
 
getSubscribedChannels(server_id)
Format the response from channels_for_server in the way that the handlers expect.
source code
 
isCustomChannel(channel_id)
Input: channel_id (from DB Table rhnChannel.id)...
source code
 
base_channel_for_rel_arch(release, server_arch, org_id=-1, user_id=None) source code
 
base_eus_channel_for_ver_rel_arch(version, release, server_arch, org_id=-1, user_id=None)
given a redhat-release version, release, and server arch, return a list of dicts containing the details of the channel z streams either match the version/release pair, or are greater.
source code
 
get_channel_for_release_arch(release, server_arch, org_id=None) source code
 
applet_channels_for_uuid(uuid) source code
 
channels_for_release_arch(release, server_arch, org_id=-1, user_id=None) source code
 
list_packages_source(channel_id) source code
 
list_all_packages_checksum_sql(channel_id) source code
 
list_packages_checksum_sql(channel_id) source code
 
_list_packages_sql(query, channel_id) source code
 
list_packages_sql(channel_id) source code
 
list_all_packages_sql(channel_id) source code
 
list_all_packages_complete_sql(channel_id) source code
 
list_packages_path(channel_id) source code
 
list_packages(channel) source code
 
list_all_packages(channel) source code
 
list_all_packages_checksum(channel) source code
 
list_all_packages_complete(channel) source code
 
_list_packages(channel, cache_prefix, function) source code
 
getChannelInfoForKickstart(kickstart) source code
 
getChannelInfoForKickstartOrg(kickstart, org_id) source code
 
getChannelInfoForKickstartSession(session) source code
 
getChildChannelInfoForKickstart(kickstart, child) source code
 
getChannelInfoForTinyUrl(tinyurl) source code
 
list_obsoletes(channel) source code
 
__auth_user(server_id, username, password)
Auth if user can add/remove channel from given server
source code
 
subscribe_sql(server_id, channel_id, commit=1) source code
 
subscribe_channel(server_id, channel, username, password) source code
 
guess_channels_for_server(server, user_id=None, none_ok=0, raise_exceptions=0) source code
 
subscribe_server_channels(server, user_id=None, none_ok=0) source code
 
unsubscribe_sql(server_id, channel_id, commit=1) source code
 
unsubscribe_channel(server_id, channel, username, password) source code
 
unsubscribe_all_channels(server_id) source code
 
unsubscribe_channels(server_id, channels) source code
 
subscribe_channels(server_id, channels) source code
 
is_subscribed(server_id, channel) source code
 
system_reg_message(server) source code
 
subscribe_to_tools_channel(server_id)
Subscribes server_id to the RHN Tools channel associated with its base channel, if one exists.
source code
Variables [hide private]
  _query_get_source_packages_from_ids = <backend.server.rhnSQL.s...
  _query_all_packages_from_channel_checksum = '\n select\n ...
  _query_latest_packages_from_channel = '\n select\n p...
  _query_channel_details = <backend.server.rhnSQL.sql_base.State...
  _query_server_parent_channel = <backend.server.rhnSQL.sql_base...
  _query_can_subscribe = <backend.server.rhnSQL.sql_base.Stateme...
  h_invalid_channel_title = 'System Registered but Inactive'
  h_invalid_channel_message = '\nInvalid Architecture and OS rel...
  s_invalid_channel_title = 'System Registered but Inactive'
  s_invalid_channel_message = '\nInvalid Architecture and OS rel...
  no_autoentitlement_message = '\n This system has been success...
  no_entitlement_title = 'System Registered but Inactive'
  no_entitlement_message = '\n This system has been successfull...
  __package__ = 'backend.server'
Function Details [hide private]

channels_for_server(server_id)

source code 

channel info list for all channels accessible by this server.

list channels a server_id is subscribed to We DO NOT want to cache this one because we depend on getting accurate information and the caching would only introduce more overhead on an otherwise very fast query

isCustomChannel(channel_id)

source code 

Input:      channel_id  (from DB Table rhnChannel.id)
Returns:    True if this is a custom channel
        False if this is not a custom channel


Variables Details [hide private]

_query_get_source_packages_from_ids

Value:
<backend.server.rhnSQL.sql_base.Statement instance at 139980618074520;\
 statement=
    select srpm.name
      from rhnChannelPackage cp,
           rhnPackage p,
           rhnSourceRPM srpm
     where cp.channel_id = :channel_id
       and cp.package_id = p.id
...

_query_all_packages_from_channel_checksum

Value:
'''
    select
        p.id,
        pn.name,
        pevr.version,
        pevr.release,
        pevr.epoch,
        pa.label arch,
...

_query_latest_packages_from_channel

Value:
'''
    select
        p.id,
        pn.name,
        pevr.version,
        pevr.release,
        pevr.epoch,
        pa.label arch,
...

_query_channel_details

Value:
<backend.server.rhnSQL.sql_base.Statement instance at 139980618074592;\
 statement=
select c.id, c.label, c.parent_channel
  from rhnChannel c
 where c.label = :channel

_query_server_parent_channel

Value:
<backend.server.rhnSQL.sql_base.Statement instance at 139980618074664;\
 statement=
select pc.id, pc.label
  from rhnChannel c
  join rhnServerChannel sc on c.parent_channel = sc.channel_id
  join rhnChannel pc on c.parent_channel = pc.id
 where sc.server_id = :sid
 group by pc.id, pc.label
...

_query_can_subscribe

Value:
<backend.server.rhnSQL.sql_base.Statement instance at 139980618074736;\
 statement=
select rhn_channel.user_role_check(:cid, wc.id, 'subscribe') as can_su\
bscribe
  from web_contact wc
 where wc.login_uc = upper(:username)

h_invalid_channel_message

Value:
'''
Invalid Architecture and OS release combination (%s, %s).
Your system has been registered, but will not receive updates
because it is not subscribed to a channel. If you have not yet
activated your product for service, please visit our website at:

     http://www.redhat.com/apps/activate/

...

s_invalid_channel_message

Value:
'''
Invalid Architecture and OS release combination (%s, %s).
Your system has been registered, but will not receive updates
because it could not be subscribed to a base channel.
Please contact your organization administrator for assistance.
'''

no_autoentitlement_message

Value:
'''
  This system has been successfully registered, but is not yet entitle\
d
  to service.  To entitle this system to service, login to the web sit\
e at:

  %(entitlement_url)s
'''

no_entitlement_message

Value:
'''
  This system has been successfully registered, but no service entitle\
ments
  were available.  To entitle this system to service, login to the web\
 site at:

  %(entitlement_url)s
'''