<s> """<STR_LIT>""" <EOL> import Bcfg2 . Server . Plugin <EOL> class ServiceCompat ( Bcfg2 . Server . Plugin . Plugin , <EOL> Bcfg2 . Server . Plugin . GoalValidator ) : <EOL> """<STR_LIT>""" <EOL> create = False <EOL> __author__ = '<STR_LIT>' <EOL> mode_map = { ( '<STR_LIT:true>' , '<STR_LIT:true>' ) : '<STR_LIT:default>' , <EOL> ( '<STR_LIT>' , '<STR_LIT:true>' ) : '<STR_LIT>' , <EOL> ( '<STR_LIT:false>' , '<STR_LIT:false>' ) : '<STR_LIT>' } <EOL> def validate_goals ( self , metadata , config ) : <EOL> """<STR_LIT>""" <EOL> if metadata . version_info and metadata . version_info >= ( <NUM_LIT:1> , <NUM_LIT:3> , <NUM_LIT:0> , '<STR_LIT>' , <NUM_LIT:0> ) : <EOL> return <EOL> for entry in config . xpath ( "<STR_LIT>" ) : <EOL> mode_key = ( entry . get ( "<STR_LIT>" , "<STR_LIT:true>" ) . lower ( ) , <EOL> entry . get ( "<STR_LIT>" , "<STR_LIT:true>" ) . lower ( ) ) <EOL> try : <EOL> mode = self . mode_map [ mode_key ] <EOL> except KeyError : <EOL> self . logger . info ( "<STR_LIT>" <EOL> "<STR_LIT>" <EOL> "<STR_LIT>" % <EOL> ( entry . tag , entry . get ( "<STR_LIT:name>" ) , <EOL> metadata . hostname ) ) <EOL> mode = "<STR_LIT>" <EOL> entry . set ( "<STR_LIT>" , mode ) </s>
