diff options
| author | Jenkins <jenkins@review.openstack.org> | 2012-07-20 20:01:46 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2012-07-20 20:01:46 +0000 |
| commit | 45205734d31c8b281056a44c236a64af343efb70 (patch) | |
| tree | 65b8c6cbae7095e62d284926e09dd1493a8ef338 /nova/cloudpipe | |
| parent | a8e16cfd8886e09493f23f72022756209060f8a0 (diff) | |
| parent | 8b7765276951f4a2a6a80df3bce7c12e64cee44f (diff) | |
Merge "Fix cloudpipe keypair creation. Add pipelib tests"
Diffstat (limited to 'nova/cloudpipe')
| -rw-r--r-- | nova/cloudpipe/pipelib.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/nova/cloudpipe/pipelib.py b/nova/cloudpipe/pipelib.py index 6926978fc..6a772eb63 100644 --- a/nova/cloudpipe/pipelib.py +++ b/nova/cloudpipe/pipelib.py @@ -26,8 +26,6 @@ import os import string import zipfile -# NOTE(vish): cloud is only for the _gen_key functionality -from nova.api.ec2 import cloud from nova import compute from nova.compute import instance_types from nova import crypto @@ -146,7 +144,10 @@ class CloudPipe(object): def setup_key_pair(self, context): key_name = '%s%s' % (context.project_id, FLAGS.vpn_key_suffix) try: - result = cloud._gen_key(context, context.user_id, key_name) + keypair_api = compute.api.KeypairAPI() + result = keypair_api.create_key_pair(context, + context.user_id, + key_name) private_key = result['private_key'] key_dir = os.path.join(FLAGS.keys_path, context.user_id) if not os.path.exists(key_dir): |
