[pkg-eucalyptus-commits] [SCM] managing cloud instances for Eucalyptus branch, master, updated. 3.0.0-alpha3-257-g1da8e3a

Garrett Holmstrom gholms at fedoraproject.org
Sun Jun 16 02:31:18 UTC 2013


The following commit has been merged in the master branch:
commit 2569f1848c616f378ff4221bf77d114cd9d33feb
Author: Garrett Holmstrom <gholms at fedoraproject.org>
Date:   Tue May 7 15:17:55 2013 -0700

    Add "ec2-default-keypair" region config option
    
    Fixes TOOLS-178

diff --git a/euca2ools/commands/euca/runinstances.py b/euca2ools/commands/euca/runinstances.py
index 7867215..7031f8d 100644
--- a/euca2ools/commands/euca/runinstances.py
+++ b/euca2ools/commands/euca/runinstances.py
@@ -164,6 +164,14 @@ class RunInstances(EucalyptusRequest):
                 self.params['UserData'] = base64.b64encode(
                     user_data_file.read())
 
+        if self.args.get('KeyName') is None:
+            default_key_name = self.config.get_region_option(
+                'ec2-default-keypair')
+            if default_key_name:
+                self.log.info("using default key pair '%s'", default_key_name)
+                self.params['KeyName'] = default_key_name
+
+
     def preprocess(self):
         counts = self.args['count'].split('-')
         if len(counts) == 1:

-- 
managing cloud instances for Eucalyptus



More information about the pkg-eucalyptus-commits mailing list