#!/usr/bin/env python
# modified once more
# $Id$
#test of mod_config 16

KB=1024L
MB=KB*KB
GB=KB*MB
TB=KB*GB
PB=KB*TB
EB=KB*PB

#dlt_rate =     5.1 * MB
lto3_rate =   27.0 * MB
null_rate =   11.5 * MB
s9940b_rate = 27.0 * MB
lto2_rate =   27.0 * MB

mvr_check_f = 100
mvr_check_1st = 0

mvr_max_failures=5
mvr_max_consecutive_failures=3
max_buf=2500*MB
min_buffer = 64*MB
vol_max_noaccess_cnt=4
blank_error_increment = 0

low_level_diag_pattern = 'st[0-9]' # pattern to look in syslog file when FTT_EIO occurs
lto3_min_buffer = 64*MB
lto3_max_buffer = 2500*MB
lto3_mvr_check_f = 10
lto3_mvr_check_1st = 0
lto2_mvr_check_f = 30

mvr_max_failures = 5
mvr_max_consecutive_failures=3
b_mvr_check_f = 30
b_mvr_check_1st = 0
legal_encp_version = 'v3_6c'
dismount_delay = 30
max_dismount_delay = 30

monitoring_and_web="d0ensrv2n.fnal.gov"
enstore_DB="d0ensrv0n.fnal.gov"
enstore_backup="d0ensrv3n.fnal.gov"
enstore_library="d0ensrv4n.fnal.gov"
enstore_pnfs="d0ensrv1n.fnal.gov"
enstore_DB_host=enstore_DB
backup_host=enstore_backup
web_server_host=monitoring_and_web
log_server_host=monitoring_and_web
alarm_server_host=monitoring_and_web
ratekeeper_host=monitoring_and_web
event_relay_host=monitoring_and_web
inquisitor_host=monitoring_and_web
DB_host=enstore_DB_host
file_clerk_host=enstore_DB_host
volume_clerk_host=enstore_DB_host
info_server_host=enstore_DB_host
accounting_server_host=enstore_DB_host
drivestat_host=enstore_DB_host

html_dir = "/srv2/enstore/www/web-pages/"
log_dir = "/srv2/enstore/enstore-log"
www_alias = "www-d0en-t"   #optional
conf_alias = "conf-d0en-t" #optional
pnfs_alias = "pnfs-d0en-t" #optional

configdict = {}

#crc_seed = 0 we will use crc_seed 1
#configdict['encp']={'crc_seed' : crc_seed }
configdict['known_config_servers'] = {'d0en'  : ('conf-d0en-t.fnal.gov',7500),
			      }

configdict['system'] = { 'allowed_down' : {'log_server' :           [1, 10],
				   'alarm_server' :         [1, 10],
				   'configuration_server' : [1, 10],
				   'file_clerk' :           [1, 10],
				   'inquisitor' :           [3, 30],
				   'volume_clerk' :         [1, 10],
				   'library_manager' :      [2, 20],
				   'accounting_server' :    [3, 20],
				   'drivestat_server' :     [3, 20],
				   'info_server' :          [3, 20],
				   'media_changer' :        [2, 10],
				   'default' :              [1, 20] }}


configdict['blocksizes'] = { 'LTO3'      : 131072,
		     'null'      : 131072,
		     '9940': 131072,
		     '9940B': 131072,
		     'LTO2'      : 131072,
		     '3480'      : 131072,
                      }

configdict['common_blank_low'] = { 'warning': 50, 'alarm': 10 }

configdict['wrappersizes'] = { 'null' : (100L*GB) - 1,
		       'cern' : long("9"*20),
		       'cpio_odc' : (8L*GB) - 1 }

configdict['database']     = {  'db_dir':'/srv0/enstore/enstore-db-backup',
			'jou_dir':'/srv0/enstore/enstore-journal',
			'db_host':enstore_DB_host,
			'dbname':'enstoredb',
			'db_port':8888,
			'dbhost': enstore_DB_host,
			'dbport': 8888,
			'dbuser': 'enstore',
			'dbserverowner': 'products',
			'dbarea':'/srv0/enstore/enstore-db'}

configdict['backup']       = {
    'host':backup_host,
    'dir':'/srv3/enstore/enstore-backup',
    'extract_dir':'/srv3/enstore/check-db-tmp',
    'backup2tape_dir':'/pnfs/eagle/d0en-backups',
    'check_db_area':'/srv3/enstore/check-database' }


configdict['domains']      = {
'invalid_domains' : [],
'valid_domains'   : ['140.221.183'],
}

#This is Fermilab specific.
configdict['service_ips'] = {
    www_alias  : {'host' : monitoring_and_web, 'interface' : "www-t"},
    pnfs_alias : {'host' : enstore_pnfs, 'interface' : "pnfs-t"},
    conf_alias : {'host' : "d0ensrv2n.fnal.gov", 'interface' : "conf-t"},
    }

configdict['crons'] = {
    'www_alias'       : www_alias, #optional
    'conf_alias'      : conf_alias, #optional
    'pnfs_alias'      : pnfs_alias, #optional
    'web_node'        : monitoring_and_web,
    'html_dir'        : html_dir,
    'log_dir'         : log_dir,
    'tmp_dir'         : "/tmp",
    'email'           : "enstore-auto@fnal.gov",
    'developer_email' : "moibenko@fnal.gov,zalokar@fnal.gov,huangch@fnal.gov,litvinse@fnal.gov",
    'backup_node'     : enstore_backup,
    'backup_dir'      : "/srv3/enstore/backups",
    'farmlets_dir'    : "/usr/local/etc/farmlets",
}

#If the following items match an enstore server's name, then a host
# specified here is not necessary.  It is taken from that servers host
# value.  If it is not a server's name, then you must put a host
# entry here.
configdict['crontabs'] = {
    'log_server'        : {'cronfiles' : ["log_server",
                                          "log_html"]},
    'log_server_fermi'  : {'cronfiles' : ["log_server.fermi.srv2"],
                           'host'      : "d0ensrv2n.fnal.gov"}, #Don't change!
    'web_server'        : {'cronfiles' : ["enstore_plots",
                                          "enstore_html",
                                          "inventory_web",
                                          "inventory.fermi",
                                          "chkcrons",  #What does it do?
                                          "tab_flipping",
                                          ],
                           'host'      : monitoring_and_web},
    'monitoring'        : {'cronfiles' : ["inventory",
                                          "copy_ran_file"],
                           'host'      : enstore_backup},
    'pnfs'              : {'cronfiles' : ["delfile",
                                          "pnfs_misc"],
                           'host'      : enstore_pnfs},
    'accounting_server' : {'cronfiles' : ["accounting_db"]},
    'drivestat_server'  : {'cronfiles' : ["drivestat_db"]},
    'file_clerk'        : {'cronfiles' : ["enstore_db"]},
    'databases'         : {'cronfiles' : ["checkdb",
                                          "backup",
                                          "backup2Tape"],
                           'host'      : enstore_backup},
    }

configdict['inventory']    = {
'inventory_dir'		: '/srv3/enstore/db-inventory',
'inventory_tmp_dir'	: '/srv3/enstore/db-inventory/tmp',
'inventory_cache_dir'	: '/srv3/enstore/db-inventory_cache',
'inventory_extract_dir'	: '/srv3/enstore/db-inventory/extract',
'inventory_rcp_dir'	        : '%s:%s/tape_inventory' % (monitoring_and_web, html_dir,),
'wpa_states'		: ["full", "readonly"],
'wpa_media_types'	        : ["LTO3"],
'wpa_excluded_libraries'	: ["null1", "disk", "test"]
}

# tape mount limits according to media type
# when mounts exceed the first number, an alarm should be generated
# when it exceeds the second number, enstore ball should be turned red
#
# ignore any media type that is not mentioned
configdict['tape_mount_limit'] = {
'LTO3':    (2000, 5000),
}

configdict['pnfs_server'] = {'host':enstore_pnfs,
                             }

configdict['web_server'] = {
'ServerHost'     : web_server_host,
'User'           : 'enstore',
'Group'          : 'enstore',
'port'           : 80,
'ServerName'     : 'www-d02en.fnal.gov',
'DocumentRoot'   : '/srv2/enstore/www/d0enn/html',
'ScoreBoardFile' : '/srv2/enstore/www/d0enn/apache_status',
'PidFile'        : '/srv2/enstore/www/d0enn/adm/httpd.pid',
'ErrorLog'       : '/srv2/enstore/www/d0enn/adm/error.log',
'CustomLog'      : {
            'combined' : '/srv2/enstore/www/d0enn/adm/access.log',
	    'referer'  : '/srv2/enstore/www/d0enn/adm/referer.log',
	    'agent'    : '/srv2/enstore/www/d0enn/adm/agent.log'
	    },
'ServerRoot'  : '/etc/httpd/' ,
'ScriptAlias' : {
             'fake' : '/cgi-bin/',
	     'real' : '/srv2/enstore/www/d0enn/cgi-bin/'
	     }
}

configdict['ratekeeper'] = {
'host'		: ratekeeper_host,		#node ratekeeper is running on
'port'		: 55511,		#port ratekeeper is running on
#'event_relay_host'	: 'gccensrv1.fnal.gov',	#node event relay is running on
'norestart'		: 'INQ',
'noupdown'		: 'efb',
'logname'		: 'RATSRV',		#logname
'dir'		: '/srv2/enstore/ratekeeper/',	#directory to write rates to
'tmp'		: '/srv2/enstore/tmp/',  #temp directory used
#'nodes'		: {},
'ps'		: '%s/*rates.ps' % (html_dir,),
'jpg'		: '%s/*rates.jpg' % (html_dir,),
'stamp'		: '%s/*rates_stamp.jpg' % (html_dir,)
}


configdict['event_relay']  = {
'host':event_relay_host,
'port':55510 }

configdict['file_clerk']   = {
'host': file_clerk_host,
'port':7501,
'logname':'FILSRV',
'norestart':'INQ',
'brand':'CDMS', }

configdict['volume_clerk'] = {
'host':volume_clerk_host,
'port':7502,
'logname':'VOLSRV',
'norestart':'INQ',
'max_noaccess_cnt' : vol_max_noaccess_cnt }

configdict['alarm_server'] = {
'host':alarm_server_host,
'port':7503,
'logname':'ALMSRV',
'norestart':'INQ', }

configdict['log_server']   = {
'host':log_server_host,
'port':7504,
'norestart':'INQ',
'msg_type_logs': {'MSG_TYPE=MC_LOAD_REQ' : 'MOUNTS-',
	      'MSG_TYPE=MC_LOAD_DONE' : 'MOUNTS-',
	      'MSG_TYPE=ENCP_XFER' : 'ENCPS-',
	      'MSG_TYPE=EVENT_RELAY' : 'EVRLY-',
	      'MSG_TYPE=ADD_TO_LMQ' : 'LMQADDS-'},
'log_file_path' : log_dir }

configdict['operation_db'] = {
'dbhost': 'stkensrv0.fnal.gov',
'dbport': 8800,
'dbname': 'operation',
'dbuser': 'enstore',
'dbserverowner': 'products'}

configdict['accounting_server'] = {
'host': accounting_server_host,
'port': 7580,
'logname': 'ACCSRV',
'norestart':'INQ',
'dbhost': accounting_server_host,
'dbport': 8800,
'dbname': 'accounting',
'dbuser': 'enstore',
'dbserverowner': 'products',
'dbarea': '/srv0/enstore/accounting-db'}

configdict['drivestat_server'] = {
'host': drivestat_host,
'port': 7590,
'logname': 'DRSSRV',
'norestart':'INQ',
'dbhost': drivestat_host,
'dbport': 8802,
'dbname': 'drivestat',
'dbuser': 'enstore',
'dbserverowner': 'products',
'dbarea': '/srv0/enstore/drivestat-db'}

configdict['info_server'] = {
'host': info_server_host,
'port': 7777,
'logname': 'INFSRV',
'norestart':'INQ',
'dbhost': info_server_host,
'dbname': 'enstoredb'}

configdict['inquisitor']   = {
    'host':inquisitor_host, 'port':7505, 'logname':'INQSRV',
    'alive_rcv_timeout': 15, 'alive_retries':1,
    'refresh' : 3600,
    'html_file':html_dir,
    'http_log_file_path':log_dir,
    'www_host':'http://%s.fnal.gov' % (www_alias),
    'max_encp_lines': 250,
    'user_log_dirs' : {'D0en Test Cluster Node Info'	: '/enstore/nodeinfo.html',
                       #'D0en Test Cluster Console Logs'	: '/enstore/CONSOLES.html',
                       #'D0en Test Cluster SDR Info'	: '/enstore/SDR.html',
                       #'D0en Test Cluster SEL Info'	: '/enstore/SEL.html',
                       #'D0en Test Internode Rates'	: '/enstore/quickcheck.eepro100.html',
                       #'D0en Test UDP Clogup Info'	: '/enstore/UDPclog.html',
                       'D0en Test Tape Drives'		: '/enstore/firmware_stat_report.d0ensrv2n.fnal.gov.html',
                       'Active Monitor Log'		: '/enstore/active_monitor.html',
                       'Network-At-A-Glance'		: '/enstore/enstore_saag_network.html',
                       'D0en Test PNFS Export List'	: '/enstore/%s_pnfsExports.html' % (www_alias,),
                       'FAILED Transfers'		: '/enstore/log/transfer_failed.txt ',
                       'Recent D0en Test log messages'	: '/enstore/log/D0en-Test-log.html ',
                       },
    'default_alive_interval': 40,
    'default_hung_interval' : 120,
    }

#Starting with encp v3 the "enstore monitor" command looks for 'monitor_server'
# instead of 'monitor'.  Need both for compatibility.  Remove 'monitor' when
# only v3 and later is allowed.
configdict['monitor_server'] = {
'html_dir'		: html_dir,
'html_gen_host'	: web_server_host,
'refresh'		: 3600,
'block_size'	: 65536,
'block_count'	: 160,
'default_timeout'	: 3 }
configdict['monitor'] = {
'html_dir'		: html_dir,
'html_gen_host'	: web_server_host,
'refresh'		: 3600,
'block_size'	: 65536,
'block_count'	: 160,
'default_timeout'	: 3 }

configdict['www_server'] = { 'system_tag' : "D0EN_N: D0 SDE TEST SYSTEM",
			     'media' : {'1' : 'GCC SL8500',
					},
			     'inq_ignore' : 1,
                             }
"""
configdict['other_saag_links'] = { 'dcache_cd'   : ['CD dCache', 'http://fndca.fnal.gov/'],
				   'dcache_cms'  : ['CMS dCache', 'http://cmsdca.fnal.gov/'],
				   'dcache_lqcd' : ['LQCD dCache', 'http://lqcddca.fnal.gov/'],
				   }
"""

configdict['null1.library_manager']     =  { 'host':enstore_library, 'port':7511,
					     'logname':'NULLBM',
					     'norestart':'INQ',
					     'noupdown':'jon',
					     'inq_ignore':'jon',
					     'max_encp_retries':3,
					     'max_file_size':(8L*GB) - 1,
					     'suspect_volume_expiration_time':2,
					     'legal_encp_version':'v3_3',
                                             'allow': {'NULL00':['d0ensrv*'],
                                                       },
					     }

'''
configdict['LTO3.library_manager']      =  { 'host':enstore_library, 'port':7515,
					     'logname':'LTO3_T',
					     'norestart':'INQ',
					     'noupdown':'AM',
					     'max_encp_retries':3,
					     'max_suspect_movers':3,
					     'max_file_size':(400L*GB) - 1,
					     'min_file_size':300*MB,
					     'suspect_volume_expiration_time':3600*24,
					     'legal_encp_version':'v3_3',
					     'storage_group_limits':{'cms' : 3,
								     },
					     'CleanTapeVolumeFamily': 'CLEAN.CleanTapeFileFamily.noWrapper',
                                             'blank_error_increment':blank_error_increment,
					     }
'''
configdict['D0-9940B.library_manager'] = { 'host':'d0ensrv4n',
					   'port':7522,
					   'logname':'9940BLM',
					   'max_encp_retries':3,
					   'max_file_size':(200L*GB) - 1,
					   'min_file_size':100*MB,
					   'suspect_volume_expiration_time':3600*24,
					   'legal_encp_version':legal_encp_version,}

configdict['null1.media_changer']    = { 'host':enstore_library, 'port':7520, 'logname':'NUL1MC',
					 'type':'RDD_MediaLoader', 'norestart':'INQ',
					 'noupdown':'jon', 'inq_ignore':'jon', }

'''
configdict['SL8500n.media_changer']      = { 'host':enstore_library, 'port':7575,
                                             'logname':'SL8500MC ',
                                             'type':'STK_MediaLoader',
                                             'norestart':'INQ',
                                             'acls_host':'fntt-gcc',
                                             'acls_uname':'acsss',
                                             'DriveCleanTime':{'LTO3':[60,1],},
					 }
'''
configdict['stk.media_changer']      = {
    'host':'d0ensrv4n',
    'port':7525,
    'logname':'STKMC ',
    'type':'STK_MediaLoader',
    'norestart':'INQ',
    'max_work':4,			# d0en and stken have to share fntt
    'acls_host':'fntt',
    'acls_uname':'acsss',
    'DriveCleanTime':{'9940':[60,1],
                      '9940B':[60,1]},
    'tape_library':"D0 PowderHorn 9310",
    }

configdict['null02.mover'] = { 'host':'d0ensrv1n',
			       'data_ip':'d0ensrv1n',
			       'port':7538,
			       'logname':'NUL02MV',
			       'norestart':'INQ',
			       'noupdown':'efb',
			       'inq_ignore' : 'jon',
			       'max_buffer':max_buf,
			       'library':'null1.library_manager',
			       'device':'/dev/null',
			       'driver':'NullDriver',
			       'mc_device':'-1',
			       'media_changer':'null1.media_changer',
			       'update_interval':2,
			       }

configdict['null12.mover'] = { 'host':'d0ensrv1n',
			       'data_ip':'d0ensrv1n.fnal.gov',
			       'port':7539,
			       'logname':'NUL12MV',
			       'norestart':'INQ',
			       'noupdown':'efb',
			       'inq_ignore' : 'jon',
			       'max_buffer':350*MB,
			       'library':'null1.library_manager',
			       'device':'/dev/null',
			       'driver':'NullDriver',
			       'mc_device':'-1',
			       'media_changer':'null1.media_changer',
			       'update_interval':2
			       }

configdict['9940B28.mover'] = { 'host':'d0enmvr28a',
				'data_ip':'d0enmvr28a',
				'port':7615,
				'logname':'DBT28MV',
				'statistics_path': '/tmp/enstore/enstore/DBT28MV.stat',
				'norestart':'INQ',
				'max_consecutive_failures': mvr_max_consecutive_failures,
				'max_failures': mvr_max_failures,
				'compression':0,
				'check_written_file': b_mvr_check_f,
				#'max_buffer':1300*MB,
				'max_buffer':1000*MB,
				'max_rate': s9940b_rate,
				'mount_delay':15,
				'max_dismount_delay':max_dismount_delay,
				'dismount_delay':dismount_delay,
				'update_interval':5,
				#'library':'D0-9940B.library_manager',
				'library':'D0-9940B.library_manager',
				'device':'/dev/rmt/tps2d0n',
				'driver':'FTTDriver',
				'mc_device':'1,0,10,10',
				'media_changer':'stk.media_changer',
				'do_cleaning':'No',
				'syslog_entry':low_level_diag_pattern,
				'send_stats':1,
				}

configdict['samlto2.library_manager']  = { 'host':'d0ensrv4n', 'port':7513,
					   'logname':'LTO2LBM',
					   'max_encp_retries':3,
					   'norestart':'INQ',
					   'max_file_size':(200L*GB) - 1,
					   'min_file_size':100*MB,
					   'CleanTapeVolumeFamily': 'EnsV1.CleanTapeFileFamily.noWrapper',
					   'suspect_volume_expiration_time':3600*24,
					   'legal_encp_version':legal_encp_version,}
configdict['aml2.media_changer']     = {
    'host':'d0ensrv4n',
    'port':7523,
    'logname':'AML2MC',
    'type':'AML2_MediaLoader',
    'norestart':'INQ',
    'RobotArm':'Both',
    'IdleTimeHome':30000000,
    'DriveCleanTime':{'DE':[60,1],
                      'DC':[60,1],
                      'DM':[60,1],
                      'D3':[120,2]},
    'IOBoxMedia':{'ACI_8MM':['E01','E08'],
                  'ACI_LTO':['E03','E05','E06'],
                  'ACI_DECDLT':['E02','E04','E07']},
    'tape_library':"D0 AML/2",
    }





configdict['D41GLTO.mover'] = {	'host': 'd0enmvr58a',
				'data_ip':'d0enmvr58a',
				'port': 7658,
				'logname': 'D41GMV',
				'statistics_path': '/tmp/enstore/enstore/D41GLTO.stat',
				'max_consecutive_failures': mvr_max_consecutive_failures,
				'max_failures': mvr_max_failures,
				'compression':0,
				'check_written_file': lto2_mvr_check_f,
				'max_buffer' : 1300*MB,
				'max_rate':lto2_rate,
				'mount_delay':30,
				'max_dismount_delay':max_dismount_delay,
				'dismount_delay':dismount_delay,
				'update_interval':5,
				'library': 'samlto2.library_manager',
				'device' : '/dev/rmt/tps0d1n',
				'driver' : 'FTTDriver',
				'mc_device':'D41G',
				'media_changer':'aml2.media_changer',
				'syslog_entry':low_level_diag_pattern,
				'do_cleaning':'No',
				'norestart':'INQ',
				'send_stats':1,
				}

'''
configdict['LTO3_21.mover'] = { 'host':'stkenmvr121a', 'data_ip':'stkenmvr121a', 'port':7821, 'logname':'LTO21MV',
				'statistics_path':'/tmp/enstore/enstore/LTO3_21.stat',
				'norestart':'INQ',
				'max_consecutive_failures': mvr_max_consecutive_failures,
				'max_failures': mvr_max_failures,'compression':0,
				'check_written_file': lto3_mvr_check_f,
				'check_first_written_file':lto3_mvr_check_1st,
				'max_buffer':lto3_max_buffer,
				'max_rate': lto3_rate,
				'mount_delay':15,
				'update_interval':5,
				'library':'LTO3.library_manager',
				'device':'/dev/rmt/tps2d0n', 'driver':'FTTDriver',
				'mc_device':'0,3,1,3', 'media_changer':'SL8500.media_changer', 'do_cleaning':'No',
				'syslog_entry':low_level_diag_pattern,
				'max_time_in_state':1200,
				'send_stats':1,
				}
'''
# disk configuration
configdict['disk.library_manager'] = {
   'host':'d0ensrv4n',
   'port':7512,
   'logname':'DISKLM',
   'norestart':'INQ',
   'compression':0,
   'max_file_size':(2L*GB) - 1,
   }


configdict['disk1.mover'] = {
   'device':'/srv2/data/d1',
   'type':'DiskMover',
   'host':'d0ensrv2n',
   'ip_map':'d0ensrv2n', #disk mover only
   'port':7531,
   'library':['disk.library_manager',] ,
   'driver':'DiskDriver',
   'mc_device':'1',
   'logname':'DSK1MV',
   'update_interval':5,
   }

configdict['disk2.mover'] = {
   'device':'/srv2/data/d2',
   'type':'DiskMover',
   'host':'d0ensrv2n',
   'ip_map':'d0ensrv2n', #disk mover only
   'port':7532,
   'library':['disk.library_manager',] ,
   'driver':'DiskDriver',
   'mc_device':'1',
   'logname':'DSK2MV',
   'update_interval':5,
   }
'''
configdict['disk3.mover'] = {
   'device':'/srv2/data/d3',
   'type':'DiskMover',
   'host':'d0ensrv2n',
   'ip_map':'d0ensrv2n', #disk mover only
   'port':7533,
   'library':['disk.library_manager',] ,
   'driver':'DiskDriver',
   'mc_device':'1',
   'logname':'DSK3MV',
   'update_interval':5,
   }

configdict['disk4.mover'] = {
   'device':'/srv2/data/d3',
   'type':'DiskMover',
   'host':'d0ensrv2n',
   'ip_map':'d0ensrv2n', #disk mover only
   'port':7534,
   'library':['disk.library_manager',] ,
   'driver':'DiskDriver',
   'mc_device':'1',
   'logname':'DSK4MV',
   'update_interval':5,
   }
configdict['disk5.mover'] = {
   'device':'/srv2/data/d3',
   'type':'DiskMover',
   'host':'d0ensrv2n',
   'ip_map':'d0ensrv2n', #disk mover only
   'port':7535,
   'library':['disk.library_manager',] ,
   'driver':'DiskDriver',
   'mc_device':'1',
   'logname':'DSK5MV',
   'update_interval':5,
   }


configdict['disk6.mover'] = {
   'device':'/srv2/data/d3',
   'type':'DiskMover',
   'host':'d0ensrv2n',
   'ip_map':'d0ensrv2n', #disk mover only
   'port':7536,
   'library':['disk.library_manager',] ,
   'driver':'DiskDriver',
   'mc_device':'1',
   'logname':'DSK6MV',
   'update_interval':5,
   }

configdict['disk7.mover'] = {
   'device':'/srv2/data/d3',
   'type':'DiskMover',
   'host':'d0ensrv2n',
   'ip_map':'d0ensrv2n', #disk mover only
   'port':7537,
   'library':['disk.library_manager',] ,
   'driver':'DiskDriver',
   'mc_device':'1',
   'logname':'DSK7MV',
   'update_interval':5,
   }

configdict['disk8.mover'] = {
   'device':'/srv2/data/d3',
   'type':'DiskMover',
   'host':'d0ensrv2n',
   'ip_map':'d0ensrv2n', #disk mover only
   'port':7538,
   'library':['disk.library_manager',] ,
   'driver':'DiskDriver',
   'mc_device':'1',
   'logname':'DSK8MV',
   'update_interval':5,
   }

configdict['disk9.mover'] = {
   'device':'/srv2/data/d3',
   'type':'DiskMover',
   'host':'d0ensrv2n',
   'ip_map':'d0ensrv2n', #disk mover only
   'port':7539,
   'library':['disk.library_manager',] ,
   'driver':'DiskDriver',
   'mc_device':'1',
   'logname':'DSK9MV',
   'update_interval':5,
   }

configdict['disk10.mover'] = {
   'device':'/srv2/data/d3',
   'type':'DiskMover',
   'host':'d0ensrv2n',
   'ip_map':'d0ensrv2n', #disk mover only
   'port':7540,
   'library':['disk.library_manager',] ,
   'driver':'DiskDriver',
   'mc_device':'1',
   'logname':'DSK10MV',
   'update_interval':5,
   }
'''



"""

priority: OPTIONAL. If present specifies the request priority settings for a
Library Manager based on the ticket keys and regular expressions. For details
please contact developer or look in the priority.py code.

----------------------------------------------------------------
discipline: OPTIONAL. If present specifies the restictions set for the request
for a Library Manager based on the ticket keys and regular expressions. For
details please contact developer or look in the discipline.py code.

----------------------------------------------------------------
LIBRARY MANAGER KEYS

host (string) REQUIRED

port (int) REQUIRED

logname (string) OPTIONAL - defaults to mover name

startup_delay: (int) OPTIONAL Time during which LM ignores mover requests after startup.
	       Default 32

min_file_size: (int or long) OPTIONAL. Minimal file size when requesting volume clerk for
	       the volume to write to. Default 0L

max_file_size: (int or long) OPTIONAL. Maximal file size allowed for the media served by
	       this LM. Default 2*GB - 2*KB

legal_encp_version: (string) OPTIONAL. the oldest allowed encp version. All others will be rejected.
		    Default ''

suspect_volume_expiration_time: (int) OPTIONAL. Time after which becomes cleared.
				Default None

rq_wait_time: (int) OPTIONAL. Recreate postponed request list after this time expires.
	      Default 3600 s

CleanTapeVolumeFamily: (string) OPTIONAL volume family for the cleaning tape. Used by Media Changer.
		       No default

storage_group_limits: minimal amount of drives that can be used by a certain storage group (fair share)
		      when different storage groups compete for tape drives.

-------------------------------------------------------------------

MOVER KEYS

These are all the keys that the mover cares about:

host (string) REQUIRED

port (int) REQUIRED

logname (string) OPTIONAL - defaults to mover name

do_eject (string) OPTIONAL - defaults to 'yes', override by setting
		  "no" or "No" (or anything starting with N or n)

do_cleaning (string) OPTIONAL - defaults to 'yes', override by setting
		     "no" or "No" (or anything starting with N or n)
		     This only controls automatic cleaning.  enstore mov --clean-drive
		     will always work, whether this is set or not.

mc_device (string) not needed for NULL movers; required otherwise

min_buffer (int)  OPTIONAL minimum amount of memory to allocate for
		  buffering - defaults to 8MB

max_buffer (int)  OPTIONAL maximum amount of memory to allocate for
		  buffering - defaults to 64MB

max_rate (float) OPTIONAL maximum sustained transfer rate for writes
		 This is used to calculate optimal buffer size.  It does not need to
		 be exact.

device (string) REQUIRED pathname to the UNIX tape device
		for NULL movers make this /dev/null

dismount_delay (int) OPTIONAL delayed dismount value to use when none
		     specified by the client. Default is 60 seconds.
		     Set to negative value to get "infinite" dismount
		     delay.

mount_delay (int) OPTIONAL number of seconds to wait after media
		  changer mount completes, before trying to open
		  device. Default is 15 for FTT driver, 0 for NULL
		  driver

max_dismount_delay: (int s) OPTIONAL maximal dismount delay that can be set for this mover.
			    Default 600 seconds

library (string or list):  REQUIRED.  Who are we working for?  One or
			   more library manager names.

driver (string): REQUIRED.  Currently must be 'FTTDriver' or
		 'NullDriver', or else mover will complain at startup.
		 If we need a disk mover, this would be easy to hack
		 together; doesn't seem too useful though.

max_consecutive_failures: type int, default 2
			  Mover will declare itself "broken" if this
			  many successive transfers fail, and the
			  error was not ENCP_GONE

max_failures: type int, default 3
	      Mover will declare itself "broken" if this many
	      transfers fail within failure_interval (see below).
	      Again, ENCP_GONE errors do not count

failure_interval: type int, default 3600 (one hour)
		  Interval for above.

send_stats: OPTIONAL if present (can be set to 1) send drive statistics to the drivestat Data Base

type: (string) OPTIONAL type of the mover ('','Mover','DiskMover') specifies the type of mover

ip_map: (string) OPTIONAL ip map of the mover node. Used only in Disk Mover to create a volume name

media_type: (string) OPTIONAL media type used for the mover

log_state: (int) OPTIONAL if set log the state of the mover processes

syslog_entry: (string) OPTIONAL expression to match in the syslog for the low level failure diagnostics

restart_on_error: (int) restart mover if it went to the ERROR state. Default - not restart

connect_timeout (sec) TO for mover connection to encp. Default - 15 s

connect_retries (int) number of connect retries. Default 4

update_interval: (int s) OPTIONAL interval for the mover to ask LM for the work. Default 15 s

single_filemark: (int) OPTIONAL if not 0 write single file mark. Default 0 - write 2 fm

check_written_file: (int) OPTIONAL if more than 0 randomly check written file using randomization of
			  this number. Default 0 - no check. 1 - check every written file.

max_time_in_state: (int s) OPTIONAL time in state after which alarm will be raised. Default 600 s

max_in_state_cnt: (int) OPTIONAL if this counter expires Mover errors out with Mover stuck message.
			Default 3

statistics_path: (string): OPTIONAL. If specified write the last statistics to the file statistics_path.
			   Default None

compression: (int) OPTIONAL 0 means no compression. Everything else means use the drive compression.
		   Default None - use the drive compression

get_remaining_from_stats (optional) : get remaining bytes info from drive

"""
