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

Module server_lib

source code

Classes [hide private]
  rhnSystemEntitlementException
  rhnNoSystemEntitlementsException
Functions [hide private]
 
getServerID(server, fields=[])
Given a textual digitalid (old style or new style) or simply an ID try to search in the database and return the numeric id (thus doing validation in case you pass a numeric ID already)
source code
 
getServerSecret(server)
retrieve the server secret using the great getServerID function
source code
 
__create_server_group(group_label, org_id)
create the initial server groups for a new server
source code
 
join_server_group(server_id, server_group_id)
Adds a server to a server group
source code
 
create_server_setup(server_id, org_id)
This function inserts a row in rhnServerInfo.
source code
 
checkin(server_id, commit=1)
checkin - update the last checkin time
source code
 
set_qos(server_id) source code
 
throttle(server)
throttle - limits access to free users if a throttle file exists NOTE: We don't throttle anybody.
source code
 
join_rhn(org_id)
Stub
source code
 
snapshot_server(server_id, reason) source code
 
check_entitlement(server_id) source code
 
update_push_client_registration(server_id) source code
 
update_push_client_jid(server_id, jid) source code
 
generate_random_string(length=20) source code
Variables [hide private]
  _query_update_push_client_registration = <spacewalk.server.rhn...
  _query_insert_push_client_registration = <spacewalk.server.rhn...
  _query_delete_duplicate_client_jids = <spacewalk.server.rhnSQL...
  _query_update_push_client_jid = <spacewalk.server.rhnSQL.sql_b...
  __package__ = 'backend.server.rhnServer'
Function Details [hide private]

getServerID(server, fields=[])

source code 

Given a textual digitalid (old style or new style) or simply an ID try to search in the database and return the numeric id (thus doing validation in case you pass a numeric ID already)

If found, it will return a dictionary with at least an "id" member

Additional fields can be requested by passing an array of strings with field names from rhnServer check if all chars of a string are in a set

throttle(server)

source code 

throttle - limits access to free users if a throttle file exists NOTE: We don't throttle anybody. Just stub.


Variables Details [hide private]

_query_update_push_client_registration

Value:
<spacewalk.server.rhnSQL.sql_base.Statement instance at 13998081289048\
0; statement=
    update rhnPushClient
       set name = :name_in,
           shared_key = :shared_key_in,
           state_id = :state_id_in,
           next_action_time = NULL,
           last_ping_time = NULL
...

_query_insert_push_client_registration

Value:
<spacewalk.server.rhnSQL.sql_base.Statement instance at 13998081289055\
2; statement=
        insert into rhnPushClient
           (id, server_id, name, shared_key, state_id)
        values (sequence_nextval('rhn_pclient_id_seq'), :server_id_in,\
 :name_in,
            :shared_key_in, :state_id_in)

_query_delete_duplicate_client_jids

Value:
<spacewalk.server.rhnSQL.sql_base.Statement instance at 13998081289062\
4; statement=
    update rhnPushClient
       set jabber_id = null
     where jabber_id = :jid and
           server_id <> :server_id

_query_update_push_client_jid

Value:
<spacewalk.server.rhnSQL.sql_base.Statement instance at 13998081289069\
6; statement=
    update rhnPushClient
       set jabber_id = :jid,
           next_action_time = NULL,
           last_ping_time = NULL
     where server_id = :server_id