update Key admin
diff --git a/plstackapi/core/api/keys.py b/plstackapi/core/api/keys.py
index 42ffe46..ad54041 100644
--- a/plstackapi/core/api/keys.py
+++ b/plstackapi/core/api/keys.py
@@ -27,6 +27,7 @@
nova_fields = {'name': key.name,
'key': key.key}
nova_key = driver.create_keypair(**nova_fields)
+ key.key_id = nova_key.id
key.save()
return key
@@ -37,7 +38,7 @@
driver = OpenStackDriver(client = auth_check(auth))
keys = _get_keys(filter)
for key in keys:
- driver.delete_keypair(name=key.name)
+ driver.delete_keypair(id=key.key_id)
key.delete()
return 1