<s> from agents . ec2_agent import EC2Agent <EOL> from agents . euca_agent import EucalyptusAgent <EOL> from agents . gce_agent import GCEAgent <EOL> from agents . openstack_agent import OpenStackAgent <EOL> __author__ = '<STR_LIT>' <EOL> __email__ = '<STR_LIT>' <EOL> class InfrastructureAgentFactory : <EOL> """<STR_LIT>""" <EOL> agents = { <EOL> '<STR_LIT>' : EC2Agent , <EOL> '<STR_LIT>' : EucalyptusAgent , <EOL> '<STR_LIT>' : GCEAgent , <EOL> '<STR_LIT>' : OpenStackAgent <EOL> } <EOL> def create_agent ( self , infrastructure ) : <EOL> """<STR_LIT>""" <EOL> if self . agents . has_key ( infrastructure ) : <EOL> return self . agents [ infrastructure ] ( ) <EOL> else : <EOL> raise NameError ( '<STR_LIT>' + infrastructure ) </s>
