<s> '''<STR_LIT>''' <EOL> import socket <EOL> class PoolManagerError ( Exception ) : <EOL> '''<STR_LIT>''' <EOL> class PoolNotFoundError ( PoolManagerError ) : <EOL> '''<STR_LIT>''' <EOL> def __init__ ( self , poolName ) : <EOL> PoolManagerError . __init__ ( self , poolName ) <EOL> self . poolName = poolName <EOL> class ComputerNotFoundError ( PoolManagerError ) : <EOL> '''<STR_LIT>''' <EOL> def __init__ ( self , computerName ) : <EOL> PoolManagerError . __init__ ( self , computerName ) <EOL> self . computerName = computerName <EOL> class PoolDescription ( ) : <EOL> def __init__ ( self , id , name , version ) : <EOL> '''<STR_LIT>''' <EOL> self . id = id <EOL> self . name = name <EOL> self . version = version <EOL> class ComputerDescription ( object ) : <EOL> _name = None <EOL> def getName ( self ) : <EOL> return self . _name <EOL> def setName ( self , name ) : <EOL> self . _name = socket . getfqdn ( name ) <EOL> name = property ( getName , setName ) <EOL> def __init__ ( self , id , name , version , pools , cpucount , cpufreq , cpucores , ramsize , port , properties ) : <EOL> '''<STR_LIT>''' <EOL> self . id = id <EOL> self . name = name <EOL> self . version = version <EOL> self . pools = list ( pools ) <EOL> self . cpucount = cpucount <EOL> self . cpufreq = cpufreq <EOL> self . cpucores = cpucores <EOL> self . ramsize = ramsize <EOL> self . port = port <EOL> self . properties = properties <EOL> class IPoolManager ( ) : <EOL> '''<STR_LIT>''' <EOL> def getPool ( self , poolName ) : <EOL> '''<STR_LIT>''' <EOL> raise PoolNotFoundError ( poolName ) <EOL> def listPools ( self ) : <EOL> '''<STR_LIT>''' <EOL> return [ ] <EOL> def getComputer ( self , computerName ) : <EOL> '''<STR_LIT>''' <EOL> raise ComputerNotFoundError ( computerName ) <EOL> def listComputers ( self ) : <EOL> '''<STR_LIT>''' <EOL> return [ ] <EOL> def listComputersForPool ( self , poolName ) : <EOL> '''<STR_LIT>''' <EOL> raise PoolNotFoundError ( poolName ) <EOL> def setComputerWorkingFlag ( self , computer , workingFlag ) : <EOL> '''<STR_LIT>''' <EOL> raise ComputerNotFoundError ( computer ) </s>
