------------------------------------------------------------ revno: 82 committer: Soren Hansen branch nick: one-1.2.hostspecificec2 timestamp: Fri 2009-02-13 11:53:46 +0100 message: Optionally look for an EC2: attribute in the EC2 driver. This should make it possible to specify different AMI's depending on whether you're deploying to Amazon's EC2 or a local Eucalyptus cloud. === modified file 'src/vmm/EC2Driver.cc' --- src/vmm/EC2Driver.cc 2009-01-22 16:37:36 +0000 +++ src/vmm/EC2Driver.cc 2009-02-13 10:53:46 +0000 @@ -33,6 +33,7 @@ string elasticip = ""; string a_ports = ""; string itype = ""; + string attrname = ""; // ------------------------------------------------------------------------- @@ -45,9 +46,14 @@ // ------------------------------------------------------------------------- - if ( vm->get_template_attribute("EC2",attrs) == 0 ) + attrname = "EC2:" + vm->get_hostname(); + + if ( vm->get_template_attribute(attrname,attrs) == 0 ) { - goto error_ec2; + if ( vm->get_template_attribute("EC2",attrs) == 0 ) + { + goto error_ec2; + } } ec2 = static_cast(attrs[0]);