28887f25a46f_create_queue_tables Namespace Reference


Functions

def downgrade
def upgrade

Variables

string down_revision = '21e526ad3040'
string QUEUE_AUTOPAUSE_NAME = 'queue_autopause_values'
list QUEUE_AUTOPAUSE_VALUES = ['yes', 'no', 'all']
string QUEUE_STRATEGY_NAME = 'queue_strategy_values'
list QUEUE_STRATEGY_VALUES
string revision = '28887f25a46f'
string YESNO_NAME = 'yesno_values'
list YESNO_VALUES = ['yes', 'no']


Function Documentation

def 28887f25a46f_create_queue_tables::downgrade (  ) 

Definition at line 131 of file 28887f25a46f_create_queue_tables.py.

00131                :
00132     ########################## drop tables ###########################
00133 
00134     op.drop_table('queues')
00135     op.drop_table('queue_members')
00136 
00137     ########################## drop enums ############################
00138 
00139     sa.Enum(name=QUEUE_STRATEGY_NAME).drop(op.get_bind(), checkfirst=False)
00140     sa.Enum(name=QUEUE_AUTOPAUSE_NAME).drop(op.get_bind(), checkfirst=False)
00141 

def 28887f25a46f_create_queue_tables::upgrade (  ) 

Definition at line 48 of file 28887f25a46f_create_queue_tables.py.

00048              :
00049     ############################# Enums ##############################
00050 
00051     # yesno_values have already been created, so use postgres enum object
00052     # type to get around "already created" issue - works okay with mysql
00053     yesno_values = ENUM(*YESNO_VALUES, name=YESNO_NAME, create_type=False)
00054 
00055     queue_strategy_values = sa.Enum(*QUEUE_STRATEGY_VALUES, name=QUEUE_STRATEGY_NAME)
00056     queue_autopause_values = sa.Enum(*QUEUE_AUTOPAUSE_VALUES, name=QUEUE_AUTOPAUSE_NAME)
00057 
00058     ######################### create tables ##########################
00059 
00060     op.create_table(
00061         'queues',
00062         sa.Column('name', sa.String(128), primary_key=True, nullable=False),
00063         sa.Column('musiconhold', sa.String(128)),
00064         sa.Column('announce', sa.String(128)),
00065         sa.Column('context', sa.String(128)),
00066         sa.Column('timeout', sa.Integer),
00067         sa.Column('ringinuse', yesno_values),
00068         sa.Column('setinterfacevar', yesno_values),
00069         sa.Column('setqueuevar', yesno_values),
00070         sa.Column('setqueueentryvar', yesno_values),
00071         sa.Column('monitor_format', sa.String(8)),
00072         sa.Column('membermacro', sa.String(512)),
00073         sa.Column('membergosub', sa.String(512)),
00074         sa.Column('queue_youarenext', sa.String(128)),
00075         sa.Column('queue_thereare', sa.String(128)),
00076         sa.Column('queue_callswaiting', sa.String(128)),
00077         sa.Column('queue_quantity1', sa.String(128)),
00078         sa.Column('queue_quantity2', sa.String(128)),
00079         sa.Column('queue_holdtime', sa.String(128)),
00080         sa.Column('queue_minutes', sa.String(128)),
00081         sa.Column('queue_minute', sa.String(128)),
00082         sa.Column('queue_seconds', sa.String(128)),
00083         sa.Column('queue_thankyou', sa.String(128)),
00084         sa.Column('queue_callerannounce', sa.String(128)),
00085         sa.Column('queue_reporthold', sa.String(128)),
00086         sa.Column('announce_frequency', sa.Integer),
00087         sa.Column('announce_to_first_user', yesno_values),
00088         sa.Column('min_announce_frequency', sa.Integer),
00089         sa.Column('announce_round_seconds', sa.Integer),
00090         sa.Column('announce_holdtime', sa.String(128)),
00091         sa.Column('announce_position', sa.String(128)),
00092         sa.Column('announce_position_limit', sa.Integer),
00093         sa.Column('periodic_announce', sa.String(50)),
00094         sa.Column('periodic_announce_frequency', sa.Integer),
00095         sa.Column('relative_periodic_announce', yesno_values),
00096         sa.Column('random_periodic_announce', yesno_values),
00097         sa.Column('retry', sa.Integer),
00098         sa.Column('wrapuptime', sa.Integer),
00099         sa.Column('penaltymemberslimit', sa.Integer),
00100         sa.Column('autofill', yesno_values),
00101         sa.Column('monitor_type', sa.String(128)),
00102         sa.Column('autopause', queue_autopause_values),
00103         sa.Column('autopausedelay', sa.Integer),
00104         sa.Column('autopausebusy', yesno_values),
00105         sa.Column('autopauseunavail', yesno_values),
00106         sa.Column('maxlen', sa.Integer),
00107         sa.Column('servicelevel', sa.Integer),
00108         sa.Column('strategy', queue_strategy_values),
00109         sa.Column('joinempty', sa.String(128)),
00110         sa.Column('leavewhenempty', sa.String(128)),
00111         sa.Column('reportholdtime', yesno_values),
00112         sa.Column('memberdelay', sa.Integer),
00113         sa.Column('weight', sa.Integer),
00114         sa.Column('timeoutrestart', yesno_values),
00115         sa.Column('defaultrule', sa.String(128)),
00116         sa.Column('timeoutpriority', sa.String(128))
00117     )
00118 
00119     op.create_table(
00120         'queue_members',
00121         sa.Column('queue_name', sa.String(80), primary_key=True, nullable=False),
00122         sa.Column('interface', sa.String(80), primary_key=True, nullable=False),
00123         sa.Column('uniqueid', sa.String(80), nullable=False),
00124         sa.Column('membername', sa.String(80)),
00125         sa.Column('state_interface', sa.String(80)),
00126         sa.Column('penalty', sa.Integer),
00127         sa.Column('paused', sa.Integer)
00128     )
00129 
00130 
def downgrade():


Variable Documentation

string down_revision = '21e526ad3040'

Definition at line 29 of file 28887f25a46f_create_queue_tables.py.

string QUEUE_AUTOPAUSE_NAME = 'queue_autopause_values'

Definition at line 44 of file 28887f25a46f_create_queue_tables.py.

list QUEUE_AUTOPAUSE_VALUES = ['yes', 'no', 'all']

Definition at line 45 of file 28887f25a46f_create_queue_tables.py.

string QUEUE_STRATEGY_NAME = 'queue_strategy_values'

Definition at line 40 of file 28887f25a46f_create_queue_tables.py.

Initial value:

[ 'ringall', 'leastrecent', 'fewestcalls', 'random', 'rrmemory',
    'linear', 'wrandom', 'rrordered', ]

Definition at line 41 of file 28887f25a46f_create_queue_tables.py.

string revision = '28887f25a46f'

Definition at line 28 of file 28887f25a46f_create_queue_tables.py.

string YESNO_NAME = 'yesno_values'

Definition at line 37 of file 28887f25a46f_create_queue_tables.py.

list YESNO_VALUES = ['yes', 'no']

Definition at line 38 of file 28887f25a46f_create_queue_tables.py.


Generated on Thu Apr 16 06:41:37 2015 for Asterisk - The Open Source Telephony Project by  doxygen 1.5.6