diff options
| author | Jenkins <jenkins@review.openstack.org> | 2013-04-01 21:55:14 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2013-04-01 21:55:14 +0000 |
| commit | d3dcc22cef5d3e037195abcd97e7473f3dd18b4e (patch) | |
| tree | 95e32f54e32137575d91a87c60bd6681616c804c /nova/compute | |
| parent | c8067d1b700267cea74cba4836232527a612c5d8 (diff) | |
| parent | 0ae598b1a7a92755fd0fcc2685816414fb6f47b0 (diff) | |
Merge "Return 409 on creating/importing same name keypair"
Diffstat (limited to 'nova/compute')
| -rw-r--r-- | nova/compute/api.py | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/nova/compute/api.py b/nova/compute/api.py index 8b75613d2..17851b150 100644 --- a/nova/compute/api.py +++ b/nova/compute/api.py @@ -2718,13 +2718,6 @@ class KeypairAPI(base.Base): msg = _('Keypair name must be between 1 and 255 characters long') raise exception.InvalidKeypair(explanation=msg) - # NOTE: check for existing keypairs of same name - try: - self.db.key_pair_get(context, user_id, key_name) - raise exception.KeyPairExists(key_name=key_name) - except exception.NotFound: - pass - def import_key_pair(self, context, user_id, key_name, public_key): """Import a key pair using an existing public key.""" self._validate_keypair_name(context, user_id, key_name) @@ -2767,7 +2760,6 @@ class KeypairAPI(base.Base): 'public_key': public_key, 'private_key': private_key} self.db.key_pair_create(context, keypair) - return keypair def delete_key_pair(self, context, user_id, key_name): |
