Package backend :: Package server :: Package action :: Module utils :: Class SubscribedChannel
[hide private]
[frames] | no frames]

Class SubscribedChannel

source code

SubscribedChannel represents a channel to which the server is subscribed.

Instance Methods [hide private]
 
__init__(self, server_id, channel_lookup_string)
Constructor.
source code
 
_get_channel_info(self)
Looks up the correct channel based on channel_lookup_string.
source code
 
is_subscribed_to_channel(self)
Returns True if server_id is subscribed to the channel, False otherwise
source code
 
get_channel_id(self)
Returns the channel's unique id.
source code
 
get_channel_label(self)
Returns the channel's label.
source code
Method Details [hide private]

__init__(self, server_id, channel_lookup_string)
(Constructor)

source code 

Constructor.

server_id is a string containing the unique number that the database has assigned to the server.

channel_lookup_string is a string that the _get_channel_info function uses to look up the correct channel by channel label. It does NOT have to be the entire channel label, but it does have to occur at the beginning of the channel label. For instance "rhn-tools" would match any of the rhn-tools channels because they all begin with "rhn-tools". It can also be the entire channel label, of course.

_get_channel_info(self)

source code 

Looks up the correct channel based on channel_lookup_string. Populates the id, label, and a boolean that tells whether the channel is found.