#
# CostModule
#
cm set debug off
cm set update on
cm set magic on

#
# PoolManager Selection Unit
#
psu set allpoolsactive off


#
# The units ...
#
psu create unit -net    0.0.0.0/0.0.0.0
psu create unit -protocol */*
psu create unit -store  *@*
psu create unit -store  ch_ops:OPS@osm
psu create unit -store  ch_ops:OPS-disk-only@osm
psu create unit -store  ch_dteam:DTEAM@osm
psu create unit -store  ch_dteam:DTEAM-disk-only@osm


#
# The unit Groups ...
#
psu create ugroup world-net
psu addto ugroup world-net 0.0.0.0/0.0.0.0
psu create ugroup shared-disk-only-store
psu addto ugroup shared-disk-only-store *@*
psu addto ugroup shared-disk-only-store ch_ops:OPS-disk-only@osm
psu addto ugroup shared-disk-only-store ch_dteam:DTEAM-disk-only@osm
psu create ugroup shared-tape-store
psu addto ugroup shared-tape-store ch_ops:OPS@osm
psu addto ugroup shared-tape-store ch_dteam:DTEAM@osm


#
# The pools ...
#
psu create pool f01-151-104-e_1sT_shared
psu create pool f01-151-104-e_2wT_shared
psu create pool f01-151-104-e_3rT_shared
psu create pool f01-151-104-e_4D_shared


#
# The pool groups ...
#
psu create pgroup all-pools
psu addto pgroup all-pools f01-151-104-e_1sT_shared
psu addto pgroup all-pools f01-151-104-e_2wT_shared
psu addto pgroup all-pools f01-151-104-e_3rT_shared
psu addto pgroup all-pools f01-151-104-e_4D_shared

psu create pgroup all-tape-pools
psu addto pgroup all-tape-pools f01-151-104-e_1sT_shared
psu addto pgroup all-tape-pools f01-151-104-e_2wT_shared

psu create pgroup p2pClient-pools
psu addto pgroup p2pClient-pools f01-151-104-e_3rT_shared


psu create pgroup shared-disk-only-pools
psu addto pgroup shared-disk-only-pools f01-151-104-e_4D_shared

psu create pgroup shared-write-tape-pools
psu addto pgroup shared-write-tape-pools f01-151-104-e_2wT_shared

psu create pgroup shared-read-tape-pools
psu addto pgroup shared-read-tape-pools f01-151-104-e_3rT_shared

psu create pgroup shared-stage-pools
psu addto pgroup shared-stage-pools f01-151-104-e_1sT_shared

psu create pgroup shared-prime-stage-pools
psu addto pgroup shared-prime-stage-pools f01-151-104-e_1sT_shared

psu create pgroup shared-fallback-stage-pools


#
# The links ...
#

psu create link shared-disk-only-link shared-disk-only-store
psu set link shared-disk-only-link -readpref=40 -writepref=40 -cachepref=0 -p2ppref=1
psu add link shared-disk-only-link shared-disk-only-pools

psu create link shared-write-tape-link shared-tape-store
psu set link shared-write-tape-link -readpref=0 -writepref=40 -cachepref=0 -p2ppref=0
psu add link shared-write-tape-link shared-write-tape-pools

psu create link shared-read-tape-link shared-tape-store
psu set link shared-read-tape-link -readpref=40 -writepref=0 -cachepref=0 -p2ppref=-1
psu add link shared-read-tape-link shared-read-tape-pools

psu create link shared-prime-stage-link shared-tape-store
psu set link shared-prime-stage-link -readpref=0 -writepref=0 -cachepref=70 -p2ppref=0
psu add link shared-prime-stage-link shared-prime-stage-pools

psu create link shared-fallback-stage-link shared-tape-store
psu set link shared-fallback-stage-link -readpref=0 -writepref=0 -cachepref=50 -p2ppref=0
psu add link shared-fallback-stage-link shared-fallback-stage-pools


#
# The link Groups ...
#
psu create linkGroup shared-tape-linkGroup
psu set linkGroup custodialAllowed shared-tape-linkGroup true
psu set linkGroup replicaAllowed shared-tape-linkGroup false
psu set linkGroup nearlineAllowed shared-tape-linkGroup true
psu set linkGroup outputAllowed shared-tape-linkGroup true
psu set linkGroup onlineAllowed shared-tape-linkGroup false
psu addto linkGroup shared-tape-linkGroup shared-write-tape-link

psu create linkGroup shared-disk-only-linkGroup
psu set linkGroup custodialAllowed shared-disk-only-linkGroup false
psu set linkGroup replicaAllowed shared-disk-only-linkGroup true
psu set linkGroup nearlineAllowed shared-disk-only-linkGroup false
psu set linkGroup outputAllowed shared-disk-only-linkGroup false
psu set linkGroup onlineAllowed shared-disk-only-linkGroup true
psu addto linkGroup shared-disk-only-linkGroup shared-disk-only-link


#
# RequestContainer
#
rc onerror suspend
rc set max retries 100
rc set retry 3600
rc set poolpingtimer 600
rc set max restore unlimited
rc set max threads 2147483647


#
# PartitionManager
#
pm set default -stage-allowed=yes -p2p-fortransfer=yes
